<div dir="ltr"><div><div>Hi all, <br><br></div>LTTng uses more memory than I expected. On the simple experiment below
one can see that the "cached" memory increases by<br><br>subbuf_size*num_cpu*(num_subbuf+1)<br><br></div><div>That's not a big deal, but I did not expect the "+1".<br><br>Does somebody know where it comes from?<br>
<br><br></div><div>-- Regards, Sebastien<br><br><br></div><div>12M == 2M*2*(2+1)<br>24M == 4M*2*(2+1)<br>20M == 2M*2*(4+1)<br>40M == 4M*2*(4+1)<br></div><div><br># grep processor /proc/cpuinfo<br>processor : 0<br>processor : 1<br>
<br># lttng create<br>Session auto-20140416-180246 created.<br>Traces will be written in /root/lttng-traces/auto-20140416-180246<br><br># free -m<br> total used free shared buffers cached<br>
Mem: 1002 670 332 0 22 250<br>-/+ buffers/cache: 397 605<br>Swap: 0 0 0<br><br># lttng enable-channel channel0 --num-subbuf 2 --subbuf-size 2M -u<br>
UST channel channel0 enabled for session auto-20140416-180246<br><br># free -m<br> total used free shared buffers cached<br>Mem: 1002 682 320 0 22 262<br>
-/+ buffers/cache: 397 605<br>Swap: 0 0 0<br><br># lttng destroy<br>Session auto-20140416-180246 destroyed<br><br># lttng create<br>Session auto-20140416-180317 created.<br>Traces will be written in /root/lttng-traces/auto-20140416-180317<br>
<br># free -m<br> total used free shared buffers cached<br>Mem: 1002 670 332 0 22 250<br>-/+ buffers/cache: 397 605<br>Swap: 0 0 0<br>
<br># lttng enable-channel channel0 --num-subbuf 2 --subbuf-size 4M -u<br>UST channel channel0 enabled for session auto-20140416-180317<br><br># free -m<br> total used free shared buffers cached<br>
Mem: 1002 694 307 0 22 274<br>-/+ buffers/cache: 397 605<br>Swap: 0 0 0<br><br># lttng destroy<br>Session auto-20140416-180317 destroyed<br>
<br># lttng create<br>Session auto-20140416-180339 created.<br>Traces will be written in /root/lttng-traces/auto-20140416-180339<br><br># free -m<br> total used free shared buffers cached<br>
Mem: 1002 670 332 0 22 250<br>-/+ buffers/cache: 397 605<br>Swap: 0 0 0<br><br># lttng enable-channel channel0 --num-subbuf 4 --subbuf-size 2M -u<br>
UST channel channel0 enabled for session auto-20140416-180339<br><br># free -m<br> total used free shared buffers cached<br>Mem: 1002 690 311 0 22 270<br>
-/+ buffers/cache: 397 605<br>Swap: 0 0 0<br><br># lttng destroy<br>Session auto-20140416-180339 destroyed<br><br># lttng create<br>Session auto-20140416-180406 created.<br>Traces will be written in /root/lttng-traces/auto-20140416-180406<br>
<br># free -m<br> total used free shared buffers cached<br>Mem: 1002 670 332 0 22 250<br>-/+ buffers/cache: 397 605<br>Swap: 0 0 0<br>
<br># lttng enable-channel channel0 --num-subbuf 4 --subbuf-size 4M -u<br>UST channel channel0 enabled for session auto-20140416-180406<br><br># free -m<br> total used free shared buffers cached<br>
Mem: 1002 710 292 0 22 290<br>-/+ buffers/cache: 397 605<br><br></div></div>