Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to .NET 9 #1108

Merged
merged 7 commits into from
Nov 13, 2024
Merged

Move to .NET 9 #1108

merged 7 commits into from
Nov 13, 2024

Conversation

eduherminio
Copy link
Member

@eduherminio eduherminio commented Oct 17, 2024

[-3, 1] 8+0.08

Score of Lynx-net-9-no-cet-4299-win-x64 vs Lynx 4292 - main: 2745 - 2635 - 4416  [0.506] 9796
...      Lynx-net-9-no-cet-4299-win-x64 playing White: 2109 - 624 - 2165  [0.652] 4898
...      Lynx-net-9-no-cet-4299-win-x64 playing Black: 636 - 2011 - 2251  [0.360] 4898
...      White vs Black: 4120 - 1260 - 4416  [0.646] 9796
Elo difference: 3.9 +/- 5.1, LOS: 93.3 %, DrawRatio: 45.1 %
SPRT: llr 2.9 (100.2%), lbound -2.25, ubound 2.89 - H1 was accepted
Before disabling CET: perf regression
Score of Lynx-net-9-4284-win-x64 vs Lynx 4283 - main: 314 - 410 - 587  [0.463] 1311
...      Lynx-net-9-4284-win-x64 playing White: 246 - 106 - 304  [0.607] 656
...      Lynx-net-9-4284-win-x64 playing Black: 68 - 304 - 283  [0.320] 655
...      White vs Black: 550 - 174 - 587  [0.643] 1311
Elo difference: -25.5 +/- 14.0, LOS: 0.0 %, DrawRatio: 44.8 %
SPRT: llr -2.27 (-78.5%), lbound -2.25, ubound 2.89 - H0 was accepted
Score of Lynx-net-9-no-datas-4285-win-x64 vs Lynx 4283 - main: 3484 - 3630 - 5764  [0.494] 12878
...      Lynx-net-9-no-datas-4285-win-x64 playing White: 2611 - 909 - 2920  [0.632] 6440
...      Lynx-net-9-no-datas-4285-win-x64 playing Black: 873 - 2721 - 2844  [0.356] 6438
...      White vs Black: 5332 - 1782 - 5764  [0.638] 12878
Elo difference: -3.9 +/- 4.5, LOS: 4.2 %, DrawRatio: 44.8 %
SPRT: llr -2.27 (-78.6%), lbound -2.25, ubound 2.89 - H0 was accepted
Score of Lynx-net-9-no-datas-4285-win-x64 vs Lynx-net-9-4284-win-x64: 6549 - 6545 - 10616  [0.500] 23710
...      Lynx-net-9-no-datas-4285-win-x64 playing White: 4877 - 1642 - 5336  [0.636] 11855
...      Lynx-net-9-no-datas-4285-win-x64 playing Black: 1672 - 4903 - 5280  [0.364] 11855
...      White vs Black: 9780 - 3314 - 10616  [0.636] 23710
Elo difference: 0.1 +/- 3.3, LOS: 51.4 %, DrawRatio: 44.8 %
SPRT: llr -1.54 (-53.2%), lbound -2.25, ubound 2.89

Last validation:

Test  | net-9
Elo   | 2.52 +- 4.19 (95%)
SPRT  | 8.0+0.08s Threads=1 Hash=32MB
LLR   | 2.92 (-2.25, 2.89) [-5.00, 0.00]
Games | 11046: +3102 -3022 =4922
Penta | [244, 1276, 2420, 1322, 261]
https://openbench.lynx-chess.com/test/937/

@eduherminio
Copy link
Member Author

eduherminio commented Oct 18, 2024

DATAS (#404) will be enabled by default, it might be worth checking disabling it, although its performance improv should be negligible.

From Performance Improvements in .NET 9:

DATAS was introduced in .NET 8 and serves to narrow the gap between workstation and server GC, bringing server GC closer to workstation memory consumption. It dynamically scales how much memory is being consumed by server GC, such that in times of less load, less memory is being used.

While DATAS shipped in .NET 8, it was only on by default for Native AOT-based projects, and even there it still had some issues to be sorted. Those issues have now been sorted (...), such that in .NET 9, as of dotnet/runtime#103374, DATAS is now enabled by default for server GC.

If you have a workload where absolute best possible throughput is paramount and you’re ok with additional memory being consumed to enable that, you should feel free to disable DATAS, e.g. by adding this to your project file:

<GarbageCollectionAdaptationMode>0</GarbageCollectionAdaptationMode>

Back in the day the difference was minimal (#404) and it doesn't seem to be causing the initial perf issue here either.
Will disable it anyway.

Score of Lynx-net-9-no-datas-4285-win-x64 vs Lynx-net-9-4284-win-x64: 6437 - 6434 - 10439  [0.500] 23310
...      Lynx-net-9-no-datas-4285-win-x64 playing White: 4791 - 1612 - 5252  [0.636] 11655
...      Lynx-net-9-no-datas-4285-win-x64 playing Black: 1646 - 4822 - 5187  [0.364] 11655
...      White vs Black: 9613 - 3258 - 10439  [0.636] 23310
Elo difference: 0.0 +/- 3.3, LOS: 51.1 %, DrawRatio: 44.8 %
SPRT: llr -1.53 (-52.8%), lbound -2.25, ubound 2.89

@eduherminio eduherminio marked this pull request as ready for review November 13, 2024 02:19
@eduherminio eduherminio merged commit 9953da0 into main Nov 13, 2024
27 checks passed
@eduherminio eduherminio deleted the net-9 branch November 13, 2024 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant