Skip to content

Commit f1f946a

Browse files
committed
tmp: enable huge pages by default
To do some performance testing comparing huge pages with small pages. Signed-off-by: Patrick Roy <[email protected]>
1 parent 2795a8c commit f1f946a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/vmm/src/vmm_config/machine_config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ impl From<kernel_version::Error> for VmConfigError {
5353
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
5454
pub enum HugePageConfig {
5555
/// Do not use hugepages, e.g. back guest memory by 4K
56-
#[default]
5756
#[serde(alias = "4K")]
5857
None,
5958
/// Back guest memory by 2MB hugetlbfs pages
6059
#[serde(rename = "2M")]
60+
#[default]
6161
Hugetlbfs2M,
6262
/// Back guest memory by 1GB hugetlbfs
6363
#[serde(rename = "1G")]

tools/devtool

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ cmd_test() {
697697
# anyway (something else on the host seems to be stealing our huge pages, and we cannot "ear mark" them for
698698
# Firecracker processes). Thus, just allocate 4GB of them and call it a day.
699699
say "Setting up huge pages pool"
700-
num_hugetlbfs_pages=2048
700+
num_hugetlbfs_pages=51200 # 100GiB huge pages pool
701701

702702
# Allocate enough 2M hugetlbfs pages to boot a single 128MB microvm
703703
huge_pages_old=$(cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages)

0 commit comments

Comments
 (0)