All of lore.kernel.org
 help / color / mirror / Atom feed
* HugePages shared memory support in LLTng
@ 2019-07-12 22:18 Yiteng Guo
  0 siblings, 0 replies; 13+ messages in thread
From: Yiteng Guo @ 2019-07-12 22:18 UTC (permalink / raw)
  To: lttng-dev


[-- Attachment #1.1: Type: text/plain, Size: 1781 bytes --]

Hello,

I am wondering if there is any way for lttng-ust to create its shm on
hugepages. I noticed that there was an option `--shm-path` which can be
used to change the location of shm. However, if I specified the path to a
`hugetlbfs` such as /dev/hugepages, I would get errors in lttng-sessiond
and no trace data were generated.

The error I got was
```
PERROR - 17:54:56.740674 [8163/8168]: Error appending to metadata file:
Invalid argument (in lttng_metadata_printf() at ust-metadata.c:176)
Error: Failed to generate session metadata (errno = -1)
```
I took a look at lttng code base and found that lttng used `write` to
generate a metadata file under `--shm-path`. However, it looks like
`hugetlbfs` does not support `write` operation. I did a simple patch with
`mmap` to get around this problem. Then, I got another error:
```
Error: Error creating UST channel "my-channel" on the consumer daemon
```
This time, I could not locate the problem anymore :(. Do you have any idea
of how to get hugepages shm work in lttng?

To give you more context here, I was tracing a performance sensitive
program. I didn't want to suffer from the sub-buffer switch cost so I
created a very large sub-buffer (1MB). I did a benchmark on my tracepoint
and noticed that after running a certain number of tracepoints, I got a
noticeably larger overhead (1200ns larger than other) for every ~130
tracepoints. It turned out that this large overhead was due to a page
fault. The numbers were matched up (130 * 32 bytes = 4160 bytes, which is
approximately the size of a normal page 4kB) and I also used lttng perf
page fault counters to verify it. Therefore, I am looking for a solution to
have lttng create shm on hugepages.

Thank you very much! I look forward to hearing from you.

Best,
Yiteng

[-- Attachment #1.2: Type: text/html, Size: 2041 bytes --]

[-- Attachment #2: Type: text/plain, Size: 156 bytes --]

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

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

end of thread, other threads:[~2019-07-29 19:05 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAO+PNdHdLFk=Q0L2BLGnz8xCvdgMw3aYpZuAZumBOWKraKTnAw@mail.gmail.com>
2019-07-15 14:33 ` HugePages shared memory support in LLTng Jonathan Rajotte-Julien
     [not found] ` <20190715143302.GA2017@joraj-alpa>
2019-07-15 19:21   ` Yiteng Guo
     [not found]   ` <CAO+PNdHW7O98QSdWyA5U6e=gtLmdFt77wHOT=eHb-Py1W3A-oQ@mail.gmail.com>
2019-07-22 18:44     ` Yiteng Guo
     [not found]     ` <CAO+PNdFotFk6uCF1dySZi9dV6PYpAazWoQpsnU+N58F2b-73FQ@mail.gmail.com>
2019-07-22 19:23       ` Jonathan Rajotte-Julien
     [not found]       ` <20190722192308.GA803@joraj-alpa>
2019-07-23 15:07         ` Jonathan Rajotte-Julien
     [not found]         ` <20190723150744.GC803@joraj-alpa>
     [not found]           ` <CAO+PNdGhEgeTo35du4ysMcCOUQ0PKE4tuyGg593AE5feZZ4_JQ@mail.gmail.com>
2019-07-23 20:27             ` Jonathan Rajotte-Julien
     [not found]             ` <20190723202723.GD803@joraj-alpa>
2019-07-24 15:54               ` Yiteng Guo
     [not found]               ` <CAO+PNdEfTq5vAqWJAoWK_hyxdjUuQgPPf0sqJXNO9jw1J6RoNg@mail.gmail.com>
2019-07-24 15:59                 ` Jonathan Rajotte-Julien
2019-07-25 15:40               ` Mathieu Desnoyers
     [not found]               ` <1962899258.11638.1564069223526.JavaMail.zimbra@efficios.com>
2019-07-25 17:59                 ` Trent Piepho via lttng-dev
     [not found]                 ` <1564077561.2343.121.camel@impinj.com>
2019-07-26  4:37                   ` Yiteng Guo
     [not found]                   ` <CAO+PNdGRD3BkfEOgjCLo+kgXreZD_GqYnW6LB7-ELjnowk+GjQ@mail.gmail.com>
2019-07-29 19:05                     ` Jonathan Rajotte-Julien
2019-07-12 22:18 Yiteng Guo

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.