1

My SLAB unreclaimable memory (SUnreclaim) grows without bounds and this appears to be the reason why my system eventually runs out of RAM and starts trying to swap until it dies. Here's a graph of my SUreclaim over a couple of days. My typical RAM usage is about 5GB on a 16GB server. When the SUreclaim gets to about 10.xGB the endless swapping starts.

These graphs show it growing endlessly and me rebooting it to free up the RAM, in these 2 cases, before it causes my system to swap itself to death.

enter image description here

Here's a partial slabtop just before the 2nd reboot.

---------------------------------- 20180730164416 ----------------------------------
 Active / Total Objects (% used)    : 34014938 / 35150125 (96.8%)
 Active / Total Slabs (% used)      : 1098114 / 1098114 (100.0%)
 Active / Total Caches (% used)     : 120 / 147 (81.6%)
 Active / Total Size (% used)       : 7332279.93K / 7831039.90K (93.6%)
 Minimum / Average / Maximum Object : 0.01K / 0.22K / 22.88K

  OBJS ACTIVE  USE OBJ SIZE  SLABS OBJ/SLAB CACHE SIZE NAME                   
8433792 8349318  98%    0.06K 131778       64    527112K pid                    
4253942 4250995  99%    0.09K  92477       46    369908K anon_vma               
3011640 2929311  97%    0.20K 150582       20    602328K vm_area_struct         
2994831 2908345  97%    0.19K 142611       21    570444K dentry                 
2068096 2033715  98%    0.03K  16157      128     64628K kmalloc-32             
1953024 1932838  98%    0.02K   7629      256     30516K kmalloc-16             
1820128 1618465  88%    0.25K 113758       16    455032K filp                   
1149438 1149438 100%    0.04K  11269      102     45076K pde_opener             
1014336 891822  87%    0.06K  15849       64     63396K kmalloc-64             
954051 953969  99%    0.19K  45431       21    181724K cred_jar               
757224 752612  99%    0.10K  19416       39     77664K buffer_head            
627368 627368 100%    0.07K  11203       56     44812K eventpoll_pwq          
564900 535453  94%    0.09K  13450       42     53800K kmalloc-96             
372690 336229  90%    0.13K  12423       30     49692K kernfs_node_cache      
362528 362365  99%    0.12K  11329       32     45316K seq_file               
329937 327195  99%    1.06K  21455       30    686560K signal_cache         

task_struct is also normally very high and is normally about 1.5GB before I have to reboot.

A couple of questions:
1) How do I work out which SLAB caches contain the unreclaimable RAM?
2) Is there anything else I can do to work out why the RAM is unreclaimable?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.