Skip to content

Commit 66cf8cb

Browse files
committed
doc: include interaction of dirty page tracking with hugepages
Extend the limitation section of the huge pages docs to include a note about how dirty page tracking negates the benefits of huge pages. Also add a cross-reference to the diff snapshot docs. Signed-off-by: Patrick Roy <[email protected]>
1 parent 9429bc6 commit 66cf8cb

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

docs/hugepages.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ Firecracker features:
4040

4141
- Memory Ballooning via the [Balloon Device](./ballooning.md)
4242

43+
Furthermore, enabling dirty page tracking for hugepage memory negates the
44+
performance benefits of using huge pages. This is because KVM will
45+
unconditionally establish guest page tables at 4K granularity if dirty page
46+
tracking is enabled, even if the host users huge mappings.
47+
4348
## FAQ
4449

4550
### Why does Firecracker not offer a transparent huge pages (THP) setting?

docs/snapshotting/snapshot-support.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,9 @@ in the snapshot by instead considering all pages that were _accessed_ during the
318318
VM's lifetime. This potentially results in bigger memory files (although they
319319
are still sparse), but avoids the runtime overhead of dirty page logging.
320320

321+
*Note*: Dirty page tracking negates most of the benefits of
322+
[huge pages](../hugepages.md#known-limitations).
323+
321324
Without dirty page tracking enabled, Firecracker uses the
322325
[`mincore(2)`][man mincore] syscall to determine which pages to include in the
323326
snapshot. As such, this mode of snapshot taking will only work _if swap is

0 commit comments

Comments
 (0)