qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>,
	qemu-block@nongnu.org
Cc: kwolf@redhat.com, den@openvz.org, qemu-devel@nongnu.org,
	mreitz@redhat.com
Subject: Re: [PATCH v2] scripts/simplebench: compare write request performance
Date: Mon, 13 Jul 2020 15:36:50 +0300	[thread overview]
Message-ID: <f12e3633-f44f-a5a1-4e84-b072b1e155fb@virtuozzo.com> (raw)
In-Reply-To: <5dc513ae-a425-43e5-e257-acb73a02af7d@virtuozzo.com>

13.07.2020 13:26, Andrey Shinkevich wrote:
> On 13.07.2020 11:43, Vladimir Sementsov-Ogievskiy wrote:
>> 12.07.2020 19:07, Andrey Shinkevich wrote:
>>> On 11.07.2020 16:05, Vladimir Sementsov-Ogievskiy wrote:
>>>> 26.06.2020 17:31, Andrey Shinkevich wrote:
>>>>> The script 'bench_write_req.py' allows comparing performances of write
>>>>> request for two qemu-img binary files.
>>>>> An example with (qemu-img binary 1) and without (qemu-img binary 2) the
>>>>> applied patch "qcow2: skip writing zero buffers to empty COW areas"
>>>>> (git commit ID: c8bb23cbdbe32f5)
>>>>> The <unaligned> case does not involve the COW optimization.
>>>>>
>>>> Good, this proves that c8bb23cbdbe32f5 makes sense.
>>>>
>>>>> Suggested-by: Denis V. Lunev <den@openvz.org>
>>>>> Suggested-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
>>>>> Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
>>>>> ---
>>>>> v2:
>>>>>    01: Three more test cases added to the script:
>>>>>        <simple case>
>>>>>        <general case>
>>>>>        <unaligned>
>>>>>
>>>>>   scripts/simplebench/bench_write_req.py | 201 +++++++++++++++++++++++++++++++++
>>>>>   1 file changed, 201 insertions(+)
>>>>>   create mode 100755 scripts/simplebench/bench_write_req.py
>>>>>
>>>>> diff --git a/scripts/simplebench/bench_write_req.py b/scripts/simplebench/bench_write_req.py
>>>>> new file mode 100755
>>>>> index 0000000..fe92d01
>>>>> --- /dev/null
>>>>> +++ b/scripts/simplebench/bench_write_req.py
>>>>> @@ -0,0 +1,201 @@
>>>>
>>>> Next, I don't understand, are you trying to fill qcow2 image by dd directly? This is strange. Even if you don't break metadata, you don't change it, so all cluster will remain empty.
>>>>
>>>>
>>> I have tested and it works as designed.
>>>
>>
>> But how is it designed? You just filled unallocated clusters with some data. When you read from qcow2, you'll still read zeros, because L1/L2 tables are not filled. The random data will lay untouched.
>>
>>
> 
> Sounds reasonable. But why do QEMU-ING INFO shows the actual size increased after the dd command?
> 

Because actual file size changed :) img-info shows two sizes: virtual disk size (it's unchanged of course), and real size of file, which is affected by dd of course.



-- 
Best regards,
Vladimir


  reply	other threads:[~2020-07-13 12:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-26 14:31 [PATCH v2] scripts/simplebench: compare write request performance Andrey Shinkevich
2020-07-11 13:05 ` Vladimir Sementsov-Ogievskiy
2020-07-12 16:07   ` Andrey Shinkevich
2020-07-13  8:43     ` Vladimir Sementsov-Ogievskiy
2020-07-13 10:26       ` Andrey Shinkevich
2020-07-13 12:36         ` Vladimir Sementsov-Ogievskiy [this message]
2020-07-13 10:33       ` Andrey Shinkevich

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=f12e3633-f44f-a5a1-4e84-b072b1e155fb@virtuozzo.com \
    --to=vsementsov@virtuozzo.com \
    --cc=andrey.shinkevich@virtuozzo.com \
    --cc=den@openvz.org \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --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 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).