[PATCH 17/18] perf tools: Limit the ordered events queue by default to 100MB
From: Jiri Olsa
Date: Wed Jun 18 2014 - 11:00:41 EST
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@xxxxxxxxxx>
Cc: Corey Ashford <cjashfor@xxxxxxxxxxxxxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Jean Pihet <jean.pihet@xxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
---
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 662ee0c..aa98b6a 100644
--- a/tools/perf/util/ordered-events.c
+++ b/tools/perf/util/ordered-events.c
@@ -252,7 +252,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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/