Describe the bug
The initial benchmark of the algorithms algo-perf is wrongly calculated, especially on slow devices.
To Reproduce
Run initial benchmark with the default bench-algo-time 10s and look for example at rx/0 hashrate. I'm getting only 21H/s instead of 220H/s. It is on 4 cores ARMv8 with Linux. If I press H during the rx/0 benchmark, I'll get the correct 220H/s from xmrig.
Increasing bench-algo-time increases slowly the measured hashrate, but it does not reach the correct value of 220.
bench-allgo-time (s)
rx/0 (H/s)
10
21.758
20
81.867
40
132.082
80
164.095
160
183.984
320
200.829
It looks like the hashrate is wrongly calculated in your src/core/Benchmark.cpp and includes the dataset initialization time, which is in my case 26s. For faster computers it is less, so the error is smaller. But it should be corrected anyway. Otherwise the algorithms with longer dataset initialization are underestimated.
Expected behavior
The dataset initialization time should not be included, otherwise the algo benchmark is not correct and then algo-switching is not working as intended.
If I try to correct the hashrates by multiplying them by (bench-allgo-time + initialization)/bench-allgo-time, I'm getting better results:
Describe the bug The initial benchmark of the algorithms algo-perf is wrongly calculated, especially on slow devices.
To Reproduce Run initial benchmark with the default bench-algo-time 10s and look for example at rx/0 hashrate. I'm getting only 21H/s instead of 220H/s. It is on 4 cores ARMv8 with Linux. If I press H during the rx/0 benchmark, I'll get the correct 220H/s from xmrig.
Increasing bench-algo-time increases slowly the measured hashrate, but it does not reach the correct value of 220.
It looks like the hashrate is wrongly calculated in your src/core/Benchmark.cpp and includes the dataset initialization time, which is in my case 26s. For faster computers it is less, so the error is smaller. But it should be corrected anyway. Otherwise the algorithms with longer dataset initialization are underestimated.
Expected behavior The dataset initialization time should not be included, otherwise the algo benchmark is not correct and then algo-switching is not working as intended.
If I try to correct the hashrates by multiplying them by (bench-allgo-time + initialization)/bench-allgo-time, I'm getting better results:
Required data