Bug 1893773

Summary: NVDIMM: memory usage in WebAdmin is always ~100% regardless to actual usage inside the VM.
Product: [oVirt] vdsm Reporter: Nisim Simsolo <nsimsolo>
Component: GeneralAssignee: Tomáš Golembiovský <tgolembi>
Status: CLOSED CURRENTRELEASE QA Contact: Nisim Simsolo <nsimsolo>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.40.35CC: ahadas, bugs, nsimsolo
Target Milestone: ovirt-4.4.4Keywords: Reopened
Target Release: 4.40.38Flags: pm-rhel: ovirt-4.4+
pm-rhel: planning_ack+
ahadas: devel_ack+
pm-rhel: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: vdsm-4.40.38 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-01-12 16:23:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
engine.log
none
vdsm.log
none
vdsm.log.1.xz
none
VM domxml, without VNDIMM
none
VM domxml, with NVDIMM
none
VM QEMU log none

Description Nisim Simsolo 2020-11-02 15:13:26 UTC
Description of problem:
- When running VM with NVDIMM device attached, the memory usage percentage in WebAdmin is always around 100% although the actual usage inside the VM is around 1%
- When removing NVDIMM and running the same VM again, the memory usage is displayed correctly.

--------------------
VM memory configuration and usage:
[root@dhcp16-201-114 ~]# ndctl list --namespaces
[
  {
    "dev":"namespace0.0",
    "mode":"raw",
    "size":266153754624,
    "sector_size":512,
    "blockdev":"pmem0"
  }
]
[root@dhcp16-201-114 ~]# ndctl list --regions
[
  {
    "dev":"region0",
    "size":266153754624,
    "available_size":0,
    "max_available_extent":0,
    "type":"pmem",
    "persistence_domain":"unknown"
  }
]
[root@dhcp16-201-114 ~]# dmesg | grep pmem
[    4.628930] pmem0: detected capacity change from 0 to 266153754624
[root@dhcp16-201-114 ~]# cat /proc/meminfo | grep -i memtotal
MemTotal:        7951468 kB
[root@dhcp16-201-114 ~]# free
              total        used        free      shared  buff/cache   available
Mem:        7951468      184188     7541536        8796      225744     7516956
Swap:             0           0           0
[root@dhcp16-201-114 ~]# 


------------------
VM domxml:
[root@intel-purley-04 images]# virsh -r dumpxml 16 | grep -i memory
    <ovirt-vm:minGuaranteedMemoryMb type="int">8192</ovirt-vm:minGuaranteedMemoryMb>
  <maxMemory slots='16' unit='KiB'>293472256</maxMemory>
  <memory unit='KiB'>268306432</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
      <cell id='0' cpus='0-15' memory='8388608' unit='KiB'/>
    <memory model='nvdimm' access='shared'>
    </memory>

Version-Release number of selected component (if applicable):
ovirt-engine-4.4.3.8-0.1.el8ev
vdsm-4.40.35-1.el8ev.x86_64
libvirt-daemon-6.6.0-6.module+el8.3.0+8125+aefcf088.x86_64
qemu-kvm-5.1.0-13.module+el8.3.0+8382+afc3bbea.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Run VM with NVDIMM device. 
2. Observe WebAdmin -> Compute -> VMs, memory column
3.

Actual results:
Memory usage is always 97%

Expected results:
Memory usage should display to the actual usage.

Additional info:
VMs domxml of same VM with/without NVDIMM device attached.
VM qemu log and engine.log attached
vdsm.log attached:
VM without NVDIMM dtarted at: 2020-11-02 08:51:02,445-0500 INFO  (jsonrpc/3) [api.virt] START create(vmParams={'vmId': 'a125d2eb-91fa-4399-b931-6c1aea6d9d55'
VM with NVDIMM started at: 2020-11-02 09:25:54,813-0500 INFO  (jsonrpc/6) [api.virt] START create(vmParams={'vmId': 'a125d2eb-91fa-4399-b931-6c1aea6d9d55',

Comment 1 Nisim Simsolo 2020-11-02 15:19:14 UTC
Created attachment 1725859 [details]
engine.log

Comment 2 Nisim Simsolo 2020-11-02 15:20:19 UTC
Created attachment 1725860 [details]
vdsm.log

Comment 3 Nisim Simsolo 2020-11-02 15:23:28 UTC
Created attachment 1725861 [details]
vdsm.log.1.xz

Comment 4 Nisim Simsolo 2020-11-02 15:24:19 UTC
Created attachment 1725862 [details]
VM domxml, without VNDIMM

Comment 5 Nisim Simsolo 2020-11-02 15:24:53 UTC
Created attachment 1725864 [details]
VM domxml, with NVDIMM

Comment 6 Nisim Simsolo 2020-11-02 15:25:48 UTC
Created attachment 1725868 [details]
VM QEMU log

Comment 7 Casper (RHV QE bot) 2020-11-27 16:01:26 UTC
This bug has low overall severity and passed an automated regression suite, and is not going to be further verified by QE. If you believe special care is required, feel free to re-open to ON_QA status.

Comment 8 Nisim Simsolo 2021-01-06 10:24:00 UTC
Verified:
ovirt-engine-4.4.4.6-0.1.el8ev
vdsm-4.40.40-1.el8ev.x86_64
qemu-kvm-5.1.0-14.module+el8.3.0+8790+80f9c6d8.1.x86_64
libvirt-daemon-6.6.0-7.1.module+el8.3.0+8852+b44fca9f.x86_64

Comment 9 Sandro Bonazzola 2021-01-12 16:23:50 UTC
This bugzilla is included in oVirt 4.4.4 release, published on December 21st 2020.

Since the problem described in this bug report should be resolved in oVirt 4.4.4 release, it has been closed with a resolution of CURRENT RELEASE.

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