Patch with instructions: https://github.com/Hardcode84/factorio-large-pages
Need patched TBB library: https://github.com/Hardcode84/oneTBB/tr ... -pages-win
Large pages support is quite finicky on Windows, you need to enable them first via group policy editor. Also, you cannot reserve them like on linux, and they are very susceptible to physical mem fragmentation and after some uptime you can find you cannot allocate any large pages even if you have enough free ram.
You can check how much large pages memory was allocated using rammap: https://learn.microsoft.com/en-us/sysin ... ads/rammap
This patch should work with steam 1.1.80 and 1.1.81
Some perf measurements (saves from dosh's patreon):
Code: Select all
sushi:
before
Performed 1000 updates in 14299.998 ms
avg: 14.300 ms, min: 12.791 ms, max: 18.595 ms
checksum: 3950118544
19.540 Goodbye
tbbmalloc
Performed 1000 updates in 13469.460 ms
avg: 13.469 ms, min: 12.417 ms, max: 17.850 ms
checksum: 3950118544
17.993 Goodbye
tbbmalloc + huge pages
Performed 1000 updates in 12207.342 ms
avg: 12.207 ms, min: 11.126 ms, max: 15.822 ms
checksum: 3950118544
16.411 Goodbye
SE:
before:
Performed 1000 updates in 11056.954 ms
avg: 11.057 ms, min: 9.795 ms, max: 27.241 ms
checksum: 2406519625
61.348 Goodbye
tbbmalloc:
Performed 1000 updates in 10744.327 ms
avg: 10.744 ms, min: 9.502 ms, max: 24.667 ms
checksum: 2406519625
53.865 Goodbye
tbbmalloc + huge pages:
Performed 1000 updates in 9319.778 ms
avg: 9.320 ms, min: 8.200 ms, max: 22.630 ms
checksum: 2406519625
49.449 Goodbye
logibrain:
before:
Performed 1000 updates in 8771.204 ms
avg: 8.771 ms, min: 5.529 ms, max: 26.442 ms
checksum: 3349378544
15.131 Goodbye
tbbmalloc:
Performed 1000 updates in 7702.753 ms
avg: 7.703 ms, min: 5.010 ms, max: 19.551 ms
checksum: 3349378544
13.075 Goodbye
tbbmalloc + huge pages:
Performed 1000 updates in 7246.894 ms
avg: 7.247 ms, min: 4.841 ms, max: 18.670 ms
checksum: 3349378544
12.203 Goodbye
Also, I've some marginal UPS improvements even without large pages, just from replacing allocator with TBB one, but some other people who tested it reported no improvement.