From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56747) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VkyVW-0005gu-Bh for qemu-devel@nongnu.org; Mon, 25 Nov 2013 10:55:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VkyVN-0000gR-R6 for qemu-devel@nongnu.org; Mon, 25 Nov 2013 10:55:30 -0500 Received: from mx.ipv6.kamp.de ([2a02:248:0:51::16]:51264 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VkyVN-0000gN-Fk for qemu-devel@nongnu.org; Mon, 25 Nov 2013 10:55:21 -0500 Message-ID: <529372FB.4070403@kamp.de> Date: Mon, 25 Nov 2013 16:55:39 +0100 From: Peter Lieven MIME-Version: 1.0 References: <1385387840-17307-1-git-send-email-pl@kamp.de> <1385387840-17307-6-git-send-email-pl@kamp.de> <529368A8.8050807@redhat.com> <52936D8C.50709@kamp.de> <529371CF.3030507@redhat.com> In-Reply-To: <529371CF.3030507@redhat.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1.8 5/6] qemu-img: add option to align writes to cluster_sectors during convert List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com On 25.11.2013 16:50, Paolo Bonzini wrote: > Il 25/11/2013 16:32, Peter Lieven ha scritto: >>> Also, a couple of ideas for separate patches. Perhaps the default value >>> of "-S" could be cluster_size if specified? This would avoid making raw >>> images too fragmented, and compounding filesystem-level fragmentation >>> with qcow2-level fragmentation. And 4K is too small a default in my >>> opinion; it could be easily changed to 64K, though 4K was of course an >>> improvement compared to 512 before commit a22f123 (qemu-img: Require >>> larger zero areas for sparse handling, 2011-08-26). >> I would vote for 64K or 256K, we already use the first for some time. >> However, it turned out >> that (much) bigger values decrease performance. Setting it >> to cluster_size can be dangerous. As described in my case its 15MB and >> I think for vhd its 1MB. This can be a lot of zeros that have to be >> written. > What about max(4096, min(bdi->cluster_size, 1048576))? chaning sparse_size from 65536 to 1048576 about 5% performance decrease... lieven@lieven-pc:~/git/qemu$ time ./qemu-img convert -pp -m 15728640 -S 1048576 /tmp/VC-Ubuntu-LTS-12.04.2-64bit.qcow2 iscsi://172.21.200.45/iqn.2001-05.com.equallogic:0-8a0906-9d95c510a-344001d54795289f-2012-r2-1-7-0/0 40980480 of 40980480 sectors converted. real 0m29.263s user 0m7.544s sys 0m1.636s lieven@lieven-pc:~/git/qemu$ time ./qemu-img convert -pp -m 15728640 -S 4096 /tmp/VC-Ubuntu-LTS-12.04.2-64bit.qcow2 iscsi://172.21.200.45/iqn.2001-05.com.equallogic:0-8a0906-9d95c510a-344001d54795289f-2012-r2-1-7-0/0 40980480 of 40980480 sectors converted. real 0m28.169s user 0m7.792s sys 0m1.516s lieven@lieven-pc:~/git/qemu$ time ./qemu-img convert -pp -m 15728640 -S 65536 /tmp/VC-Ubuntu-LTS-12.04.2-64bit.qcow2 iscsi://172.21.200.45/iqn.2001-05.com.equallogic:0-8a0906-9d95c510a-344001d54795289f-2012-r2-1-7-0/0 40980480 of 40980480 sectors converted. real 0m27.643s user 0m7.644s sys 0m1.520s i wouldn't go over 64k until we fully understand which impact it has. Peter