Hi, it is not really a bug. You should give the VM more memory if you expect that it will need it that fast. The ballooning mechanism has its disadvantages and this is one of those. We do not react fast enough when such a fast allocation happens.
There is really not much we can do from the mom / guest agent side. We could slowly increase the available memory when the guest agent dies (pretty easy to implement) and we might inform the system that a guest agent is an important process (if that is even possible) so OOM killer will avoid it. But that would not help with Cannot allocate memory error as even the OOM killer takes time before it reacts. Using low guaranteed memory values with ballooning for critical VMs is probably not the best idea. Regards -- Martin Sivak [email protected] SLA / oVirt On Fri, Mar 18, 2016 at 1:00 PM, Andreas Trawöger <[email protected]> wrote: > Hi, > > > I'm trying to track down why my Foreman Centos7 VM continuously crashes with > out of Memory errors on my ovirt-3.6 hosts and what seems to happen is the > following: > > > 1. The Foreman VM only uses 1GB at the beginning and MOM over time reduces > the memory size from 8GB Ram to the defined minimum of 2GB > > > mom.log: > 2016-03-18 12:25:42,669 - mom.Controllers.Balloon - INFO - Ballooning > guest:qvie-foreman from 2210584 to 2100054 > > > 2. When the VM needs RAM very quickly like if you do an 'cp /dev/zero > /run/zero' the ovirt guest agent crashes with an out of memory error. > > > ovirt-guest-agent.log: > > Traceback (most recent call last): > File "/usr/share/ovirt-guest-agent/OVirtAgentLogic.py", line 239, in > doWork > self.sendUserInfo() > File "/usr/share/ovirt-guest-agent/OVirtAgentLogic.py", line 355, in > sendUserInfo > cur_user = self.dr.getActiveUser() > File "/usr/share/ovirt-guest-agent/GuestAgentLinux2.py", line 325, in > getActiveUser > users = os.popen('/usr/bin/users').read().split() > OSError: [Errno 12] Cannot allocate memory > > 3. Resulting in an MOM warning that it can't get any memory stats from the > VM. Leaving the memory size at its minimum size:. > > > mom.log: > > mom.Collectors.GuestMemory - WARNING - getVmMemoryStats() error: The > ovirt-guest-agent is not active > > > Any chances to prevent that from happening? Or is this a bug in MOM / > ovirt-guest-agent that should be fixed? > > > Greetings > > Andreas > > > _______________________________________________ > Users mailing list > [email protected] > http://lists.ovirt.org/mailman/listinfo/users > _______________________________________________ Users mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/users

