From: Jiri Olsa <jolsa@redhat.com>
To: Alexey Budankov <alexey.budankov@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Andi Kleen <ak@linux.intel.com>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v8 00/12] perf: enable compression of record mode trace to save storage space
Date: Fri, 15 Mar 2019 13:28:11 +0100 [thread overview]
Message-ID: <20190315122811.GC1400@krava> (raw)
In-Reply-To: <4c037bbd-1cc9-90f2-b9cd-0e0839c83b73@linux.intel.com>
On Thu, Mar 14, 2019 at 02:26:23PM +0300, Alexey Budankov wrote:
>
> The patch set implements runtime trace compression (-z option) in
> record mode and trace auto decompression in report and inject modes.
> Streaming Zstd API [1] is used for compression and decompression of
> data that come from kernel mmaped data buffers.
>
> Usage of implemented -z,--compression_level=n option provides ~3-5x
> avg. trace file size reduction on variety of tested workloads what
> saves storage space on larger server systems where trace file size
> can easily reach several tens or even hundreds of GiBs, especially
> when profiling with dwarf-based stacks and tracing of context switches.
> Default option value is 1 (fastest compression).
>
> Implemented --mmap-flush option can be used to specify minimal size
> of data chunk that is extracted from mmaped kernel buffer to store
> into a trace. The option is independent from -z setting and doesn't
> vary with compression level. The default option value is 1 byte what
> means every time trace writing thread finds some new data in the
> mmaped buffer the data is extracted, possibly compressed and written
> to a trace. The option serves two purposes the first one is to increase
> the compression ratio of trace data and the second one is to avoid
> live-lock self tool process monitoring in system wide (-a) profiling
> mode. Profiling in system wide mode with compression (-a -z) can
> additionally induce data into the kernel buffers along with the data
> from monitored processes. If performance data rate and volume from
> the monitored processes is high then trace streaming and compression
> activity in the tool is also high. It can lead to subtle live-lock
> effect of endless activity when compression of single new byte from
> some of mmaped kernel buffer induces the next single byte at some
> mmaped buffer. So perf tool thread never stops on polling event file
> descriptors. Varying data chunk size to be extracted from mmap buffers
> allows avoiding live-locking self monitoring in system wide mode and
> makes mmap buffers polling loop configurable.
>
> $ tools/perf/perf record -z -e cycles -- matrix.gcc
> $ tools/perf/perf record --aio -z -e cycles -- matrix.gcc
> $ tools/perf/perf record -z --mmap-flush 1024 -e cycles -- matrix.gcc
> $ tools/perf/perf record --aio -z --mmap-flush 1K -e cycles -- matrix.gcc
hi,
I'm getting error with -z:
[root@krava perf]# ./perf record -z ./perf bench sched messaging -l 10000
# Running 'sched/messaging' benchmark:
# 20 sender and receiver processes per group
# 10 groups == 400 processes run
Total time: 18.775 [sec]
[ perf record: Woken up 57 times to write data ]
0x5228 [0]: failed to process type: 81
[ perf record: Captured and wrote 6.453 MB perf.data, compressed (original 21.486 MB, ratio is 3.340) ]
jirka
next prev parent reply other threads:[~2019-03-15 12:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-14 11:26 [PATCH v8 00/12] perf: enable compression of record mode trace to save storage space Alexey Budankov
2019-03-14 11:28 ` [PATCH v8 01/12] feature: implement libzstd check, LIBZSTD_DIR and NO_LIBZSTD defines Alexey Budankov
2019-03-14 11:29 ` [PATCH v8 02/12] perf record: implement --mmap-flush=<threshold> option Alexey Budankov
2019-03-14 11:30 ` [PATCH v8 03/12] perf session: define bytes_transferred and bytes_compressed metrics Alexey Budankov
2019-03-14 11:30 ` [PATCH v8 04/12] perf record: implement COMPRESSED event record and its attributes Alexey Budankov
2019-03-14 11:31 ` [PATCH v8 05/12] perf mmap: implement dedicated memory buffer for data compression Alexey Budankov
2019-03-14 11:32 ` [PATCH v8 06/12] perf util: introduce Zstd streaming based compression API Alexey Budankov
2019-03-14 11:34 ` [PATCH v8 07/12] perf record: implement compression for serial trace streaming Alexey Budankov
2019-03-14 11:35 ` [PATCH v8 08/12] perf record: implement compression for AIO " Alexey Budankov
2019-03-14 11:36 ` [PATCH v8 09/12] perf record: implement -z,--compression_level=n option Alexey Budankov
2019-03-14 11:37 ` [PATCH v8 10/12] perf report: implement record trace decompression Alexey Budankov
2019-03-14 11:38 ` [PATCH v8 11/12] perf inject: enable COMPRESSED records decompression Alexey Budankov
2019-03-14 11:38 ` [PATCH v8 12/12] perf tests: implement Zstd comp/decomp integration test Alexey Budankov
2019-03-15 12:28 ` Jiri Olsa [this message]
2019-03-15 13:43 ` [PATCH v8 00/12] perf: enable compression of record mode trace to save storage space Alexey Budankov
2019-03-15 15:18 ` Alexey Budankov
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=20190315122811.GC1400@krava \
--to=jolsa@redhat.com \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=alexey.budankov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.