Skip to content

Commit

Permalink
fix: Tweak instruction overhead per canister (#1819)
Browse files Browse the repository at this point in the history
Internal metrics show that spawning of sandbox process is closer to 2ms
on average so updating the relevant overhead to align better with the
actual pressure on the system.
  • Loading branch information
dsarlis authored and CI Automation committed Oct 3, 2024
1 parent fa23297 commit d265777
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rs/config/src/subnet_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ const MAX_INSTRUCTIONS_PER_SLICE: NumInstructions = NumInstructions::new(2 * B);
// to enter and exit the Wasm engine.
const INSTRUCTION_OVERHEAD_PER_EXECUTION: NumInstructions = NumInstructions::new(2 * M);

// We assume 1 cycles unit ≅ 1 CPU cycle, so on a 2 GHz CPU it takes about 4ms
// We assume 1 cycles unit ≅ 1 CPU cycle, so on a 2 GHz CPU it takes about 2ms
// to prepare execution of a canister.
const INSTRUCTION_OVERHEAD_PER_CANISTER: NumInstructions = NumInstructions::new(8 * M);
const INSTRUCTION_OVERHEAD_PER_CANISTER: NumInstructions = NumInstructions::new(4 * M);

// Metrics show that finalization can take 13ms when there were 5000 canisters
// in a subnet. This comes out to about 3us per canister which comes out to
Expand Down

0 comments on commit d265777

Please sign in to comment.