Open rhn opened 4 years ago
Hm. What kind of computer are you using? Hardware/ CPU count / OS ?
If you run bin/hs-bench --backend=simple
what kind of stats do you get?
Does the threads
value match the number of CPUs you have?
Also worth noting, Handshake mainnet difficulty is way beyond the reach of CPU mining, so I hope you're just testing...
That's a Linux 8 thread machine. I suspect this is something related to running out of worker threads.
I was testing the viability of CPU mining :)
bin/hs-bench --backend=simple
Backend: simple, Device: -1
Ops: 1000000, Threads: 8, Grids: 0, Blocks: 0, Iterations: 10
Thread count matches the CPU.
Hm well you can run hs-miner with --threads=7
. We have similar issues with GPUs and block / thread size. The miner does not automatically tune to the hardware, at this point it requires some manual tweaking. On my computer (with 4 CPUs) it runs fine and I can even get > 4 threads (for some reason...?).
That counts as a workaround, but there's a clear deadlock in there somewhere related (probably) to the async event loop, which is what I'm really reporting.
It's possible that this is what's going on here: https://news.ycombinator.com/item?id=22514388
Every request done after the work had started when using the CPU backend times out.
I'm not sure about the proper solution, but when I limited the number of CPUs used:
the requests don't time out any more.