[lttng-dev] clarification on limiting the size of the trace file

Sadon, Mirit Mirit.Sadon at emc.com
Wed May 7 01:12:29 EDT 2014


Hi,

This is what I understood should happen but in the actual run the lttng file fills all the free space in the partition 4GB.

Thanks
Mirit Sadon 

-----Original Message-----
From: Thibault, Daniel [mailto:Daniel.Thibault at drdc-rddc.gc.ca] 
Sent: Monday, May 05, 2014 7:10 PM
To: lttng-dev at lists.lttng.org
Cc: Sadon, Mirit; Eshel, Ayelet
Subject: RE: [lttng-dev] clarification on limiting the size of the trace file

----------------------------------------------------------------------
Date: Mon, 5 May 2014 08:24:39 +0000
From: "Sadon, Mirit" <Mirit.Sadon at emc.com>
Cc: "Eshel, Ayelet" <Ayelet.Eshel at emc.com>

> I am working with the lttng trace to see how it affects are program 
> performance, But if I don't limit the size of the trace file collected it fills all the space in the partition I specify.
> What does it mean if I start the trace and limit the trace file to let say 1GB.
> Would the trace stop after it reaches the limit or it will continue and override the previous collected points?
>
> I tried by using this command when creating the channel but it didn't work.
>
> lttng enable-channel perf --subbuf-size 262144 -C 262144 -W 32 
> --num-subbuf 32 -u
>
> We are working with lttng version 2.04.
>
> Mirit Sadon
> EMC2

   This feature may not have been mature with version 2.0.4; I would recommend upgrading to at least 2.3 if not 2.4.

   Your command sets up a single user-space channel named perf which uses a 32-part buffer of total size 32*262144=8388608 (8 MiB).  The trace is itself limited to 32 chunks of size 262144 each.  By default, user-space channels run in discard mode.  So in this case LTTng should capture about 8 MiB of events to disc, and a further 8 MiB in memory before "giving up" altogether.

   When the trace is started the 8 MiB buffer will start filling up, and the consumer daemon will start dumping the events to the trace file.  Once the trace file saturates at 8 MiB total size, the consumer daemon will stop emptying the buffer.  The buffer will then capture another 8 MiB of events.  Once the buffer is full, LTTng will systematically discard new events as they occur.

   It would be an interesting feature if the snapshot command could be used at this point to dump the 8 MiB of otherwise-lost events to another trace file.

Daniel U. Thibault
Protection des systèmes et contremesures (PSC) | Systems Protection & Countermeasures (SPC) Cyber sécurité pour les missions essentielles (CME) | Mission Critical Cyber Security (MCCS) R & D pour la défense Canada - Valcartier (RDDC Valcartier) | Defence R&D Canada - Valcartier (DRDC Valcartier)
2459 route de la Bravoure
Québec QC  G3J 1X5
CANADA
Vox : (418) 844-4000 x4245
Fax : (418) 844-4538
NAC : 918V QSDJ <http://www.travelgis.com/map.asp?addr=918V%20QSDJ>
Gouvernement du Canada | Government of Canada <http://www.valcartier.drdc-rddc.gc.ca/>




More information about the lttng-dev mailing list