Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better use number of physical cores instead of logical cores by default #3298

Closed
renkun-ken opened this issue Jan 21, 2019 · 0 comments · Fixed by #3435
Closed

Better use number of physical cores instead of logical cores by default #3298

renkun-ken opened this issue Jan 21, 2019 · 0 comments · Fixed by #3435
Labels
Milestone

Comments

@renkun-ken
Copy link
Member

@renkun-ken renkun-ken commented Jan 21, 2019

It is great that the latest release (v1.12.0) add more support for multithreading in subsetting and restore-after-fork behavior by default. The current default threads is omp_get_max_threads() which tries to achieve maximal performance on a completely task-free server. In practice, however, this default number of threads makes data.table multithreading cost much much more time in computing on a slightly busier server.

In my case, I'm using a server of 40 physical cores (RhpcBLASctl::get_num_cores()) and 80 threads (RhpcBLASctl::get_num_procs()). In status of no other running tasks, the default behavior of data.table is to occupy all 80 threads which works well. But if any other running tasks occupies a small number of threads (e.g. 5-10), data.table multithreading would cost much longer time than no-multithreading at all since those CPUs are blocked.

I'm not sure if it makes sense not to occupy all threads by default. I'd recommend occupying all physical cores by default which seems more practical and may achieve better performance when other tasks are using CPUs or hyperthreading is enabled.

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

Successfully merging a pull request may close this issue.

3 participants