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

Reflect missing QEMU/KVM memory usage categories in code #4101

Open
OhmSpectator opened this issue Jul 24, 2024 · 0 comments
Open

Reflect missing QEMU/KVM memory usage categories in code #4101

OhmSpectator opened this issue Jul 24, 2024 · 0 comments

Comments

@OhmSpectator
Copy link
Member

@cperakis has provided a report on QEMU/KVM memory usage: https://docs.google.com/document/d/1akU0yJTeufqHwy0MfTsd6fO4eZ-ELMk1fJm14YYfblo/edit?usp=sharing.
While the work is ongoing and further experiments are planned to gather more details about memory usage, it has become evident that some categories of memory usage during guest runs are not accounted for in our code. For example, memory used by KVM and some emulation-related allocs are not currently considered.

In our code, we have functions to estimate memory usage for some categories, but they are incomplete. The relevant code snippet is:

overhead = undefinedVMMOverhead() + ramVMMOverhead(domainRAMSize) +
qemuVMMOverhead() + cpuVMMOverhead(domainMaxCpus, domainVcpus) + mmioOverhead

Even though testing is not yet finished, we can improve this code by listing the categories for which we should calculate memory usage. This ticket aims to enhance the current code to at least include the expected categories, using mock function implementations. The actual implementations will be completed later once all tests are done and analyzed.

So the following can be done:

  • Review the current memory usage accounting functions.
  • Identify the missing categories of memory usage.
  • Add placeholders for the missing categories in the code.
  • Implement mock functions for the newly identified categories.
  • Document the expected categories and their importance in the code comments.
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