Open Leviathan1995 opened 7 years ago
since hardware_concurrency just is hint of the system's concurrency thread number. And there is still many argues between the number of thread and the number of cpu cores. In my opinion, I would like to set the thread number equal to ther core-number * 1.5. There is a discussion to tell us why we should set thread number more than core number. Then main idea is that the disk IO operation may block the thread. when cpu run schedule() function, it's better to have another thread to run. I have forgot this article...
Yes, I just suggest to set this option, but the number of thread will be discussed further.
ok. you can add the data_thread_num to the config file.
The
data_thread_num
is hardcoded in config file, and I think we could make this value is related to number of CPU's on the machine. For example, setdata_thread_num
to std::hardwared_concurrency()*0.75