<div dir="ltr"><div>Hi, Kienan<br><br></div><div>I am attaching an screen recording of
the behaviour I am seeing in this mail. The behaviour is same
irrespective of the device i use, sorry for miscommunication in the
npocs output (I assumed it was 32), but other than that all outputs are
same (except the hostname as there are multiple devices with same lttng
config but this memory cosumption is seen on all the devices).</div><div><br></div><div>I had few question<br><br></div><div>1.
Does lltng allocated all the memory it needs and mark it as dirty in
ram when any process which links/uses lttng-ust runs? (here i tried with
one process but it is same for any of my process)<br>2. (nSubbuf * subbufSize) * (nCPUs + 1 iff snapshot mode is enabled) * (nUIDs or nPIDs)<br><br></div><div>How do we calculate uid in the system is it all uids in the system? is it equal to `cat /etc/passwd | wc -l` ?<br><br></div><div>I will put my calculations according to the above estimate based on all the channel i am creating</div><div><br></div><div>(<span id="m_-5967291644094277896gmail-cwos">4194304</span>*4 + 262144*4 + 16384*4) * (16) * (30 if number user are equal to `cat /etc/passwd | wc -l`)B = <span id="m_-5967291644094277896gmail-cwos">7.998046875 GB approx [this is based on the start_lttng.py please do correct me if am wrong here.]<br><br></span></div><div>But since there are only two users which uses lttng i think the correct estimate would be<br></div><div>(<span id="m_-5967291644094277896gmail-cwos">4194304</span>*4 + 262144*4 + 16384*4) * (16) * (2)B = <span id="m_-5967291644094277896gmail-cwos">546MB <br><br></span></div><div><span id="m_-5967291644094277896gmail-cwos">Please do correct me If I am wrong calculations here. <br></span></div><div><span id="m_-5967291644094277896gmail-cwos"><br></span></div><div>Now,
there are a few things here, according to my output lttng is using 11G
which is much more higher than the what is configured.<br><br></div><div>I am attaching the lttng status and the file which is uses to create the lttng sessions.<br><br></div><div><br></div><div><br></div><div>Thank You.<br><br><br><a href="https://drive.google.com/file/d/1tS_ZWEsXDpHZXfWzZHXmWcT0igiIOIaa/view?usp=sharing">https://drive.google.com/file/d/1tS_ZWEsXDpHZXfWzZHXmWcT0igiIOIaa/view?usp=sharing</a> -- recording of the behaviour which is seen<br><a href="https://drive.google.com/file/d/1PrU31oyEw1n9tKETlUtmNGO50s6ywx7p/view?usp=sharing">https://drive.google.com/file/d/1PrU31oyEw1n9tKETlUtmNGO50s6ywx7p/view?usp=sharing</a> -- the file which is used to create lttng sessions</div><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Wed, Mar 12, 2025 at 12:25 AM Kienan Stewart <<a href="mailto:kstewart@efficios.com">kstewart@efficios.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Lakshya,<br>
<br>
On 3/11/25 12:25 PM, Gour DEV wrote:<br>
> Hi, Kienan<br>
><br>
> here is the requested output<br>
><br>
> root@localhost:~# top -b -n 1 | grep lttng<br>
> 4841 root 20 0 11.5g 11.0g 11.0g S 5.9 35.4 8:39.93<br>
> lttng-c+<br>
> 4824 root 20 0 1098824 26456 5380 S 0.0 0.1 0:07.25<br>
> lttng-s+<br>
> 4825 root 20 0 48872 2188 1012 S 0.0 0.0 0:00.00<br>
> lttng-r+<br>
> 4843 root 20 0 3680 1160 816 S 0.0 0.0 0:00.23<br>
<br>
This top output for `localhost` seems very different than the output for <br>
`localhost` in your previous message.<br>
<br>
<br>
> lttng-r+<br>
> root@localhost:~# nrpco<br>
> bash: nrpco: command not found<br>
> root@localhost:~# nproc<br>
> 16<br>
> root@localhost:~# cat /sys/devices/system/cpu/possible<br>
> 0-15<br>
><br>
<br>
You indicated the bookworm machine has 32 cores, this is showing 16. If <br>
you're comparing a 16 core machine to a 32 core machine, it is very <br>
normal that the memory usage is higher on the 32 core machine.<br>
<br>
><br>
> Most of the process are running as asorcs user but some are running <br>
as root.<br>
<br>
So you have two users with instrumented applications.<br>
<br>
<br>
Given the discrepancies in the information provided I'm finding it a bit <br>
hard to understand what you're looking at.<br>
<br>
<br>
In general, a channel's shared memory footprint can be estimated with[1]:<br>
<br>
(nSubbuf * subbufSize) * (nCPUs + 1 iff snapshot mode is enabled) * <br>
(nUIDs or nPIDs)<br>
<br>
Note that the sub-buffer sizes you are using get rounded to the nearest <br>
larger power of 2. See [2].<br>
<br>
thanks,<br>
kienan<br>
<br>
[1]: <a href="https://lttng.org/docs/v2.13/#doc-channel-buffering-schemes" rel="noreferrer" target="_blank">https://lttng.org/docs/v2.13/#doc-channel-buffering-schemes</a><br>
[2]: <br>
<a href="https://lttng.org/man/1/lttng-enable-channel/v2.13/#doc-opt--subbuf-size" rel="noreferrer" target="_blank">https://lttng.org/man/1/lttng-enable-channel/v2.13/#doc-opt--subbuf-size</a><br>
</blockquote></div>