-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from Chester-alt/Advanced->-Memory-optimisation
Advanced > memory optimisation
- Loading branch information
Showing
3 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
### Memory Configuration | ||
|
||
- Clone the repo | ||
``` | ||
git clone https://github.com/Timmoth/grandchesstree | ||
``` | ||
- CD into shared folder and open Perft.cs | ||
``` | ||
cd GrandChessTree.Shared | ||
vim Perft.cd | ||
``` | ||
- To edit the memory allocation per worker thread edit it the following line (Line 36) | ||
|
||
``` | ||
public static Summary* AllocateHashTable(int sizeInMb = 512) | ||
``` | ||
- Change the value of 512 to as much ram you want to allocate per thread | ||
|
||
**Please note do not over allocate as the program will OOM** | ||
|
||
- CD into client and run the application | ||
|
||
``` | ||
cd ../GrandChessTree.Client | ||
# x86 | ||
dotnet run -c Release --no-launch-profile | ||
# ARM | ||
dotnet run -c Release --no-launch-profile --property:DefineConstants="ARM" | ||
``` | ||
|
||
``` | ||
api_url: https://api.grandchesstree.com/ | ||
api_key: <your_api_key> | ||
workers: <number_of_threads> | ||
worker_id: 0 | ||
``` | ||
- That's it! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters