]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man5/slabinfo.5
intro.1, _exit.2, access.2, alarm.2, alloc_hugepages.2, arch_prctl.2, bind.2, chdir...
[thirdparty/man-pages.git] / man5 / slabinfo.5
CommitLineData
fea681da
MK
1.\" Copyright (c) 2001 Andreas Dilger (adilger@turbolinux.com)
2.\"
93015253 3.\" %%%LICENSE_START(VERBATIM)
fea681da
MK
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.
7.\"
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.
12.\"
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
19.\" professionally.
20.\"
21.\" Formatted or processed versions of this manual, if unaccompanied by
22.\" the source, must acknowledge the copyright and authors of this work.
4b72fb64 23.\" %%%LICENSE_END
fea681da 24.\"
de54b4ec
MK
25.\" FIXME Over time, the slabinfo format has gone through
26.\" version changes. These should be documented:
27.\"
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
4eaa04c5 33.\"
350038ff 34.TH SLABINFO 5 2007-09-30 "" "Linux Programmer's Manual"
fea681da 35.SH NAME
f68512e9 36/proc/slabinfo \- kernel slab allocator statistics
fea681da
MK
37.SH SYNOPSIS
38.B cat /proc/slabinfo
39.SH DESCRIPTION
40Frequently used objects in the Linux kernel
41(buffer heads, inodes, dentries, etc.)
c13182ef
MK
42have their own cache.
43The file
fea681da 44.I /proc/slabinfo
c13182ef
MK
45gives statistics.
46For example:
fea681da 47.LP
a6e2f128 48.in +4n
fea681da
MK
49.nf
50% cat /proc/slabinfo
2bc2f479 51slabinfo \- version: 1.1
fea681da
MK
52kmem_cache 60 78 100 2 2 1
53blkdev_requests 5120 5120 96 128 128 1
54mnt_cache 20 40 96 1 1 1
55inode_cache 7005 14792 480 1598 1849 1
56dentry_cache 5469 5880 128 183 196 1
57filp 726 760 96 19 19 1
58buffer_head 67131 71240 96 1776 1781 1
59vm_area_struct 1204 1652 64 23 28 1
60\&...
61size-8192 1 17 8192 1 17 2
62size-4096 41 73 4096 41 73 1
63\&...
64.fi
a6e2f128 65.in
fea681da
MK
66.LP
67For each slab cache, the cache name, the number of currently
68active objects, the total number of available objects, the
69size of each object in bytes, the number of pages with at
70least one active object, the total number of allocated pages,
71and the number of pages per slab are given.
72
73Note that because of object alignment and slab cache overhead,
c13182ef 74objects are not normally packed tightly into pages.
350038ff 75Pages with even one in-use object are considered in-use and cannot be
fea681da
MK
76freed.
77
78Kernels compiled with slab cache statistics will also have
79"(statistics)" in the first line of output, and will have 5
80additional columns, namely: the high water mark of active
81objects; the number of times objects have been allocated;
82the number of times the cache has grown (new pages added
83to this cache); the number of times the cache has been
84reaped (unused pages removed from this cache); and the
85number of times there was an error allocating new pages
c13182ef
MK
86to this cache.
87If slab cache statistics are not enabled
fea681da
MK
88for this kernel, these columns will not be shown.
89
90SMP systems will also have "(SMP)" in the first line of
91output, and will have two additional columns for each slab,
92reporting the slab allocation policy for the CPU-local
93cache (to reduce the need for inter-CPU synchronization
c13182ef
MK
94when allocating objects from the cache).
95The first column is the per-CPU limit: the maximum number of objects that
96will be cached for each CPU.
97The second column is the
fea681da
MK
98batchcount: the maximum number of free objects in the
99global cache that will be transferred to the per-CPU cache
100if it is empty, or the number of objects to be returned
101to the global cache if the per-CPU cache is full.
102
103If both slab cache statistics and SMP are defined, there
104will be four additional columns, reporting the per-CPU
c13182ef
MK
105cache statistics.
106The first two are the per-CPU cache
fea681da
MK
107allocation hit and miss counts: the number of times an
108object was or was not available in the per-CPU cache
c13182ef
MK
109for allocation.
110The next two are the per-CPU cache free
fea681da
MK
111hit and miss counts: the number of times a freed object
112could or could not fit within the per-CPU cache limit,
113before flushing objects to the global cache.
114
115It is possible to tune the SMP per-CPU slab cache limit
116and batchcount via:
117
a6e2f128 118.in +4n
fea681da
MK
119.nf
120echo "\fIcache_name limit batchcount\fP" > /proc/slabinfo
121.fi
a6e2f128 122.in
2b2581ee
MK
123.SH FILES
124.I <linux/slab.h>
a759cc87 125.SH VERSIONS
fea681da
MK
126.I /proc/slabinfo
127exists since Linux 2.1.23.
128SMP per-CPU caches exist since Linux 2.4.0-test3.
350038ff 129.SH NOTES
38f76cd2
MK
130Since Linux 2.6.16 the file
131.I /proc/slabinfo
7eb32f00
MK
132is only present if the
133.B CONFIG_SLAB
134kernel configuration option is enabled.