Skip to main content

debian - Slab uses 88Gb of 128Gb available. What could cause this?




We run a debian 2.6.26-2-amd64 x86_64 GNU/Linux on a server with 128 Gb. Recently it our available memory became rather low. Looking at the /proc/meminfo showed that the Slab was using 88Gb, which is counted in the used memory off course.




  1. Is this a problem? I suspect that memory will be freed when necessary, but I don't know if that could have unwanted side effects.

  2. Why would Slab need that much memory? Is there a clear cause for that?

  3. can we avoid this to happen in the future?

  4. How can we free this memory?



thank you in advance




> cat /proc/meminfo
MemTotal: 132304500 kB
MemFree: 26669388 kB
Buffers: 237504 kB
Cached: 11881136 kB
SwapCached: 48 kB
Active: 5244640 kB
Inactive: 11714308 kB
SwapTotal: 5751228 kB

SwapFree: 5750436 kB
Dirty: 24 kB
Writeback: 0 kB
AnonPages: 4840256 kB
Mapped: 163968 kB
Slab: 88314840 kB
SReclaimable: 88275644 kB
SUnreclaim: 39196 kB
PageTables: 80852 kB
NFS_Unstable: 0 kB

Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 71903476 kB
Committed_AS: 6818332 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 505724 kB
VmallocChunk: 34359231963 kB

Answer



Are you absolutely certain this is an actual problem: used RAM is not the same as unavailable ram (See i.e. this ServerFault question on free/buffers/cache), the reflex of wanting to have memory listed as free is often wrong.




Slab isn't one specific thing, it's one of the memory allocators within the kernel, in particular slab lets the kernel manage objects which aren't page-sized (as pointed out elsewhere /proc/slabinfo and slabtop should give you some indication of what it's currently holding on to). Some more background on slab can be found here



If you see the SReclaimable below Slab, it's of the opinion that almost all the memory allocated by slab can be reclaimed when/if needed. So, yes, memory will be freed when necessary. The incidental cost of reclaiming are paying some deferred bookkeeping-costs in cpu-cycles.



I'm not sure if slab strictly speaking need all that memory, it'll in a lot of cases retain initialized objects for later use (saving initialization), some of it are various caches, most of this is are probably beneficial (I.e. effects of filesystem-caches are immense).



If you want to control the behavior of the vmm, check out /proc/sys/vm, in particular min_slab_ratio might be of interest. You can also limit individual slab-caches through /proc/slabinfo (see the ibm developerworks article for details). Although, before you start turning on the vmm and slab: Figure out what you actually want to accomplish, and do some research on the vmm and how it can be tuned to fit your workload(s). It's quite possible to break your system both subtly and spectacularly by playing around with vmm tuning-knobs.


Comments

Popular posts from this blog

linux - iDRAC6 Virtual Media native library cannot be loaded

When attempting to mount Virtual Media on a iDRAC6 IP KVM session I get the following error: I'm using Ubuntu 9.04 and: $ javaws -version Java(TM) Web Start 1.6.0_16 $ uname -a Linux aud22419-linux 2.6.28-15-generic #51-Ubuntu SMP Mon Aug 31 13:39:06 UTC 2009 x86_64 GNU/Linux $ firefox -version Mozilla Firefox 3.0.14, Copyright (c) 1998 - 2009 mozilla.org On Windows + IE it (unsurprisingly) works. I've just gotten off the phone with the Dell tech support and I was told it is known to work on Linux + Firefox, albeit Ubuntu is not supported (by Dell, that is). Has anyone out there managed to mount virtual media in the same scenario?

ubuntu - Monitoring CPU, Mem, disk, on a single server

I've been looking for a simple starter solution for monitoring my [currently] single server hosted solution. Other than Nagios and similar, are there other good (simple) solutions people are using? Answer Everything depends on what you want. For example Munin is very simple, you can install and configure it in less then 10 minutes (on one server), it can sends alarms, make graphs from monitoring cpu, mem. apache connections, eaccellerator, disk io and many many more (it has many plugins). But if you are planning in future get some more machines, munin may not be enough. For example in munin you cant monitor state of individual processes, can't monitor changes in files (for security purpose). So if you wanna only see what is the utilization of basics parameters on your server and don't plan to buy some more servers Munin is what you are looking for, but if you wanna be alarmed when some of your service is down, take more control on what is happeninig on...

hp proliant - Smart Array P822 with HBA Mode?

We get an HP DL360 G8 with an Smart Array P822 controller. On that controller will come a HP StorageWorks D2700 . Does anybody know, that it is possible to run the Smart Array P822 in HBA mode? I found only information about the P410i, who can run HBA. If this is not supported, what you think about the LSI 9207-8e controller? Will this fit good in that setup? The Hardware we get is used but all original from HP. The StorageWorks has 25 x 900 GB SAS 10K disks. Because the disks are not new I would like to use only 22 for raid6, and the rest for spare (I need to see if the disk count is optimal or not for zfs). It would be nice if I'm not stick to SAS in future. As OS I would like to install debian stretch with zfs 0.71 as file system and software raid. I have see that hp has an page for debian to. I would like to use hba mode because it is recommend, that zfs know at most as possible about the disk, and I'm independent from the raid controller. For us zfs have many benefits, ...