[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL 09/12] migration: Use migration_transferred_bytes() to calcula
From: |
Juan Quintela |
Subject: |
Re: [PULL 09/12] migration: Use migration_transferred_bytes() to calculate rate_limit |
Date: |
Fri, 26 May 2023 10:55:18 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Fiona Ebner <f.ebner@proxmox.com> wrote:
> Am 18.05.23 um 19:13 schrieb Juan Quintela:
>> diff --git a/migration/migration-stats.c b/migration/migration-stats.c
>> index feec7d7369..97759a45f3 100644
>> --- a/migration/migration-stats.c
>> +++ b/migration/migration-stats.c
>> @@ -24,7 +24,9 @@ bool migration_rate_exceeded(QEMUFile *f)
>> return true;
>> }
>>
>> - uint64_t rate_limit_used = stat64_get(&mig_stats.rate_limit_used);
>> + uint64_t rate_limit_start = stat64_get(&mig_stats.rate_limit_start);
>> + uint64_t rate_limit_current = migration_transferred_bytes(f);
>> + uint64_t rate_limit_used = rate_limit_current - rate_limit_start;
>> uint64_t rate_limit_max = stat64_get(&mig_stats.rate_limit_max);
>>
>> if (rate_limit_max == RATE_LIMIT_DISABLED) {
>
> Hi,
> just wanted to let you know that the call to
> migration_transferred_bytes(f) here can introduce a huge performance
> penalty when taking a snapshot. I ran into the issue when testing
> something else, with a single-disk snapshot. Without this call it takes
> about two seconds, with the call about two minutes.
Ouch.
Now that everything is reviewed for that series I can sent the new set
of patches. As I drop the counter it should just get the speed back.
New series comming that removed rate_limit counter altogether.
Can you take a look after I send it?
Thanks for the report.
And now that we are at it. How are you testing this?
As you appears to be the bigger user of snapshots (or at least the
louder). Creating tests/qtest/snapshot-test.c could be a good idea.
1st to check this kind of breakage.
2nd so I be sure that we don't "pesimize" your use case.
Hint, hint.
2 seconds vs 2 minutes.
A more detailed explanation that what are you doing would be great.
I.e. you are taking lots of snapshots by second or what?
Later, Juan.
- [PULL 01/12] configure: add --disable-colo-proxy option, (continued)
- [PULL 01/12] configure: add --disable-colo-proxy option, Juan Quintela, 2023/05/18
- [PULL 02/12] migration: split migration_incoming_co, Juan Quintela, 2023/05/18
- [PULL 03/12] migration: process_incoming_migration_co(): move colo part to colo, Juan Quintela, 2023/05/18
- [PULL 04/12] migration: Don't use INT64_MAX for unlimited rate, Juan Quintela, 2023/05/18
- [PULL 05/12] qemu-file: Account for rate_limit usage on qemu_fflush(), Juan Quintela, 2023/05/18
- [PULL 06/12] migration: Move rate_limit_max and rate_limit_used to migration_stats, Juan Quintela, 2023/05/18
- [PULL 07/12] migration: Move migration_total_bytes() to migration-stats.c, Juan Quintela, 2023/05/18
- [PULL 08/12] migration: Add a trace for migration_transferred_bytes, Juan Quintela, 2023/05/18
- [PULL 09/12] migration: Use migration_transferred_bytes() to calculate rate_limit, Juan Quintela, 2023/05/18
- [PULL 11/12] migration/multifd: Compute transferred bytes correctly, Juan Quintela, 2023/05/18
- [PULL 10/12] migration: We don't need the field rate_limit_used anymore, Juan Quintela, 2023/05/18
- [PULL 12/12] migration: Fix duplicated included in meson.build, Juan Quintela, 2023/05/18