4

Is there any way to figure out who or what is allocating size-256 slabs, like in the slabtop output below?

I had to reboot a server yesterday that had 5G out of 8G RAM in size-256 slabs and was running out of memory, as dropping the caches (sysctl vm.drop_caches) did not help at all.

 Active / Total Objects (% used)    : 4676032 / 5036537 (92.8%)
 Active / Total Slabs (% used)      : 303375 / 303426 (100.0%)
 Active / Total Caches (% used)     : 112 / 175 (64.0%)
 Active / Total Size (% used)       : 1116785.79K / 1154991.43K (96.7%)
 Minimum / Average / Maximum Object : 0.02K / 0.23K / 128.00K

  OBJS ACTIVE  USE OBJ SIZE  SLABS OBJ/SLAB CACHE SIZE NAME                   
2556525 2556525 100%    0.25K 170435       15    681740K size-256
292605 292592  99%    0.80K  58521        5    234084K ext3_inode_cache
1065560 862638  80%    0.09K  26639       40    106556K buffer_head
275056 274933  99%    0.24K  17191       16     68764K dentry_cache
 70182  63921  91%    0.52K  10026        7     40104K radix_tree_node
478018 377629  78%    0.06K   8102       59     32408K page_beancounter
 67440  63833  94%    0.12K   2248       30      8992K size-128
120891 116338  96%    0.06K   2049       59      8196K size-64 
 23388   9657  41%    0.30K   1949       12      7796K ip_conntrack
  1362   1342  98%    2.00K    681        2      2724K size-2048
Aleksandar Ivanisevic
  • 3,327
  • 19
  • 24
  • possible duplicate of: http://serverfault.com/questions/240277/slab-uses-88gb-of-128gb-available-what-could-cause-this – neutrinus Apr 25 '14 at 08:41
  • I don't think this question is a duplicate of that. But that other question does contain useful background information. It would be interesting to see the contents of `/proc/meminfo` as well. – kasperd Apr 25 '14 at 10:01

1 Answers1

0

You can use systemtap which will print the size and pid.

Andrew Schulman
  • 8,561
  • 21
  • 31
  • 47