File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
canister_sandbox/src/replica_controller Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -75,10 +75,10 @@ const SANDBOX_PROCESSES_TO_EVICT: usize = 200;
75
75
/// The RSS to evict in one go in order to amortize for the eviction cost (1 GiB).
76
76
const SANDBOX_PROCESSES_RSS_TO_EVICT : NumBytes = NumBytes :: new ( 1024 * 1024 * 1024 ) ;
77
77
78
- /// By default, assume each sandbox process consumes 50 MiB of RSS.
78
+ /// By default, assume each sandbox process consumes 5 MiB of RSS.
79
79
/// The actual memory usage is updated asynchronously.
80
80
/// See `monitor_and_evict_sandbox_processes`
81
- const DEFAULT_SANDBOX_PROCESS_RSS : NumBytes = NumBytes :: new ( 50 * 1024 * 1024 ) ;
81
+ const DEFAULT_SANDBOX_PROCESS_RSS : NumBytes = NumBytes :: new ( 5 * 1024 * 1024 ) ;
82
82
83
83
/// To speedup synchronous operations, the sandbox RSS-based eviction
84
84
/// is triggered only when the system's available memory falls below
Original file line number Diff line number Diff line change @@ -46,8 +46,10 @@ const DEFAULT_WASMTIME_RAYON_COMPILATION_THREADS: usize = 10;
46
46
const DEFAULT_PAGE_ALLOCATOR_THREADS : usize = 8 ;
47
47
48
48
/// Sandbox process eviction ensures that the number of sandbox processes is
49
- /// always below this threshold.
50
- pub ( crate ) const DEFAULT_MAX_SANDBOX_COUNT : usize = 7_000 ;
49
+ /// always below this threshold. Idle sandboxes should be using at most ~5MiB
50
+ /// resident memory with the on-disk compilation cache, so 10,000 sandboxes
51
+ /// shouldn't be more than 50 GiB.
52
+ pub ( crate ) const DEFAULT_MAX_SANDBOX_COUNT : usize = 10_000 ;
51
53
52
54
/// A sandbox process may be evicted after it has been idle for this
53
55
/// duration and sandbox process eviction is activated.
You can’t perform that action at this time.
0 commit comments