Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comparison between gperftools and a newer version of glibc malloc #1521

Closed
jeljeli opened this issue Jun 4, 2024 · 1 comment
Closed

Comparison between gperftools and a newer version of glibc malloc #1521

jeljeli opened this issue Jun 4, 2024 · 1 comment

Comments

@jeljeli
Copy link

jeljeli commented Jun 4, 2024

Hello,

Thank you for the excellent work on gperftools and for providing the comparison between gperftools and glibc 2.3 malloc (available in this link : https://gperftools.github.io/gperftools/tcmalloc.html)

I am interested in understanding how gperftools compares with a newer version of malloc from glibc. Do you have any benchmarks or comparison data for gperftools against a newer glibc malloc (e.g. version 2.39) ?

Thank you for your assistance.

@alk
Copy link
Contributor

alk commented Jun 21, 2024

I don't have capacity for comprehensive write-up, but here is quick summary.

So for the past 10-ish years or so, our competition has improved greatly. There used to be somewhat big difference in fast-path performance between us and glibc and jemalloc. They "simply" neglected most common workloads. Both those competitors have improved. We're still able to beat them on those "simplest" workloads according to benchmarks I have, but the gap is much more narrow. We also occasionally do better then them especially if/when more cache is given to us (e.g. on TF benchmarks; but I last checked 5-ish years ago). And there are some workloads where they're better then us (e.g. when certain inter-thread allocation patterns occur and hurt on our choice of non-sharded central-free-lists: #1448).

I should also note 2 important competitors. One is "abseil" tcmalloc (github.com/google/tcmalloc) and another mimalloc. I've yet to do a closer look at mimalloc, but there is good chance they know what they're doing. For abseil tcmalloc, their per-cpu caches and even better attention to performance in those critical fast-past cases gives them win over gperftools as of now.

@alk alk closed this as completed Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants