1 .\" Copyright (c) 2001 Andreas Dilger (adilger@turbolinux.com)
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date. The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein. The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
25 .\" FIXME Over time, the slabinfo format has gone through
26 .\" version changes. These should be documented:
28 .\" slabinfo 1.0 - Linux 2.2 (precisely: 2.1.23)
29 .\" slabinfo 1.1 - Linux 2.4 (precisely: 2.4.0-test3)
30 .\" slabinfo 1.2 - Linux 2.5.45
31 .\" slabinfo 2.0 - Linux 2.6 (precisely: 2.5.71)
32 .\" slabinfo 2.1 - Linux 2.6.10
34 .TH SLABINFO 5 2007-09-30 "" "Linux Programmer's Manual"
36 /proc/slabinfo \- kernel slab allocator statistics
40 Frequently used objects in the Linux kernel
41 (buffer heads, inodes, dentries, etc.)
51 slabinfo \- version: 1.1
52 kmem_cache 60 78 100 2 2 1
53 blkdev_requests 5120 5120 96 128 128 1
54 mnt_cache 20 40 96 1 1 1
55 inode_cache 7005 14792 480 1598 1849 1
56 dentry_cache 5469 5880 128 183 196 1
57 filp 726 760 96 19 19 1
58 buffer_head 67131 71240 96 1776 1781 1
59 vm_area_struct 1204 1652 64 23 28 1
61 size-8192 1 17 8192 1 17 2
62 size-4096 41 73 4096 41 73 1
67 For each slab cache, the cache name, the number of currently
68 active objects, the total number of available objects, the
69 size of each object in bytes, the number of pages with at
70 least one active object, the total number of allocated pages,
71 and the number of pages per slab are given.
73 Note that because of object alignment and slab cache overhead,
74 objects are not normally packed tightly into pages.
75 Pages with even one in-use object are considered in-use and cannot be
78 Kernels compiled with slab cache statistics will also have
79 "(statistics)" in the first line of output, and will have 5
80 additional columns, namely: the high water mark of active
81 objects; the number of times objects have been allocated;
82 the number of times the cache has grown (new pages added
83 to this cache); the number of times the cache has been
84 reaped (unused pages removed from this cache); and the
85 number of times there was an error allocating new pages
87 If slab cache statistics are not enabled
88 for this kernel, these columns will not be shown.
90 SMP systems will also have "(SMP)" in the first line of
91 output, and will have two additional columns for each slab,
92 reporting the slab allocation policy for the CPU-local
93 cache (to reduce the need for inter-CPU synchronization
94 when allocating objects from the cache).
95 The first column is the per-CPU limit: the maximum number of objects that
96 will be cached for each CPU.
97 The second column is the
98 batchcount: the maximum number of free objects in the
99 global cache that will be transferred to the per-CPU cache
100 if it is empty, or the number of objects to be returned
101 to the global cache if the per-CPU cache is full.
103 If both slab cache statistics and SMP are defined, there
104 will be four additional columns, reporting the per-CPU
106 The first two are the per-CPU cache
107 allocation hit and miss counts: the number of times an
108 object was or was not available in the per-CPU cache
110 The next two are the per-CPU cache free
111 hit and miss counts: the number of times a freed object
112 could or could not fit within the per-CPU cache limit,
113 before flushing objects to the global cache.
115 It is possible to tune the SMP per-CPU slab cache limit
120 echo "\fIcache_name limit batchcount\fP" > /proc/slabinfo
127 exists since Linux 2.1.23.
128 SMP per-CPU caches exist since Linux 2.4.0-test3.
130 Since Linux 2.6.16 the file
132 is present only if the
134 kernel configuration option is enabled.