perf: enable demand paging for heap (3 GiB → 654 MiB snapshots) - #100
Closed
danbugs wants to merge 1 commit into
Closed
perf: enable demand paging for heap (3 GiB → 654 MiB snapshots)#100danbugs wants to merge 1 commit into
danbugs wants to merge 1 commit into
Conversation
danbugs
force-pushed
the
perf/demand-page-heap
branch
from
June 24, 2026 17:39
4383532 to
da91188
Compare
Contributor
There was a problem hiding this comment.
Linux Benchmarks
Details
| Benchmark suite | Current: 307f19b | Previous: 4460ae2 | Ratio |
|---|---|---|---|
hello_world (median) |
20 ms |
20 ms |
1 |
pandas (median) |
110 ms |
110 ms |
1 |
density (per VM) |
8 MB |
11 MB |
0.73 |
snapshot (disk) |
653 MiB |
656 MiB |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
Temporarily point all examples' unikraft source at danbugs/unikraft:perf/demand-page-heap to validate the boot.c heap unmap fix across all examples. This branch adds a uk_paging_page_unmap call after uk_vma_map_anon in heap_init(), tearing down boot-provided identity-mapped PTEs so demand paging works correctly. Reduces snapshot size from 3.0 GiB to 654 MiB for Python guests. Signed-off-by: danbugs <danilochiarlone@gmail.com>
danbugs
force-pushed
the
perf/demand-page-heap
branch
from
June 24, 2026 17:55
da91188 to
307f19b
Compare
Contributor
There was a problem hiding this comment.
Windows Benchmarks
Details
| Benchmark suite | Current: 307f19b | Previous: 4460ae2 | Ratio |
|---|---|---|---|
hello_world (median) |
151 ms |
301 ms |
0.50 |
pandas (median) |
546 ms |
768 ms |
0.71 |
density (per VM) |
328 MB |
656 MB |
0.50 |
snapshot (disk) |
654 MiB |
664 MiB |
0.98 |
This comment was automatically generated by workflow using github-action-benchmark.
Contributor
Author
|
No longer needed — demand-page-heap testing covered in PR 99 |
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
danbugs/unikraft:perf/demand-page-heap, which adds auk_paging_page_unmapcall inboot.c:heap_init()to tear down boot-provided identity-mapped PTEs after setting up the demand-paged VMASnapshot::from_env()identity-maps the entire heap in boot page tables before the guest starts. Unikraft'suk_vma_map_anoncreates a demand-paged VMA on top but never removes the existing PTEs, sovma_op_anon_faultnever fires and all heap pages (including untouched zeroes) end up in the snapshotTest plan