Honey-XI and related now with Large Pages Enabled (LP)
Posted: Thu Feb 13, 2020 6:53 am
Large Pages code ported from Brainfish by Thomas Zipproth
Both for Windows Popcnt and Bmi2
All 10 engines in the Honey family were enabled with Large Pages, including the functional equivalent Stockfish, Black-Diamond, Bluefish and Weakfish
Some runs
3970x - Windows 10 Pro
Before LP:
Stockfish-XI
bench 2048 64 26
===========================
Total time (ms) : 40053
Nodes searched : 3825860217
Nodes/second : 95519941
After LP
Stockfish-XI-LP
bench 2048 64 26
===========================
Total time (ms) : 40486
Nodes searched : 4186128286
Nodes/second : 103396934
Before LP:
Honey-XI
bench 2048 64 26
===========================
Total time (ms) : 42417
Nodes searched : 4031868048
Nodes/second : 95053116
After LP
Honey-XI-LP
bench 2048 64 26
===========================
Total time (ms) : 42289
Nodes searched : 4353576891
Nodes/second : 102948210
Before LP:
Weakfish-XI
bench 2048 64 14
===========================
Total time (ms) : 151909
Nodes searched : 18787154052
Nodes/second : 123673739
After LP:
Weakfish-XI-LP
bench 2048 64 14
===========================
Total time (ms) : 137214
Nodes searched : 18347938746
Nodes/second : 133717687
This what it will look like when running from the terminal, "b" is a shortcut for bench. You will see feedback when Large pages are enabled. No feedback means they are not enabled.
Also , it does seem to me much more efficient, when you set the memory to 2048 or a multiple of 2048. e.g.
# Stockfish-XI-LP b 24000 64 26
Stockfish XI-LP by T. Romstad, M. Costalba, J. Kiiski, G. Linscott
info string Hash LargePages 16 Mb
info string Hash LargePages 24000 Mb
===========================
Total time (ms) : 81096
Nodes searched : 8352466673
Nodes/second : 102994804
versus:
# Stockfish-XI-LP b 32768 64 26 >/dev/null
info string Hash LargePages 16 Mb
info string Hash LargePages 32768 Mb
===========================
Total time (ms) : 72008
Nodes searched : 7581919305
Nodes/second : 105292735
Enjoy!
https://github.com/MichaelB7/Stockfish/releases/tag/XI
To Enable Large Pages in Windows 10 Pro ( admin account required)
PLEASE UNDERSTAND THE RISKS BEFORE YOU DO THIS - enabling Large Pages can slow your system to CRAWL if you have insufficient memory. I would recommend at least 128 GB of RAM. I assume no responsibility for any action you take. At the minimum, I would divide the RAM you have by 4 and use that as your max hash for all engines running. It's probably best to reboot your machine if you re planning to use a big hash ( 25% of your RAM) relative to the memory you have
Both for Windows Popcnt and Bmi2
All 10 engines in the Honey family were enabled with Large Pages, including the functional equivalent Stockfish, Black-Diamond, Bluefish and Weakfish
Some runs
3970x - Windows 10 Pro
Before LP:
Stockfish-XI
bench 2048 64 26
===========================
Total time (ms) : 40053
Nodes searched : 3825860217
Nodes/second : 95519941
After LP
Stockfish-XI-LP
bench 2048 64 26
===========================
Total time (ms) : 40486
Nodes searched : 4186128286
Nodes/second : 103396934
Before LP:
Honey-XI
bench 2048 64 26
===========================
Total time (ms) : 42417
Nodes searched : 4031868048
Nodes/second : 95053116
After LP
Honey-XI-LP
bench 2048 64 26
===========================
Total time (ms) : 42289
Nodes searched : 4353576891
Nodes/second : 102948210
Before LP:
Weakfish-XI
bench 2048 64 14
===========================
Total time (ms) : 151909
Nodes searched : 18787154052
Nodes/second : 123673739
After LP:
Weakfish-XI-LP
bench 2048 64 14
===========================
Total time (ms) : 137214
Nodes searched : 18347938746
Nodes/second : 133717687
This what it will look like when running from the terminal, "b" is a shortcut for bench. You will see feedback when Large pages are enabled. No feedback means they are not enabled.
Code: Select all
# Stockfish-XI-LP b 2048 64 26 >/dev/null
info string Hash LargePages 16 Mb >> feedback
info string Hash LargePages 2048 Mb >> the switch to 2048M for the bench
Position: 1/46
Nodes/Second: 90057k
Position: 2/46
Nodes/Second: 96955k
Position: 3/46
Nodes/Second: 149867k
Position: 4/46
Nodes/Second: 107021k
Position: 5/46
Nodes/Second: 96096k
Position: 6/46
Nodes/Second: 97556k
Position: 7/46
Nodes/Second: 102131k
Position: 8/46
Nodes/Second: 105759k
Position: 9/46
Nodes/Second: 94619k
Position: 10/46
Nodes/Second: 110949k
Position: 11/46
Nodes/Second: 92430k
Position: 12/46
Nodes/Second: 92261k
Position: 13/46
Nodes/Second: 106225k
Position: 14/46
Nodes/Second: 95441k
Position: 15/46
Nodes/Second: 111919k
Position: 16/46
Nodes/Second: 117256k
Position: 17/46
Nodes/Second: 131569k
Position: 18/46
Nodes/Second: 169362k
Position: 19/46
Nodes/Second: 168165k
Position: 20/46
Nodes/Second: 148695k
Position: 21/46
Nodes/Second: 201570k
Position: 22/46
Nodes/Second: 198146k
Position: 23/46
Nodes/Second: 223107k
Position: 24/46
Nodes/Second: 145669k
Position: 25/46
Nodes/Second: 183492k
Position: 26/46
Nodes/Second: 137464k
Position: 27/46
Nodes/Second: 144809k
Position: 28/46
Nodes/Second: 121770k
Position: 29/46
Nodes/Second: 120945k
Position: 30/46
Nodes/Second: 152202k
Position: 31/46
Nodes/Second: 114101k
Position: 32/46
Nodes/Second: 103902k
Position: 33/46
Nodes/Second: 96549k
Position: 34/46
Nodes/Second: 97917k
Position: 35/46
Nodes/Second: 172706k
Position: 36/46
Nodes/Second: 169495k
Position: 37/46
Nodes/Second: 151874k
Position: 38/46
Nodes/Second: 150158k
Position: 39/46
Nodes/Second: 153048k
Position: 40/46
Nodes/Second: 170206k
Position: 41/46
Nodes/Second: 136215k
Position: 42/46
Nodes/Second: 91093k
Position: 43/46
Nodes/Second: 71358k
Position: 44/46
Nodes/Second: 0k
Position: 45/46
Nodes/Second: 0k
Position: 46/46
Nodes/Second: 86456k
===========================
Total time (ms) : 77074
Nodes searched : 8073053897
Nodes/second : 104744192
Also , it does seem to me much more efficient, when you set the memory to 2048 or a multiple of 2048. e.g.
# Stockfish-XI-LP b 24000 64 26
Stockfish XI-LP by T. Romstad, M. Costalba, J. Kiiski, G. Linscott
info string Hash LargePages 16 Mb
info string Hash LargePages 24000 Mb
===========================
Total time (ms) : 81096
Nodes searched : 8352466673
Nodes/second : 102994804
versus:
# Stockfish-XI-LP b 32768 64 26 >/dev/null
info string Hash LargePages 16 Mb
info string Hash LargePages 32768 Mb
===========================
Total time (ms) : 72008
Nodes searched : 7581919305
Nodes/second : 105292735
Enjoy!
https://github.com/MichaelB7/Stockfish/releases/tag/XI
To Enable Large Pages in Windows 10 Pro ( admin account required)
PLEASE UNDERSTAND THE RISKS BEFORE YOU DO THIS - enabling Large Pages can slow your system to CRAWL if you have insufficient memory. I would recommend at least 128 GB of RAM. I assume no responsibility for any action you take. At the minimum, I would divide the RAM you have by 4 and use that as your max hash for all engines running. It's probably best to reboot your machine if you re planning to use a big hash ( 25% of your RAM) relative to the memory you have
- On the Start menu, click Run. In the Open box, type gpedit.msc.
On the Local Group Policy Editor console, expand Computer Configuration, and then expand Windows Settings.
Expand Security Settings, and then expand Local Policies.
Select the User Rights Assignment folder.
The policies will be displayed in the details pane.
In the pane, double-click Lock pages in memory.
In the Local Security Setting - Lock pages in memory dialog box, click Add User or Group.