Closed who-biz closed 5 years ago
@leto Since I'm not very familiar with threads, if you could just give your approval that this seems correct, i'll go ahead and make the changes. Alternatively, PR it yourself if you'd like to earn your full-fledged contributor badge (sorry we don't have real badges)
Consideration: Our algorithm uses a 1 MB scratchpad. Knowing that information, I'm unsure if 0x80000 or 0x40000 would be better here. Most likely the latter?
Note: This may be the source of the crash on unspent_outputs
in CLI. I believe output selection uses threads as well.
This has relevance to mining in code located here: https://github.com/blur-network/blur/blob/master/src/cryptonote_basic/miner.cpp#L352
@who-biz this seems reasonable to me :+1:
In
src/cryptonote_config.h
the macro forTHREAD_STACK_SIZE
is defaulted to5*1024*1024
or0x500000
... This should probably be0x80000
instead.This may be the cause behind the the strange behavior w.r.t. to hashrate declining when we use more cores in larger processors. We should not be allocating 5.24 MB per thread
I'm sure boost::thread provides a way to allocate thread stack size in a way that is at least somewhat portable.