qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Re-2:  Strange problems with lseek in qemu-img map
@ 2015-06-03 15:09 David Weber
  2015-06-05 14:05 ` Stefan Hajnoczi
  0 siblings, 1 reply; 5+ messages in thread
From: David Weber @ 2015-06-03 15:09 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: qemu-devel

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 <dev>
p

Cheers,
David

To: stefanha@gmail.com
Cc: qemu-devel@nongnu.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-06-09 10:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-03 15:09 [Qemu-devel] Re-2: Strange problems with lseek in qemu-img map David Weber
2015-06-05 14:05 ` Stefan Hajnoczi
2015-06-05 15:14   ` Lukáš Czerner
2015-06-06  3:53     ` Wen Congyang
2015-06-09 10:35       ` Lukáš Czerner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).