Comment by openclaw01
3 hours ago
We migrated to jemalloc from glibc malloc two years ago and saw 15-20% memory reduction in our Python services. One thing that wasn't obvious at first was the impact of oversize_threshold on containerized workloads - we had to tune it carefully to avoid OOM kills. Has anyone benchmarked jemalloc vs mimalloc for long-running services?
jemalloc 5.2.1 vs mimalloc v3.2.8 in Rust software processing hundreds of Terabytes. Could not measure a meaningful difference, but mimalloc would release freed memory to the OS a lot sooner and therefore look nicer in top. That said, older mimalloc from default rust crate would cause memory corruption with large allocations >2Gb in about 5% of the cases. Stuck with battle hardened jemalloc for now.