Skip to content

Commit

Permalink
Merge pull request #281 from microsoft/danmihai1/memory-overhead-clarity
Browse files Browse the repository at this point in the history
runtime: improved memory overhead management
  • Loading branch information
danmihai1 authored Jan 2, 2025
2 parents 79931de + c7b8ee9 commit 32dde44
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions src/runtime/pkg/katautils/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -1963,11 +1963,6 @@ func checkHypervisorConfig(config vc.HypervisorConfig) error {
}

memSizeMB := int64(config.MemorySize)

if memSizeMB == 0 {
return errors.New("VM memory cannot be zero")
}

mb := int64(1024 * 1024)

for _, image := range images {
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/virtcontainers/hypervisor.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const (
vSockLogsPort = 1025

// MinHypervisorMemory is the minimum memory required for a VM.
MinHypervisorMemory = 64
MinHypervisorMemory = 0

defaultMsize9p = 8192

Expand Down
2 changes: 1 addition & 1 deletion tools/osbuilder/node-builder/azure-linux/package_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ source "${common_file}"

# these options ensure we produce the proper CLH config file
runtime_make_flags="SKIP_GO_VERSION_CHECK=1 QEMUCMD= FCCMD= ACRNCMD= STRATOVIRTCMD= DEFAULT_HYPERVISOR=cloud-hypervisor
DEFMEMSZ=256 DEFSTATICSANDBOXWORKLOADMEM=1792 DEFVIRTIOFSDAEMON=${VIRTIOFSD_BINARY_LOCATION} PREFIX=${INSTALL_PATH_PREFIX}"
DEFMEMSZ=0 DEFSTATICSANDBOXWORKLOADMEM=512 DEFVIRTIOFSDAEMON=${VIRTIOFSD_BINARY_LOCATION} PREFIX=${INSTALL_PATH_PREFIX}"

# - for vanilla Kata we use the kernel binary. For ConfPods we use IGVM, so no need to provide kernel path.
# - for vanilla Kata we explicitly set DEFSTATICRESOURCEMGMT_CLH. For ConfPods,
Expand Down

0 comments on commit 32dde44

Please sign in to comment.