Bug 2232484

Summary: VM stats mem buffered and cached not reported
Product: Red Hat Enterprise Virtualization Manager Reporter: Marcus West <mwest>
Component: ovirt-engineAssignee: Nobody <nobody>
Status: NEW --- QA Contact: meital avital <mavital>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.5.3   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: UX RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Marcus West 2023-08-17 05:48:09 UTC
# Description of problem:

When checking VM statistics via API, mem buffered and mem cached always report '0'.  Also, a value is reported via the GUI, however it's different that what is reported on the VM itself ('free -m').  Is this value reliable?

# Version-Release number of selected component (if applicable):

ovirt-engine-4.5.3.7-1.el8ev.noarch
qemu-guest-agent-6.2.0-11.module+el8.6.0+14707+5aa4b42d.x86_64 (running on RHEL8.6 VM)


# How reproducible:

Always


# Steps to Reproduce:
1. Check VM stats via GUI
2. Check VM stats via API
3. Check VM stats via OS ('free -m')

# Actual results:

- API always returns '0'
- GUI returns a number different to OS ('free -m')

# Expected results:

- values should be the same

# Additional info:

'vdsm-client VM getStats' does not report anything about cached or buffered memory:

$ vdsm-client VM getStats vmID="8f5dd144-a234-472a-9d8b-c7c7722f4509"
... 
        "memUsage": "32",
        "memoryStats": {
            "majflt": 0,
            "mem_free": "1067700",
            "mem_total": "1270468",
            "mem_unused": "687132",
            "minflt": 0,
            "pageflt": 0,
            "swap_in": 0,
            "swap_out": 0
        },
...