Reduce default --memory to 32Mi, set examples to measured minimums#77
Merged
Conversation
every example already specifies its own --memory value in its Justfile, so nothing depends on the CLI default. 64Mi comfortably covers the lightweight examples (helloworld-c needs 4Mi, rust/go/dotnet/shell need 16Mi) while heavier workloads (python 512Mi, powershell 1Gi) continue to set their own. Signed-off-by: danbugs <danilochiarlone@gmail.com>
There was a problem hiding this comment.
Pull request overview
Lowers the hyperlight-unikraft CLI’s default guest memory/heap size from 512Mi to 64Mi, aligning the out-of-the-box default with the lightweight examples while still allowing heavier workloads to override via --memory.
Changes:
- Change
--memorydefault from512Mito64Mi. - Update the CLI help text examples to include
64Mi.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Linux Benchmarks
Details
| Benchmark suite | Current: bb82d7d | Previous: d8524a9 | Ratio |
|---|---|---|---|
hello_world (median) |
20 ms |
20 ms |
1 |
pandas (median) |
100 ms |
110 ms |
0.91 |
density (per VM) |
7 MB |
7 MB |
1 |
snapshot (disk) |
385 MiB |
385 MiB |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
Contributor
There was a problem hiding this comment.
Windows Benchmarks
Details
| Benchmark suite | Current: bb82d7d | Previous: d8524a9 | Ratio |
|---|---|---|---|
hello_world (median) |
269 ms |
179 ms |
1.50 |
pandas (median) |
779 ms |
508 ms |
1.53 |
density (per VM) |
6 MB |
6 MB |
1 |
snapshot (disk) |
392 MiB |
392 MiB |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
binary-searched the minimum --memory each example needs to produce its expected output: helloworld-c: 2Mi rust: 16Mi go: 16Mi shell: 16Mi dotnet: 16Mi dotnet-nativeaot: 8Mi hostfs-posix-c: 2Mi hostfs-posix-py: 512Mi python: 512Mi python-tools: 512Mi nodejs: 512Mi powershell: 1Gi networking-py: 32Mi python-agent: 1Gi update each example's Justfile to use its measured minimum, and have CI read the memory value from the Justfile instead of hardcoding it in the workflow matrix. this makes the Justfile the single source of truth. also fixes two under-provisioned examples that were silently relying on headroom: hostfs-posix-py (was 96Mi, needs 512Mi) and python-tools (was 96Mi, needs 512Mi). lower the CLI default from 512Mi to 32Mi — covers every lightweight example with headroom while giving an honest signal that heavy runtimes (python, nodejs, powershell) need explicit --memory. Signed-off-by: danbugs <danilochiarlone@gmail.com>
This was referenced May 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--memoryeach example actually needs to produce correct output512Mito32Mi— covers all lightweight examples (C, Rust, Go, .NET, shell) with headroom; heavy runtimes (Python, Node, PowerShell) require explicit--memoryhostfs-posix-py(was 96Mi, needs 512Mi) andpython-tools(was 96Mi, needs 512Mi)Measured minimums