APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

2005/07/08 slabtop, /proc/slabinfo

If you ever noticed /proc/slabinfo, its contents surely mystified you. That documentation is as geeky as it gets. There's a "slabtop" command that supposedly makes it more comprehensible but probably does not. Basically, it's information about internal kernel caches. "Slabs" are small allocations of memory, less than a page or not a multiple of page size. The kernel needs a lot of these odd sized chunks for caches.

I first came across mention of /proc/slabinfo in a performance tuning book, which suggested that the statistics here could be useful in determining where your kernel is using too much memory. Of course that's true, but unless you have a baseline for comparison, you wouldn't know what's normal and what isn't. For example, here's part of "slabtop" on a 2.6 webserver:


223533 221207  98%    0.14K   8279       27     33116K dentry_cache
165902 165870  99%    0.34K  15082       11     60328K linvfs_icache
165902 165870  99%    0.36K  15082       11     60328K xfs_inode
 48636  39464  81%    0.27K   3474       14     13896K radix_tree_node
 37976  37493  98%    0.46K   4747        8     18988K ext3_inode_cache
 23550  20517  87%    0.05K    314       75      1256K buffer_head
  5734   5658  98%    0.08K    122       47       488K vm_area_struct
 

Obviously the biggest kernel caches here are for directory entries (dentry_cache). That probably makes sense; I guess I'd expect directory caches to be much higher than tcp related caches. But again, unless I had experience and knowledge of what's normal here, this doesn't help me.

You can find a few interesting threads that mention this by Googling "slabinfo tuning", but the few I looked at were disappointing and didn't enlighten me much.

.

Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> -> slabtop, /proc/slabinfo



Increase ad revenue 50-250% with Ezoic


More Articles by

Find me on Google+

© Tony Lawrence



Kerio Samepage


Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us





Generally, old media don't die. They just have to grow old gracefully. Guess what, we still have stone masons. They haven't been the primary purveyors of the written word for a while now of course, but they still have a role because you wouldn't want a TV screen on your headstone. (Douglas Adams)





This post tagged: