Received: from eggs.gnu.org ([2001:4830:134:3::10]:43597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0AIz-0002at-BX for qemu-devel@nongnu.org; Wed, 03 Jun 2015 11:10:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0AIu-0001f2-D3 for qemu-devel@nongnu.org; Wed, 03 Jun 2015 11:10:09 -0400 Received: from mx3.munzinger.de ([195.226.116.139]:8944) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0AIu-0001U7-6o for qemu-devel@nongnu.org; Wed, 03 Jun 2015 11:10:04 -0400 From: "David Weber" Date: Wed, 3 Jun 2015 15:09:40 +0000 Message-ID: <00056481.556F34D3@pegasus.munzinger.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Subject: [Qemu-devel] Re-2: Strange problems with lseek in qemu-img map List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel@nongnu.org Thanks a lot for your reply and sorry for my double post out of impatientness. > > I then startet a fedora 22 live system and I saw the same problem. It > > happens > > on both the ramdisk and a ext4 filesystem. > > "it" == qemu-img map hangs or takes a very long time? I never waited for it to complete but I guess it just takes very long. > > Can you post a shell script that reproduces this with a ramdisk? That > seems like the easiest way to get people debugging it. You can use the following commands. mkfs.ext4 /dev/ram0 mkdir -p /mnt/tmp mount /dev/ram0 /mnt/tmp cd /mnt/tmp qemu-img create test 500G time qemu-img map test This takes foreover on all my systems. Running everything on tmpfs instead is fast mkdir -p /mnt/tmp mount -t tmpfs -o size=1G none /mnt/tmp cd /mnt/tmp qemu-img create test 500G time qemu-img map test I did run a few more tests on different systems and made an interessting observation. lseek is damn slow if the blockdevice has an I/O size of 512 bytes (like the raid controller of my server or a ramdisk) and runs fast with 4096 bytes (like the ssd of my workstation or tmpfs). I confirmned this also with with a few other drives but it still could be coincidence... You can check the I/O size by running fdisk p Cheers, David To: stefanha@gmail.com Cc: qemu-devel@nongnu.org