<p>
<span style="font-size:14px;white-space:normal;">Hi,dear.</span>
</p>
<p>
<span style="font-size:14px;white-space:normal;"><br>
</span>
</p>
<p>
I have been using lttng to monitor my server these days,but I found something interesting.
</p>
<p>
The cpu usage of lttng varies with the number of cpu cores of the server.
</p>
<p>
<br>
</p>
<p>
On the server, I create a tracing session in live mode, using "lttng create my-session --live".
</p>
<p>
Then,I Start the babeltrace2 and configure it to connect to the relay daemon,using "--input-format=lttng-live" mode.
</p>
<p>
I used 5 cloud servers,1core4G 2core8G 4core16G 8core16G 8core16G.
</p>
<p>
And,the same test script was executed above to provide the same workload.
</p>
<p>
<br>
</p>
<p>
As we all know,lttng has 5 processes,
</p>
<p>
1.lttng-runas --daemonize
</p>
<p>
2.lttng-runas -k --consumerd-cmd-sock /var/run/lttng/kconsumerd/command --consumerd-err-sock /var/run/lttng/kconsumerd/error --group tracing
</p>
<p>
3.lttng-sessiond --daemonize
</p>
<p>
4.lttng-relayd -L tcp://localhost:5344
</p>
<p>
5.lttng-consumerd -k --consumerd-cmd-sock /var/run/lttng/kconsumerd/command --consumerd-err-sock /var/run/lttng/kconsumerd/error --group tracing
</p>
<p>
<br>
</p>
<p>
The CPU usage of the first four processes is below 2% on the 5 servers,but the lttng-consumerd process is different.
</p>
<p>
On 1-core、2-core、4-core servers,t<span style="white-space:normal;">he CPU usage of the <span style="white-space:normal;">lttng-consumerd process</span> is below 2%.</span>
</p>
<p>
<span style="white-space:normal;">But on two 8-core machines, the cpu usage of the lttng-consumerd process reached 10% or more.</span>
</p>
<p>
<span style="white-space:normal;"><br>
</span>
</p>
<p>
<span style="white-space:normal;">And,the cpu usage of the babeltrace process is not much different,just the cpu usage of the lttng-consumerd process varies with the number of cpu cores of the server.</span>
</p>
<p>
<span style="white-space:normal;"><br>
</span>
</p>
<p>
<span style="white-space:normal;">Why it is like this?How should this phenomenon be analyzed?<br>
</span>
</p>
<p>
<span style="white-space:normal;"><br>
</span>
</p>
<p>
Looking forward to your reply.
</p>
<p>
<br>
thanks,<br>
yuhua<br>
</p>
<p>
<br>
</p>
<p>
<br>
</p>