[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH RDMA support v1: 13/13] print out migration thro
From: |
mrhines |
Subject: |
[Qemu-devel] [RFC PATCH RDMA support v1: 13/13] print out migration throughput while debugging |
Date: |
Wed, 10 Apr 2013 18:28:21 -0400 |
From: "Michael R. Hines" <address@hidden>
It's very helpful when debugging to print out migration throughput
after each iteration round to compare the different migration
technologies.
Signed-off-by: Michael R. Hines <address@hidden>
---
migration.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/migration.c b/migration.c
index 3b4b467..3439629 100644
--- a/migration.c
+++ b/migration.c
@@ -35,6 +35,9 @@
do { } while (0)
#endif
+#define MBPS(bytes, time) time ? ((((double) bytes * 8) \
+ / ((double) time / 1000.0)) / 1000.0 / 1000.0) : -1.0
+
enum {
MIG_STATE_ERROR,
MIG_STATE_SETUP,
@@ -546,8 +549,9 @@ static void *migration_thread(void *opaque)
max_size = bandwidth * migrate_max_downtime() / 1000000;
DPRINTF("transferred %" PRIu64 " time_spent %" PRIu64
- " bandwidth %g max_size %" PRId64 "\n",
- transferred_bytes, time_spent, bandwidth, max_size);
+ " bandwidth %g throughput %f max_size %" PRId64 "\n",
+ transferred_bytes, time_spent, bandwidth,
+ MBPS(transferred_bytes, time_spent), max_size);
/* if we haven't sent anything, we don't want to recalculate
10000 is a small enough number for our purposes */
if (s->dirty_bytes_rate && transferred_bytes > 10000) {
--
1.7.10.4
- Re: [Qemu-devel] [RFC PATCH RDMA support v1: 10/13] introduce new command migrate_check_for_zero, (continued)
- [Qemu-devel] [RFC PATCH RDMA support v1: 11/13] send pc.ram over RDMA, mrhines, 2013/04/10
- [Qemu-devel] [RFC PATCH RDMA support v1: 12/13] updated protocol documentation, mrhines, 2013/04/10
- [Qemu-devel] [RFC PATCH RDMA support v1: 09/13] parse QMP string for new 'rdma' protocol, mrhines, 2013/04/10
- [Qemu-devel] [RFC PATCH RDMA support v1: 03/13] RDMA is enabled by default per the usual ./configure testing., mrhines, 2013/04/10
- [Qemu-devel] [RFC PATCH RDMA support v1: 13/13] print out migration throughput while debugging,
mrhines <=
- [Qemu-devel] [RFC PATCH RDMA support v1: 02/13] Core RMDA logic, mrhines, 2013/04/10
- Re: [Qemu-devel] [RFC PATCH RDMA support v7: 00/13] rdma cleanup and reordering, Michael R. Hines, 2013/04/10