version 1 showing authors affecting page license.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
SLABINFO |
|
|
2 |
!!!SLABINFO |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
AVAILABILITY |
|
|
7 |
FILES |
|
|
8 |
---- |
|
|
9 |
!!NAME |
|
|
10 |
|
|
|
11 |
|
|
|
12 |
/proc/slabinfo - Kernel slab allocator statistics |
|
|
13 |
!!SYNOPSIS |
|
|
14 |
|
|
|
15 |
|
|
|
16 |
__cat /proc/slabinfo__ |
|
|
17 |
!!DESCRIPTION |
|
|
18 |
|
|
|
19 |
|
|
|
20 |
Frequently used objects in the Linux kernel (buffer heads, |
|
|
21 |
inodes, dentries, etc) have their own cache. The file |
|
|
22 |
''/proc/slabinfo'' gives statistics. For |
|
|
23 |
example |
|
|
24 |
|
|
|
25 |
|
|
|
26 |
% cat /proc/slabinfo |
|
|
27 |
slabinfo - version: 1.1 |
|
|
28 |
kmem_cache 60 78 100 2 2 1 |
|
|
29 |
blkdev_requests 5120 5120 96 128 128 1 |
|
|
30 |
mnt_cache 20 40 96 1 1 1 |
|
|
31 |
inode_cache 7005 14792 480 1598 1849 1 |
|
|
32 |
dentry_cache 5469 5880 128 183 196 1 |
|
|
33 |
filp 726 760 96 19 19 1 |
|
|
34 |
buffer_head 67131 71240 96 1776 1781 1 |
|
|
35 |
vm_area_struct 1204 1652 64 23 28 1 |
|
|
36 |
... |
|
|
37 |
size-8192 1 17 8192 1 17 2 |
|
|
38 |
size-4096 41 73 4096 41 73 1 |
|
|
39 |
... |
|
|
40 |
|
|
|
41 |
|
|
|
42 |
For each slab cache the cache name, the number of currently |
|
|
43 |
active objects, the total number of available objects, the |
|
|
44 |
size of each object in bytes, the number of pages with at |
|
|
45 |
least one active object, the total number of allocated |
|
|
46 |
pages, and the number of pages per slab are |
|
|
47 |
given. |
|
|
48 |
|
|
|
49 |
|
|
|
50 |
Note that because of object alignment and slab cache |
|
|
51 |
overhead, objects are not normally packed tightly into |
|
|
52 |
pages. Pages with even one in-use object are considered |
|
|
53 |
in-use and cannot be freed. |
|
|
54 |
|
|
|
55 |
|
|
|
56 |
Kernels compiled with slab cache statistics will also have |
|
|
57 |
|
|
|
58 |
|
|
|
59 |
SMP systems will also have |
|
|
60 |
|
|
|
61 |
|
|
|
62 |
If both slab cache statistics and SMP are defined, there |
|
|
63 |
will be four additional columns, reporting the per-CPU cache |
|
|
64 |
statistics. The first two are the per-CPU cache allocation |
|
|
65 |
hit and miss counts: the number of times an object was or |
|
|
66 |
was not available in the per-CPU cache for allocation. The |
|
|
67 |
next two are the per-CPU cache free hit and miss counts: the |
|
|
68 |
number of times a freed object could or could not fit within |
|
|
69 |
the per-CPU cache limit, before flushing objects to the |
|
|
70 |
global cache. |
|
|
71 |
|
|
|
72 |
|
|
|
73 |
It is possible to tune the SMP per-CPU slab cache limit and |
|
|
74 |
batchcount via: |
|
|
75 |
|
|
|
76 |
|
|
|
77 |
echo cache_name limit batchcount'' |
|
|
78 |
'' |
|
|
79 |
!!AVAILABILITY |
|
|
80 |
|
|
|
81 |
|
|
|
82 |
''/proc/slabinfo'' exists since Linux 2.1.23. SMP per-CPU |
|
|
83 |
caches exist since Linux 2.4.0-test3. |
|
|
84 |
!!FILES |
|
|
85 |
|
|
|
86 |
|
|
|
87 |
'''' |
|
|
88 |
---- |