Bug 975626 - [Docs] [Tracker] Alert on VMs not respecting balloon [waiting]
[Docs] [Tracker] Alert on VMs not respecting balloon [waiting]
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: Documentation (Show other bugs)
3.5.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 3.3.0
Assigned To: Zac Dover
ecs-bugs
sla
: FutureFeature
Depends On: 967573
Blocks: 978136 978137 978139
  Show dependency treegraph
 
Reported: 2013-06-18 20:57 EDT by Andrew Burden
Modified: 2016-06-13 20:42 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 967573
: 978136 978137 978139 (view as bug list)
Environment:
Last Closed: 2014-07-22 08:16:48 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: SLA
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Andrew Burden 2013-06-18 20:57:28 EDT
+++ This bug was initially created as a clone of Bug #967573 +++

related to bug 967572 for balloon support.
this is for engine to report on guests not respecting ballooning requests (which once cgroups for memory are supported, will get swapped out for their unreserved memory)


Virtual machines sharing and using memory resources - ballooning.

Depending on implementation, this could affect:
* Admin
* CLI
* Dev
* PUP
* UP
Comment 1 Zac Dover 2013-08-17 21:52:37 EDT
The following is from BZ#967573:

Deatils on how to test;

Setting up
============

Engine:
Enable ballooning in cluster optimization

Host:
--
up-to-date vdsm and mom
swapoff -a
set rpc-port: 8080 in /etc/vdsm/mom.conf
restart vdsm

monitor the host (and its VMs) using:
/var/log/vdsm/mom.log
vdsCommand -s 0 getAllVmStats
python -c "import xmlrpclib; from pprint import pprint; mom = xmlrpclib.ServerProxy('http://localhost:8080'); pprint(mom.getStatistics())"

VMs (you need two):
--
RAM: Host's RAM / 2
Resource allocation/Guaranteed memory: 512MB (or some other small number)

yum install ovirt-guest-agent
systemctl start ovirt-guest-agent
systemctl enable ovirt-guest-agent
mount -t tmpfs -o size=<almost all free RAM in Bytes> none /mnt
swapoff -a

Testing:
============
Once you have two VMs ready issue the next line in both:

cat /dev/urandom >/mnt/data

Then you can watch the host and once the the host's free memory drops bellow about 20% you should see ballooning commands like "mom.Controllers.Balloon - INFO - Ballooning guest:half1 from 2096400 to 1991580" being logged to mom.log.

If the agent is down you will see "mom.Collectors.GuestMemory - WARNING - getVmMemoryStats() error: The ovirt-guest-agent is not active".
If everything is ok on the VMs side you should see "GuestMonitor-<VM name> is ready". 

At that time you should stop the cat commands and start playing with stopping the guest-agent or rmmod-ing virtio_balloon module.

Be aware of the fact you are filling the guest's memory and it has no swap. When the kernel needs memory and there is no free space in it, it first kills the ovirt-guest-agent and then panics... That is a feature though :)
Comment 2 Zac Dover 2013-11-11 21:30:01 EST
Updated Topic [7913-553371] "Cluster Policy Settings Explained".

This topic is included in the Admin Guide.

The addition I made to the topic is brief, and reads:

  When a host's free memory drops below 20%, ballooning commands like 
  mom.Controllers.Balloon - INFO Ballooning guest:half1 from 1096400 
  to 1991580 are logged to /etc/vdsm/mom.conf. /etc/vdsm/mom.conf is 
  the Memory Overcommit Manager log file.

This material must also be included in the Command Line Shell Guide.

Moving to POST.
Comment 3 Zac Dover 2013-11-11 21:40:03 EST
Or maybe this doesn't need to be in the Command Line Shell Guide.

Andrew, do you think that this needs to be in the Command Line Shell Guide?
Comment 4 Zac Dover 2014-07-22 08:16:48 EDT
The Situation
-------------
In the following section of the RHEV 3.4 Admin Guide, in this section:

⁠4.2.2.4. Cluster Policy Settings Explained

The following text is included:

  When a host's free memory drops below 20%, ballooning commands like 
  mom.Controllers.Balloon - INFO Ballooning guest:half1 from 1096400 
  to 1991580 are logged to /etc/vdsm/mom.conf. /etc/vdsm/mom.conf is 
  the Memory Overcommit Manager log file.


NVR
---
Red_Hat_Enterprise_Virtualization-Administration_Guide-3.4-en-US-3.4-31


This information is now in the RHEV 3.4 Admin Guide. I feel comfortable therefore closing this bug.

Note You need to log in before you can comment on or make changes to this bug.