Skip to content

Commit

Permalink
Merge pull request #18 from Chester-alt/Advanced->-Memory-optimisation
Browse files Browse the repository at this point in the history
Advanced > memory optimisation
  • Loading branch information
Timmoth authored Feb 14, 2025
2 parents 4d2428c + 1c44dfd commit 2ba0262
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
37 changes: 37 additions & 0 deletions docs/memoryConf.md
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!
2 changes: 1 addition & 1 deletion docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
api_url: https://api.grandchesstree.com/
api_key: <your_api_key>
workers: <number_of_threads>
desired_depth: 12
worker_id: 0
```
- That's it!

Expand Down
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ nav:
- Results: results.md
- Technical overview: technical.md
- Linux Installation: linuxInstall.md
- Advanced Configuration:
- Memory Configuration: memoryConf.md

markdown_extensions:
- tables
Expand Down

0 comments on commit 2ba0262

Please sign in to comment.