All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David Weber" <wb@munzinger.de>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re-2:  Strange problems with lseek in qemu-img map
Date: Wed, 3 Jun 2015 15:09:40 +0000	[thread overview]
Message-ID: <00056481.556F34D3@pegasus.munzinger.de> (raw)

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

             reply	other threads:[~2015-06-03 15:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-03 15:09 David Weber [this message]
2015-06-05 14:05 ` Re-2: Strange problems with lseek in qemu-img map Stefan Hajnoczi
2015-06-05 14:05   ` [Qemu-devel] " Stefan Hajnoczi
2015-06-05 15:14   ` Lukáš Czerner
2015-06-05 15:14     ` Lukáš Czerner
2015-06-06  3:53     ` Wen Congyang
2015-06-06  3:53       ` [Qemu-devel] " Wen Congyang
2015-06-09 10:35       ` Lukáš Czerner
2015-06-09 10:35         ` [Qemu-devel] " Lukáš Czerner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=00056481.556F34D3@pegasus.munzinger.de \
    --to=wb@munzinger.de \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.