Message ID | 20201109090850.2424-1-jinzeyu@huawei.com |
---|---|
Headers | show |
Series | migration: Multi-thread compression with zstd method | expand |
On 11/9/20 3:08 AM, Zeyu Jin wrote: > A multi-thread compress method parameter is added to hold the method we > are going to use. By default the 'zlib' method is used to maintain the > compatibility as before. > > Signed-off-by: Zeyu Jin <jinzeyu@huawei.com> > Signed-off-by: Ying Fang <fangying1@huawei.com> > --- Focusing on just the UI: > +++ b/qapi/migration.json > @@ -525,6 +525,19 @@ > 'data': [ 'none', 'zlib', > { 'name': 'zstd', 'if': 'defined(CONFIG_ZSTD)' } ] } > > +## > +# @CompressMethod: > +# > +# An enumeration of multi-thread compression methods. > +# > +# @zlib: use zlib compression method. > +# > +# Since: 5.0 This will have to be Since: 6.0, as it has missed feature freeze for 5.2. > +# > +## > +{ 'enum': 'CompressMethod', > + 'data': [ 'zlib' ] } > + > ## > # @BitmapMigrationBitmapAlias: > # > @@ -599,6 +612,9 @@ > # compression, so set the decompress-threads to the number about 1/4 > # of compress-threads is adequate. > # > +# @compress-method: Set compression method to use in multi-thread compression. > +# Defaults to none. (Since 5.0) Looks like it will be a recurring issue in the series, so I'll quit pointing it out. CompressMethod above does not have a 'none' option, so how can it default to none? Did you forget an enum option?
On 2020/11/9 17:08, Zeyu Jin wrote: > Currently we have both multi-thread compression and multifd to optimize > live migration in Qemu. Mulit-thread compression deals with the situation > where network bandwith is limited but cpu resource adequate. Multifd instead > aims to take full advantage of network bandwith. Moreover it supports both > zlib and zstd compression on each channel. > > In this patch series, we did some code refactoring on multi-thread compression > live migration and bring zstd compression method support for it. > > Below is the test result of multi-thread compression live migration > with different compress methods. Test result shows that zstd outperforms > zlib by about 70%. > > Migration Configuration: > Guest 8U 32G > compress-threads 8 > decompress-threads 2 > compress-level 1 > bandwidth-limit 100Mbps > > Test Result: > +---------------------+--------------+-------------+ > | compress method | zlib | zstd | > +---------------------+--------------+-------------+ > | total time (ms) | 75256 | 44187 | > +---------------------+--------------+-------------+ > | downtime(ms) | 128 | 81 | > +---------------------+--------------+-------------+ > | transferred ram(kB)| 1576866 | 736117 | > +---------------------+--------------+-------------+ > | throughput(mbps) | 172.06 | 137.16 | > +---------------------+--------------+-------------+ > | total ram(kB) | 33685952 | 33685952 | > +---------------------+--------------+-------------+ > > Zeyu Jin (6): > migration: Add multi-thread compress method > migration: Refactoring multi-thread compress migration > migration: Add multi-thread compress ops > migration: Add zstd support in multi-thread compression > migration: Add compress_level sanity check > doc: Update multi-thread compression doc > > docs/multi-thread-compression.txt | 31 ++- > hw/core/qdev-properties-system.c | 11 + > include/hw/qdev-properties.h | 4 + > migration/migration.c | 56 ++++- > migration/migration.h | 1 + > migration/qemu-file.c | 62 +---- > migration/qemu-file.h | 4 +- > migration/ram.c | 381 +++++++++++++++++++++++++----- > monitor/hmp-cmds.c | 12 + > qapi/migration.json | 26 +- > 10 files changed, 465 insertions(+), 123 deletions(-) > Ping