Can You activate large pages in Windows 10 Home?

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

RubiChess
Posts: 584
Joined: Fri Mar 30, 2018 7:20 am
Full name: Andreas Matthies

Re: Can You activate large pages in Windows 10 Home?

Post by RubiChess »

Here a short description how to enable the needed privilege and use large pages in Windows 10 home edition:

1. Download a Powershell module UserRights.psm1 from here https://gallery.technet.microsoft.com/s ... r-26e259b0 and remember the folder you saved it (in my example it is in C:\Entwicklung\PowerShell)
2. Start a powershell with administration privileges and do the following (with correct path of the module file):

Code: Select all

Set-ExecutionPolicy RemoteSigned -Force
$user=whoami
Import-Module C:\Entwicklung\PowerShell\UserRights.psm1
Grant-UserRight -Account $user -Right SeLockMemoryPrivilege
Get-UserRightsGrantedToAccount -Account $user
Output should look like this:

Code: Select all

PS C:\WINDOWS\system32> Set-ExecutionPolicy RemoteSigned -Force
PS C:\WINDOWS\system32> $user=whoami
PS C:\WINDOWS\system32> Import-Module C:\Entwicklung\PowerShell\UserRights.psm1
PS C:\WINDOWS\system32> Grant-UserRight -Account $user -Right SeLockMemoryPrivilege
PS C:\WINDOWS\system32> Get-UserRightsGrantedToAccount -Account $user

Account                       Right
-------                       -----
asus-nb\amatt SeLockMemoryPrivilege
I you want, you can set powershell execution policy back to restricted after that. This is a matter of general powershell security on your machine and has nothing to do with the large pages.

Code: Select all

Set-ExecutionPolicy Restricted -Force
Restart your computer. From now on you should be able to run Stockfish without(!) administration priviliges (so there is no security issue) and using large pages:

Code: Select all

Stockfish 12 by the Stockfish developers (see AUTHORS file)
setoption name Hash value 1024
info string Hash table allocation: Windows large pages used.
Regards, Andreas
syzygy
Posts: 5566
Joined: Tue Feb 28, 2012 11:56 pm

Re: Can You activate large pages in Windows 10 Home?

Post by syzygy »

mwyoung wrote: Fri Dec 18, 2020 3:34 am
Jouni wrote: Thu Dec 17, 2020 9:08 pm Hmm may be too complicated for just 1-2% speedup. Unless You have superhardware.
I agree. It does not matter much. Large page are a waste of time. I have tested this, and Large page are not worth the effort. So do not distress if you can not, or do not want to use them. A better version of Stockfish, who does not use Large page. Is worth more then a version of Stockfish that has Large page enabled. I no longer use versions of Stockfish that have Large page enabled.
The official Stockfish has LP enabled since quite a while, so indeed there is no need to use a non-official version to which someone has added LP support.
syzygy
Posts: 5566
Joined: Tue Feb 28, 2012 11:56 pm

Re: Can You activate large pages in Windows 10 Home?

Post by syzygy »

RubiChess wrote: Sat Dec 19, 2020 9:52 am Here a short description how to enable the needed privilege and use large pages in Windows 10 home edition:
Thanks a lot, it worked perfectly (on Windows 10 Home with Administrator privileges).
User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: Can You activate large pages in Windows 10 Home?

Post by MikeB »

For any engine that has Large Pages enabled, I have always picked up 8 to 10% with using 2048MB hash.
AMD 3970x , 128 GB RAM. Most noticeable when using 60 threads ( 32 Cores) .
Image
mwyoung
Posts: 2727
Joined: Wed May 12, 2010 10:00 pm

Re: Can You activate large pages in Windows 10 Home?

Post by mwyoung »

syzygy wrote: Sat Dec 19, 2020 4:56 pm
mwyoung wrote: Fri Dec 18, 2020 3:34 am
Jouni wrote: Thu Dec 17, 2020 9:08 pm Hmm may be too complicated for just 1-2% speedup. Unless You have superhardware.
I agree. It does not matter much. Large page are a waste of time. I have tested this, and Large page are not worth the effort. So do not distress if you can not, or do not want to use them. A better version of Stockfish, who does not use Large page. Is worth more then a version of Stockfish that has Large page enabled. I no longer use versions of Stockfish that have Large page enabled.
The official Stockfish has LP enabled since quite a while, so indeed there is no need to use a non-official version to which someone has added LP support.
That is not really the point. If you can not, or do not know how to activate LP in windows. You are not missing out on anything.

And LP will not work even if you enable it in the chess engine. Unless you also activate LP support in windows. And LP is not activated by default.
syzygy
Posts: 5566
Joined: Tue Feb 28, 2012 11:56 pm

Re: Can You activate large pages in Windows 10 Home?

Post by syzygy »

mwyoung wrote: Sun Dec 20, 2020 12:58 am
syzygy wrote: Sat Dec 19, 2020 4:56 pm
mwyoung wrote: Fri Dec 18, 2020 3:34 am
Jouni wrote: Thu Dec 17, 2020 9:08 pm Hmm may be too complicated for just 1-2% speedup. Unless You have superhardware.
I agree. It does not matter much. Large page are a waste of time. I have tested this, and Large page are not worth the effort. So do not distress if you can not, or do not want to use them. A better version of Stockfish, who does not use Large page. Is worth more then a version of Stockfish that has Large page enabled. I no longer use versions of Stockfish that have Large page enabled.
The official Stockfish has LP enabled since quite a while, so indeed there is no need to use a non-official version to which someone has added LP support.
That is not really the point. If you can not, or do not know how to activate LP in windows. You are not missing out on anything.

And LP will not work even if you enable it in the chess engine. Unless you also activate LP support in windows. And LP is not activated by default.
A simple test gives 1749357 nps without LP, 2133080 nps with LP with a 4GB TT. Not enabling LP is difficult to justify (other than by laziness or lack of Administrator privileges on Windows).
ernest
Posts: 2041
Joined: Wed Mar 08, 2006 8:30 pm

Re: Can You activate large pages in Windows 10 Home?

Post by ernest »

syzygy wrote: Sun Dec 20, 2020 1:30 am
...Not enabling LP is difficult to justify (other than by laziness or lack of Administrator privileges on Windows).
Maybe to prevent some heating... :D
(if you are borderline)
mwyoung
Posts: 2727
Joined: Wed May 12, 2010 10:00 pm

Re: Can You activate large pages in Windows 10 Home?

Post by mwyoung »

syzygy wrote: Sun Dec 20, 2020 1:30 am
mwyoung wrote: Sun Dec 20, 2020 12:58 am
syzygy wrote: Sat Dec 19, 2020 4:56 pm
mwyoung wrote: Fri Dec 18, 2020 3:34 am
Jouni wrote: Thu Dec 17, 2020 9:08 pm Hmm may be too complicated for just 1-2% speedup. Unless You have superhardware.
I agree. It does not matter much. Large page are a waste of time. I have tested this, and Large page are not worth the effort. So do not distress if you can not, or do not want to use them. A better version of Stockfish, who does not use Large page. Is worth more then a version of Stockfish that has Large page enabled. I no longer use versions of Stockfish that have Large page enabled.
The official Stockfish has LP enabled since quite a while, so indeed there is no need to use a non-official version to which someone has added LP support.
That is not really the point. If you can not, or do not know how to activate LP in windows. You are not missing out on anything.

And LP will not work even if you enable it in the chess engine. Unless you also activate LP support in windows. And LP is not activated by default.
A simple test gives 1749357 nps without LP, 2133080 nps with LP with a 4GB TT. Not enabling LP is difficult to justify (other than by laziness or lack of Administrator privileges on Windows).
Let it run and it degrades.... as I said.
"The worst thing that can happen to a forum is a running wild attacking moderator(HGM) who is not corrected by the community." - Ed Schröder
But my words like silent raindrops fell. And echoed in the wells of silence.
User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: Can You activate large pages in Windows 10 Home?

Post by MikeB »

Jouni wrote: Thu Dec 17, 2020 9:08 pm Hmm may be too complicated for just 1-2% speedup. Unless You have superhardware.
On some systems it is much marge than 1-2%, ymmv of course. For me, it is a 10% pickup , essentially turning my 32 core machine into 35 cores with speed increase. My CPU was about $2K, so it like getting $200 value of addiotnal CPU time. It i have never its een degrade and its' actually better than overclocking since the it does not require additional power as overclocking does.

Every single one of my builds exceed 100M nps running hybrid benches, using just 60 of the 64 threads

### Based on commits through 12/20/2020:
### ======================================================
### Bluefish-12-R2-09-Eval.bench:Nodes searched : 12773251
### Bluefish-12-R2-09-Eval.bench:Nodes/second : 2075938
### Bluefish-12-R2-09-Eval-60_Cores.bench:Nodes searched : 875069545
### Bluefish-12-R2-09-Eval-60_Cores.bench:Nodes/second : 105620k
### Bluefish-12-R2-09-NiNu.bench:Nodes searched : 12773251
### Bluefish-12-R2-09-NiNu.bench:Nodes/second : 2099137
### Bluefish-12-R2-09-NiNu-60_Cores.bench:Nodes searched : 856959823
### Bluefish-12-R2-09-NiNu-60_Cores.bench:Nodes/second : 105083k
### Honey-12-R2-09-Eval.bench:Nodes searched : 13655249
### Honey-12-R2-09-Eval.bench:Nodes/second : 2074320
### Honey-12-R2-09-Eval-60_Cores.bench:Nodes searched : 832783584
### Honey-12-R2-09-Eval-60_Cores.bench:Nodes/second : 102838k
### Honey-12-R2-09-NiNu.bench:Nodes searched : 13655249
### Honey-12-R2-09-NiNu.bench:Nodes/second : 2111201
### Honey-12-R2-09-NiNu-60_Cores.bench:Nodes searched : 883055739
### Honey-12-R2-09-NiNu-60_Cores.bench:Nodes/second : 104776k
### Oki-Maguro-12-R2-09-Eval.bench:Nodes searched : 11993004
### Oki-Maguro-12-R2-09-Eval.bench:Nodes/second : 2083927
### Oki-Maguro-12-R2-09-Eval-60_Cores.bench:Nodes searched : 662008693
### Oki-Maguro-12-R2-09-Eval-60_Cores.bench:Nodes/second : 103116k
### Oki-Maguro-12-R2-09-NiNu.bench:Nodes searched : 11993004
### Oki-Maguro-12-R2-09-NiNu.bench:Nodes/second : 2099615
### Oki-Maguro-12-R2-09-NiNu-60_Cores.bench:Nodes searched : 646865402
### Oki-Maguro-12-R2-09-NiNu-60_Cores.bench:Nodes/second : 102206k
### ======================================================
Image
mwyoung
Posts: 2727
Joined: Wed May 12, 2010 10:00 pm

Re: Can You activate large pages in Windows 10 Home?

Post by mwyoung »

MikeB wrote: Sun Dec 20, 2020 6:29 am
Jouni wrote: Thu Dec 17, 2020 9:08 pm Hmm may be too complicated for just 1-2% speedup. Unless You have superhardware.
On some systems it is much marge than 1-2%, ymmv of course. For me, it is a 10% pickup , essentially turning my 32 core machine into 35 cores with speed increase. My CPU was about $2K, so it like getting $200 value of addiotnal CPU time. It i have never its een degrade and its' actually better than overclocking since the it does not require additional power as overclocking does.

Every single one of my builds exceed 100M nps running hybrid benches, using just 60 of the 64 threads

### Based on commits through 12/20/2020:
### ======================================================
### Bluefish-12-R2-09-Eval.bench:Nodes searched : 12773251
### Bluefish-12-R2-09-Eval.bench:Nodes/second : 2075938
### Bluefish-12-R2-09-Eval-60_Cores.bench:Nodes searched : 875069545
### Bluefish-12-R2-09-Eval-60_Cores.bench:Nodes/second : 105620k
### Bluefish-12-R2-09-NiNu.bench:Nodes searched : 12773251
### Bluefish-12-R2-09-NiNu.bench:Nodes/second : 2099137
### Bluefish-12-R2-09-NiNu-60_Cores.bench:Nodes searched : 856959823
### Bluefish-12-R2-09-NiNu-60_Cores.bench:Nodes/second : 105083k
### Honey-12-R2-09-Eval.bench:Nodes searched : 13655249
### Honey-12-R2-09-Eval.bench:Nodes/second : 2074320
### Honey-12-R2-09-Eval-60_Cores.bench:Nodes searched : 832783584
### Honey-12-R2-09-Eval-60_Cores.bench:Nodes/second : 102838k
### Honey-12-R2-09-NiNu.bench:Nodes searched : 13655249
### Honey-12-R2-09-NiNu.bench:Nodes/second : 2111201
### Honey-12-R2-09-NiNu-60_Cores.bench:Nodes searched : 883055739
### Honey-12-R2-09-NiNu-60_Cores.bench:Nodes/second : 104776k
### Oki-Maguro-12-R2-09-Eval.bench:Nodes searched : 11993004
### Oki-Maguro-12-R2-09-Eval.bench:Nodes/second : 2083927
### Oki-Maguro-12-R2-09-Eval-60_Cores.bench:Nodes searched : 662008693
### Oki-Maguro-12-R2-09-Eval-60_Cores.bench:Nodes/second : 103116k
### Oki-Maguro-12-R2-09-NiNu.bench:Nodes searched : 11993004
### Oki-Maguro-12-R2-09-NiNu.bench:Nodes/second : 2099615
### Oki-Maguro-12-R2-09-NiNu-60_Cores.bench:Nodes searched : 646865402
### Oki-Maguro-12-R2-09-NiNu-60_Cores.bench:Nodes/second : 102206k
### ======================================================
For engine testing it does not work well. As you run the engines with many games. And the LP degrades.
I have found it does not work well. To the point of 1 Gb hash will run better then LP with more hash.

Maybe some GUI's will reset the LP after each game. But Fritz does not.

And I do not know about your CPU, but I get better then a 10% overclock. And the price of power is not a factor. Some of you guys must pay high KW/hours charges. I live in a low cost KW/hour part of the country.
"The worst thing that can happen to a forum is a running wild attacking moderator(HGM) who is not corrected by the community." - Ed Schröder
But my words like silent raindrops fell. And echoed in the wells of silence.