All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: "you.chen" <you.chen@intel.com>
Cc: qemu-devel@nongnu.org,  "dennis . wu" <dennis.wu@intel.com>,
	 Juan Quintela <quintela@redhat.com>,
	 Eric Blake <eblake@redhat.com>
Subject: Re: [PATCH v2 2/2] migration: add support for qatzip compression when doing live migration
Date: Mon, 17 Apr 2023 15:27:07 +0200	[thread overview]
Message-ID: <87r0siabbo.fsf@pond.sub.org> (raw)
In-Reply-To: <20230417083935.415782-3-you.chen@intel.com> (you chen's message of "Mon, 17 Apr 2023 16:39:35 +0800")

"you.chen" <you.chen@intel.com> writes:

> Add config and logics to use qatzip for page compression, in order to support qatzip compression better, we collect multipe pages together to do qatzip compression for best performance.
> And we use compile option CONFIG_QATZIP to determine whether should qatzip related code be compiled or not.
>
> Co-developed-by: dennis.wu <dennis.wu@intel.com>
> Signed-off-by: you.chen <you.chen@intel.com>

[...]

> diff --git a/qapi/migration.json b/qapi/migration.json
> index c84fa10e86..6459927c7a 100644
> --- a/qapi/migration.json
> +++ b/qapi/migration.json
> @@ -644,6 +644,8 @@
>  #                  no compression, 1 means the best compression speed, and 9 means best
>  #                  compression ratio which will consume more CPU.
>  #
> +# @compress-with-qat: compress with qat on and off. (Since 8.1)
> +#
>  # @compress-threads: Set compression thread count to be used in live migration,
>  #                    the compression thread count is an integer between 1 and 255.
>  #
> @@ -784,7 +786,7 @@
>  { 'enum': 'MigrationParameter',
>    'data': ['announce-initial', 'announce-max',
>             'announce-rounds', 'announce-step',
> -           'compress-level', 'compress-threads', 'decompress-threads',
> +           'compress-level', 'compress-with-qat', 'compress-threads', 'decompress-threads',
>             'compress-wait-thread', 'throttle-trigger-threshold',
>             'cpu-throttle-initial', 'cpu-throttle-increment',
>             'cpu-throttle-tailslow',
> @@ -815,6 +817,8 @@
>  #
>  # @compress-level: compression level
>  #
> +# @compress-with-qat: compression with qat (Since 8.1)
> +#
>  # @compress-threads: compression thread count
>  #
>  # @compress-wait-thread: Controls behavior when all compression threads are
> @@ -954,6 +958,7 @@
>              '*announce-rounds': 'size',
>              '*announce-step': 'size',
>              '*compress-level': 'uint8',
> +            '*compress-with-qat': 'bool',
>              '*compress-threads': 'uint8',
>              '*compress-wait-thread': 'bool',
>              '*decompress-threads': 'uint8',
> @@ -1152,6 +1157,7 @@
>              '*announce-rounds': 'size',
>              '*announce-step': 'size',
>              '*compress-level': 'uint8',
> +            '*compress-with-qat': 'bool',
>              '*compress-threads': 'uint8',
>              '*compress-wait-thread': 'bool',
>              '*decompress-threads': 'uint8',

We already have MigrationCapability compress

    # @compress: Use multiple compression threads to accelerate live migration.
    #            This feature can help to reduce the migration traffic, by sending
    #            compressed pages. Please note that if compress and xbzrle are both
    #            on, compress only takes effect in the ram bulk stage, after that,
    #            it will be disabled and only xbzrle takes effect, this can help to
    #            minimize migration traffic. The feature is disabled by default.
    #            (since 2.4 )

and xbzrle

    # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
    #          This feature allows us to minimize migration traffic for certain work
    #          loads, by sending compressed difference of the pages
    #

and MigrationParameters / MigrateSetParameters multifd-compression

    # @multifd-compression: Which compression method to use.
    #                       Defaults to none. (Since 5.0)
    #
    # @multifd-zlib-level: Set the compression level to be used in live
    #                      migration, the compression level is an integer between 0
    #                      and 9, where 0 means no compression, 1 means the best
    #                      compression speed, and 9 means best compression ratio which
    #                      will consume more CPU.
    #                      Defaults to 1. (Since 5.0)
    #
    # @multifd-zstd-level: Set the compression level to be used in live
    #                      migration, the compression level is an integer between 0
    #                      and 20, where 0 means no compression, 1 means the best
    #                      compression speed, and 20 means best compression ratio which
    #                      will consume more CPU.
    #                      Defaults to 1. (Since 5.0)

where multifd-compression is

    ##
    # @MultiFDCompression:
    #
    # An enumeration of multifd compression methods.
    #
    # @none: no compression.
    # @zlib: use zlib compression method.
    # @zstd: use zstd compression method.
    #
    # Since: 5.0
    ##

How does this all fit together?  It feels like a bunch of featured piled
onto each other, then shaken well.  Or am I confused?

I could use an abstract description of compression in migration.



  reply	other threads:[~2023-04-17 13:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-17  8:39 [PATCH v2 0/2] migration: use qatzip to acclerate the live migration you.chen
2023-04-17  8:39 ` [PATCH v2 1/2] migration: add build option to support qemu build with qatzip you.chen
2023-04-17  9:04   ` Thomas Huth
2023-04-17  8:39 ` [PATCH v2 2/2] migration: add support for qatzip compression when doing live migration you.chen
2023-04-17 13:27   ` Markus Armbruster [this message]
2023-04-20 11:29     ` Juan Quintela
2023-04-18  7:49   ` Juan Quintela

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=87r0siabbo.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=dennis.wu@intel.com \
    --cc=eblake@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=you.chen@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 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.