Earlier quoted context omitted.
I wonder why glibc isn't just using jemalloc when it seems to perform much better than what it currently has.
Under most workloads jemalloc will use much more memory than ptmalloc (glibc).
Why does musl make my Rust code so slow?
41–50 of 77 posts
Re: Why does musl make my Rust code so slow?
#42Re: Why does musl make my Rust code so slow?
#43Earlier quoted context omitted.
Benchmarking in Docker in general is a mistake I believe.
Why? The only overhead you have in Docker is on syscalls (due to permission checks, namespaces, ...), everything else runs at 100% native speed - unlike assisted virtualization (at least IOMMU overhead plus overhead for anything involving the filesystem) or emulated virtualization (obvious overheads here).
Re: Why does musl make my Rust code so slow?
#44Re: Why does musl make my Rust code so slow?
#45Earlier quoted context omitted.
Under most workloads jemalloc will use much more memory than ptmalloc (glibc).
I had the opposite experience. Jemalloc uses a lot less (virtual) memory, especially with multithreaded applications. The glibc allocator wastes quite a lot of memory mappings from a thread and never cleans them up even if a thread only had a burst of allocations (there is an upstream bug open about, they don't consider it a leak)
Re: Why does musl make my Rust code so slow?
#46For those curious, Musl's malloc implementation is currently being re-written for higher performance and robustness, see https://github.com/richfelker/mallocng-draft
Re: Why does musl make my Rust code so slow?
#47For those curious, Musl's malloc implementation is currently being re-written for higher performance and robustness, see https://github.com/richfelker/mallocng-draft
Do you have any extra readings on the rationale of building their own malloc rather than integrating mimalloc or jemalloc?
Re: Why does musl make my Rust code so slow?
#48For those curious, Musl's malloc implementation is currently being re-written for higher performance and robustness, see https://github.com/richfelker/mallocng-draft
Do you have any extra readings on the rationale of building their own malloc rather than integrating mimalloc or jemalloc?
Re: Why does musl make my Rust code so slow?
#49For those curious, Musl's malloc implementation is currently being re-written for higher performance and robustness, see https://github.com/richfelker/mallocng-draft
Do you have any extra readings on the rationale of building their own malloc rather than integrating mimalloc or jemalloc?
Re: Why does musl make my Rust code so slow?
#50Earlier quoted context omitted.
Ah, okay. Searched a bit, and it apparently requires you to find your own with dns client lookup library, avoid dlopen(), set GCONV_PATH, and so on.
For a long time glibc was maintained by someone who was of the opinion that if you wanted to statically link 3rd party libraries, then you shouldn't be allowed to build binaries.
I think the truth is that both have costs and benefits. Dynamic linking is good for security patches, memory and disk usage. But it creates new opportunities for problems, for example ABI breakage becomes more significant of a problem and needs a lot of care to avoid. People distributing code, be it to end users or app stores or on servers with things like chroots, jails and containers, need to carry their dependencies anyway negating some of the benefits.