]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man5/slabinfo.5
Renamed .SH AVAILABILITY to .SH VERSIONS
[thirdparty/man-pages.git] / man5 / slabinfo.5
1 .\" Copyright (c) 2001 Andreas Dilger (adilger@turbolinux.com)
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date. The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein. The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .TH SLABINFO 5 2001-06-19 "" "Linux manual"
24 .SH NAME
25 /proc/slabinfo \- Kernel slab allocator statistics
26 .SH SYNOPSIS
27 .B cat /proc/slabinfo
28 .SH DESCRIPTION
29 Frequently used objects in the Linux kernel
30 (buffer heads, inodes, dentries, etc.)
31 have their own cache.
32 The file
33 .I /proc/slabinfo
34 gives statistics.
35 For example:
36 .LP
37 .RS
38 .nf
39 % cat /proc/slabinfo
40 slabinfo \- version: 1.1
41 kmem_cache 60 78 100 2 2 1
42 blkdev_requests 5120 5120 96 128 128 1
43 mnt_cache 20 40 96 1 1 1
44 inode_cache 7005 14792 480 1598 1849 1
45 dentry_cache 5469 5880 128 183 196 1
46 filp 726 760 96 19 19 1
47 buffer_head 67131 71240 96 1776 1781 1
48 vm_area_struct 1204 1652 64 23 28 1
49 \&...
50 size-8192 1 17 8192 1 17 2
51 size-4096 41 73 4096 41 73 1
52 \&...
53 .fi
54 .RE
55 .LP
56 For each slab cache, the cache name, the number of currently
57 active objects, the total number of available objects, the
58 size of each object in bytes, the number of pages with at
59 least one active object, the total number of allocated pages,
60 and the number of pages per slab are given.
61
62 Note that because of object alignment and slab cache overhead,
63 objects are not normally packed tightly into pages.
64 Pages with
65 even one in-use object are considered in-use and cannot be
66 freed.
67
68 Kernels compiled with slab cache statistics will also have
69 "(statistics)" in the first line of output, and will have 5
70 additional columns, namely: the high water mark of active
71 objects; the number of times objects have been allocated;
72 the number of times the cache has grown (new pages added
73 to this cache); the number of times the cache has been
74 reaped (unused pages removed from this cache); and the
75 number of times there was an error allocating new pages
76 to this cache.
77 If slab cache statistics are not enabled
78 for this kernel, these columns will not be shown.
79
80 SMP systems will also have "(SMP)" in the first line of
81 output, and will have two additional columns for each slab,
82 reporting the slab allocation policy for the CPU-local
83 cache (to reduce the need for inter-CPU synchronization
84 when allocating objects from the cache).
85 The first column is the per-CPU limit: the maximum number of objects that
86 will be cached for each CPU.
87 The second column is the
88 batchcount: the maximum number of free objects in the
89 global cache that will be transferred to the per-CPU cache
90 if it is empty, or the number of objects to be returned
91 to the global cache if the per-CPU cache is full.
92
93 If both slab cache statistics and SMP are defined, there
94 will be four additional columns, reporting the per-CPU
95 cache statistics.
96 The first two are the per-CPU cache
97 allocation hit and miss counts: the number of times an
98 object was or was not available in the per-CPU cache
99 for allocation.
100 The next two are the per-CPU cache free
101 hit and miss counts: the number of times a freed object
102 could or could not fit within the per-CPU cache limit,
103 before flushing objects to the global cache.
104
105 It is possible to tune the SMP per-CPU slab cache limit
106 and batchcount via:
107
108 .nf
109 echo "\fIcache_name limit batchcount\fP" > /proc/slabinfo
110 .fi
111 .SH VERSIONS
112 .I /proc/slabinfo
113 exists since Linux 2.1.23.
114 SMP per-CPU caches exist since Linux 2.4.0-test3.
115 .SH FILES
116 .I <linux/slab.h>