Received: from eggs.gnu.org ([2001:4830:134:3::10]:48238) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoWHH-0004W2-VU for qemu-devel@nongnu.org; Thu, 05 Dec 2013 05:35:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VoWHC-0003YH-0O for qemu-devel@nongnu.org; Thu, 05 Dec 2013 05:35:27 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53699) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoWHB-0003YB-NG for qemu-devel@nongnu.org; Thu, 05 Dec 2013 05:35:21 -0500 Date: Thu, 5 Dec 2013 11:35:15 +0100 From: Stefan Hajnoczi Message-ID: <20131205103515.GE9629@stefanha-thinkpad.redhat.com> References: <1385546829-3839-1-git-send-email-pl@kamp.de> <1385546829-3839-9-git-send-email-pl@kamp.de> <20131204164349.GE27759@stefanha-thinkpad.redhat.com> <529F5C56.20906@kamp.de> <529FE0FF.5040503@redhat.com> <73B4DA19-7D30-4392-8E20-BE9B8C9D4555@kamp.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <73B4DA19-7D30-4392-8E20-BE9B8C9D4555@kamp.de> Subject: Re: [Qemu-devel] [PATCHv3 1.8 8/9] qemu-img: increase min_sparse to 128 sectors (64kb) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven Cc: "kwolf@redhat.com" , Stefan Hajnoczi , "qemu-devel@nongnu.org" , "pbonzini@redhat.com" On Thu, Dec 05, 2013 at 05:55:22AM +0100, Peter Lieven wrote: > > > > Am 05.12.2013 um 03:12 schrieb Eric Blake : > > > > On 12/04/2013 09:46 AM, Peter Lieven wrote: > > > >>> I guess a sane size would be cluster size. For a raw file 4 KB is > >>> reasonable since that's the file system block size. > >> in case of iscsi the cluster size could be much too high as for example > >> my storage has a cluster_size of 15MB. > >>> > >>> Is it necessary to increase to 64 KB here? > >> No, its indepent of the rest. Paolo suggested to increase it and I can confirm > >> that for my usage case its faster than 4K. > > > > At least on NTFS file systems, 64k is the minimum size of a hole in a > > sparse file. While many file systems support smaller holes, there are > > definitely systems where trying to detect smaller holes only results in > > wasted efforts. Is it worth making the default dynamic based on stat() > > information regarding optimum IO size for the given destination file system? > > it is definetely worth it, but i would require additional work and testing. the current code does not create holes that are aligned to min_sparse and min_sparse has to be limited to a reasonable size. and i wonder if the right value is bs->bl.opt_transfer_lenght, bs->bl.discard_alignment or bdi->cluster_size/9. maybe depepnding on if its a cow Image or not. > > i can look at this. but i would leave the patch out for now. Okay, I'll drop this patch for now. It can be improved in a separate series. Stefan