theQRL / qryptonight

QRL Mining Library
GNU General Public License v3.0
8 stars 13 forks source link

Default number of mining threads #26

Open jleni opened 6 years ago

jleni commented 6 years ago

The current implementation uses:

https://github.com/theQRL/qryptonight/blob/af5ec51f2c14e1e21682185cbf0abc7529f754bd/src/qryptonight/qryptominer.cpp#L103

This is not optimal. For example, HT threads can affect this value. Ideally, the default should be based on cache size, etc.

The current code already has hwloc as a dependency. This library provides most of that tools that would be necessary to improve the default value. The following can server as a guide:

https://github.com/open-mpi/hwloc/blob/9b57ec9d780a05cf08432fe478722d274aa2e8a5/doc/examples/hwloc-hello.c#L107

jleni commented 6 years ago

We had random crashes when PRs #23 and #27 was incorporated. Reopening to track progress, we need to investigate the causes.