Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1247694 > unrolled thread
| Started by | Sergey Senozhatsky <sergey.senozhatsky@gmail.com> |
|---|---|
| First post | 2015-10-15 13:20 +0200 |
| Last post | 2015-10-17 04:30 +0200 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
[RFC][PATCH 0/8] introduce slabinfo extended mode Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2015-10-15 13:20 +0200
[PATCH 7/8] tools/vm/slabinfo: cosmetic globals cleanup Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2015-10-15 13:20 +0200
Re: [RFC][PATCH 0/8] introduce slabinfo extended mode Andrew Morton <akpm@linux-foundation.org> - 2015-10-17 00:40 +0200
Re: [RFC][PATCH 0/8] introduce slabinfo extended mode Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2015-10-17 04:30 +0200
| From | Sergey Senozhatsky <sergey.senozhatsky@gmail.com> |
|---|---|
| Date | 2015-10-15 13:20 +0200 |
| Subject | [RFC][PATCH 0/8] introduce slabinfo extended mode |
| Message-ID | <qjOJH-4LQ-7@gated-at.bofh.it> |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Sergey Senozhatsky <sergey.senozhatsky@gmail.com> |
|---|---|
| Date | 2015-10-15 13:20 +0200 |
| Subject | [PATCH 7/8] tools/vm/slabinfo: cosmetic globals cleanup |
| Message-ID | <qjOJI-4LQ-31@gated-at.bofh.it> |
| In reply to | #1247694 |
checkpatch.pl complains about globals being explicitly zeroed
out: "ERROR: do not initialise globals to 0 or NULL".
New globals, introduced in this patch set, have no explicit 0
initialization; clean up the old ones to make it less hairy.
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
---
tools/vm/slabinfo.c | 54 ++++++++++++++++++++++++++---------------------------
1 file changed, 27 insertions(+), 27 deletions(-)
diff --git a/tools/vm/slabinfo.c b/tools/vm/slabinfo.c
index 60beb91..86e698d0 100644
--- a/tools/vm/slabinfo.c
+++ b/tools/vm/slabinfo.c
@@ -53,43 +53,43 @@ struct aliasinfo {
struct slabinfo *slab;
} aliasinfo[MAX_ALIASES];
-int slabs = 0;
-int actual_slabs = 0;
-int aliases = 0;
-int alias_targets = 0;
-int highest_node = 0;
+int slabs;
+int actual_slabs;
+int aliases;
+int alias_targets;
+int highest_node;
char buffer[4096];
-int show_empty = 0;
-int show_report = 0;
-int show_alias = 0;
-int show_slab = 0;
+int show_empty;
+int show_report;
+int show_alias;
+int show_slab;
int skip_zero = 1;
-int show_numa = 0;
-int show_track = 0;
-int show_first_alias = 0;
-int validate = 0;
-int shrink = 0;
-int show_inverted = 0;
-int show_single_ref = 0;
-int show_totals = 0;
-int sort_size = 0;
-int sort_active = 0;
-int set_debug = 0;
-int show_ops = 0;
-int show_activity = 0;
+int show_numa;
+int show_track;
+int show_first_alias;
+int validate;
+int shrink;
+int show_inverted;
+int show_single_ref;
+int show_totals;
+int sort_size;
+int sort_active;
+int set_debug;
+int show_ops;
+int show_activity;
int output_lines = -1;
int sort_loss;
int extended_totals;
int show_bytes;
/* Debug options */
-int sanity = 0;
-int redzone = 0;
-int poison = 0;
-int tracking = 0;
-int tracing = 0;
+int sanity;
+int redzone;
+int poison;
+int tracking;
+int tracing;
int page_size;
--
2.6.1.134.g4b1fd35
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Andrew Morton <akpm@linux-foundation.org> |
|---|---|
| Date | 2015-10-17 00:40 +0200 |
| Message-ID | <qklPk-3h0-13@gated-at.bofh.it> |
| In reply to | #1247694 |
On Thu, 15 Oct 2015 20:14:25 +0900 Sergey Senozhatsky <sergey.senozhatsky@gmail.com> wrote: > 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. hm, why the "RFC"? These patches look more mature than most of the stuff I get ;) You should have cc'ed linux-mm on these patches: nobody will have noticed them. slabinfo is documented a bit in Documentation/vm/slub.txt. Please review that file for accuracy and completeness. It should at least draw readers' attention to the new tools/vm/slabinfo-gnuplot.sh. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Sergey Senozhatsky <sergey.senozhatsky@gmail.com> |
|---|---|
| Date | 2015-10-17 04:30 +0200 |
| Message-ID | <qkppU-b0-11@gated-at.bofh.it> |
| In reply to | #1249192 |
On (10/16/15 15:35), Andrew Morton wrote: > On Thu, 15 Oct 2015 20:14:25 +0900 Sergey Senozhatsky <sergey.senozhatsky@gmail.com> wrote: > > > 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. > > hm, why the "RFC"? These patches look more mature than most of the > stuff I get ;) > Thank you, sir. I wasn't so sure about the gnuplot script, that's why I added RFC. > You should have cc'ed linux-mm on these patches: nobody will have > noticed them. I should have done that, my bad. `./scripts/get_maintainer.pl -f tools/vm/' confused me. > slabinfo is documented a bit in Documentation/vm/slub.txt. Please > review that file for accuracy and completeness. It should at least > draw readers' attention to the new tools/vm/slabinfo-gnuplot.sh. Will take a look. -ss -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web