From: Wei Wang <wei.w.wang@intel.com>
To: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: kevin.tian@intel.com, quintela@redhat.com, qemu-devel@nongnu.org,
peterx@redhat.com, gloryxiao@tencent.com, yi.y.sun@intel.com
Subject: Re: [PATCH v1 1/2] migration/xbzrle: replace transferred xbzrle bytes with encoded bytes
Date: Wed, 22 Apr 2020 10:51:52 +0800 [thread overview]
Message-ID: <5E9FB148.3060906@intel.com> (raw)
In-Reply-To: <20200421192106.GM3029@work-vm>
On 04/22/2020 03:21 AM, Dr. David Alan Gilbert wrote:
> * Wei Wang (wei.w.wang@intel.com) wrote:
>> Like compressed_size which indicates how many bytes are compressed, we
>> need encoded_size to understand how many bytes are encoded with xbzrle
>> during migration.
>>
>> Replace the old xbzrle_counter.bytes, instead of adding a new counter,
>> because we don't find a usage of xbzrle_counter.bytes currently, which
>> includes 3 more bytes of the migration transfer protocol header (in
>> addition to the encoding header). The encoded_size will further be used
>> to calculate the encoding rate.
>>
>> Signed-off-by: Yi Sun <yi.y.sun@intel.com>
>> Signed-off-by: Wei Wang <wei.w.wang@intel.com>
> Can you explain why these 3 bytes matter? Certainly the 2 bytes of the
> encoded_len are an overhead that's a cost of using XBZRLE; so if you're
> trying to figure out whether xbzrle is worth it, then you should include
> those 2 bytes in the cost.
> That other byte, that holds ENCODING_FLAG_XBZRLE also seems to be pure
> oerhead of XBZRLE; so your cost of using XBZRLE really does include
> those 3 bytes.
>
> SO to me it makes sense to include the 3 bytes as it currently does.
>
> Dave
Thanks Dave for sharing your thoughts.
We hope to do a fair comparison of compression rate and xbzrle encoding
rate.
The current compression_rate doesn't include the migration flag overhead
(please see
update_compress thread_counts() ). So for xbzrle encoding rate, we
wanted it not include the migration
protocol flags as well (but the 2 bytes xbzrle encoding overhead is kept
there, as the compression rate
includes the compression header overhead).
Or would you think it is necessary to add the migration flag (8 bytes)
for compression
when calculating the compression rate?
Best,
Wei
next prev parent reply other threads:[~2020-04-22 2:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-20 3:06 [PATCH v1 0/2] Migration xbzrle changes Wei Wang
2020-04-20 3:06 ` [PATCH v1 1/2] migration/xbzrle: replace transferred xbzrle bytes with encoded bytes Wei Wang
2020-04-20 9:29 ` Daniel P. Berrangé
2020-04-20 9:49 ` Wei Wang
2020-04-21 19:21 ` Dr. David Alan Gilbert
2020-04-22 2:51 ` Wei Wang [this message]
2020-04-24 10:47 ` Dr. David Alan Gilbert
2020-04-27 7:26 ` Wei Wang
2020-04-20 3:06 ` [PATCH v1 2/2] migration/xbzrle: add encoding rate Wei Wang
2020-04-20 9:30 ` Daniel P. Berrangé
2020-04-20 14:53 ` Eric Blake
2020-04-21 1:14 ` Wei Wang
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=5E9FB148.3060906@intel.com \
--to=wei.w.wang@intel.com \
--cc=dgilbert@redhat.com \
--cc=gloryxiao@tencent.com \
--cc=kevin.tian@intel.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=yi.y.sun@intel.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 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).