slabinfo(5)
๐ slabinfo โ bestie's guide to kernel slab allocator statistics โจ
okay so like, slabinfo is the manual page (it's in section 5, the file formats girlies) all about /proc/slabinfo โ which is literally the receipt for everything the kernel's slab allocator is doing. no cap. let's get into it ๐ซถ
โจ SYNOPSIS โจ
cat /proc/slabinfo
that's it. that's the whole vibe. ๐
๐ธ DESCRIPTION ๐ธ
so the tea is: all the objects the Linux kernel uses constantly โ buffer heads, inodes, dentries, etc. โ get their own little cache to live in. and the file /proc/slabinfo is where you go to read the statistics on all those caches. it's giving open-book exam ๐
here's a little (edited) peek at what's inside:
$ 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
...
first line of output = the version number, so an application reading the file can stay chill when the format changes. (scroll down to VERSIONS if you're nosy ๐)
second line = the column names for everything below it.
every line after that = one specific cache, and after the cache name you get three components:
- statistics
- tunables
- slabdata
๐ the statistics, explained
active_objsโ how many objects are currently active, aka actually in use. the main characters ๐num_objsโ the total number of allocated objects, meaning the in-use ones plus the not-in-use ones. everyone invited to the party.objsizeโ size of the objects in this slab, in bytes.objperslabโ how many objects get stored in each slab.pagesperslabโ how many pages get allocated for each slab.
๐๏ธ the tunables, explained
these show the tunable parameters for that cache. here's the important part bestie:
when you're on the default SLUB allocator, there are no tunables, the/proc/slabinfofile is not writable, and these fields just show the value0. that's normal, don't panic. ๐ง
when you're on the older SLAB allocator, you can set the tunables for a particular cache by writing lines shaped like this into /proc/slabinfo:
# echo 'name limit batchcount sharedfactor' > /proc/slabinfo;
breakdown: name is the cache name, and limit, batchcount, and sharedfactor are integers defining the new values for the corresponding tunables. the rules, fr fr:
limitshould be a positive valuebatchcountshould be a positive value that is less than or equal tolimitsharedfactorshould be nonnegative
and if any of the specified values is invalid? the cache settings are just left unchanged. no harm, no foul. ๐
the tunables fields in each line are:
limitโ the maximum number of objects that will be cached.batchcountโ on SMP systems, this specifies the number of objects to transfer at one time when refilling the available object list.sharedfactorโ[To be documented]๐ (yes really, that's what it says, i don't make the rules)
๐งฑ the slabdata, explained
active_slabsโ the number of active slabs.nums_slabsโ the total number of slabs.sharedavailโ[To be documented](again. iconic of them honestly)
heads up: because of object alignment and slab cache overhead, objects are not normally packed tightly into pages. and pages with even one in-use object count as in-use and cannot be freed. so like, a page with one lonely little guy in it is still fully committed. ๐ญ
also! kernels configured with CONFIG_DEBUG_SLAB get extra statistics fields in each line, and the first line of the file will contain the string "(statistics)". those extra statistics include:
- the high water mark of active objects
- the number of times objects have been allocated
- the number of times the cache has grown (new pages added to this cache)
- the number of times the cache has been reaped (unused pages removed from this cache)
- the number of times there was an error allocating new pages to this cache
very detective of them ๐
๐ฆ VERSIONS ๐ฆ
/proc/slabinfo first appeared in Linux 2.1.23. it's versioned, and over time there have been a bunch of versions with different layouts โ a whole glow-up timeline:
1.0โ present throughout the Linux 2.2.x kernel series.1.1โ present in the Linux 2.4.x kernel series.1.2โ a format that was briefly present in the Linux 2.5 development series.2.0โ present in Linux 2.6.x kernels up to and including Linux 2.6.9.2.1โ the current format, which first appeared in Linux 2.6.10. ๐
๐ NOTES ๐
- only root can read โ and, if the kernel was configured with
CONFIG_SLAB, write โ the/proc/slabinfofile. sorry bestie, it's a VIP section. - the total amount of memory allocated to the SLAB/SLUB cache is shown in the
Slabfield of/proc/meminfo.
๐ SEE ALSO ๐
slabtop(1)- the kernel source file
Documentation/mm/slab.rstandtools/mm/slabinfo.c
and that's the whole page, bestie!! you ate that. ๐โจ this was written by the Linux man-pages 6.20 girlies, dated 2026-02-08 โ mwah, slay, periodt. ๐ ๐
๐ฆ where this page comes from
- arch rolling: man-pages 6.20-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- ๐ the page's license: Linux-man-pages-copyleft
- Copyright 2001, Andreas Dilger <adilger@turbolinux.com>
- Copyright 2017, Michael Kerrisk <mtk.manpages@gmail.com>
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms