Bug 1413449

Summary: Compress statistic information is missing when using --compressed --comp-methods options
Product: Red Hat Enterprise Linux 7 Reporter: Dan Zheng <dzheng>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.4CC: dyuan, fjin, jdenemar, rbalakri, zpeng
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-16 09:07:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dan Zheng 2017-01-16 02:55:38 UTC
Description of problem:
Compress statistic information is missing when using --compressed --comp-methods mt --comp-mt-level --comp-mt-threads --comp-mt-dthreads options

Version-Release number of selected component (if applicable):
libvirt-2.5.0-1.virtcov.el7.x86_64
qemu-img-rhev-2.6.0-29.el7.x86_64
kernel-3.10.0-534.el7.x86_64


How reproducible:
100%

Steps to Reproduce:
1. Start a guest and migrate it with options
# virsh start rhel7.4
Domain rhel7.4 started

# virsh migrate --live --verbose --domain rhel7.4 --desturi qemu+ssh://<target_ip>/system --compressed --comp-methods mt --comp-mt-level 9 --comp-mt-threads 5 --comp-mt-dthreads 5
Migration: [100 %]

2. Show domjobinfo
# virsh domjobinfo rhel7.4 --completed
Job type:         Completed  
Time elapsed:     19636        ms
Time elapsed w/o network: 19636        ms
Data processed:   92.259 MiB
Data remaining:   0.000 B
Data total:       1.126 GiB
Memory processed: 92.259 MiB
Memory remaining: 0.000 B
Memory total:     1.126 GiB
Memory bandwidth: 14.444 MiB/s
Dirty rate:       0            pages/s
Iteration:        4          
Constant pages:   221351      
Normal pages:     76372      
Normal data:      298.328 MiB
Total downtime:   232          ms
Downtime w/o network: 232          ms
Setup time:       27           ms

3. While the compress statistic info will be shown when only --compressed is used.
# virsh migrate --live --verbose --compressed --domain rhel7.4 --desturi qemu+ssh://<target_ip>/system
Migration: [100 %]

# virsh domjobinfo rhel7.4 --completed
Job type:         Completed  
Time elapsed:     19039        ms
Time elapsed w/o network: 19038        ms
Data processed:   265.690 MiB
Data remaining:   0.000 B
Data total:       1.126 GiB
Memory processed: 265.690 MiB
Memory remaining: 0.000 B
Memory total:     1.126 GiB
Memory bandwidth: 106.596 MiB/s
Dirty rate:       0            pages/s
Iteration:        6          
Constant pages:   250220      
Normal pages:     67199      
Normal data:      262.496 MiB
Total downtime:   346          ms
Downtime w/o network: 345          ms
Setup time:       14           ms
Compression cache: 64.000 MiB
Compressed data:  545.999 KiB
Compressed pages: 1517        
Compression cache misses: 19760        
Compression overflows: 0    

Actual results:
When using --comp-methods mt, the compressed statistic info was not shown.

Expected results:
The compressed statistic info when --comp-methods mt is used should be shown in domjobinfo



Additional info:

Comment 1 Jiri Denemark 2017-01-16 09:07:31 UTC
Well, --compressed without any --comp-methods enables XBZRLE compression, while --comp-methods mt enables multithreaded compression. The provided compression statistics are only relevant to XBZRLE method and QEMU does not provide any data for multithreaded compression.