Using ComputeTaskPool for a par_for_each query only uses half of available logical cores #1907
Labels
A-App
Bevy apps and plugins
C-Bug
An unexpected or incorrect behavior
C-Performance
A change motivated by improving speed, memory usage or compile times
Bevy version
0.5
Operating system & version
Linux
What you did
I have a CPU heavy task and running it as part of a query
par_for_each
loop in aComputeTaskPool
and only half of my cores are being utilised. I originally used an AsyncTaskPool but this has even fewer threads assigned.I know why this happens but it was unexpected:
bevy/crates/bevy_core/src/task_pool_options.rs
Line 54 in 75ae20d
What you expected to happen
When not using the
IoTaskPool
orAsyncComputeTaskPool
I would expect theComputeTaskPool
to use all logical cores. Likewise I would expect the other pools to expand to optimally use the CPU available.Alternatively, documentation should be updated to make clear what the current behaviour is and steps to create a new task pool.
What actually happened
Only half of the available core were used.
The text was updated successfully, but these errors were encountered: