All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christopher Pereira <kripper@imatronix.cl>
To: qemu-devel@nongnu.org
Subject: qcow2 perfomance: read-only IO on the guest generates high write IO on the host
Date: Wed, 11 Aug 2021 07:36:33 -0400	[thread overview]
Message-ID: <55980bc8-97ad-77a4-1bb7-a086f2712ea1@imatronix.cl> (raw)

[-- Attachment #1: Type: text/plain, Size: 1223 bytes --]

Hi,

I'm reading a directory with 5.000.000 files (2,4 GB) inside a guest 
using "find | grep -c".

On the host I saw high write IO (40 MB/s !) during over 1 hour using 
virt-top.

I later repeated the read-only operation inside the guest and no 
additional data was written on the host. The operation took only some 
seconds.

I believe QEMU was creating some kind of cache or metadata map the first 
time I accessed the inodes.

But I wonder why the cache or metadata map wasn't available the first 
time and why QEMU had to recreate it?

The VM has "compressed base <- snap 1" and base was converted without 
prealloc.

Is it because we created the base using convert without metadata 
prealloc and so the metadata map got lost?

I will do some experiments soon using convert + metadata prealloc and 
probably find out myself, but I will happy to read your comments and 
gain some additional insights.
If it the problem persists, I would try again without compression.

Additional info:

  * Guest fs is xfs.
  * (I believe the snapshot didn't significantly increase in size, but I
    would need to double check)
  * This is a production host with old QEMU emulator version 2.3.0
    (qemu-kvm-ev-2.3.0-31.el7_2.10.1)


[-- Attachment #2: Type: text/html, Size: 1627 bytes --]

             reply	other threads:[~2021-08-11 11:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-11 11:36 Christopher Pereira [this message]
2021-08-24 15:37 ` qcow2 perfomance: read-only IO on the guest generates high write IO on the host Kevin Wolf
2021-09-09 10:23   ` Christopher Pereira

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=55980bc8-97ad-77a4-1bb7-a086f2712ea1@imatronix.cl \
    --to=kripper@imatronix.cl \
    --cc=qemu-devel@nongnu.org \
    /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.