[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 03/16] migration: Calculate mbps only during transfer
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PULL 03/16] migration: Calculate mbps only during transfer time |
Date: |
Wed, 27 Jun 2018 14:55:51 +0200 |
We used to include in this calculation the setup time, but that can be
quite big in rdma or multifd.
Signed-off-by: Juan Quintela <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
---
migration/migration.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/migration/migration.c b/migration/migration.c
index e1eaa97df4..d3e6da9bfe 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -2708,6 +2708,7 @@ static void migration_calculate_complete(MigrationState
*s)
{
uint64_t bytes = qemu_ftell(s->to_dst_file);
int64_t end_time = qemu_clock_get_ms(QEMU_CLOCK_REALTIME);
+ int64_t transfer_time;
s->total_time = end_time - s->start_time;
if (!s->downtime) {
@@ -2718,8 +2719,9 @@ static void migration_calculate_complete(MigrationState
*s)
s->downtime = end_time - s->downtime_start;
}
- if (s->total_time) {
- s->mbps = ((double) bytes * 8.0) / s->total_time / 1000;
+ transfer_time = s->total_time - s->setup_time;
+ if (transfer_time) {
+ s->mbps = ((double) bytes * 8.0) / transfer_time / 1000;
}
}
--
2.17.1
- [Qemu-devel] [PULL 00/16] Migration, Juan Quintela, 2018/06/27
- [Qemu-devel] [PULL 01/16] migration: Create multipage support, Juan Quintela, 2018/06/27
- [Qemu-devel] [PULL 02/16] migration: Create multifd packet, Juan Quintela, 2018/06/27
- [Qemu-devel] [PULL 04/16] migration: Abstract the number of bytes sent, Juan Quintela, 2018/06/27
- [Qemu-devel] [PULL 05/16] migration: Add multifd traces for start/end thread, Juan Quintela, 2018/06/27
- [Qemu-devel] [PULL 03/16] migration: Calculate mbps only during transfer time,
Juan Quintela <=
- [Qemu-devel] [PULL 06/16] migration: Multifd channels always wait on the sem, Juan Quintela, 2018/06/27
- [Qemu-devel] [PULL 07/16] migration: Add block where to send/receive packets, Juan Quintela, 2018/06/27
- [Qemu-devel] [PULL 08/16] migration: Synchronize multifd threads with main thread, Juan Quintela, 2018/06/27
- [Qemu-devel] [PULL 10/16] migration: Create ram_save_multifd_page, Juan Quintela, 2018/06/27
- [Qemu-devel] [PULL 09/16] migration: Create multifd_bytes ram_counter, Juan Quintela, 2018/06/27
- [Qemu-devel] [PULL 11/16] migration: Start sending messages, Juan Quintela, 2018/06/27
- [Qemu-devel] [PULL 12/16] migration: Wait for blocking IO, Juan Quintela, 2018/06/27
- [Qemu-devel] [PULL 13/16] migration: Remove not needed semaphore and quit, Juan Quintela, 2018/06/27
- [Qemu-devel] [PULL 14/16] migration: Stop sending whole pages through main channel, Juan Quintela, 2018/06/27
- [Qemu-devel] [PULL 16/16] migration: fix crash in when incoming client channel setup fails, Juan Quintela, 2018/06/27