You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "ksqrtr (via GitHub)" <gi...@apache.org> on 2023/08/01 09:31:40 UTC
[GitHub] [trafficserver] ksqrtr opened a new issue, #10123: Difference between LD_PRELOAD libjemalloc and building with jemalloc
ksqrtr opened a new issue, #10123:
URL: https://github.com/apache/trafficserver/issues/10123
Hello!
Are there any differences between these two setups for ATS 9.2.x?
Case 1:
1. `CONFIG proxy.config.proxy_binary_opts STRING -M -f -F`
2. `LD_PRELOAD=/path/to/libjemalloc.so /path/to/traffic_manager`
Case 2:
1. `CONFIG proxy.config.proxy_binary_opts STRING -M -f -F`
2. Traffic server compiled with `--with-jemalloc=/path/to/libjemalloc` and no `LD_PRELOAD` stuff is done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] cmcfarlen commented on issue #10123: Difference between LD_PRELOAD libjemalloc and building with jemalloc
Posted by "cmcfarlen (via GitHub)" <gi...@apache.org>.
cmcfarlen commented on issue #10123:
URL: https://github.com/apache/trafficserver/issues/10123#issuecomment-1708585924
Hi! Sorry for the delay responding to this issue.
If you configure using `--with-jemalloc` or `--with-mimalloc` then ATS will use a custom allocator for allocations when freelists are disabled (with -f). Additionally, with `--with-jemalloc`, when you send `SIGUSR1` ATS will call malloc_stats_print to dump arena stats and will look for a custom format string in `proxy.config.memory.malloc_stats_print_opts`.
As an aside, the `-f` option disables freelists, which can definitely improve performance if you have a lot of cores and high transaction rates. On the other hand, `-F` disables the thread-local object caches which will re-use objects reallocated on the same thread (ProxyAllocators). Turning this off might actually decrease performance and put more pressure on the memory allocators. If you really want to tune ATS, you should run with both flags on/off to see how they impact performance and memory usage.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Difference between LD_PRELOAD libjemalloc and building with jemalloc [trafficserver]
Posted by "dhairavm (via GitHub)" <gi...@apache.org>.
dhairavm commented on issue #10123:
URL: https://github.com/apache/trafficserver/issues/10123#issuecomment-1856002239
Hi @cmcfarlen We've also compiled ATS v8.1.7 for Debian using `--with-jemalloc=/usr/local/lib`.
While your answer clarifies the function of `-f` versus `-F`, could you also shed some light on whether an ATS build that is compiled with `--with-jemalloc=/usr/local/lib` also needs an `LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2` or not to function correctly with Jemalloc?
Also, where can we find examples/samples for the string to put as value for `proxy.config.memory.malloc_stats_print_opts`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Difference between LD_PRELOAD libjemalloc and building with jemalloc [trafficserver]
Posted by "bryancall (via GitHub)" <gi...@apache.org>.
bryancall closed issue #10123: Difference between LD_PRELOAD libjemalloc and building with jemalloc
URL: https://github.com/apache/trafficserver/issues/10123
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Difference between LD_PRELOAD libjemalloc and building with jemalloc [trafficserver]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #10123:
URL: https://github.com/apache/trafficserver/issues/10123#issuecomment-2542662934
This issue has been automatically marked as stale because it has not had recent activity. Marking it stale to flag it for further consideration by the community.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Difference between LD_PRELOAD libjemalloc and building with jemalloc [trafficserver]
Posted by "bryancall (via GitHub)" <gi...@apache.org>.
bryancall commented on issue #10123:
URL: https://github.com/apache/trafficserver/issues/10123#issuecomment-4828019928
This is a usage and support question rather than a bug or feature request, and the core of it was already answered in the thread: when Apache Traffic Server is built with --with-jemalloc (or --with-mimalloc), it uses that custom allocator directly for allocations made when the freelists are disabled, so an explicit LD_PRELOAD of libjemalloc is not required in that build. Sending SIGUSR1 to a jemalloc build also calls malloc_stats_print and honors the format string in proxy.config.memory.malloc_stats_print_opts (the accepted format strings are documented by jemalloc itself for malloc_stats_print). The two open follow-up questions never got a reply and the thread has been idle and auto-marked stale since 2023, so I am closing it as a resolved, stale support question. If you still have a specific question about jemalloc tuning on a current release, please open a new discussion with the version and configuration details and we can pick it up there.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Difference between LD_PRELOAD libjemalloc and building with jemalloc [trafficserver]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #10123:
URL: https://github.com/apache/trafficserver/issues/10123#issuecomment-3806761187
This issue has been automatically marked as stale because it has not had recent activity. Marking it stale to flag it for further consideration by the community.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org