All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-trace-devel@vger.kernel.org,
	Tzvetomir Stoyanov <tz.stoyanov@gmail.com>
Subject: Re: trace-cmd library: Add ZSTD support.
Date: Sun, 20 Feb 2022 21:05:58 +0100	[thread overview]
Message-ID: <YhKfJqm33bPaExVI@breakpoint.cc> (raw)
In-Reply-To: <20220220141759.124bc6e6@gandalf.local.home>

On 2022-02-20 14:17:59 [-0500], Steven Rostedt wrote:
> On Sun, 20 Feb 2022 19:14:48 +0100
> Sebastian Andrzej Siewior <sebastian@breakpoint.cc> wrote:
> 
> > > One benefit is to just have a test case for multiple versions. And who
> > > knows, if it is an easy implementation, perhaps there's something that
> > > needs it in a very limited embedded environment? Does it really hurt
> > > keeping it, even though it may never be used?  
> > 
> > Especially in embedded environment I would prefer zstd over zlib because
> > it performance. These days, if you can allow to compile trace-cmd you
> > should be able to include zstd, too. One downside is probably that the
> > zstd library is larger than libz.
> 
> Maybe I'll make it a compile time option. Just for history sake ;-)

Keep it as a fall back if you want. Just wanted to point out the zstd
benefits.

> > Awesome. I don't know how you make trace.dat in the end but I saw that
> > there is one trace file per CPU first. Would it make sense to compress
> > these before they are written to disk?
> 
> We could do that but it would definitely not be by default. The reason is
> that the per cpu files are created with the splice command. That is, the
> data *never* goes to user space from the time it leaves the internal kernel
> ring buffer to the time it is added to the file (with zero copy, as the
> data page is taken directly from the ring buffer). Having compression would
> require passing the data to user space and back, which would mean a higher
> probability of dropped events.
> 
> Perhaps we could add the compression algorithm into the kernel? :-/

Oh I see. So we may keep that option for later. We do have compression
in kernel for various reasons (say filesystem compression (btrfs,
ubifs), initramfs, …). We could push the whole file through the
compression before splice. I may investigate some other time ;)

> -- Steve

Sebastian

      reply	other threads:[~2022-02-20 20:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-19 23:01 trace-cmd library: Add ZSTD support Sebastian Andrzej Siewior
2022-02-19 23:01 ` [PATCH] " Sebastian Andrzej Siewior
2022-02-21  6:08   ` Tzvetomir Stoyanov
2022-02-21 13:35     ` [PATCH v2] trace-compress: " Sebastian Andrzej Siewior
2022-02-22  2:52       ` Tzvetomir Stoyanov
2022-02-21 13:54     ` [PATCH] trace-cmd library: " Sebastian Andrzej Siewior
2022-02-22  3:42       ` Tzvetomir Stoyanov
2022-02-22  3:53         ` Steven Rostedt
2022-02-22 21:06         ` Sebastian Andrzej Siewior
2022-02-20 17:11 ` Steven Rostedt
2022-02-20 18:14   ` Sebastian Andrzej Siewior
2022-02-20 19:17     ` Steven Rostedt
2022-02-20 20:05       ` Sebastian Andrzej Siewior [this message]

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=YhKfJqm33bPaExVI@breakpoint.cc \
    --to=sebastian@breakpoint.cc \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tz.stoyanov@gmail.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 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.