Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm investigating some application issues on a Linux system and noticed this around the time of the most recent problem, but not close enough to be definitively related:

Jun  7 17:51:49 localhost kernel: shrink_slab: nr=-155456000
Jun  7 17:51:49 localhost kernel: shrink_slab: nr=-157859400
Jun  7 17:51:49 localhost kernel: shrink_slab: nr=-157833400
Jun  8 06:20:23 localhost kernel: shrink_slab: nr=-284172800

What is this? Googling isn't helping, I get that it's something with VM, but why is it suddenly showing up in /var/log/messages?

Edit: I take it it's showing this because the number of pages it could free ("nr") is negative. Which is presumably a bad thing. I found patches for newer kernels that display a more useful message to this effect. Still not sure what this means though, or what I need to do about it.

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

Your message is generated by the slab allocator, the mechanism used by the Linux kernel to manage the portion of memory it needs for itself (not for user space processes). Originally it was written by Jeff Bonwick for Solaris, and it's probably easiest to understand by reading Bonwick(94) (PDF).

If you are wondering about the name, in his blog Bonwick eventually revealed the story behind it.

When you're looking at the Linux specifics, the article Anatomy of the Linux slab allocator should cover that. If you want to understand management of user-space memory as well, Mel Gorman, Understanding the Linux Virtual Memory Manager gives even more detail.

For German speaking readers, there's an excellent introduction in the German Wikipedia Article on the slab allocator.

share|improve this answer
    
Fascinating links, thank you! I especially enjoyed reading about "grab a slab". So I take it the messages I'm seeing indicate normal activity, but any ideas why it's showing up now? I've never seen it before. –  Steve Kehlet Jun 8 '12 at 20:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.