hs-miner icon indicating copy to clipboard operation
hs-miner copied to clipboard

Requests time out when CPU is used

Open rhn opened this issue 5 years ago • 6 comments

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:

for (let i = 0; i < this.count - 1; i++) {

the requests don't time out any more.

rhn avatar Feb 14 '20 16:02 rhn

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...

pinheadmz avatar Feb 14 '20 17:02 pinheadmz

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 :)

rhn avatar Feb 14 '20 18:02 rhn

bin/hs-bench --backend=simple
Backend: simple, Device: -1
Ops: 1000000, Threads: 8, Grids: 0, Blocks: 0, Iterations: 10

Thread count matches the CPU.

rhn avatar Feb 15 '20 09:02 rhn

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...?).

pinheadmz avatar Feb 15 '20 15:02 pinheadmz

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.

rhn avatar Feb 15 '20 16:02 rhn

It's possible that this is what's going on here: https://news.ycombinator.com/item?id=22514388

rhn avatar Mar 08 '20 08:03 rhn