Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion crates/core/src/startup.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use core_affinity::CoreId;
use crossbeam_queue::ArrayQueue;
use itertools::Itertools;
use spacetimedb_paths::server::{ConfigToml, LogsDir};
use std::path::PathBuf;
use std::time::Duration;
Expand Down Expand Up @@ -194,7 +195,14 @@ pub struct Cores {
impl Cores {
fn get() -> Option<Self> {
let cores = &mut core_affinity::get_core_ids()
.filter(|cores| cores.len() >= 8)?
.filter(|cores| cores.len() >= 10)?
.into_iter()
// We reserve the first two cores for the OS.
// This allows us to pin interrupt handlers (IRQs) to these cores,
// particularly those for incoming network traffic,
// preventing them from preempting the main reducer threads.
.filter(|core_id| core_id.id > 1)
.collect_vec()
.into_iter();

let total = cores.len() as f64;
Expand Down
Loading