[lttng-dev] "lttng enable-channel --tracefile-size" bug

Julien Desfossez jdesfossez at efficios.com
Fri Jun 3 13:17:59 UTC 2016


> thanks, just one more question, I would think that it would be more
> efficient to have multiple sub-buffers writing to a file versus one
> sub-buffer to one file,. Of course, when the file gets overwritten
> (rolled-over by the tracefile-count option)  multiple sub-buffers are
> lost.  Do you have any use case recommendation?  John

It all depends on your use-case, usually the tracefile-count option is
used to keep an relatively short time-frame history on disk, so the size
you keep on disk is dependant on how long you want this history to be
and the rate at which events are recorded.

The sub-buffer size is not directly related to this option, when a
tracefile is overwritten all its content is truncated regardless the
number of sub-buffers. So having 10 sub-buffers of 4k or 1 sub-buffer of
40k is basically the same thing for the tracefile rotation.

In terms of performance, handling the rotation adds some work for the
consumerd after extracting the data, so if it is too frequent, you might
see more discarded events. On the other hand, if your tracefiles are
really big, when you overwrite one, you loose a lot of old data (more or
less old depending on the tracefile-count option). So it really is a
tradeoff you have to think about with your use-case.

I hope it clarifies the situation.

Thanks,

Julien


More information about the lttng-dev mailing list