public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: kan.liang@intel.com
Cc: acme@kernel.org, mingo@redhat.com, linux-kernel@vger.kernel.org,
	peterz@infradead.org, jolsa@kernel.org, wangnan0@huawei.com,
	hekuang@huawei.com, namhyung@kernel.org,
	alexander.shishkin@linux.intel.com, adrian.hunter@intel.com,
	ak@linux.intel.com
Subject: Re: [PATCH V2 0/5] event synthesization multithreading for perf record
Date: Wed, 18 Oct 2017 19:04:04 +0200	[thread overview]
Message-ID: <20171018170404.nneblkkkmeqjtflp@gmail.com> (raw)
In-Reply-To: <1508336973-383492-1-git-send-email-kan.liang@intel.com>


* kan.liang@intel.com <kan.liang@intel.com> wrote:

> From: Kan Liang <Kan.liang@intel.com>
> 
> The event synthesization multithreading is introduced in
> ("perf top optimization") https://lkml.org/lkml/2017/9/29/269
> But it was not enabled for perf record. Because the process function
> process_synthesized_event was not multithreading friendly.
> 
> The patch series temporarily stores the process result in per-thread file,
> which make the processing in parallel. Then it dumps the file one by one to
> the perf.data at the end of event synthesization.
> 
> The source code is also available at
> https://github.com/kliang2/perf.git perf_record_opt
> 
> Usually, the event synthesization only happens once on either start or end.
> With the snapshotting code, we synthesize events multiple times, once per
> each new perf.data file. Both of the cases are verified.
> 
> Here are the latency test result on Knights Mill and Skylake server
> 
> The workload is to compile Linux kernel as below
> "sudo nice make -j$(grep -c '^processor' /proc/cpuinfo)"
> Then, "sudo perf record -e cycles -a -- sleep 1"
> 
> The latency is the time cost of __machine__synthesize_threads or
> its multithreading replacement, record__multithread_synthesize.
> 
> - Latency on Knights Mill (272 CPUs)
> 
> Original(s)     With patch(s)   Speedup
> 12.74           5.54            2.3X
> 
> - Latency on Skylake server (192 CPUs)
> 
> Original(s)     With patch(s)   Speedup
> 0.36            0.25            1.47X

Btw., just as an interesting experiment, could you try to measure how it performs 
to create just the per-CPU files, and *not* dump them into a single file?

I.e. how much faster will it get if the serialization at the end is avoided?

Of course nothing can read such per-CPU files yet, so this is just for scalability 
measurement.

Thanks,

	Ingo

  parent reply	other threads:[~2017-10-18 17:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-18 14:29 [PATCH V2 0/5] event synthesization multithreading for perf record kan.liang
2017-10-18 14:29 ` [PATCH V2 1/5] perf tools: pass thread info to process function kan.liang
2017-10-18 14:29 ` [PATCH V2 2/5] perf tools: pass thread info in event synthesization kan.liang
2017-10-18 14:29 ` [PATCH V2 3/5] perf tools: expose copyfile_offset() kan.liang
2017-10-18 14:29 ` [PATCH V2 4/5] perf record: synthesize event multithreading support kan.liang
2017-10-18 15:37   ` Jiri Olsa
2017-10-18 15:39   ` Jiri Olsa
2017-10-18 15:43   ` Jiri Olsa
2017-10-18 16:57     ` Liang, Kan
2017-10-18 14:29 ` [PATCH V2 5/5] perf record: add option to set the number of thread for event synthesize kan.liang
2017-10-18 17:04 ` Ingo Molnar [this message]
2017-10-20 20:19   ` [PATCH V2 0/5] event synthesization multithreading for perf record Liang, Kan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171018170404.nneblkkkmeqjtflp@gmail.com \
    --to=mingo@kernel.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=hekuang@huawei.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=wangnan0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox