lkml.org 
[lkml]   [2014]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 16/17] perf tools: Limit the ordered events queue by default to 100MB
Date
It's still configurable by report.queue-size config option,
but looks like 100MB limit is more sane than no limit at all.

There's some speedup for report on huge data files:

With the limit of 100 MB, I've got around 15% speedup on reporting
of ~10GB perf.data file.

current code:
621,685,704,665 cycles ( +- 0.52% )
873,397,467,969 instructions ( +- 0.00% )

286.133268732 seconds time elapsed ( +- 1.13% )

with patches:
603,933,987,185 cycles ( +- 0.45% )
869,139,445,070 instructions ( +- 0.00% )

245.337510637 seconds time elapsed ( +- 0.49% )

The speed up seems to be mainly in less cycles spent in servicing
page faults.

current code:
4.44% 0.01% perf.old [kernel.kallsyms] [k] page_fault

with patches:
1.45% 0.00% perf [kernel.kallsyms] [k] page_fault

current code (faults event):
6,643,807 faults ( +- 0.36% )

with patches (faults event):
2,214,756 faults ( +- 3.03% )

Also there's lower memory consuption.

Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
tools/perf/util/ordered-events.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/ordered-events.c b/tools/perf/util/ordered-events.c
index 80f1daa..c47475e 100644
--- a/tools/perf/util/ordered-events.c
+++ b/tools/perf/util/ordered-events.c
@@ -251,7 +251,8 @@ void ordered_events_queue_init(struct ordered_events_queue *q)
INIT_LIST_HEAD(&q->events);
INIT_LIST_HEAD(&q->cache);
INIT_LIST_HEAD(&q->to_free);
- q->max_alloc_size = (u64) -1;
+ /* 100MB limitation by default */
+ q->max_alloc_size = 100 * 1024 * 1024;
q->cur_alloc_size = 0;
}

--
1.8.3.1


\
 
 \ /
  Last update: 2014-06-13 01:21    [W:0.108 / U:9.924 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site