All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: On lost events
       [not found] <51D5ED4E.2000305@ericsson.com>
@ 2013-07-04 22:29 ` Mathieu Desnoyers
       [not found] ` <20130704222948.GB8852@Krystal>
  1 sibling, 0 replies; 8+ messages in thread
From: Mathieu Desnoyers @ 2013-07-04 22:29 UTC (permalink / raw)
  To: Matthew Khouzam; +Cc: lttng-dev

* Matthew Khouzam (matthew.khouzam@ericsson.com) wrote:
> Hi tracing werewolves,
> 
> I want to clear up some stuff about lost events.
> 
> Lost events are caused, in lttng 2.x when the tracer does not have
> enough memory available to write an event. This can be due to:
> * events coming in too fast (faster than we can write them)
> * a given event being too large
> * we have an event that does a nested wrap around
> 
> LTTng will not write the whole packet that is lost.

LTTng does not write an _event_ discarded at all. However, a packet
"lost" is a different thing: it only happens in overwrite mode, when we
overwrite a packet.

> It uses a ring
> buffer and the packet will just be overwritten in the buffer, but a
> counter will be incremented.

For an _event_ discarded, we're not even writing it into the buffer.

> The counter is written in the packet header in the CTF trace.

Indeed, the event lost counters are written in the packet in the ctf
trace.

> 
> When reading a trace, if you just read the packet headers, you will see
> something as follows:
> 
> Packet 1:
> ts_begin: 100
> ts_end: 200
> discarded: 0
> 
> Packet 2:
> ts_begin: 300
> ts_end: 400
> discarded: 100
> 
> Packet 3:
> ts_begin: 500
> ts_end: 600
> discarded: 100
> 
> Packet 4:
> ts_begin: 650
> ts_end: 750
> discarded: 200
> 
> With this example, the lost events are located between packets 1, 2 and
> packets 3,4.
> 
> If the events are too large, they are discarded in the current packet,
> lttng does not split events into packets (yet?), and this is lost during
> a current packet.
> 
> That means if the events are lost between 1 and 2, they are potentially
> in the range of [200-400] but probably in [200-300]
> The next lost event are between 3 and 4 (events discarded is a total
> count, not local to that packet), so 100 events are also lost between
> [600-750] but likely in between [600-650]. If you can confirm that all
> events WITH CONTEXTS are smaller than the packet sizes, I think it's a
> shoe in that it's between the packets and not containing the next packet.

"and not contained in the next packet".

Thanks,

Mathieu

> 
> Hope this clarifies some issues, it did for me!
> 
> Matthew
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: On lost events
       [not found] ` <20130704222948.GB8852@Krystal>
@ 2013-07-05 18:54   ` Matthew Khouzam
       [not found]   ` <51D71672.8020804@ericsson.com>
  1 sibling, 0 replies; 8+ messages in thread
From: Matthew Khouzam @ 2013-07-05 18:54 UTC (permalink / raw)
  To: Mathieu Desnoyers; +Cc: lttng-dev

Quick question. Some traces have overlapping packets, so in that case,
the lost events are between the last event of a previous packet and the
first event of the next packet, which just happens to be the previous
packet's end time?
On 13-07-04 06:29 PM, Mathieu Desnoyers wrote:
> * Matthew Khouzam (matthew.khouzam@ericsson.com) wrote:
>> Hi tracing werewolves,
>>
>> I want to clear up some stuff about lost events.
>>
>> Lost events are caused, in lttng 2.x when the tracer does not have
>> enough memory available to write an event. This can be due to:
>> * events coming in too fast (faster than we can write them)
>> * a given event being too large
>> * we have an event that does a nested wrap around
>>
>> LTTng will not write the whole packet that is lost.
> LTTng does not write an _event_ discarded at all. However, a packet
> "lost" is a different thing: it only happens in overwrite mode, when we
> overwrite a packet.
>
>> It uses a ring
>> buffer and the packet will just be overwritten in the buffer, but a
>> counter will be incremented.
> For an _event_ discarded, we're not even writing it into the buffer.
>
>> The counter is written in the packet header in the CTF trace.
> Indeed, the event lost counters are written in the packet in the ctf
> trace.
>
>> When reading a trace, if you just read the packet headers, you will see
>> something as follows:
>>
>> Packet 1:
>> ts_begin: 100
>> ts_end: 200
>> discarded: 0
>>
>> Packet 2:
>> ts_begin: 300
>> ts_end: 400
>> discarded: 100
>>
>> Packet 3:
>> ts_begin: 500
>> ts_end: 600
>> discarded: 100
>>
>> Packet 4:
>> ts_begin: 650
>> ts_end: 750
>> discarded: 200
>>
>> With this example, the lost events are located between packets 1, 2 and
>> packets 3,4.
>>
>> If the events are too large, they are discarded in the current packet,
>> lttng does not split events into packets (yet?), and this is lost during
>> a current packet.
>>
>> That means if the events are lost between 1 and 2, they are potentially
>> in the range of [200-400] but probably in [200-300]
>> The next lost event are between 3 and 4 (events discarded is a total
>> count, not local to that packet), so 100 events are also lost between
>> [600-750] but likely in between [600-650]. If you can confirm that all
>> events WITH CONTEXTS are smaller than the packet sizes, I think it's a
>> shoe in that it's between the packets and not containing the next packet.
> "and not contained in the next packet".
>
> Thanks,
>
> Mathieu
>
>> Hope this clarifies some issues, it did for me!
>>
>> Matthew
>>
>> _______________________________________________
>> lttng-dev mailing list
>> lttng-dev@lists.lttng.org
>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: On lost events
       [not found]   ` <51D71672.8020804@ericsson.com>
@ 2013-07-05 19:40     ` Yannick Brosseau
       [not found]     ` <51D72111.2010905@gmail.com>
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Yannick Brosseau @ 2013-07-05 19:40 UTC (permalink / raw)
  To: lttng-dev

On 2013-07-05 14:54, Matthew Khouzam wrote:
> Quick question. Some traces have overlapping packets, so in that case,
> the lost events are between the last event of a previous packet and the
> first event of the next packet, which just happens to be the previous
> packet's end time?
Babeltrace say that the losts are between the beginning of the next and
the end of the previous.

> On 13-07-04 06:29 PM, Mathieu Desnoyers wrote:
>> * Matthew Khouzam (matthew.khouzam@ericsson.com) wrote:
>>> Hi tracing werewolves,
>>>
>>> I want to clear up some stuff about lost events.
>>>
>>> Lost events are caused, in lttng 2.x when the tracer does not have
>>> enough memory available to write an event. This can be due to:
>>> * events coming in too fast (faster than we can write them)
>>> * a given event being too large
>>> * we have an event that does a nested wrap around
>>>
>>> LTTng will not write the whole packet that is lost.
>> LTTng does not write an _event_ discarded at all. However, a packet
>> "lost" is a different thing: it only happens in overwrite mode, when we
>> overwrite a packet.
>>
>>> It uses a ring
>>> buffer and the packet will just be overwritten in the buffer, but a
>>> counter will be incremented.
>> For an _event_ discarded, we're not even writing it into the buffer.
>>
>>> The counter is written in the packet header in the CTF trace.
>> Indeed, the event lost counters are written in the packet in the ctf
>> trace.
>>
>>> When reading a trace, if you just read the packet headers, you will see
>>> something as follows:
>>>
>>> Packet 1:
>>> ts_begin: 100
>>> ts_end: 200
>>> discarded: 0
>>>
>>> Packet 2:
>>> ts_begin: 300
>>> ts_end: 400
>>> discarded: 100
>>>
>>> Packet 3:
>>> ts_begin: 500
>>> ts_end: 600
>>> discarded: 100
>>>
>>> Packet 4:
>>> ts_begin: 650
>>> ts_end: 750
>>> discarded: 200
>>>
>>> With this example, the lost events are located between packets 1, 2 and
>>> packets 3,4.
>>>
>>> If the events are too large, they are discarded in the current packet,
>>> lttng does not split events into packets (yet?), and this is lost during
>>> a current packet.
>>>
>>> That means if the events are lost between 1 and 2, they are potentially
>>> in the range of [200-400] but probably in [200-300]
>>> The next lost event are between 3 and 4 (events discarded is a total
>>> count, not local to that packet), so 100 events are also lost between
>>> [600-750] but likely in between [600-650]. If you can confirm that all
>>> events WITH CONTEXTS are smaller than the packet sizes, I think it's a
>>> shoe in that it's between the packets and not containing the next packet.
>> "and not contained in the next packet".
>>
>> Thanks,
>>
>> Mathieu
>>
>>> Hope this clarifies some issues, it did for me!
>>>
>>> Matthew
>>>
>>> _______________________________________________
>>> lttng-dev mailing list
>>> lttng-dev@lists.lttng.org
>>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: On lost events
       [not found]     ` <51D72111.2010905@gmail.com>
@ 2013-07-05 19:54       ` Matthew Khouzam
  0 siblings, 0 replies; 8+ messages in thread
From: Matthew Khouzam @ 2013-07-05 19:54 UTC (permalink / raw)
  To: lttng-dev


On 13-07-05 03:40 PM, Yannick Brosseau wrote:
> On 2013-07-05 14:54, Matthew Khouzam wrote:
>> Quick question. Some traces have overlapping packets, so in that case,
>> the lost events are between the last event of a previous packet and the
>> first event of the next packet, which just happens to be the previous
>> packet's end time?
> Babeltrace say that the losts are between the beginning of the next and
> the end of the previous.

To quote the green lantern, "I KNOW RIGHT?!!?!?!". jokes aside, that
implies that all packets should always overlap and if they don't there
should be anti-time. I think the safest way to go about it is "last
event of the last packet to first event of the next one".
>
>> On 13-07-04 06:29 PM, Mathieu Desnoyers wrote:
>>> * Matthew Khouzam (matthew.khouzam@ericsson.com) wrote:
>>>> Hi tracing werewolves,
>>>>
>>>> I want to clear up some stuff about lost events.
>>>>
>>>> Lost events are caused, in lttng 2.x when the tracer does not have
>>>> enough memory available to write an event. This can be due to:
>>>> * events coming in too fast (faster than we can write them)
>>>> * a given event being too large
>>>> * we have an event that does a nested wrap around
>>>>
>>>> LTTng will not write the whole packet that is lost.
>>> LTTng does not write an _event_ discarded at all. However, a packet
>>> "lost" is a different thing: it only happens in overwrite mode, when we
>>> overwrite a packet.
>>>
>>>> It uses a ring
>>>> buffer and the packet will just be overwritten in the buffer, but a
>>>> counter will be incremented.
>>> For an _event_ discarded, we're not even writing it into the buffer.
>>>
>>>> The counter is written in the packet header in the CTF trace.
>>> Indeed, the event lost counters are written in the packet in the ctf
>>> trace.
>>>
>>>> When reading a trace, if you just read the packet headers, you will see
>>>> something as follows:
>>>>
>>>> Packet 1:
>>>> ts_begin: 100
>>>> ts_end: 200
>>>> discarded: 0
>>>>
>>>> Packet 2:
>>>> ts_begin: 300
>>>> ts_end: 400
>>>> discarded: 100
>>>>
>>>> Packet 3:
>>>> ts_begin: 500
>>>> ts_end: 600
>>>> discarded: 100
>>>>
>>>> Packet 4:
>>>> ts_begin: 650
>>>> ts_end: 750
>>>> discarded: 200
>>>>
>>>> With this example, the lost events are located between packets 1, 2 and
>>>> packets 3,4.
>>>>
>>>> If the events are too large, they are discarded in the current packet,
>>>> lttng does not split events into packets (yet?), and this is lost during
>>>> a current packet.
>>>>
>>>> That means if the events are lost between 1 and 2, they are potentially
>>>> in the range of [200-400] but probably in [200-300]
>>>> The next lost event are between 3 and 4 (events discarded is a total
>>>> count, not local to that packet), so 100 events are also lost between
>>>> [600-750] but likely in between [600-650]. If you can confirm that all
>>>> events WITH CONTEXTS are smaller than the packet sizes, I think it's a
>>>> shoe in that it's between the packets and not containing the next packet.
>>> "and not contained in the next packet".
>>>
>>> Thanks,
>>>
>>> Mathieu
>>>
>>>> Hope this clarifies some issues, it did for me!
>>>>
>>>> Matthew
>>>>
>>>> _______________________________________________
>>>> lttng-dev mailing list
>>>> lttng-dev@lists.lttng.org
>>>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>> _______________________________________________
>> lttng-dev mailing list
>> lttng-dev@lists.lttng.org
>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: On lost events
       [not found]   ` <51D71672.8020804@ericsson.com>
  2013-07-05 19:40     ` Yannick Brosseau
       [not found]     ` <51D72111.2010905@gmail.com>
@ 2013-07-05 22:13     ` Mathieu Desnoyers
       [not found]     ` <20130705221312.GA28331@Krystal>
  3 siblings, 0 replies; 8+ messages in thread
From: Mathieu Desnoyers @ 2013-07-05 22:13 UTC (permalink / raw)
  To: Matthew Khouzam; +Cc: lttng-dev

* Matthew Khouzam (matthew.khouzam@ericsson.com) wrote:
> Quick question. Some traces have overlapping packets, so in that case,
> the lost events are between the last event of a previous packet and the
> first event of the next packet, which just happens to be the previous
> packet's end time?

"Some traces have overlapping packets"

do you mean

"Some traces have overlapping packets"

or

"Some streams have overlapping packets"

?

> On 13-07-04 06:29 PM, Mathieu Desnoyers wrote:
> > * Matthew Khouzam (matthew.khouzam@ericsson.com) wrote:
> >> Hi tracing werewolves,
> >>
> >> I want to clear up some stuff about lost events.
> >>
> >> Lost events are caused, in lttng 2.x when the tracer does not have
> >> enough memory available to write an event. This can be due to:
> >> * events coming in too fast (faster than we can write them)
> >> * a given event being too large
> >> * we have an event that does a nested wrap around
> >>
> >> LTTng will not write the whole packet that is lost.
> > LTTng does not write an _event_ discarded at all. However, a packet
> > "lost" is a different thing: it only happens in overwrite mode, when we
> > overwrite a packet.
> >
> >> It uses a ring
> >> buffer and the packet will just be overwritten in the buffer, but a
> >> counter will be incremented.
> > For an _event_ discarded, we're not even writing it into the buffer.
> >
> >> The counter is written in the packet header in the CTF trace.
> > Indeed, the event lost counters are written in the packet in the ctf
> > trace.
> >
> >> When reading a trace, if you just read the packet headers, you will see
> >> something as follows:
> >>
> >> Packet 1:
> >> ts_begin: 100
> >> ts_end: 200
> >> discarded: 0
> >>
> >> Packet 2:
> >> ts_begin: 300
> >> ts_end: 400
> >> discarded: 100
> >>
> >> Packet 3:
> >> ts_begin: 500
> >> ts_end: 600
> >> discarded: 100
> >>
> >> Packet 4:
> >> ts_begin: 650
> >> ts_end: 750
> >> discarded: 200
> >>
> >> With this example, the lost events are located between packets 1, 2 and
> >> packets 3,4.
> >>
> >> If the events are too large, they are discarded in the current packet,
> >> lttng does not split events into packets (yet?), and this is lost during
> >> a current packet.
> >>
> >> That means if the events are lost between 1 and 2, they are potentially
> >> in the range of [200-400] but probably in [200-300]
> >> The next lost event are between 3 and 4 (events discarded is a total
> >> count, not local to that packet), so 100 events are also lost between
> >> [600-750] but likely in between [600-650]. If you can confirm that all
> >> events WITH CONTEXTS are smaller than the packet sizes, I think it's a
> >> shoe in that it's between the packets and not containing the next packet.
> > "and not contained in the next packet".
> >
> > Thanks,
> >
> > Mathieu
> >
> >> Hope this clarifies some issues, it did for me!
> >>
> >> Matthew
> >>
> >> _______________________________________________
> >> lttng-dev mailing list
> >> lttng-dev@lists.lttng.org
> >> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
> 

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: On lost events
       [not found]     ` <20130705221312.GA28331@Krystal>
@ 2013-07-08 15:55       ` Matthew Khouzam
       [not found]       ` <51DAE0FE.2020809@ericsson.com>
  1 sibling, 0 replies; 8+ messages in thread
From: Matthew Khouzam @ 2013-07-08 15:55 UTC (permalink / raw)
  To: Mathieu Desnoyers; +Cc: lttng-dev

Some streams have overlapping packets. I was shocked.


On 13-07-05 06:13 PM, Mathieu Desnoyers wrote:
> * Matthew Khouzam (matthew.khouzam@ericsson.com) wrote:
>> Quick question. Some traces have overlapping packets, so in that case,
>> the lost events are between the last event of a previous packet and the
>> first event of the next packet, which just happens to be the previous
>> packet's end time?
> "Some traces have overlapping packets"
>
> do you mean
>
> "Some traces have overlapping packets"
>
> or
>
> "Some streams have overlapping packets"
>
> ?
>
>> On 13-07-04 06:29 PM, Mathieu Desnoyers wrote:
>>> * Matthew Khouzam (matthew.khouzam@ericsson.com) wrote:
>>>> Hi tracing werewolves,
>>>>
>>>> I want to clear up some stuff about lost events.
>>>>
>>>> Lost events are caused, in lttng 2.x when the tracer does not have
>>>> enough memory available to write an event. This can be due to:
>>>> * events coming in too fast (faster than we can write them)
>>>> * a given event being too large
>>>> * we have an event that does a nested wrap around
>>>>
>>>> LTTng will not write the whole packet that is lost.
>>> LTTng does not write an _event_ discarded at all. However, a packet
>>> "lost" is a different thing: it only happens in overwrite mode, when we
>>> overwrite a packet.
>>>
>>>> It uses a ring
>>>> buffer and the packet will just be overwritten in the buffer, but a
>>>> counter will be incremented.
>>> For an _event_ discarded, we're not even writing it into the buffer.
>>>
>>>> The counter is written in the packet header in the CTF trace.
>>> Indeed, the event lost counters are written in the packet in the ctf
>>> trace.
>>>
>>>> When reading a trace, if you just read the packet headers, you will see
>>>> something as follows:
>>>>
>>>> Packet 1:
>>>> ts_begin: 100
>>>> ts_end: 200
>>>> discarded: 0
>>>>
>>>> Packet 2:
>>>> ts_begin: 300
>>>> ts_end: 400
>>>> discarded: 100
>>>>
>>>> Packet 3:
>>>> ts_begin: 500
>>>> ts_end: 600
>>>> discarded: 100
>>>>
>>>> Packet 4:
>>>> ts_begin: 650
>>>> ts_end: 750
>>>> discarded: 200
>>>>
>>>> With this example, the lost events are located between packets 1, 2 and
>>>> packets 3,4.
>>>>
>>>> If the events are too large, they are discarded in the current packet,
>>>> lttng does not split events into packets (yet?), and this is lost during
>>>> a current packet.
>>>>
>>>> That means if the events are lost between 1 and 2, they are potentially
>>>> in the range of [200-400] but probably in [200-300]
>>>> The next lost event are between 3 and 4 (events discarded is a total
>>>> count, not local to that packet), so 100 events are also lost between
>>>> [600-750] but likely in between [600-650]. If you can confirm that all
>>>> events WITH CONTEXTS are smaller than the packet sizes, I think it's a
>>>> shoe in that it's between the packets and not containing the next packet.
>>> "and not contained in the next packet".
>>>
>>> Thanks,
>>>
>>> Mathieu
>>>
>>>> Hope this clarifies some issues, it did for me!
>>>>
>>>> Matthew
>>>>
>>>> _______________________________________________
>>>> lttng-dev mailing list
>>>> lttng-dev@lists.lttng.org
>>>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: On lost events
       [not found]       ` <51DAE0FE.2020809@ericsson.com>
@ 2013-07-08 16:38         ` Mathieu Desnoyers
  0 siblings, 0 replies; 8+ messages in thread
From: Mathieu Desnoyers @ 2013-07-08 16:38 UTC (permalink / raw)
  To: Matthew Khouzam; +Cc: lttng-dev

* Matthew Khouzam (matthew.khouzam@ericsson.com) wrote:
> Some streams have overlapping packets. I was shocked.

Ah! yes. The time stamp begin is sampled at event space reservation, and
time stamp end is sampled at commit.

So you can have, with packets A and B in a stream:

- reserve space at end of A
- interrupted
- reserve space at beginning of B (get timestamp begin)
- commit at end of A (get timestamp end)
- commit at beginning of B

So yes, the timestamps can very slightly overlap indeed.

Thanks,

Mathieu

> 
> 
> On 13-07-05 06:13 PM, Mathieu Desnoyers wrote:
> > * Matthew Khouzam (matthew.khouzam@ericsson.com) wrote:
> >> Quick question. Some traces have overlapping packets, so in that case,
> >> the lost events are between the last event of a previous packet and the
> >> first event of the next packet, which just happens to be the previous
> >> packet's end time?
> > "Some traces have overlapping packets"
> >
> > do you mean
> >
> > "Some traces have overlapping packets"
> >
> > or
> >
> > "Some streams have overlapping packets"
> >
> > ?
> >
> >> On 13-07-04 06:29 PM, Mathieu Desnoyers wrote:
> >>> * Matthew Khouzam (matthew.khouzam@ericsson.com) wrote:
> >>>> Hi tracing werewolves,
> >>>>
> >>>> I want to clear up some stuff about lost events.
> >>>>
> >>>> Lost events are caused, in lttng 2.x when the tracer does not have
> >>>> enough memory available to write an event. This can be due to:
> >>>> * events coming in too fast (faster than we can write them)
> >>>> * a given event being too large
> >>>> * we have an event that does a nested wrap around
> >>>>
> >>>> LTTng will not write the whole packet that is lost.
> >>> LTTng does not write an _event_ discarded at all. However, a packet
> >>> "lost" is a different thing: it only happens in overwrite mode, when we
> >>> overwrite a packet.
> >>>
> >>>> It uses a ring
> >>>> buffer and the packet will just be overwritten in the buffer, but a
> >>>> counter will be incremented.
> >>> For an _event_ discarded, we're not even writing it into the buffer.
> >>>
> >>>> The counter is written in the packet header in the CTF trace.
> >>> Indeed, the event lost counters are written in the packet in the ctf
> >>> trace.
> >>>
> >>>> When reading a trace, if you just read the packet headers, you will see
> >>>> something as follows:
> >>>>
> >>>> Packet 1:
> >>>> ts_begin: 100
> >>>> ts_end: 200
> >>>> discarded: 0
> >>>>
> >>>> Packet 2:
> >>>> ts_begin: 300
> >>>> ts_end: 400
> >>>> discarded: 100
> >>>>
> >>>> Packet 3:
> >>>> ts_begin: 500
> >>>> ts_end: 600
> >>>> discarded: 100
> >>>>
> >>>> Packet 4:
> >>>> ts_begin: 650
> >>>> ts_end: 750
> >>>> discarded: 200
> >>>>
> >>>> With this example, the lost events are located between packets 1, 2 and
> >>>> packets 3,4.
> >>>>
> >>>> If the events are too large, they are discarded in the current packet,
> >>>> lttng does not split events into packets (yet?), and this is lost during
> >>>> a current packet.
> >>>>
> >>>> That means if the events are lost between 1 and 2, they are potentially
> >>>> in the range of [200-400] but probably in [200-300]
> >>>> The next lost event are between 3 and 4 (events discarded is a total
> >>>> count, not local to that packet), so 100 events are also lost between
> >>>> [600-750] but likely in between [600-650]. If you can confirm that all
> >>>> events WITH CONTEXTS are smaller than the packet sizes, I think it's a
> >>>> shoe in that it's between the packets and not containing the next packet.
> >>> "and not contained in the next packet".
> >>>
> >>> Thanks,
> >>>
> >>> Mathieu
> >>>
> >>>> Hope this clarifies some issues, it did for me!
> >>>>
> >>>> Matthew
> >>>>
> >>>> _______________________________________________
> >>>> lttng-dev mailing list
> >>>> lttng-dev@lists.lttng.org
> >>>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
> 

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* On lost events
@ 2013-07-04 21:46 Matthew Khouzam
  0 siblings, 0 replies; 8+ messages in thread
From: Matthew Khouzam @ 2013-07-04 21:46 UTC (permalink / raw)
  To: lttng-dev

Hi tracing werewolves,

I want to clear up some stuff about lost events.

Lost events are caused, in lttng 2.x when the tracer does not have
enough memory available to write an event. This can be due to:
* events coming in too fast (faster than we can write them)
* a given event being too large
* we have an event that does a nested wrap around

LTTng will not write the whole packet that is lost. It uses a ring
buffer and the packet will just be overwritten in the buffer, but a
counter will be incremented.
The counter is written in the packet header in the CTF trace.

When reading a trace, if you just read the packet headers, you will see
something as follows:

Packet 1:
ts_begin: 100
ts_end: 200
discarded: 0

Packet 2:
ts_begin: 300
ts_end: 400
discarded: 100

Packet 3:
ts_begin: 500
ts_end: 600
discarded: 100

Packet 4:
ts_begin: 650
ts_end: 750
discarded: 200

With this example, the lost events are located between packets 1, 2 and
packets 3,4.

If the events are too large, they are discarded in the current packet,
lttng does not split events into packets (yet?), and this is lost during
a current packet.

That means if the events are lost between 1 and 2, they are potentially
in the range of [200-400] but probably in [200-300]
The next lost event are between 3 and 4 (events discarded is a total
count, not local to that packet), so 100 events are also lost between
[600-750] but likely in between [600-650]. If you can confirm that all
events WITH CONTEXTS are smaller than the packet sizes, I think it's a
shoe in that it's between the packets and not containing the next packet.

Hope this clarifies some issues, it did for me!

Matthew

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-07-08 16:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <51D5ED4E.2000305@ericsson.com>
2013-07-04 22:29 ` On lost events Mathieu Desnoyers
     [not found] ` <20130704222948.GB8852@Krystal>
2013-07-05 18:54   ` Matthew Khouzam
     [not found]   ` <51D71672.8020804@ericsson.com>
2013-07-05 19:40     ` Yannick Brosseau
     [not found]     ` <51D72111.2010905@gmail.com>
2013-07-05 19:54       ` Matthew Khouzam
2013-07-05 22:13     ` Mathieu Desnoyers
     [not found]     ` <20130705221312.GA28331@Krystal>
2013-07-08 15:55       ` Matthew Khouzam
     [not found]       ` <51DAE0FE.2020809@ericsson.com>
2013-07-08 16:38         ` Mathieu Desnoyers
2013-07-04 21:46 Matthew Khouzam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.