[lttng-dev] Channel buffer allocation

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Tue Nov 14 00:19:30 UTC 2017


----- On Nov 13, 2017, at 1:40 PM, Nalin Pai <nalinpai at gmail.com> wrote: 

> Hi,
> In the per-pid buffer scheme, when are the ring buffers allocated for each pid?
> Is it when a channel is created or is it an event provided by that process is
> enabled for a specific channel.

In per-pid buffers, the buffers are allocated for each registered process whenever 
each of those process is registered (typically at program launch). Buffer allocation 
of per-pid buffers brings a significant overhead on systems with short-lived processes. 
Using "per-uid" buffers is recommended instead in those situations. 

> I am trying to understand whether there is an overhead to creating many
> channels. Will a process incur the allocation of buffers for a channel that is
> not interested in any of the events that the process is providing?

Yes, a process will have to allocate buffers if it's registered to lttng-sessiond, even if 
it does not contain any event enabled for that channel. This is needed to handle 
dynamically loaded libraries for instance, which may add additional events into a 
process after its initial constructor execution. 

Thanks, 

Mathieu 

> -Nalin

> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers 
EfficiOS Inc. 
http://www.efficios.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20171114/b0631803/attachment.html>


More information about the lttng-dev mailing list