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

[memtune] qemu process limit is not updated after updating vm memory hard_limit at run-time

    • Minor
    • sst_virtualization
    • ssg_virtualization
    • None
    • QE ack
    • False
    • Hide

      None

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

      Description of problem:
      Start vm, update vm memory hard_limit by "virsh memtune <domain> --hard-limit <n>" at run-time. Then check qemu process limit by "prlimit", the hard limit is not updated accordingly.
      If I set hard_limit in vm xml when vm is shutoff, then start vm. The hard limit printed by prlimit will be same as the hard_limit setting in vm xml.
      I'm not sure which one is expected, but the above two behaviors are not consistent.

      Version-Release number of selected component:
      libvirt-8.5.0-1.el9.x86_64
      qemu-kvm-7.0.0-8.el9.x86_64

      How reproducible:
      100%

      Steps to Reproduce:
      1. Start a vm

      2. Check qemu process memory hard limit, it seems the default value is 64M if no hard_limit is set in vm xml:

      1. prlimit -p `pidof qemu-kvm` -l
        RESOURCE DESCRIPTION SOFT HARD UNITS
        MEMLOCK max locked-in-memory address space 67108864 67108864 bytes

      3. Update vm memory hard_limit:

      1. virsh memtune uefi --hard-limit 262144
      2. virsh memtune uefi
        hard_limit : 262144
        soft_limit : unlimited
        swap_hard_limit: unlimited
      3. virsh dumpxml uefi |grep limit
        <hard_limit unit='KiB'>262144</hard_limit>

      4. Check qemu process memory hard limit:

      1. prlimit -p `pidof qemu-kvm` -l
        RESOURCE DESCRIPTION SOFT HARD UNITS
        MEMLOCK max locked-in-memory address space 67108864 67108864 bytes

      Actual results:
      As above

            virt-maint virt-maint
            rhn-support-fjin Fangge Jin
            virt-maint virt-maint
            Liang Cong Liang Cong
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: