Bug #388
KVM probes do not get correct memory information
Status: | Closed | Start date: | 11/03/2010 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | Javi Fontan | % Done: | 0% | |
Category: | Drivers - Auth | |||
Target version: | Release 2.2 | |||
Resolution: | fixed | Pull request: | ||
Affected Versions: |
Description
From mail conversation with Rangababu Chakravarthula and Shashank Rachamalla:
It looks that the problem is OpenNebula calculating available memory. For xen >= 3.2 there is a reliable way to get available memory that is calling "xm info" and getting "max_free_memory" attribute. Unfortunately for kvm or xen < 3.2 there is not such attribute. I suppose you are using kvm as you tell about "free" command.
I began analyzing the kvm IM probe that gets memory information and there is a problem on the way to get total memory. Here is how it now gets memory information:
TOTALMEMORY: runs virsh info that gets the real physical memory installed in the machine
FREEMEMORY: runs free command and gets the free column data without buffers and cache
USEDMEMORY: runs top command and gets used memory from it (this counts buffers and cache)
This is a big problem as those valus do not match one with another (I don't really know how I failed to see this before). Here is the monitoring data from a host without VMs.
--8<------
TOTALMEMORY=8193988
USEDMEMORY=7819952
FREEMEMORY=7911924
------>8--
As you can see it makes no sense at all. Even the TOTALMEMORY that is got from virsh info is very misleading for oned as the host linux instance does not have access to all that memory (some is consumed by the hypervisor itself) as seen calling a free command:
--8<------
total used free shared buffers cached
Mem: 8193988 7819192 374796 0 64176 7473992
------>8--
Associated revisions
bug #388: Now kvm probe gets correct memory information
bug #388: Now kvm probe gets correct memory information
(cherry picked from commit bb922c51c74d0ac755e993cb6bedd81873504bb7)
History
#1 Updated by Ruben S. Montero over 10 years ago
- Target version deleted (
Release 2.0.1)
#2 Updated by Ruben S. Montero over 10 years ago
- Status changed from New to Assigned
- Target version set to Release 2.2
#3 Updated by Javi Fontan over 10 years ago
- Status changed from Assigned to 3
- Resolution set to fixed
Applied to one-2.0 and master
#4 Updated by Ruben S. Montero almost 10 years ago
- Status changed from 3 to Closed