Set the MALLOC_CONF environment variable in the Docker image to tune the Jemalloc configuration. Configuring Jemalloc to use two memory arenas reduces memory fragmentation, and using background threads and low decay times allows freed memory to be returned to the OS sooner. Previously we set this environment variable at runtime in Kubernetes, but baking it into the image is simpler.
2.1 KiB
2.1 KiB