Skip to content

Commit

Permalink
fix(core-mapping): start cpus_range from 1 on 8+ cores (#2189)
Browse files Browse the repository at this point in the history
  • Loading branch information
folex authored Mar 21, 2024
1 parent 415f917 commit 14d37b3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crates/server-config/src/defaults.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@ pub fn default_system_cpu_count() -> usize {
pub fn default_cpus_range() -> Option<CoreRange> {
let total = num_cpus::get_physical();
let left = match total {
c if c > 32 => 3,
c if c > 16 => 2,
c if c > 8 => 1,
// Leave 1 core to OS if there's 8+ cores
c if c >= 8 => 1,
_ => 0,
};
Some(
Expand Down

0 comments on commit 14d37b3

Please sign in to comment.