Skip to content

feat: Enable explicit hugepages for the GuestVM#9027

Merged
frankdavid merged 2 commits intomasterfrom
frankdavid/hugepages2
Feb 25, 2026
Merged

feat: Enable explicit hugepages for the GuestVM#9027
frankdavid merged 2 commits intomasterfrom
frankdavid/hugepages2

Conversation

@frankdavid
Copy link
Contributor

Using hugepages helps the host reduce the work of managing the memory pages of the QEMU process. The host already uses transparent huge pages, but the amount of hugepages fluctuates quite a bit during the lifetime of the VM (anywhere between 20-95% of the QEMU's process memory is backed by hugepages). Using explicit hugepages should give more consistent behavior across nodes. We only enable hugepages for non-SEV nodes because the Linux kernel does not support hugepages yet for VMs with encrypted memory.

The downside:

  • The Host must allocate the hugepages during startup, this adds ~30 seconds to the Host startup.
  • QEMU allocates hugepages eagerly during startup, this adds ~5 seconds to the startup time of the Guest VM. However, we save on the QEMU process cleanup time which can be anywhere between 30s and 100s.

Using hugepages helps the host reduce the work of managing the memory pages of the QEMU process. The host already uses transparent huge pages, but the amount of hugepages fluctuates quite a bit during the lifetime of the VM (anywhere between 20-95% of the QEMU's process memory is backed by hugepages). Using explicit hugepages should give more consistent behavior across nodes.

The downside:

- The Host must allocate the hugepages during startup, this adds ~30 seconds to the Host startup.
- QEMU allocates hugepages eagerly during startup, this adds ~5 seconds to the startup time of the Guest VM. However, we save on the QEMU process cleanup time which can be anywhere between 30s and 100s.
@frankdavid frankdavid added this pull request to the merge queue Feb 25, 2026
Merged via the queue into master with commit 3151485 Feb 25, 2026
67 of 68 checks passed
@frankdavid frankdavid deleted the frankdavid/hugepages2 branch February 25, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants