mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
Merge pull request #35216 from edsiper/fluentd-jemalloc
Automatic merge from submit-queue cluster-addons: enable Jemalloc for Fluentd based images **What this PR does / why we need it**: This Pull Request includes two patches that enable the recommended use of Jemalloc memory allocator for container images that are based in Fluentd. The patches applies to the following cluster-addons: - fluentd-es-image - fluentd-gcp-image **Which issue this PR fixes** This PR is part of the solution for issues: - kubernetes/kubernetes/issues/32762 - GoogleCloudPlatform/fluent-plugin-google-cloud/issues/87 When Fluentd runs in high load environments, it's likely the default operating system memory allocator will generate a high fragmentation ending up in a high memory usage. In order to reduce fragmentation and decrease memory usage an alternative memory allocator as Jemalloc is used.  For the record: fluentd-es-image uses [td-agent](https://docs.treasuredata.com/articles/td-agent) Fluentd package maintained by Treasure Data, which contains Jemalloc 4.2.1 (latest stable version). The google-fluentd package used in fluentd-gcp-image comes with Jemalloc 2.2.5, which have many known issues, I strongly suggest google-fluentd package gets updated. **Special notes for your reviewer**: In the research of this topic have been involved @piosz and @Crassirostris.
This commit is contained in:
commit
48ef0faa0e
@ -38,5 +38,7 @@ COPY td-agent.conf /etc/td-agent/td-agent.conf
|
||||
COPY build.sh /tmp/build.sh
|
||||
RUN /tmp/build.sh
|
||||
|
||||
ENV LD_PRELOAD /opt/td-agent/embedded/lib/libjemalloc.so
|
||||
|
||||
# Run the Fluentd service.
|
||||
ENTRYPOINT ["td-agent"]
|
||||
|
Loading…
Reference in New Issue
Block a user