Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-7105

Estimate typical and maximum memory usage based on domxml

    • None
    • Important
    • rhel-sst-virtualization
    • ssg_virtualization
    • 13
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • None

      Description of problem:

      KubeVirt runs libvirt+qemu in a Pod called virt-launcher. To be a good citizen of Kubernetes, KubeVirt has to declare ahead of time how much memory virt-launcher requests. KubeVirt currently does that in a very coarse fashion, guestimating how memory virt-laucher+libvirt+qemu+etc typically requires.

      Things become even trickier in multi-tenant Kubernetes cluster, where a cluster-admin enforces memory limits on namespaces, to limit the maximum noise one tennant can cause to others. In this case, KubeVirt has to estimate ahead of time the memory limit of virt-launcher, above which the Pod would be killed. Overestimation causes waste of resources; underestimation causes premature OOM kills.

      KubeVirt's estimates are likely to be configurable: some cluster-admins would care more about protecting their resources from rogue bursts and other cluster-admins would care more about keeping their bursting VMs alive.

      To improve KubeVirt's estimation of requested memory and memory limits, I would like libvirt to provide functions similar to

      int estimateTypicalMemoryUse(domxml)
      int estimateMaximumMemoryUse(domxml)

      Users may want to add an "int genrousity" argument, expressing in a range from 1 to 100 how generous they feel about this specific VM, and willing to pay with RAM to keep it alive.

      Super-smart users may be able to ignore KubeVirt's libvirt-based recommendation, but most VM users are unlikely to know better than us how much RAM our software consumes.

              mprivozn@redhat.com Michal Privoznik
              dkenigsb@redhat.com Dan Kenigsberg
              Michal Privoznik Michal Privoznik
              Liang Cong Liang Cong
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: