Bug 1009712

Summary: [RFE] [rhevm-reports] Reports should include host shared memory data
Product: Red Hat Enterprise Virtualization Manager Reporter: Bryan Yount <byount>
Component: ovirt-engine-reportsAssignee: Yaniv Lavi <ylavi>
Status: CLOSED ERRATA QA Contact: Barak Dagan <bdagan>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.2.0CC: aberezin, acathrow, byount, ecohen, iheim, lbopf, meverett, pstehlik, Rhev-m-bugs, ssekidde, yeylon, ylavi
Target Milestone: ---Keywords: FutureFeature
Target Release: 3.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: ovirt-3.4.0-alpha1 Doc Type: Enhancement
Doc Text:
Red Hat Enterprise Virtualization Reports now includes host shared memory data that can be used in Ad Hoc reports, and accessed via the 'getVdsStats' command.
Story Points: ---
Clone Of:
: 1045501 1045502 1045503 (view as bug list) Environment:
Last Closed: 2014-06-09 15:26:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1045501, 1045502, 1045503    
Bug Blocks:    

Description Bryan Yount 2013-09-19 00:19:53 UTC
3. What is the nature and description of the request?

The customer would like the ability, in rhevm-reports, to see a host's shared memory usage over time (KSM %).


4. Why does the customer need this? (List the business requirements here)

This would allow them to gauge the memory overcommit on their hypervisors and decide if additional memory needs to be purchased.


5. How would the customer like to achieve this? (List the functional requirements here)

A field in rhevm-reports that shows shared memory % that can be used in an ad-hoc report.


8. Does the customer have any specific timeline dependencies and which release would they like to target (i.e. RHEL5, RHEL6)?

10. List any affected packages or components.
ovirt-engine-reports
ovirt-engine-dwh


11. Would the customer be able to assist in testing this functionality if implemented?
Yes

Comment 4 Michael Everette 2013-12-20 15:32:32 UTC
Yaniv,

I have opened 1045501 1045502 1045503 to address the other components.

Comment 5 Yaniv Bronhaim 2013-12-30 07:53:51 UTC
we expose memShared field in getVdsStats, this comes from ksm monitor (self._cif.ksmMonitor.memsharing() * PAGE_SIZE_BYTES).

We also grab it in engine's side under VdsStatistics object for each host. Isn't that enough?

Comment 6 Yaniv Lavi 2013-12-30 14:28:09 UTC
(In reply to Yaniv Bronhaim from comment #5)
> we expose memShared field in getVdsStats, this comes from ksm monitor
> (self._cif.ksmMonitor.memsharing() * PAGE_SIZE_BYTES).
> 
> We also grab it in engine's side under VdsStatistics object for each host.
> Isn't that enough?

It's good.


Yaniv

Comment 7 Yaniv Lavi 2014-01-05 13:57:00 UTC
Still need to add it to ad hoc. Currently added only to history database.


Yaniv

Comment 8 Barak Dagan 2014-03-12 15:55:55 UTC
Verified on av2.1:

rhevm-3.4.0-0.3.master.el6ev.noarch
rhevm-dwh-3.4.0-0.4.master.20140224152332.el6ev.noarch
rhevm-reports-3.4.0-0.4.master.20140226133324.el6ev.noarch
jasperreports-server-pro-5.5.0-8.el6ev.noarch


# vdsClient -s 0 getVdsStats | egrep 'ksm|mem'
	ksmCpu = 0
	ksmPages = 100
	ksmState = False
	memAvailable = 1643
	memCommitted = 5445
	memFree = 7153
	memShared = 0
	memUsed = '8'



$ psql -d engine -c "select ksm_cpu_percent, ksm_pages, ksm_state from vds_statistics;"
 ksm_cpu_percent | ksm_pages | ksm_state 
-----------------+-----------+-----------
               0 |       100 | f



$psql -d ovirt_engine_history -c "select ksm_shared_memory_percent from v3_4_statistics_hosts_resources_usage_samples;" | less -S

 ksm_shared_memory_percent 
---------------------------
                         0
                         0
                         0
                         0
                         0




$psql -d ovirt_engine_history -c "select ksm_shared_memory_percent, max_ksm_shared_memory_percent from v3_4_statistics_hosts_resources_usage_hourly;" | less -S

 ksm_shared_memory_percent | max_ksm_shared_memory_percent 
---------------------------+-------------------------------
                         0 |                             0
                         0 |                             0
                         0 |                             0
                         0 |                             0
                         0 |                             0
(5 rows)



$psql -d ovirt_engine_history -c "select ksm_shared_memory_percent, max_ksm_shared_memory_percent from v3_4_statistics_hosts_resources_usage_daily;" | less -S

 ksm_shared_memory_percent | max_ksm_shared_memory_percent 
---------------------------+-------------------------------
(0 rows)

Comment 9 errata-xmlrpc 2014-06-09 15:26:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2014-0602.html