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

2005/07/08 slabtop, /proc/slabinfo


Some material is very old and may be incorrect today

© July 2005 Tony Lawrence

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.

.

If you found something useful today, please consider a small donation.



Got something to add? Send me email.





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

Printer Friendly Version

->
-> slabtop, /proc/slabinfo


Inexpensive and informative Apple related e-books:

Take Control of OS X Server

iOS 10: A Take Control Crash Course

Take Control of Upgrading to El Capitan

iOS 8: A Take Control Crash Course

Take Control of Numbers





More Articles by © Tony Lawrence





Printer Friendly Version

Have you tried Searching this site?

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


Printer Friendly Version





Principles have no real force except when one is well-fed. (Mark Twain)




Linux posts

Troubleshooting posts


This post tagged:

Kernel

Linux

Unix



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode