feat: kubevirt - use 75% of the memory for hugepages

This commit is contained in:
Ryan Yin
2024-08-15 17:19:26 +08:00
parent e17bc1ec23
commit 43db6bcf63
4 changed files with 7 additions and 11 deletions

View File

@@ -28,11 +28,7 @@ Clusters running as virtual machines on the KubeVirt cluster, for testing and pr
1. `k3s-prod-1-worker-1`
1. `k3s-prod-1-worker-2`
1. `k3s-prod-1-worker-3`
1. For testing:.
1. `k3s-test-1-master-1`
2. `k3s-test-1-worker-1`
3. `k3s-test-1-worker-2`
4. `k3s-test-1-worker-3`
1. For testing:. 2. `k3s-test-1-master-1` 3. `k3s-test-1-master-2` 4. `k3s-test-1-master-3`
## Kubernetes Resources

View File

@@ -58,8 +58,8 @@ in {
#
# pre-allocate hugepages manually(for kubevirt guest vms)
# NOTE: the hugepages allocated here can not be used for other purposes!
# so we should left some memory for the host OS
# so we should left some memory for the host OS and other vms that don't use hugepages
"hugepagesz=1G"
"hugepages=54"
"hugepages=48" # use 75% of the total memory for hugepages
];
}

View File

@@ -52,8 +52,8 @@ in {
#
# pre-allocate hugepages manually(for kubevirt guest vms)
# NOTE: the hugepages allocated here can not be used for other purposes!
# so we should left some memory for the host OS
# so we should left some memory for the host OS and other vms that don't use hugepages
"hugepagesz=1G"
"hugepages=55"
"hugepages=48" # use 75% of the total memory for hugepages
];
}

View File

@@ -52,9 +52,9 @@ in {
#
# pre-allocate hugepages manually(for kubevirt guest vms)
# NOTE: the hugepages allocated here can not be used for other purposes!
# so we should left some memory for the host OS
# so we should left some memory for the host OS and other vms that don't use hugepages
"hugepagesz=1G"
"hugepages=16"
"hugepages=15" # use 15/24 of the total memory for hugepages
# https://kubevirt.io/user-guide/compute/host-devices/
#