microsoft / microsoft/mimalloc
mimalloc's RSS is much higher than other allocators in mimalloc-bench tests
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.4k
- Forks
- 1.2k
- Avg merge
- 4d 45m
- Merged PRs (30d)
- 13
Description
The following are results from a run of mimalloc-bench. As you can see, the RSS for mimalloc is much higher than the other allocators. (sometimes up to 10x!) Is there any way to reduce this? This was running on an M1 Pro on macOS Monterey 12.4. The version of mimalloc was v1.7.6
```
$ ../../bench.sh -r=1 -n=1 je mi tbb sys allt
[...snip...]
#------------------------------------------------------------------
# test alloc time rss user sys page-faults page-reclaims
cfrac je 04.08 2896 4.07 0.00 0 374
cfrac mi 02.70 22592 2.68 0.01 0 1595
cfrac tbb 04.64 2736 4.63 0.00 0 362
cfrac sys 04.40 2272 4.39 0.00 0 319
espresso je 03.93 4912 3.91 0.01 0 507
espresso mi 03.30 23888 3.28 0.01 0 1676
espresso tbb 04.09 3376 4.08 0.01 0 402
espresso sys 04.01 3680 3.98 0.03 0 410
barnes je 01.36 58384 1.35 0.00 0 3844
barnes mi 01.36 77888 1.35 0.01 0 5051
barnes tbb 01.36 58096 1.35 0.00 0 3822
barnes sys 01.35 57584 1.35 0.00 0 3776
larsonN-sized je 4.493 109200 49.60 0.19 0 12317
larsonN-sized mi 3.078 154960 49.55 0.23 0 13123
larsonN-sized tbb 8.038 111936 49.54 0.12 0 8496
larsonN-sized sys 21.649 44912 47.21 2.50 0 8328
mstressN je 00.58 154144 1.52 1.14 0 267326
mstressN mi 00.32 495616 1.33 0.08 0 31697
mstressN tbb 00.34 166000 1.56 0.05 0 14754
mstressN sys 00.54 281312 2.11 0.40 0 19094
rptestN je .483 66192 0.82 0.62 0 6720
rptestN mi .488 126224 0.76 0.64 0 8102
rptestN tbb .689 91728 0.84 0.43 0 5962
rptestN sys .707 74352 0.98 0.57 0 5365
gs je 00.73 36256 0.71 0.02 0 2978
gs mi 00.71 55648 0.69 0.02 0 4181
gs tbb 00.71 38592 0.69 0.01 0 3156
gs sys 00.71 42384 0.69 0.01 0 3346
alloc-test1 je 03.20 17728 3.18 0.02 0 1718
alloc-test1 mi 03.01 31120 2.98 0.03 0 2129
alloc-test1 tbb 04.17 11744 4.14 0.03 0 925
alloc-test1 sys 09.52 13984 9.44 0.07 0 1051
alloc-testN je 03.67 22112 34.21 0.09 0 2005
alloc-testN mi 03.41 33536 31.92 0.07 0 2288
alloc-testN tbb 04.77 14512 45.22 0.09 0 1106
alloc-testN sys 41.57 12752 395.75 0.82 0 985
xmalloc-testN je 0.471 97728 47.25 0.49 0 6344
xmalloc-testN mi 0.307 117440 46.92 0.56 0 7540
xmalloc-testN tbb 0.909 80384 44.75 1.23 0 5244
xmalloc-testN sys 1.025 46992 43.93 3.85 0 3182
cache-scratch1 je 00.87 8752 0.86 0.00 0 1157
cache-scratch1 mi 00.87 21808 0.86 0.00 0 1547
cache-scratch1 tbb 00.86 1872 0.85 0.00 0 308
cache-scratch1 sys 00.86 1456 0.85 0.00 0 269
cache-scratchN je 00.12 8944 1.02 0.00 0 1179
cache-scratchN mi 00.12 21968 1.02 0.00 0 1566
cache-scratchN tbb 00.11 2048 1.02 0.00 0 330
cache-scratchN sys 00.11 1616 1.02 0.00 0 288
glibc-simple je 03.31 2432 3.29 0.01 0 355
glibc-simple mi 01.47 22112 1.46 0.00 0 1568
glibc-simple tbb 03.32 2288 3.31 0.01 0 340
glibc-simple sys 03.35 1920 3.25 0.10 0 300
glibc-thread je 1.981 10320 18.87 0.05 0 848
glibc-thread mi .773 29040 19.08 0.04 0 2000
glibc-thread tbb 2.500 7984 19.10 0.03 0 692
glibc-thread sys 4.467 6656 19.12 0.04 0 595
```
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
Start in mimalloc-bench with bench.sh -r=1 -n=1 je mi tbb sys allt and reproduce the RSS figures on the reported M1/macOS setup. Compare the allocator runs and inspect how the benchmark records RSS; done means explaining the discrepancy and identifying a tested way to reduce mimalloc's RSS, if feasible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, macos
- Domain
- performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100