ryran / xsos

sosreport examiner - instantly summarize system info from a sosreport or a running system
337 stars 122 forks source link

MEMINFO: include info about objects with high slab usage #194

Open gangelop opened 8 years ago

gangelop commented 8 years ago

Making a quick note so I don't forget but basically: $title

e.g.

$ sudo sort -rnk2 /proc/slabinfo | head 
dentry             47807  50589    192   21    1 : tunables    0    0    0 : slabdata   2409   2409      0
radix_tree_node    45266  45395    584   28    4 : tunables    0    0    0 : slabdata   1622   1622      0
buffer_head        38397  51129    104   39    1 : tunables    0    0    0 : slabdata   1311   1311      0
kmalloc-192        35528  35847    192   21    1 : tunables    0    0    0 : slabdata   1707   1707      0
kmalloc-64         34886  39232     64   64    1 : tunables    0    0    0 : slabdata    613    613      0
kernfs_node_cache  31144  31144    120   34    1 : tunables    0    0    0 : slabdata    916    916      0
anon_vma           12527  12852     80   51    1 : tunables    0    0    0 : slabdata    252    252      0
ext4_inode_cache   11402  17984   1024   32    8 : tunables    0    0    0 : slabdata    562    562      0
inode_cache        11148  12264    568   28    4 : tunables    0    0    0 : slabdata    438    438      0
ftrace_event_field  10455  14025     48   85    1 : tunables    0    0    0 : slabdata    165    165      0
gangelop commented 8 years ago

I'm not sure yet how to count which object has the highest memory usage. My current understanding is that it is not reflected by any single one of the values in slabinfo. Here are the names of the columns:

# name            <active_objs> <num_objs> <objsize> <objperslab> <pagesperslab> : tunables <limit> <batchcount> <sharedfactor> : slabdata <active_slabs> <num_slabs> <sharedavail>

Looking just at those names, it looks like the total size used by an object is either active_objs or num_obj times objsize. Or it maybe be that another column is relevant, like num_slabs. Anyway, I should read the manual.