Skip to contentSkip to conversation

Pros and Cons of LTTng

DISCUSSION Jonathan Rajotte-Julien 2 participants 3 messages Jul 16, 2019 – Jul 22, 2019 3 messages not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 1 line

From somewhere, I saw CPU cycles % with LTTng is even 1-2% lower than vanilla.

You might be referring to section 5.3 of [1], last paragraph.

[1] https://www.dorsal.polymtl.ca/en/system/files/desnoyers.pdf

In any cases, there is always an overhead when actively tracing (recording to disk, network or even in flight recorder mode).

Quoted 2 lines

Is it contributed by dynamic branch prediction or other instruction level optimization?

Note that these numbers were for a 2.6.30 kernel. Things might have changed a bit since. As far as I know, the performance of an instrumented kernel is independent from lttng since instrumentation of the kernel is a not only used by lttng but by multiple projects. But it might help system engineers to accept to turn on instrumentation for their kernel.

Anyhow, the speedup was attributed to the modification to the instruction and data cache layout.

Quoted 2 lines

In that way, the kernel or at least key libraries like libc is kind of re-compiled, right?

lttng-modules does not require any kernel recompilation. It uses kernel modules to function.

Instrumenting libc directly might not ideal due to its nature. You can use LD_PRELOAD and lttng-ust to shim and instrument libc function you are interested in. For example, we already ship a shim for some libc functions [1] that you can LD_PRELOAD.

[1] https://github.com/lttng/lttng-ust/tree/9d4d2a639afc19a1bd705ea560782917ac892596/liblttng-ust-libc-wrapper

Hope this helps.

Cheers

Signature · 2 lines
Jonathan Rajotte-Julien
EfficiOS
#3 lore raw
In reply to a message not in the archive

Hi Jonathan,

As to LD_PRELOAD, it is also used for privilege escalation. Will it be regarded as vulnerability and forbidden on some Linux systems?

Regards
Hai

------------------ Original ------------------

From:  "Jonathan Rajotte-Julien"<[email protected]>;
Date:  Tue, Jul 16, 2019 11:30 PM
To:  "杨海"<[email protected]>; 

Cc: "lttng-dev"<[email protected]>;
Subject: Re: 回复:Re: [lttng-dev] Pros and Cons of LTTng

Quoted 1 line

From somewhere, I saw CPU cycles % with LTTng is even 1-2% lower than vanilla.

You might be referring to section 5.3 of [1], last paragraph.

[1] https://www.dorsal.polymtl.ca/en/system/files/desnoyers.pdf

In any cases, there is always an overhead when actively tracing (recording to disk, network or even in flight recorder mode).

Quoted 2 lines

Is it contributed by dynamic branch prediction or other instruction level optimization?

Note that these numbers were for a 2.6.30 kernel. Things might have changed a bit since. As far as I know, the performance of an instrumented kernel is independent from lttng since instrumentation of the kernel is a not only used by lttng but by multiple projects. But it might help system engineers to accept to turn on instrumentation for their kernel.

Anyhow, the speedup was attributed to the modification to the instruction and data cache layout.

Quoted 2 lines

In that way, the kernel or at least key libraries like libc is kind of re-compiled, right?

lttng-modules does not require any kernel recompilation. It uses kernel modules to function.

Instrumenting libc directly might not ideal due to its nature. You can use LD_PRELOAD and lttng-ust to shim and instrument libc function you are interested in. For example, we already ship a shim for some libc functions [1] that you can LD_PRELOAD.

[1] https://github.com/lttng/lttng-ust/tree/9d4d2a639afc19a1bd705ea560782917ac892596/liblttng-ust-libc-wrapper

Hope this helps.

Cheers

Signature · 2 lines
Jonathan Rajotte-Julien
EfficiOS

_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

#5 lore raw
In reply to a message not in the archive

Hi,

Quoted 1 line

As to LD_PRELOAD, it is also used for privilege escalation. Will it be regarded as vulnerability and forbidden on some Linux systems?

It could yes.
In that case you will be limited to the syscalls interface for the libc observability unless you instrument it and distribute it.

Cheers.