Skip to content

Commit de8c495

Browse files
authored
fix: adjust scratch size for benchmarks (#1847)
This gives a headroom for benchmarks with large scratch after introducing virtual queue. Fixes CI error: `HyperlightVmError(Initialize(Run(HandleIo(Outb(GuestAborted { code: 13, message: "Out of physical memory" })))))` Signed-off-by: Tomasz Andrzejak <andreiltd@gmail.com>
1 parent b23fc1c commit de8c495

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎src/hyperlight_host/benches/benchmarks.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ use hyperlight_host::sandbox::MultiUseSandbox;
1616
use hyperlight_testing::sandbox_sizes::{LARGE_HEAP_SIZE, MEDIUM_HEAP_SIZE, SMALL_HEAP_SIZE};
1717
use hyperlight_testing::{c_simple_guest_as_pathbuf, simple_guest_as_pathbuf};
1818

19-
/// Sandbox heap size configurations for benchmarking.
20-
/// Only affects heap size - all other configuration remains at defaults.
19+
/// Sandbox heap sizes and scratch budgets for benchmarking.
20+
/// Larger heaps need extra scratch for page tables.
2121
#[derive(Clone, Copy)]
2222
enum SandboxSize {
2323
/// Default configuration (uses hyperlight defaults)
@@ -37,7 +37,7 @@ impl SandboxSize {
3737
match self {
3838
Self::Default => builder,
3939
Self::Small => builder.heap_size(SMALL_HEAP_SIZE),
40-
Self::Medium => builder.heap_size(MEDIUM_HEAP_SIZE).scratch_size(0x50000),
40+
Self::Medium => builder.heap_size(MEDIUM_HEAP_SIZE).scratch_size(0x60000),
4141
Self::Large => builder.heap_size(LARGE_HEAP_SIZE).scratch_size(0x100000),
4242
}
4343
}

0 commit comments

Comments
 (0)