Hot Memory add and Physical Memory guaranteed

Hello, i just tested the memory hot add to a vm. This vm had 2048 MB. I set the new memory to 2662 MB. I logged into the vm and i've seen that hasn't been any memory change, even if i said to the manager to apply memory expansion immediately. Memory shown by free -m is 1772 MB. Looking around i've found that that value was set in the option called "Physical Memory guaranteed". I tried setting this parameter to an higher value, but is still showing 1772, even if it says that "Memory" parameter will be changed immediately and minAllocatedMemory is changed at next boot. What is the right workflow to hot increase the ram of a vm? Luca -- "E' assurdo impiegare gli uomini di intelligenza eccellente per fare calcoli che potrebbero essere affidati a chiunque se si usassero delle macchine" Gottfried Wilhelm von Leibnitz, Filosofo e Matematico (1646-1716) "Internet è la più grande biblioteca del mondo. Ma il problema è che i libri sono tutti sparsi sul pavimento" John Allen Paulos, Matematico (1945-vivente) Luca 'remix_tj' Lorenzetto, http://www.remixtj.net , <lorenzetto.luca@gmail.com>

On Thu, Jun 22, 2017 at 6:21 PM, Luca 'remix_tj' Lorenzetto <lorenzetto.luca@gmail.com> wrote:
Hello,
i just tested the memory hot add to a vm. This vm had 2048 MB. I set the new memory to 2662 MB. I logged into the vm and i've seen that hasn't been any memory change, even if i said to the manager to apply memory expansion immediately.
Memory shown by free -m is 1772 MB.
Looking around i've found that that value was set in the option called "Physical Memory guaranteed".
I tried setting this parameter to an higher value, but is still showing 1772, even if it says that "Memory" parameter will be changed immediately and minAllocatedMemory is changed at next boot.
What is the right workflow to hot increase the ram of a vm?
forgot to say that is a RHEL 7 VM and has the memory baloon device enabled. I tried on a RHEL 6 that has no memory baloon device and the ram has been immediately increased. -- "E' assurdo impiegare gli uomini di intelligenza eccellente per fare calcoli che potrebbero essere affidati a chiunque se si usassero delle macchine" Gottfried Wilhelm von Leibnitz, Filosofo e Matematico (1646-1716) "Internet è la più grande biblioteca del mondo. Ma il problema è che i libri sono tutti sparsi sul pavimento" John Allen Paulos, Matematico (1945-vivente) Luca 'remix_tj' Lorenzetto, http://www.remixtj.net , <lorenzetto.luca@gmail.com>

"Luca 'remix_tj' Lorenzetto" <lorenzetto.luca@gmail.com> writes:
i just tested the memory hot add to a vm. This vm had 2048 MB. I set the new memory to 2662 MB. I logged into the vm and i've seen that hasn't been any memory change, even if i said to the manager to apply memory expansion immediately.
Memory shown by free -m is 1772 MB.
[...]
forgot to say that is a RHEL 7 VM and has the memory baloon device enabled.
This is normal with memory balloon enabled – memory balloon often "consumes" the hot plugged memory, so you can't see it. Regards, Milan

And I believe the virt team is working on "hotplug" support for the guaranteed memory so mom will start changing the balloon size accordingly. Michal: is there a bug tracking that? Regards, Martin Sivak On Fri, Jun 23, 2017 at 11:16 AM, Milan Zamazal <mzamazal@redhat.com> wrote:
"Luca 'remix_tj' Lorenzetto" <lorenzetto.luca@gmail.com> writes:
i just tested the memory hot add to a vm. This vm had 2048 MB. I set the new memory to 2662 MB. I logged into the vm and i've seen that hasn't been any memory change, even if i said to the manager to apply memory expansion immediately.
Memory shown by free -m is 1772 MB.
[...]
forgot to say that is a RHEL 7 VM and has the memory baloon device enabled.
This is normal with memory balloon enabled – memory balloon often "consumes" the hot plugged memory, so you can't see it.
Regards, Milan _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

On Fri, Jun 23, 2017 at 11:16 AM, Milan Zamazal <mzamazal@redhat.com> wrote:
"Luca 'remix_tj' Lorenzetto" <lorenzetto.luca@gmail.com> writes:
i just tested the memory hot add to a vm. This vm had 2048 MB. I set the new memory to 2662 MB. I logged into the vm and i've seen that hasn't been any memory change, even if i said to the manager to apply memory expansion immediately.
Memory shown by free -m is 1772 MB.
[...]
forgot to say that is a RHEL 7 VM and has the memory baloon device enabled.
This is normal with memory balloon enabled – memory balloon often "consumes" the hot plugged memory, so you can't see it.
Ok. What's exactly the role of "guaranteed memory"? Is only about ensuring on startup time that there is at least X free memory on hosts or something more complex? What's the best configuration? keeping baloon or not? setting memory and guaranteed memory to the same value? If i have 1TB of ram in all the cluster, does the "guaranteed memory" doesn't allows to provision vms with cumulative guaranteed memory usage greater than 1TB? Can KSM help allow to overprovision in this situation? Does memory baloon device has impacts on vm performance? I need to understand better in order to plan correctly all the required hardware resource i need for migrating to oVirt. Luca -- "E' assurdo impiegare gli uomini di intelligenza eccellente per fare calcoli che potrebbero essere affidati a chiunque se si usassero delle macchine" Gottfried Wilhelm von Leibnitz, Filosofo e Matematico (1646-1716) "Internet è la più grande biblioteca del mondo. Ma il problema è che i libri sono tutti sparsi sul pavimento" John Allen Paulos, Matematico (1945-vivente) Luca 'remix_tj' Lorenzetto, http://www.remixtj.net , <lorenzetto.luca@gmail.com>

"Luca 'remix_tj' Lorenzetto" <lorenzetto.luca@gmail.com> writes:
On Fri, Jun 23, 2017 at 11:16 AM, Milan Zamazal <mzamazal@redhat.com> wrote:
"Luca 'remix_tj' Lorenzetto" <lorenzetto.luca@gmail.com> writes:
i just tested the memory hot add to a vm. This vm had 2048 MB. I set the new memory to 2662 MB. I logged into the vm and i've seen that hasn't been any memory change, even if i said to the manager to apply memory expansion immediately.
Memory shown by free -m is 1772 MB.
[...]
forgot to say that is a RHEL 7 VM and has the memory baloon device enabled.
This is normal with memory balloon enabled – memory balloon often "consumes" the hot plugged memory, so you can't see it.
Ok.
What's exactly the role of "guaranteed memory"? Is only about ensuring on startup time that there is at least X free memory on hosts or something more complex?
I think it defines the minimum memory that the balloon should always leave available. Martin, do you know answers to the other questions?
What's the best configuration? keeping baloon or not? setting memory and guaranteed memory to the same value? If i have 1TB of ram in all the cluster, does the "guaranteed memory" doesn't allows to provision vms with cumulative guaranteed memory usage greater than 1TB? Can KSM help allow to overprovision in this situation?
Does memory baloon device has impacts on vm performance?
I need to understand better in order to plan correctly all the required hardware resource i need for migrating to oVirt.
Luca

What's exactly the role of "guaranteed memory"? Is only about ensuring on startup time that there is at least X free memory on hosts or something more complex?
As Milan said, it tells the balloon the lower limit of ballooning. We won't take more memory from the VM when it reaches this amount of assigned memory. It is not related to VM start, but to runtime. It is important to realize that both overcommit features (KSM, ballooning) require that the full VM can be started first. Only then will KSM start deduplicating pages and balloon inflating. That is why we recommend swap to be present and enabled on a host although it won't be really used, it just provides a buffer space before the VM is compacted.
What's the best configuration? keeping baloon or not? setting memory and guaranteed memory to the same value?
Setting the two fields to the same value effectively disables ballooning for the VM.
If i have 1TB of ram in all the cluster, does the "guaranteed memory" doesn't allows to provision vms with cumulative guaranteed memory usage greater than 1TB?
No, the memory field itself behaves like this. You can allow the consumption go higher by defining memory overcommit ratio (in Edit Cluster dialog). Guaranteed memory is only used for controlling balloon limits.
Can KSM help allow to overprovision in this situation?
KSM is complementary to ballooning in this case. Both features allow over commit to work. - KSM needs no cooperation of the VM, but scanning for duplicate pages loads the host - ballooning needs cooperation of the VM (driver + guest agent)
Does memory baloon device has impacts on vm performance?
Well the device itself does not impose any load. But when you take some memory from the VM, it will have obviously less resources. If the VM tends to allocate huge amount of memory in short time then the balloon might be slow in returning the memory to the VM and the application might not be happy about it. Best regards Martin Sivak On Fri, Jun 23, 2017 at 11:58 AM, Luca 'remix_tj' Lorenzetto <lorenzetto.luca@gmail.com> wrote:
On Fri, Jun 23, 2017 at 11:16 AM, Milan Zamazal <mzamazal@redhat.com> wrote:
"Luca 'remix_tj' Lorenzetto" <lorenzetto.luca@gmail.com> writes:
i just tested the memory hot add to a vm. This vm had 2048 MB. I set the new memory to 2662 MB. I logged into the vm and i've seen that hasn't been any memory change, even if i said to the manager to apply memory expansion immediately.
Memory shown by free -m is 1772 MB.
[...]
forgot to say that is a RHEL 7 VM and has the memory baloon device enabled.
This is normal with memory balloon enabled – memory balloon often "consumes" the hot plugged memory, so you can't see it.
Ok.
What's exactly the role of "guaranteed memory"? Is only about ensuring on startup time that there is at least X free memory on hosts or something more complex?
What's the best configuration? keeping baloon or not? setting memory and guaranteed memory to the same value? If i have 1TB of ram in all the cluster, does the "guaranteed memory" doesn't allows to provision vms with cumulative guaranteed memory usage greater than 1TB? Can KSM help allow to overprovision in this situation?
Does memory baloon device has impacts on vm performance?
I need to understand better in order to plan correctly all the required hardware resource i need for migrating to oVirt.
Luca
-- "E' assurdo impiegare gli uomini di intelligenza eccellente per fare calcoli che potrebbero essere affidati a chiunque se si usassero delle macchine" Gottfried Wilhelm von Leibnitz, Filosofo e Matematico (1646-1716)
"Internet è la più grande biblioteca del mondo. Ma il problema è che i libri sono tutti sparsi sul pavimento" John Allen Paulos, Matematico (1945-vivente)
Luca 'remix_tj' Lorenzetto, http://www.remixtj.net , <lorenzetto.luca@gmail.com> _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
participants (3)
-
Luca 'remix_tj' Lorenzetto
-
Martin Sivak
-
Milan Zamazal