Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Set meaningful number of CPU's in data server #7

Open
Leviathan1995 opened this issue May 24, 2017 · 3 comments
Open

Set meaningful number of CPU's in data server #7

Leviathan1995 opened this issue May 24, 2017 · 3 comments

Comments

@Leviathan1995
Copy link
Contributor

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, set data_thread_num to std::hardwared_concurrency()*0.75

@baotiao
Copy link
Contributor

baotiao commented Jun 7, 2017

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...

@Leviathan1995
Copy link
Contributor Author

Yes, I just suggest to set this option, but the number of thread will be discussed further.

@baotiao
Copy link
Contributor

baotiao commented Jun 7, 2017

ok. you can add the data_thread_num to the config file.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants