Efficient Number of Threads

前端 未结 6 547
小鲜肉
小鲜肉 2020-12-28 10:23

I want to optimize my application number of threads. Almost all of them have IO beside CPU usage in an equal value. How much is the efficient number of threads when there ar

6条回答
  •  悲哀的现实
    2020-12-28 10:49

    I don't think there's a definitive answer to this. I would just suggest trying your application with different numbers of threads and seeing which performs the best. One place to start would be is one more thread than the number of processor threads in your hardware, e.g. if you have a dual core processor with one thread per core then use 3 threads.

提交回复
热议问题