Memory Consumption High After Upgrading to 2.13 from 2.10
Gour DEV
lakshyagour10 at gmail.com
Wed Mar 12 05:19:07 EDT 2025
Hi, Kienan
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).
I had few question
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)
2. (nSubbuf * subbufSize) * (nCPUs + 1 iff snapshot mode is enabled) *
(nUIDs or nPIDs)
How do we calculate uid in the system is it all uids in the system? is it
equal to `cat /etc/passwd | wc -l` ?
I will put my calculations according to the above estimate based on all the
channel i am creating
(4194304*4 + 262144*4 + 16384*4) * (16) * (30 if number user are equal to
`cat /etc/passwd | wc -l`)B = 7.998046875 GB approx [this is based on the
start_lttng.py please do correct me if am wrong here.]
But since there are only two users which uses lttng i think the correct
estimate would be
(4194304*4 + 262144*4 + 16384*4) * (16) * (2)B = 546MB
Please do correct me If I am wrong calculations here.
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.
I am attaching the lttng status and the file which is uses to create the
lttng sessions.
Thank You.
https://drive.google.com/file/d/1tS_ZWEsXDpHZXfWzZHXmWcT0igiIOIaa/view?usp=sharing
-- recording of the behaviour which is seen
https://drive.google.com/file/d/1PrU31oyEw1n9tKETlUtmNGO50s6ywx7p/view?usp=sharing
-- the file which is used to create lttng sessions
On Wed, Mar 12, 2025 at 12:25 AM Kienan Stewart <kstewart at efficios.com>
wrote:
> Hi Lakshya,
>
> On 3/11/25 12:25 PM, Gour DEV wrote:
> > Hi, Kienan
> >
> > here is the requested output
> >
> > root at localhost:~# top -b -n 1 | grep lttng
> > 4841 root 20 0 11.5g 11.0g 11.0g S 5.9 35.4 8:39.93
> > lttng-c+
> > 4824 root 20 0 1098824 26456 5380 S 0.0 0.1 0:07.25
> > lttng-s+
> > 4825 root 20 0 48872 2188 1012 S 0.0 0.0 0:00.00
> > lttng-r+
> > 4843 root 20 0 3680 1160 816 S 0.0 0.0 0:00.23
>
> This top output for `localhost` seems very different than the output for
> `localhost` in your previous message.
>
>
> > lttng-r+
> > root at localhost:~# nrpco
> > bash: nrpco: command not found
> > root at localhost:~# nproc
> > 16
> > root at localhost:~# cat /sys/devices/system/cpu/possible
> > 0-15
> >
>
> You indicated the bookworm machine has 32 cores, this is showing 16. If
> you're comparing a 16 core machine to a 32 core machine, it is very
> normal that the memory usage is higher on the 32 core machine.
>
> >
> > Most of the process are running as asorcs user but some are running
> as root.
>
> So you have two users with instrumented applications.
>
>
> Given the discrepancies in the information provided I'm finding it a bit
> hard to understand what you're looking at.
>
>
> In general, a channel's shared memory footprint can be estimated with[1]:
>
> (nSubbuf * subbufSize) * (nCPUs + 1 iff snapshot mode is enabled) *
> (nUIDs or nPIDs)
>
> Note that the sub-buffer sizes you are using get rounded to the nearest
> larger power of 2. See [2].
>
> thanks,
> kienan
>
> [1]: https://lttng.org/docs/v2.13/#doc-channel-buffering-schemes
> [2]:
> https://lttng.org/man/1/lttng-enable-channel/v2.13/#doc-opt--subbuf-size
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20250312/57f240d8/attachment.htm>
More information about the lttng-dev
mailing list