microsoft / microsoft/mimalloc
mimalloc slower than glibc 2.30
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.4k
- Forks
- 1.2k
- Avg merge
- 4d 45m
- Merged PRs (30d)
- 13
Description
Hi!
First of all, legendary work! I've been using mimalloc for https://github.com/PacificBiosciences/ccs to saturate 256 threads on those new AMD 2x7742 or 2x7H12 servers. I'm blown away how much faster it is, compared to glibc 2.32. Especially running with large os pages. There is one edge case, mimalloc is still slower than the arena allocator of the latest glibc, if I use it only a few threads like 16 on a large machine.
On a small dataset, using 16 threads:
| Allocator | Threads | Wall Time | CPU Time |
| - | - | - | - |
| mimalloc + large_os_pages | 16 | 4m 35s | 1h 12m |
| mimalloc | 16 | 4m 36s | 1h 13m |
| glibc 2.30 | 16 | 4m 15s | 1h 7m |
On a dataset with 10x more data, using 256 threads:
| Allocator | Threads | Wall Time | CPU Time |
| - | - | - | - |
| mimalloc + large_os_pages | 256 | 4m 43s | 19h 04m |
| mimalloc | 256 | 5m 03s | 20h 25m |
| glibc 2.30 | 256 | 5m 18s | 14h 58m |
I'm aware that's ricing, but in production, our run times are ~30 hours, so every percent wall time counts.
I build mimalloc from source
```sh
cmake -GNinja -DCMAKE_INSTALL_PREFIX:PATH=${FOO}/software ..
ninja -v
ninja install
```
and then link it statically
```sh
LDFLAGS="${FOO}/software/lib/mimalloc-1.6/libmimalloc.a"
```
My question, is there any way to tune mimalloc to be as fast as the latest glibc allocator for lower number of threads?
Thank you!
Armin
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported 16-thread comparison using the CMake/Ninja build commands and static libmimalloc.a linkage shown in the issue. Compare mimalloc with glibc 2.30 on the stated workloads and determine whether a documented tuning option or a reproducible allocator performance problem can be identified; done means a confirmed cause or actionable next step.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cmake
- Domain
- operating-systems, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100