Skip to content

Possibility to limit number of used CPU cores? #168

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

Closed
BafDyce opened this issue Aug 13, 2020 · 2 comments
Closed

Possibility to limit number of used CPU cores? #168

BafDyce opened this issue Aug 13, 2020 · 2 comments
Labels
A-ECS Entities, components, systems, and events C-Performance A change motivated by improving speed, memory usage or compile times

Comments

@BafDyce
Copy link
Contributor

BafDyce commented Aug 13, 2020

My machine has 24 logical cores. All of them spin up and run a workload, even for the simplest application. It would be great if there was a possibility to limit the number of actively used cores. This would have the following benefits:

  • Dont waste power/dont heat up your room when you're only doing basic stuff
  • Dont impact other applications in the background too much
  • Allows to do benchmarks for lower end systems without having to spin up VMs / containers with cgroups.

This is probably also related to #111

I was already poking around in ParallelExecutor but couldnt identify any obvious place where this could be added.

@karroffel karroffel added A-ECS Entities, components, systems, and events C-Performance A change motivated by improving speed, memory usage or compile times labels Aug 13, 2020
@Ratysz
Copy link
Contributor

Ratysz commented Aug 13, 2020

This is due to rayon defaulting to as many threads as there are cores when initializing it's global thread pool. Perhaps resource+behavior akin to the window settings can be implemented to tune the global thread pool without requiring users to invoke rayon directly?

@karroffel
Copy link
Contributor

#188 was merged, so this can be closed 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Performance A change motivated by improving speed, memory usage or compile times
Projects
None yet
Development

No branches or pull requests

3 participants