pyquarkchain
pyquarkchain copied to clipboard
Create a benchmark for QKCHASH multithread
QKCHASH needs a multithread benchmark tool. I have done it myself but i'm not a coder and the code is very bad. So it's just an issue, not a PR
My code: https://github.com/AGx10k/pyquarkchain/blob/master/qkchash/benchmark-multishread.sh Test results: https://docs.google.com/spreadsheets/d/1YqbBWfXip1vprj3a53nei1cfogMaz8PW1iDk-Vr9GAo/edit#gid=0
That is a great job here, and many thanks for sharing the result. From the code, it looks like it is benchmarking python version of QKCHASH, which is much slower than C/C++ version. Will be great if you could get the results for that (and we could create a PR to add the result in qkchash.MD).
It's benchmarking the native version (see line 302) in this way:
- checks that external_miner is not running to be sure the CPU is not loaded
- cpu_cores_total=count of CPU threads available
- creates py file which is a slightly modified copy of qkchash.py
- simultaneously runs $cpu_cores_total copies of py file each logging it's output to separate log file
- when all copies are finished (checks pgrep) it gets the last lines of output to get the average result
did results myself with some results submitted by https://t.me/QuarkChain_Russia
here is PR: #410
but honestly my benchmark is very inefficient and i hope somebody will make a better one which will be more useful.