public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH 0/8] introduce slabinfo extended mode
@ 2015-10-15 11:14 Sergey Senozhatsky
  2015-10-15 11:14 ` [PATCH 1/8] tools/vm/slabinfo: use getopt no_argument/optional_argument Sergey Senozhatsky
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Sergey Senozhatsky @ 2015-10-15 11:14 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, Sergey Senozhatsky, Sergey Senozhatsky

Hi,

Add 'extended' slabinfo mode that provides additional information:
 -- totals summary
 -- slabs sorted by size
 -- slabs sorted by loss (waste)

The patches also introduces several new slabinfo options to limit the
number of slabs reported, sort slabs by loss (waste); and some fixes.


Extended output example (slabinfo -X -N 2):

 Slabcache Totals
 ----------------
 Slabcaches :              91   Aliases  :         119->69   Active:     63
 Memory used:       199798784   # Loss   :        10689376   MRatio:     5%
 # Objects  :          324301   # PartObj:           18151   ORatio:     5%
    
 Per Cache         Average              Min              Max            Total
 ----------------------------------------------------------------------------
 #Objects             5147                1            89068           324301
 #Slabs                199                1             3886            12537
 #PartSlab              12                0              240              778
 %PartSlab             32%               0%             100%               6%
 PartObjs                5                0             4569            18151
 % PartObj             26%               0%             100%               5%
 Memory            3171409             8192        127336448        199798784
 Used              3001736              160        121429728        189109408
 Loss               169672                0          5906720         10689376
    
 Per Object        Average              Min              Max
 -----------------------------------------------------------
 Memory                585                8             8192
 User                  583                8             8192
 Loss                    2                0               64
    
 Slabs sorted by size
 --------------------
 Name                   Objects Objsize           Space Slabs/Part/Cpu  O/S O %Fr %Ef Flg
 ext4_inode_cache         69948    1736       127336448      3871/0/15   18 3   0  95 a
 dentry                   89068     288        26058752      3164/0/17   28 1   0  98 a
    
 Slabs sorted by loss
 --------------------
 Name                   Objects Objsize            Loss Slabs/Part/Cpu  O/S O %Fr %Ef Flg
 ext4_inode_cache         69948    1736         5906720      3871/0/15   18 3   0  95 a
 inode_cache              11628     864          537472        642/0/4   18 2   0  94 a



The last patch in the series addresses Linus' comment from
http://marc.info/?l=linux-mm&m=144148518703321&w=2

(well, it's been some time. sorry.)


gnuplot script takes the slabinfo records file, where every record is a `slabinfo -X'
output. So the basic workflow is, for example, as follows:

	while [ 1 ]; do slabinfo -X -N 2 >> stats; sleep 1; done
	^C
	slabinfo-gnuplot.sh stats

The last command will produce 3 png files (and 3 stats files)
-- graph of slabinfo totals
-- graph of slabs by size
-- graph of slabs by loss


It's also possible to select a range of records for plotting (a range of collected
slabinfo outputs) via `-r 10,100` (for example); and compare totals from several
measurements (to visially compare slabs behaviour (10,50 range)) using
pre-parsed totals files:
	slabinfo-gnuplot.sh -r 10,50 -t stats-totals1 .. stats-totals2



Examples of graphs will be attached in a follow up letter.


This also, technically, supports ktest. Upload new slabinfo to target,
collect the stats and give the resulting stats file to slabinfo-gnuplot


Sergey Senozhatsky (8):
  tools/vm/slabinfo: use getopt no_argument/optional_argument
  tools/vm/slabinfo: limit the number of reported slabs
  tools/vm/slabinfo: sort slabs by loss
  tools/vm/slabinfo: fix alternate opts names
  tools/vm/slabinfo: introduce extended totals mode
  tools/vm/slabinfo: output sizes in bytes
  tools/vm/slabinfo: cosmetic globals cleanup
  tools/vm/slabinfo: gnuplot slabifo extended stat

 tools/vm/slabinfo-gnuplot.sh | 275 +++++++++++++++++++++++++++++++++++++++++++
 tools/vm/slabinfo.c          | 255 +++++++++++++++++++++++++--------------
 2 files changed, 442 insertions(+), 88 deletions(-)
 create mode 100755 tools/vm/slabinfo-gnuplot.sh

-- 
2.6.1.134.g4b1fd35


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-10-17  2:23 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-15 11:14 [RFC][PATCH 0/8] introduce slabinfo extended mode Sergey Senozhatsky
2015-10-15 11:14 ` [PATCH 1/8] tools/vm/slabinfo: use getopt no_argument/optional_argument Sergey Senozhatsky
2015-10-15 11:14 ` [PATCH 2/8] tools/vm/slabinfo: limit the number of reported slabs Sergey Senozhatsky
2015-10-15 11:14 ` [PATCH 3/8] tools/vm/slabinfo: sort slabs by loss Sergey Senozhatsky
2015-10-15 11:14 ` [PATCH 4/8] tools/vm/slabinfo: fix alternate opts names Sergey Senozhatsky
2015-10-15 11:14 ` [PATCH 5/8] tools/vm/slabinfo: introduce extended totals mode Sergey Senozhatsky
2015-10-15 11:14 ` [PATCH 6/8] tools/vm/slabinfo: output sizes in bytes Sergey Senozhatsky
2015-10-15 11:14 ` [PATCH 7/8] tools/vm/slabinfo: cosmetic globals cleanup Sergey Senozhatsky
2015-10-15 11:14 ` [PATCH 8/8] tools/vm/slabinfo: gnuplot slabifo extended stat Sergey Senozhatsky
2015-10-15 11:33 ` [RFC][PATCH 0/8] introduce slabinfo extended mode Sergey Senozhatsky
2015-10-16 22:35 ` Andrew Morton
2015-10-17  2:22   ` Sergey Senozhatsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox