Bug 975626 - [Docs] [Tracker] Alert on VMs not respecting balloon [waiting]
Summary: [Docs] [Tracker] Alert on VMs not respecting balloon [waiting]
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: Documentation
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.3.0
Assignee: Zac Dover
QA Contact: ecs-bugs
URL:
Whiteboard: sla
Depends On: 967573
Blocks: 978136 978137 978139
TreeView+ depends on / blocked
 
Reported: 2013-06-19 00:57 UTC by Andrew Burden
Modified: 2016-06-14 00:42 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of: 967573
: 978136 978137 978139 (view as bug list)
Environment:
Last Closed: 2014-07-22 12:16:48 UTC
oVirt Team: SLA
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Andrew Burden 2013-06-19 00:57:28 UTC
+++ 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-18 01:52:37 UTC
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-12 02:30:01 UTC
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-12 02:40:03 UTC
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 12:16:48 UTC
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.