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?

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,

apache 2.2 - Server Potentially Compromised -- c99madshell

So, low and behold, a legacy site we've been hosting for a client had a version of FCKEditor that allowed someone to upload the dreaded c99madshell exploit onto our web host. I'm not a big security buff -- frankly I'm just a dev currently responsible for S/A duties due to a loss of personnel. Accordingly, I'd love any help you server-faulters could provide in assessing the damage from the exploit. To give you a bit of information: The file was uploaded into a directory within the webroot, "/_img/fck_uploads/File/". The Apache user and group are restricted such that they can't log in and don't have permissions outside of the directory from which we serve sites. All the files had 770 permissions (user rwx, group rwx, other none) -- something I wanted to fix but was told to hold off on as it wasn't "high priority" (hopefully this changes that). So it seems the hackers could've easily executed the script. Now I wasn't able