Skip to content

Commit

Permalink
Set the reference nps for sf_16.1 wrt sf_11
Browse files Browse the repository at this point in the history
Fishtest with Stockfish 11 (official-stockfish#635) had 1.6 Mnps as reference core nps
and 0.7 Mnps as threshold nps to stop a slow worker.
Set the new reference core nps to 691680 nps according to the 56.77% slowdown
of sf_16.1 wrt sf_11 on the ARCH=x86-64-bmi2 of the Ryzen 7 PRO 7840U.
Set the new threshold for slow worker to 208082 nps according to the 70.27%
slowdown of sf_16.1 wrt sf_11 on the ARCH=x86-64-sse41-popcnt of the
Core i7 3770K.

Stockfish compiled with clang++ 18.1.0
Parallel speedup with bench at depth 13

- ARCH=x86-64-bmi2 (AMD Ryzen 7 PRO 7840U)
```
sf_base =  3451831 +/-   6037 (95%)
sf_test =  1492232 +/-   3012 (95%)
diff    = -1959598 +/-   4685 (95%)
speedup = -56.770% +/- 0.136% (95%)
```
- ARCH=x86-84-bmi2 (Intel Xeon E5-2680 v3)
```
sf_base =  1918881 +/-   1002 (95%)
sf_test =   649033 +/-    675 (95%)
diff    = -1269847 +/-   1154 (95%)
speedup = -66.176% +/- 0.060% (95%)
```
- ARCH=x86-64-sse41-popcnt (Intel Core i7 3770K)
```
sf_base =  2099079 +/-   9345 (95%)
sf_test =   623973 +/-   2121 (95%)
diff    = -1475105 +/-   7601 (95%)
speedup = -70.274% +/- 0.362% (95%)
```

Raise worker version to 230 (also server side)
  • Loading branch information
ppigazzini committed Feb 26, 2024
1 parent 1209808 commit 9af4606
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion server/fishtest/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
depending on how frequently the main instance flushes its run cache.
"""

WORKER_VERSION = 229
WORKER_VERSION = 230

"""
begin api_schema
Expand Down
2 changes: 1 addition & 1 deletion server/fishtest/rundb.py
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ def aggregate_unfinished_runs(self, username=None):
nps += concurrency * task["worker_info"]["nps"]
if task["worker_info"]["nps"] != 0:
games_per_minute += (
(task["worker_info"]["nps"] / 640000)
(task["worker_info"]["nps"] / 691680)
* (60.0 / estimate_game_duration(run["args"]["tc"]))
* (
int(task["worker_info"]["concurrency"])
Expand Down
4 changes: 2 additions & 2 deletions server/utils/delta_update_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ def initialize_info(rundb, clear_stats):


def compute_games_rates(rundb, info_tuple):
# 1184000 nps is the reference core, also set in rundb.py and games.py
# use the reference core nps, also set in rundb.py and games.py
for machine in rundb.get_machines():
games_per_hour = (
(machine["nps"] / 640000)
(machine["nps"] / 691680)
* (3600.0 / estimate_game_duration(machine["run"]["args"]["tc"]))
* (int(machine["concurrency"]) // machine["run"]["args"].get("threads", 1))
)
Expand Down
7 changes: 4 additions & 3 deletions worker/games.py
Original file line number Diff line number Diff line change
Expand Up @@ -1371,15 +1371,16 @@ def parse_options(s):
games_concurrency * threads,
)

if base_nps < 231000 / (1 + math.tanh((worker_concurrency - 1) / 8)):
if base_nps < 208082 / (1 + math.tanh((worker_concurrency - 1) / 8)):
raise WorkerException(
"This machine is too slow ({} nps / thread) to run fishtest effectively - sorry!".format(
base_nps
)
)
# 1184000 nps is the reference core benched with respect to SF 11,
# fishtest with Stockfish 11 had 1.6 Mnps as reference nps and
# 0.7 Mnps as threshold for the slow worker.
# also set in rundb.py and delta_update_users.py
factor = 640000 / base_nps
factor = 691680 / base_nps

# Adjust CPU scaling.
_, tc_limit_ltc = adjust_tc("60+0.6", factor)
Expand Down
2 changes: 1 addition & 1 deletion worker/sri.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"__version": 229, "updater.py": "Mg+pWOgGA0gSo2TuXuuLCWLzwGwH91rsW1W3ixg3jYauHQpRMtNdGnCfuD1GqOhV", "worker.py": "ZqWya/LcB5xq0sj+M/D1CApoBt0vGSTtBeaBLs3sFDEXezhfM0xdJCMeXlJZWN+5", "games.py": "C0yeQ5Oh8eyca64NntP+oetpWAjCvPSWdMyNCGSeS4o9yJN41L4SkL9rTx3z716m"}
{"__version": 230, "updater.py": "Mg+pWOgGA0gSo2TuXuuLCWLzwGwH91rsW1W3ixg3jYauHQpRMtNdGnCfuD1GqOhV", "worker.py": "2Z0LG7EAR0cmOY7yHDDsynebLO8yXmhwaBqjTAJpDDZlumO5o2xYMxglfCRg1/Bg", "games.py": "TzWMwq9hBmAHB0C7JAOvsI+pBvttQiPC4ul5FsOzozJ9lmZl/NutFbvWk8sobJr8"}
2 changes: 1 addition & 1 deletion worker/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Several packages are called "expression".
# So we make sure to use the locally installed one.

WORKER_VERSION = 229
WORKER_VERSION = 230
FILE_LIST = ["updater.py", "worker.py", "games.py"]
HTTP_TIMEOUT = 30.0
INITIAL_RETRY_TIME = 15.0
Expand Down

0 comments on commit 9af4606

Please sign in to comment.