Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The memory used by SEV-SNP virtual machine is far more than expected #250

Open
Monxter-seu opened this issue Dec 2, 2024 · 0 comments
Open

Comments

@Monxter-seu
Copy link

Monxter-seu commented Dec 2, 2024

I tried creating SEV-SNP VMs with kernel 6.11, qemu 9.2 and libvirt 10.5.0. The memory set by libvirt is 4GB, but the memory consumed by the VM is about 7GB. I used the pmap to see the memory consumed by qemu process and found out that the allocated memory is 4911700(KB) and the RSS is 494956(KB). So I want to know is it normal that about 3GB memory is consumed by the system when I started the SEV-SNP VM and the how to estimate the memory consumption for each SEV-SNP VM. By the way, all the consumed memory is in buff/cache area. THX

Add. We found that the unused pages of VMs are set as public when the system boots, so most of the pages are public. That makes the openVSwitch process allocates more memory when the openVSwitch tries to access the private pages. According to the document, that is the lazy mode of memory validation, which I thought has not been introduced to the current vision of SEV-SNP. So I want to confirm that whether the lazy validation mode has been merged into kernel and qemu and is set as the
default validation mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant