NebulousLabs / Sia-GPU-Miner

A GPU Miner for Sia
MIT License
151 stars 79 forks source link

Miner self-optimizes and prints more neatly #3

Closed JoshVorick closed 9 years ago

JoshVorick commented 9 years ago

When run, the miner will experiment with different global_item_sizes (essentially number of threads) and search for a near optimal number of threads. Each run may result in a different number of threads (e.g. 2048 one run and 4096 the next) because of some variance in speed from call to call. This barely impacts performance because 4096 threads is like calling 2048 threads twice.

The program then tunes the work done in each thread such that every call takes about 3 seconds.

The program prints the current hashrate and the number of blocks mined, updating this line every 3 seconds instead of printing a new line every 3 seconds. The only extra lines that get printed are when the program is searching for the 'optimal' thread count.

JoshVorick commented 9 years ago

Okay, I made all the changes you recommended. I also updated the 'optimal' thread_num finder. It actually works a lot better now (gets my laptop to 14-16MH/s instead of 12-13MH/s), which is a little funny because I didn't even know my laptop could do that many MH/s.