|SLABINFO(5)||Linux Programmer's Manual||SLABINFO(5)|
$ sudo cat /proc/slabinfo slabinfo - version: 2.1 # name <active_objs> <num_objs> <objsize> <objperslab> <pagesperslab> ... sigqueue 100 100 160 25 1 : tunables 0 0 0 : slabdata 4 4 0 sighand_cache 355 405 2112 15 8 : tunables 0 0 0 : slabdata 27 27 0 kmalloc-8192 96 96 8192 4 8 : tunables 0 0 0 : slabdata 24 24 0 ...
The first line of output includes a version number, which allows an application that is reading the file to handle changes in the file format. (See VERSIONS, below.) The next line lists the names of the columns in the remaining lines. Each of the remaining lines displays information about a specified cache. Following the cache name, the output shown in each line shows three components for each cache:
- The number of objects that are currently active (i.e., in use).
- The total number of allocated objects (i.e., objects that are both in use and not in use).
- The size of objects in this slab, in bytes.
- The number of objects stored in each slab.
- The number of pages allocated for each slab.
# echo 'name limit batchcount sharedfactor' > /proc/slabinfo
Here, name is the cache name, and limit, batchcount, and sharedfactor are integers defining new values for the corresponding tunables. The limit value should be a positive value, batchcount should be a positive value that is less than or equal to limit, and sharedfactor should be nonnegative. If any of the specified values is invalid, the cache settings are left unchanged. The tunables entries in each line contain the following fields:
- The maximum number of objects that will be cached.
- On SMP systems, this specifies the number of objects to transfer at one time when refilling the available object list.
- [To be documented]
- The number of active slabs.
- The total number of slabs.
- [To be documented]
- Present throughout the Linux 2.2.x kernel series.
- Present in the Linux 2.4.x kernel series.
- A format that was briefly present in the Linux 2.5 development series.
- Present in Linux 2.6.x kernels up to and including Linux 2.6.9.
- The current format, which first appeared in Linux 2.6.10.