]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man5/slabinfo.5
ffix
[thirdparty/man-pages.git] / man5 / slabinfo.5
CommitLineData
fea681da
MK
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
29Frequently used objects in the Linux kernel
30(buffer heads, inodes, dentries, etc.)
31have their own cache. The file
32.I /proc/slabinfo
33gives statistics. For example:
34.LP
35.RS
36.nf
37% cat /proc/slabinfo
2bc2f479 38slabinfo \- version: 1.1
fea681da
MK
39kmem_cache 60 78 100 2 2 1
40blkdev_requests 5120 5120 96 128 128 1
41mnt_cache 20 40 96 1 1 1
42inode_cache 7005 14792 480 1598 1849 1
43dentry_cache 5469 5880 128 183 196 1
44filp 726 760 96 19 19 1
45buffer_head 67131 71240 96 1776 1781 1
46vm_area_struct 1204 1652 64 23 28 1
47\&...
48size-8192 1 17 8192 1 17 2
49size-4096 41 73 4096 41 73 1
50\&...
51.fi
52.RE
53.LP
54For each slab cache, the cache name, the number of currently
55active objects, the total number of available objects, the
56size of each object in bytes, the number of pages with at
57least one active object, the total number of allocated pages,
58and the number of pages per slab are given.
59
60Note that because of object alignment and slab cache overhead,
61objects are not normally packed tightly into pages. Pages with
62even one in-use object are considered in-use and cannot be
63freed.
64
65Kernels compiled with slab cache statistics will also have
66"(statistics)" in the first line of output, and will have 5
67additional columns, namely: the high water mark of active
68objects; the number of times objects have been allocated;
69the number of times the cache has grown (new pages added
70to this cache); the number of times the cache has been
71reaped (unused pages removed from this cache); and the
72number of times there was an error allocating new pages
73to this cache. If slab cache statistics are not enabled
74for this kernel, these columns will not be shown.
75
76SMP systems will also have "(SMP)" in the first line of
77output, and will have two additional columns for each slab,
78reporting the slab allocation policy for the CPU-local
79cache (to reduce the need for inter-CPU synchronization
80when allocating objects from the cache). The first column
81is the per-CPU limit: the maximum number of objects that
82will be cached for each CPU. The second column is the
83batchcount: the maximum number of free objects in the
84global cache that will be transferred to the per-CPU cache
85if it is empty, or the number of objects to be returned
86to the global cache if the per-CPU cache is full.
87
88If both slab cache statistics and SMP are defined, there
89will be four additional columns, reporting the per-CPU
90cache statistics. The first two are the per-CPU cache
91allocation hit and miss counts: the number of times an
92object was or was not available in the per-CPU cache
93for allocation. The next two are the per-CPU cache free
94hit and miss counts: the number of times a freed object
95could or could not fit within the per-CPU cache limit,
96before flushing objects to the global cache.
97
98It is possible to tune the SMP per-CPU slab cache limit
99and batchcount via:
100
101.nf
102echo "\fIcache_name limit batchcount\fP" > /proc/slabinfo
103.fi
fea681da
MK
104.SH AVAILABILITY
105.I /proc/slabinfo
106exists since Linux 2.1.23.
107SMP per-CPU caches exist since Linux 2.4.0-test3.
fea681da
MK
108.SH FILES
109.I <linux/slab.h>