From: "Jérémie Galarneau via lttng-dev" <lttng-dev@lists.lttng.org>
To: "Lemay, Paul" <P.Lemay@dell.com>
Cc: "lttng-dev@lists.lttng.org" <lttng-dev@lists.lttng.org>
Subject: Re: [lttng-dev] Shared memory circular buffer and K8s pods
Date: Tue, 18 Oct 2022 14:34:09 -0400 [thread overview]
Message-ID: <Y07xoexhESiFtJTy@efficios.com> (raw)
In-Reply-To: <DS7PR19MB637575A3329444AD675C12379F289@DS7PR19MB6375.namprd19.prod.outlook.com>
Hi Paul,
We don’t have much documentation about deploying in Kubernetes; we’re working on
it.
It’s hard to provide very specific guidance without knowing your setup and
constraints. Since you mention applications, I’m assuming you are mostly
interested in user space tracing. There are two main approaches for that.
First, you can deploy the full LTTng stack in every container: the daemons of
LTTng-tools, and LTTng-UST + your app. That’s probably the simplest way to get
going, but it goes against K8s’ model of having one process per container, which
can become annoying.
The other approach, which I would recommend you look into, is deploying an LTTng
sidecar per pod that runs the session daemon, and installing LTTng-UST (the
tracer libraries) along your instrumented applications in the other containers
of the pod.
Michael Jeanson has a demo showing how he deployed LTTng in K8s using that
approach. Hopefully, that can help you get started:
https://github.com/mjeanson/gcloud-lttng
There are a couple things to note in this configuration:
- A “memory” volume, devshm, is shared between containers. It has to be
large enough to accommodate your buffer configuration, and
- the containers share the same pid namespace across the pod
(https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/).
Then that leaves the question of where you want to store traces. There’s a ton
of options there. By default, Michael's demo writes them to the lttng-home
volume. You may want to look into network streaming to send traces over the
network to a relay daemon (possibly running in another pod):
https://lttng.org/docs/v2.13/#doc-lttng-relayd
Otherwise, you may also be interested in session rotations to manage traces
pretty much how you would handle logs:
https://lttng.org/blog/2019/10/15/lttng-session-rotation/
https://lttng.org/docs/v2.13/#doc-session-rotation
Let me know if you have more questions,
Jérémie
On Tue, Oct 18, 2022 at 01:00:47PM +0000, Lemay, Paul via lttng-dev wrote:
> Hello There,
>
> We are looking at LTTng for a development here at Dell. As I understand the LTTng, there are shared memories of circular buffer traces created between an application and the consumer daemon. After looking at some presentation that you did, I see that you have started working on containerization and pods.
>
> So our applications run in pods, and am not sure how to organize the pods knowing about those shared memories? Can you help us better understand how our code should be organized in the context of Kubernetes? Any documentation that we can access?
>
> Best Regards
>
>
> Internal Use - Confidential
> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
next prev parent reply other threads:[~2022-10-18 18:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-18 13:00 [lttng-dev] Shared memory circular buffer and K8s pods Lemay, Paul via lttng-dev
2022-10-18 18:34 ` Jérémie Galarneau via lttng-dev [this message]
2022-10-18 18:40 ` Lemay, Paul via lttng-dev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y07xoexhESiFtJTy@efficios.com \
--to=lttng-dev@lists.lttng.org \
--cc=P.Lemay@dell.com \
--cc=jeremie.galarneau@efficios.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.