Better memory allocator for Linux(and Windows and Mac)

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
DeltaKilo
Burner Inserter
Burner Inserter
Posts: 12
Joined: Wed May 02, 2018 9:18 pm
Contact:

Better memory allocator for Linux(and Windows and Mac)

Post by DeltaKilo »

So I tested memory allocators under Linux, and that's the results

I used best of 3 results here, because I testing it on Laptop between latest and greatest glibc which is default, and Microsoft experimental labs MiMalloc.

It has 7.2% difference over 5000 ticks of Nefrums 100% Achievement map, hey Oxyd, Linux memory allocator is better than Windows' but I can't benchmark it there, can you link https://github.com/microsoft/mimalloc linked to executable on other platforms than Linux to measure the performance gain.

7.2% is a serious thing when we speak about megabases or mods even without linux huge pages.
Attachments
fdefault.png
fdefault.png (126.88 KiB) Viewed 1197 times
f2mimalloc.png
f2mimalloc.png (126.61 KiB) Viewed 1197 times

DeltaKilo
Burner Inserter
Burner Inserter
Posts: 12
Joined: Wed May 02, 2018 9:18 pm
Contact:

Re: Better memory allocator for Linux(and Windows and Mac)

Post by DeltaKilo »

I can plug different memory allocator with a command on Linux:

Code: Select all

LD_PRELOAD="/usr/lib64/mimalloc-1.6/libmimalloc.so.1.6" perf stat factorio --benchmark-ticks 5000 --benchmark ~/.factorio/saves/6_49_05.zip

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Better memory allocator for Linux(and Windows and Mac)

Post by posila »

Not a bug, but it might be worth exploring (even though I'd rather reduce number of heap allocations during update, or eliminate all allocations that for things that don't persist until next update)

Post Reply

Return to “Ideas and Suggestions”