[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re-2: Strange problems with lseek in qemu-img map
From: |
David Weber |
Subject: |
[Qemu-devel] Re-2: Strange problems with lseek in qemu-img map |
Date: |
Wed, 3 Jun 2015 15:09:40 +0000 |
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: address@hidden
Cc: address@hidden
- [Qemu-devel] Re-2: Strange problems with lseek in qemu-img map,
David Weber <=