Bug 1158094

Summary: tracing allocation high-watermark of drive-mirror
Product: Red Hat Enterprise Linux 7 Reporter: Eric Blake <eblake>
Component: qemu-kvm-rhevAssignee: Fam Zheng <famz>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: urgent    
Version: 7.1CC: alitke, amureini, areis, bmcclain, cwei, dyuan, eblake, famz, fsimonce, herrold, huding, iheim, jcody, jsuchane, juzhang, mkenneth, mzhan, pbonzini, rbalakri, rpacheco, scohen, shyu, tburke, virt-bugs, virt-maint, xuzhang
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-2.3 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 1041569 Environment:
Last Closed: 2015-12-04 16:19:36 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:
Bug Depends On: 819485, 822165, 1041564, 1041569    
Bug Blocks: 1082754, 1083310, 1109920    

Comment 2 Fam Zheng 2014-10-29 05:11:29 UTC
Baked a few patches to allow query-blockstats to report data for all the block devices that are assigned node-name. This should be a way for libvirt to query because we already have "node-name" parameter in drive-mirror since 2.1, which assigns a node-name to the target image.

Eric, could you confirm this solution?

Also it would be great if you could review the patches in qemu-devel:

 [Qemu-devel] [PATCH 0/4] block: Allow query stats for drive-mirror target

Thanks,
Fam

Comment 4 Fam Zheng 2015-03-05 02:12:05 UTC
Moving to MODIFIED because the upstream solution will be brought to qemu-kvm-rhev in rebasing to qemu 2.3.

Comment 5 Shaolong Hu 2015-06-18 08:47:53 UTC
Verified on qemu-kvm-rhev-2.3.0-2.el7.x86_64:

1.{"execute": "query-blockstats"}
{"return": [{"device": "drive-virtio-disk0", "parent": {"stats": {"flush_total_time_ns": 0, "wr_highest_offset": 4791586304, "wr_total_time_ns": 0, "wr_merged": 0, "wr_bytes": 0, "rd_total_time_ns": 0, "flush_operations": 0, "wr_operations": 0, "rd_merged": 0, "rd_bytes": 0, "rd_operations": 0}}, "stats": {"flush_total_time_ns": 32038496170, "wr_highest_offset": 17855233536, "wr_total_time_ns": 747353577338, "wr_merged": 874, "wr_bytes": 63842304, "rd_total_time_ns": 331771442824, "flush_operations": 185, "wr_operations": 3424, "rd_merged": 1626, "rd_bytes": 495279104, "rd_operations": 17116}}, {"device": "ide1-cd0", "stats": {"flush_total_time_ns": 0, "wr_highest_offset": 0, "wr_total_time_ns": 0, "wr_merged": 0, "wr_bytes": 0, "rd_total_time_ns": 383226, "flush_operations": 0, "wr_operations": 0, "rd_merged": 0, "rd_bytes": 136, "rd_operations": 3}}, {"device": "floppy0", "stats": {"flush_total_time_ns": 0, "wr_highest_offset": 0, "wr_total_time_ns": 0, "wr_merged": 0, "wr_bytes": 0, "rd_total_time_ns": 0, "flush_operations": 0, "wr_operations": 0, "rd_merged": 0, "rd_bytes": 0, "rd_operations": 0}}, {"device": "sd0", "stats": {"flush_total_time_ns": 0, "wr_highest_offset": 0, "wr_total_time_ns": 0, "wr_merged": 0, "wr_bytes": 0, "rd_total_time_ns": 0, "flush_operations": 0, "wr_operations": 0, "rd_merged": 0, "rd_bytes": 0, "rd_operations": 0}}]}

2.{ "execute": "query-blockstats", "arguments": { "query-nodes": true } }
{"return": []}

3.{ "execute": "blockdev-snapshot-sync", "arguments": { "device": "drive-virtio-disk0", "snapshot-file": "/home/sn1", "format": "qcow2", "mode": "absolute-paths", "node-name": "node1", "snapshot-node-name": "node2" } }

{"return": {}}

4.{ "execute": "query-blockstats", "arguments": { "query-nodes": true } }
{"return": [{"device": "drive-virtio-disk0", "parent": {"stats": {"flush_total_time_ns": 0, "wr_highest_offset": 523776, "wr_total_time_ns": 0, "wr_merged": 0, "wr_bytes": 0, "rd_total_time_ns": 0, "flush_operations": 0, "wr_operations": 0, "rd_merged": 0, "rd_bytes": 0, "rd_operations": 0}}, "stats": {"flush_total_time_ns": 205202738, "wr_highest_offset": 12062784512, "wr_total_time_ns": 499923906, "wr_merged": 0, "wr_bytes": 1536, "rd_total_time_ns": 0, "flush_operations": 2, "wr_operations": 2, "rd_merged": 0, "rd_bytes": 0, "rd_operations": 0}, "node-name": "node2"}]}

Comment 7 huiqingding 2015-06-24 06:05:32 UTC
Based on Comment 5, set this bug to VERIFIED.

Best regards,
Huiqing

Comment 9 errata-xmlrpc 2015-12-04 16:19:36 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.

https://rhn.redhat.com/errata/RHBA-2015-2546.html