4

The default value for the --max-concurrency is 0. What does that mean? Will it not use any threads? Will it automatically determine the right amount of threads? If it is the latter, is there a way to query what value was determined?

assylias
  • 2,208
  • 11
  • 27
Philippe
  • 143
  • 2
  • don't think the flag > --max-concurrency is working on current v14 tag or master branch or maybe I'm doing wrong. the RPC threads is always 2. the p2p threads is hardcoded to 10. – user5937 Sep 19 '19 at 05:11

1 Answers1

4

By default, the value will be set to the hardware concurrency reported by boost. This is usually the number of CPU "threads" available. If this returns 0, no extra worker threads will be used (not sure if that got tested). I do not think monero logs what Boost claims, but you can use that function yourself in a test program:

http://www.boost.org/doc/libs/1_66_0/doc/html/thread/thread_management.html#thread.thread_management.thread.hardware_concurrency

Monero code needs threads, and will not function if threading is not available. This setting is designed for short lived CPU intensive operations such as signature verification, etc.

user36303
  • 34,858
  • 2
  • 57
  • 123