<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Thu, Sep 28, 2017 at 12:03 PM Gianluca Cecchi &lt;<a href="mailto:gianluca.cecchi@gmail.com">gianluca.cecchi@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div>I&#39;m on 4.1.5 and I&#39;m cloning a snapshot of a VM with 3 disks for a total of about 200Gb to copy</div><div>The target I choose is on a different domain than the source one.</div><div>They are both FC storage domains, with the source on SSD disks and the target on SAS disks.</div><div><br></div><div>The disks are preallocated</div><div><br></div><div>Now I have 3 processes of kind:</div><div><div>/usr/bin/qemu-img convert -p -t none -T none -f raw /rhev/data-center/59b7af54-0155-01c2-0248-000000000195/fad05d79-254d-4f40-8201-360757128ede/images/8f62600a-057d-4d59-9655-631f080a73f6/21a8812f-6a89-4015-a79e-150d7e202450 -O raw /rhev/data-center/mnt/blockSD/6911716c-aa99-4750-a7fe-f83675a2d676/images/c3973d1b-a168-4ec5-8c1a-630cfc4b66c4/27980581-5935-4b23-989a-4811f80956ca</div></div><div><br></div><div>but despite capabilities it seems it is copying using very low system resources.</div></div></blockquote><div><br></div><div>We run qemu-img convert (and other storage related commands) with:</div><div><br></div><div>    nice -n 19 ionice -c 3 qemu-img ...</div><div> </div><div>ionice should not have any effect unless you use the CFQ I/O scheduler.</div><div><br></div><div>The intent is to limit the effect of virtual machines.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I see this both using iotop and vmstat</div><div><br></div><div>vmstat 3 gives:</div><div><font face="monospace">----io---- -system-- ------cpu-----<br></font></div><div><font face="monospace">bi    bo   in   cs us sy id wa st<br></font></div><div><font face="monospace">2527   698 3771 29394  1  0 89 10  0<br></font></div></div></blockquote><div><br></div><div>us 94% also seems very high - maybe this hypervisor is overloaded with other workloads?</div><div>wa 89% seems very high</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><font face="monospace"></font></div><div><br></div><div><br></div><div>iotop -d 5 -k -o -P gives:<br></div><div><br></div><div><div><font face="monospace">Total DISK READ :     472.73 K/s | Total DISK WRITE :<span style="white-space:pre-wrap">        </span>   17.05 K/s</font></div><div><font face="monospace">Actual DISK READ:    1113.23 K/s | Actual DISK WRITE:      55.86 K/s</font></div><div><font face="monospace">  PID  PRIO  USER    DISK READ&gt;  DISK WRITE  SWAPIN      IO    COMMAND                              </font></div><div><font face="monospace"> 2124 be/4 sanlock   401.39 K/s    0.20 K/s  0.00 %  0.00 % sanlock daemon</font></div><div><font face="monospace"> 2146 be/4 vdsm       50.96 K/s    0.00 K/s  0.00 %  0.00 % python /usr/share/o~a-broker --no-daemon</font></div><div><font face="monospace">30379 be/0 root        7.06 K/s    0.00 K/s  0.00 % 98.09 % lvm vgck --config  ~50-a7fe-f83675a2d676</font></div><div><font face="monospace">30380 be/0 root        4.70 K/s    0.00 K/s  0.00 % 98.09 % lvm lvchange --conf~59-b931-4eb61e43b56b</font></div><div><font face="monospace">30381 be/0 root        4.70 K/s    0.00 K/s  0.00 % 98.09 % lvm lvchange --conf~83675a2d676/metadata</font></div><div><font face="monospace">30631 be/0 root        3.92 K/s    0.00 K/s  0.00 % 98.09 % lvm vgs --config  d~f6-9466-553849aba5e9</font></div><div><font face="monospace"> 2052 be/3 root        0.00 K/s    2.35 K/s  0.00 %  0.00 % [jbd2/dm-34-8]</font></div><div><font face="monospace"> 6458 be/4 qemu        0.00 K/s    4.70 K/s  0.00 %  0.00 % qemu-kvm -name gues~x7 -msg timestamp=on</font></div><div><font face="monospace"> 2064 be/3 root        0.00 K/s    0.00 K/s  0.00 %  0.00 % [jbd2/dm-32-8]</font></div><div><font face="monospace"> 2147 be/4 root        0.00 K/s    4.70 K/s  0.00 %  0.00 % rsyslogd -n</font></div><div><font face="monospace"> 9145 idle vdsm        0.00 K/s    0.59 K/s  0.00 % 24.52 % qemu-img convert -p~23-989a-4811f80956ca</font></div><div><font face="monospace">13313 be/4 root        0.00 K/s    0.00 K/s  0.00 %  0.00 % [kworker/u112:3]</font></div><div><font face="monospace"> 9399 idle vdsm        0.00 K/s    0.59 K/s  0.00 % 24.52 % qemu-img convert -p~51-9c8c-8d9aaa7e8f58</font></div></div></div></blockquote><div><br></div><div>0.59 K/s seems extremely low, I don&#39;t expect such value.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><font face="monospace"> 1310 ?dif root        0.00 K/s    0.00 K/s  0.00 %  0.00 % multipathd</font></div><div><font face="monospace"> 3996 be/4 vdsm        0.00 K/s    0.78 K/s  0.00 %  0.00 % python /usr/sbin/mo~c /etc/vdsm/mom.conf</font></div><div><font face="monospace"> 6391 be/4 root        0.00 K/s    0.00 K/s  0.00 %  0.00 % [kworker/u112:0]</font></div><div><font face="monospace"> 2059 be/3 root        0.00 K/s    3.14 K/s  0.00 %  0.00 % [jbd2/dm-33-8]</font></div></div><div><br></div><div>Is it expected? Any way to speed up the process?</div></div></blockquote><div><br></div><div>I would try to perform the same copy from the shell, without ionice</div><div>and nice, and see if this improves the times.</div><div><br></div><div>Can do a test with a small image (e.g 10g) running qemu-img with strace?</div><div><br></div><div><font face="monospace">    strace -f -o qemu-img.strace qemu-img convert \</font></div><div><font face="monospace">       -p \</font></div><div><font face="monospace">       -t none \</font></div><div><font face="monospace">       -T none \</font></div><div><font face="monospace">       -f raw \</font></div><div><font face="monospace">       /dev/fad05d79-254d-4f40-8201-360757128ede/&lt;lv-name&gt; \</font></div><div><font face="monospace">       -O raw \</font></div><div><font face="monospace">       /dev/6911716c-aa99-4750-a7fe-f83675a2d676/&lt;lv-name&gt;</font></div><div><br></div><div>and shared the trace?</div><div><br></div><div>Also version info (kernel, qemu) would be useful.</div><div><br></div><div>Adding Kevin.</div><div><br></div><div>Nir</div></div></div>