[lttng-dev] Buffer multiplicity in user-space
Thibault, Daniel
Daniel.Thibault at drdc-rddc.gc.ca
Wed Dec 4 10:42:17 EST 2013
I'd appreciate a confirmation (or correction) of my understanding of buffer multiplicity in user-space. Assume we have just the root session manager running, and we've created a single session and enabled all user-space events in the default channel channel0.
In per-userID mode, if instrumented apps are running under several user IDs, we will have one buffer (set of sub-buffers) per user ID, collecting that userID's channel's events, and the consumer daemon simply round-robins servicing the buffers to the matching sub-traces (lttng-traces/session-name/ust/uid/1001/64-bit/channel0_0, lttng-traces/session-name/ust/uid/1002/64-bit/channel0_0, etc.).
Similarly, in per-processID mode, the buffer organization is the same except that we have a buffer per process ID (regardless of each process's owning userID), and the consumer daemon round-robins between a greater number of buffers, dispatching the records to more sub-traces (lttng-traces/session-name/ust/pid/app1-1001/channel0_0, lttng-traces/session-name/ust/pid/app2-1001/channel0_0, lttng-traces/session-name/ust/pid/app1-1002/channel0_0, etc.).
In this latter case, don't we potentially run into a lot of overhead if a multitude of short-lived processes occurs (i.e. going through the business of creating a buffer every time)? Is the buffer creation triggered by the process's registration with the session daemon, and does this slow the process start up (i.e. does the registration call return immediately or does it wait until the buffer is ready?)? If the registration call returns immediately, what happens if the process emits an event before the buffer creation is complete?
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