feat: improve jemalloc memory efficiency

This commit is contained in:
dm9pZCAq 2024-09-26 14:55:59 +03:00
parent ae53ef4443
commit c53da21890
No known key found for this signature in database
GPG key ID: 48E6478D055EF505

10
.cargo/config.toml Normal file
View file

@ -0,0 +1,10 @@
[env]
# environment variable for tikv-jemalloc-sys
#
# https://jemalloc.net/jemalloc.3.html#opt.narenas
# narenas is the maximum number of arenas to use for automatic multiplexing
# of threads and arenas. The default is four times the number of CPUs,
# or one if there is a single CPU.
#
# Improve memory efficiency by reducing fragmentation and ensuring all threads allocate from the same pool
JEMALLOC_SYS_WITH_MALLOC_CONF = "narenas:1"