XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    OS free memory showing Static instead Dynamic

    Scheduled Pinned Locked Moved Compute
    14 Posts 4 Posters 896 Views 7 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ivanobomI Offline
      ivanobom
      last edited by

      This is the memory config for CentOS 7 VM
      CentOS7.png

      And this is the config for Rocky 8 VM
      Rocky8.png
      As you can see, they are exactly the same.
      Thanks,

      1 Reply Last reply Reply Quote 0
      • olivierlambertO Offline
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by

        Dynamic at 8/8 means you shouldn't be able to change memory while the VM is live (it's 8GiB when it runs, no more, no less).

        Dynamic means when the VM runs, static can only be changed while it's halted.

        1 Reply Last reply Reply Quote 0
        • ivanobomI Offline
          ivanobom
          last edited by ivanobom

          As long Dynamic memory is Less or Equal Static, I AM ABLE to change it while VM is live to desired value (in this case, up to 16GB). The only case I have to halt the VM is to change the Static memory. So, in this case I have 16GB Static and 8GB Dynamic, I can live increase total memory up to 16GB (or reduce it) and CentOS 7 operating system recognize this memory change on the fly.

          Please note that I'm just having the problem with Rocky 8, that shows 16GB of total RAM, even having limited Dynamic memory to 8GB. I'm able to decrease or increase Dynamic memory (up to 16GB set on Static), but the Rocky OS will always shows 16GB of total RAM.

          1 Reply Last reply Reply Quote 0
          • olivierlambertO Offline
            olivierlambert Vates 🪐 Co-Founder CEO
            last edited by

            Ah yes sorry, I didn't read it correctly. Indeed, the range can change within the static boundaries while it's up (but not changing the static boundaries themselves).

            I'm suspecting an issue with the ballooning driver of the kernel maybe 🤔

            1 Reply Last reply Reply Quote 0
            • ivanobomI Offline
              ivanobom
              last edited by

              I just installed a new VM with original CentOS 8 (not Rocky) and it behaves exact like happens on Rocky 8 and Rocky 9. Is anything I can do to fix this supposed issue with the ballooning driver of the kernel? Or is it anything that must be resolved inside XCP-ng code?

              Thanks

              1 Reply Last reply Reply Quote 0
              • olivierlambertO Offline
                olivierlambert Vates 🪐 Co-Founder CEO
                last edited by

                Dunno, does it ring any bell @stormi ?

                We tend avoid memory ballooning here (little benefits vs many quirks in some situation), so I never encountered those bugs myself 🤷

                stormiS 1 Reply Last reply Reply Quote 0
                • stormiS Offline
                  stormi Vates 🪐 XCP-ng Team @olivierlambert
                  last edited by

                  @olivierlambert said in OS free memory showing Static instead Dynamic:

                  Dunno, does it ring any bell @stormi ?

                  No, but it's worth trying to understand what goes on.

                  1 Reply Last reply Reply Quote 0
                  • stormiS Offline
                    stormi Vates 🪐 XCP-ng Team
                    last edited by stormi

                    I raised the topic on IRC with Xen developers, and it turns out RHEL 8's kernel is built without CONFIG_XEN_BALLONING, and there's nothing we can do on hypervisor side to prevent the VM from crashing if dynamic max differs from static max in this situation.

                    I don't know why Red Hat disabled ballooning. You could try exposing your use case to them and also to their derivatives. Since Red Hat forced them to divert from RHEL when they stopped releasing package sources to the public, they might be more open to changing the configuration for better Xen support than when they were a bug to bug compatible rebuild.

                    1 Reply Last reply Reply Quote 0
                    • ivanobomI Offline
                      ivanobom
                      last edited by

                      Thanks for your reply.

                      I can see that both CentOS 7 and CentOS 8 (Rocky 8/9) have the balloon modules:

                      CentOS 7:

                      $ find /usr/lib/modules/`uname -r` -iname "*balloon*"
                      /usr/lib/modules/3.10.0-1160.83.1.el7.x86_64/kernel/drivers/hv/hv_balloon.ko.xz
                      /usr/lib/modules/3.10.0-1160.83.1.el7.x86_64/kernel/drivers/virtio/virtio_balloon.ko.xz
                      /usr/lib/modules/3.10.0-1160.83.1.el7.x86_64/kernel/drivers/misc/vmw_balloon.ko.xz
                      

                      Rocky 8:

                      $ find /usr/lib/modules/`uname -r` -iname "*balloon*"
                      /usr/lib/modules/4.18.0-477.21.1.el8_8.x86_64/kernel/drivers/virtio/virtio_balloon.ko.xz
                      /usr/lib/modules/4.18.0-477.21.1.el8_8.x86_64/kernel/drivers/hv/hv_balloon.ko.xz
                      /usr/lib/modules/4.18.0-477.21.1.el8_8.x86_64/kernel/drivers/misc/vmw_balloon.ko.xz
                      

                      Maybe it is possible to manually load this module on system boot, but I have no idea how to do it, nor which one is the correct module for Xen. Do you have any clue?

                      Thanks!

                      1 Reply Last reply Reply Quote 0
                      • stormiS Offline
                        stormi Vates 🪐 XCP-ng Team
                        last edited by

                        I don't think it's either of these modules. Ballooning support for Xen is not built at all in the kernel, according to the configuration. You need to rebuild the kernel with CONFIG_XEN_BALLONING set in its configuration, and possibly CONFIG_XEN_BALLOON_MEMORY_HOTPLUG.

                        1 Reply Last reply Reply Quote 0
                        • olivierlambertO Offline
                          olivierlambert Vates 🪐 Co-Founder CEO
                          last edited by

                          @stormi said in OS free memory showing Static instead Dynamic:

                          I don't know why Red Hat disabled ballooning.

                          I have one or two ideas about this...

                          1 Reply Last reply Reply Quote 0
                          • J Offline
                            john.c @ivanobom
                            last edited by

                            @ivanobom I have made a request for packages to be added to the Synergy repository of Alma Linux.

                            Give them the time to add the packages to the repository then try the Alma Linux distribution.

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post