From: Mathieu Desnoyers via lttng-dev <lttng-dev@lists.lttng.org>
To: 熊毓华 <xiongyuhua@zju.edu.cn>
Cc: lttng-dev <lttng-dev@lists.lttng.org>
Subject: Re: [lttng-dev] Some confusion about cpu usage of the lttng-consumerd process
Date: Mon, 30 Nov 2020 09:24:38 -0500 (EST) [thread overview]
Message-ID: <1970789645.67635.1606746278786.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <2cade259.4f3f.1760d9d1b84.Coremail.xiongyuhua@zju.edu.cn>
----- On Nov 28, 2020, at 1:49 AM, 熊毓华 xiongyuhua@zju.edu.cn wrote:
> Hi,
> I put my test scripts in the attachment.
> You can just run the script directly, create the trace session with the "--live"
> option on the 8core server,
> then you will find the cpu usage of the lttng-consumerd process reached 10% or
> more.
> About the streaming mode of lttng,I did the test before, it worked well.
> When I create the trace session with "lttng create my-session
> --output=/tmp/my-kernel-trace", or with "lttng create my-session
> --set-url=net://ip",
> the number of CPU seems not affect the cpu usage with lttng-consumerd.
> It seems that only live-mode will be affected.
The overhead of consumer daemon in live mode will increase with the number
of cpus on the system. This is expected.
There is one knob you can try to configure to adapt the amount of overhead
caused by the live timer in the consumer daemon: lttng create --live=NNN
where NNN is the live timer period in microseconds. The default is 1000000us
(1 second). Try changing this value to something larger and you will
probably notice that it lessen the consumer daemon overhead.
Shipping trace data with relatively low latency so it can be immediately
read adds overhead, and it increases with the number of cpus in the system
because there are then more per-cpu buffers to flush.
Note that your instrumentation also targets unrelated kernel and user-space
execution, so whatever is executed in the background also gets traced. And
this generate trace data traffic on each cpu. Having even just a bit of
trace data to send out in live mode can very much explain the overhead you
observe with the lttng consumer daemon.
If you care that much about overhead of the consumer daemon, don't use live
mode, and use the alternatives we discussed earlier instead, such as the
session rotation mode, if you need to consume the trace data while it is
produced.
Thanks,
Mathieu
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
prev parent reply other threads:[~2020-11-30 14:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-27 6:39 [lttng-dev] Some confusion about cpu usage of the lttng-consumerd process 熊毓华 via lttng-dev
2020-11-27 14:05 ` Jonathan Rajotte-Julien via lttng-dev
2020-11-27 15:32 ` 熊毓华 via lttng-dev
2020-11-27 16:04 ` Jonathan Rajotte-Julien via lttng-dev
2020-11-27 17:11 ` Mathieu Desnoyers via lttng-dev
2020-11-28 6:49 ` 熊毓华 via lttng-dev
2020-11-30 14:24 ` Mathieu Desnoyers via lttng-dev [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=1970789645.67635.1606746278786.JavaMail.zimbra@efficios.com \
--to=lttng-dev@lists.lttng.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=xiongyuhua@zju.edu.cn \
/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.