From patchwork Fri Feb 1 12:32:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 217453 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id DBA7A2C0295 for ; Sat, 2 Feb 2013 00:23:15 +1100 (EST) Received: from localhost ([::1]:53925 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1Fo8-0005zQ-8A for incoming@patchwork.ozlabs.org; Fri, 01 Feb 2013 07:33:28 -0500 Received: from eggs.gnu.org ([208.118.235.92]:58188) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1Fnl-0005Vh-S4 for qemu-devel@nongnu.org; Fri, 01 Feb 2013 07:33:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U1Fng-0000Mv-TD for qemu-devel@nongnu.org; Fri, 01 Feb 2013 07:33:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:61926) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1Fng-0000Mj-Le for qemu-devel@nongnu.org; Fri, 01 Feb 2013 07:33:00 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r11CWxOV003236 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 1 Feb 2013 07:32:59 -0500 Received: from trasno.mitica (ovpn-113-123.phx2.redhat.com [10.3.113.123]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r11CWvKM020403; Fri, 1 Feb 2013 07:32:58 -0500 From: Juan Quintela To: Qemu Devel , Anthony Liguori Date: Fri, 1 Feb 2013 13:32:52 +0100 Message-Id: <1359721976-19238-1-git-send-email-quintela@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 0/4] migration stats fixes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Hi migration expected_downtime calculation was removed on commit e4ed1541ac9413eac494a03532e34beaf8a7d1c5. We add the calculation back. Before doing the calculation we do: - expected_downtime intial value is max_downtime. Much, much better intial value than 0. - we move when we measure the time. We used to measure how much it took "before" we really sent the data. - we introduce sleep_time concept. While we are sleeping because we have sent all the allowed data for this second we shouldn't be accounting that time as "sending". - last patch just introduces the re-calculation of expected_downtime. It just changes the stats value. Well, patchs 2 & 3 change the bandwidth calculation for migration, but I think that we were undercalculating it enough than it was a bug. Without the 2 & 3 patches, the "expected_downtime" for an idle gust was calculated as 80ms (with 30 ms default target value), and we ended having a downtime of around 15ms. With this patches applied, we calculate an expected downtime of around 15ms or so, and then we spent aroqund 18ms on downtime. Notice that we only calculate how much it takes to sent the rest of the RAM, it just happens that there is some more data to sent that what we are calculating. Review, please. Later, Juan. The following changes since commit 8a55ebf01507ab73cc458cfcd5b9cb856aba0b9e: Merge remote-tracking branch 'afaerber/qom-cpu' into staging (2013-01-31 19:37:33 -0600) are available in the git repository at: git://repo.or.cz/qemu/quintela.git stats.next for you to fetch changes up to 791128495e3546ccc88dd037ea4dfd31eca14a56: migration: calculate expected_downtime (2013-02-01 13:22:37 +0100) ---------------------------------------------------------------- Juan Quintela (4): migration: change initial value of expected_downtime migration: calculate end time after we have sent the data migration: don't account sleep time for calculating bandwidth migration: calculate expected_downtime arch_init.c | 1 + include/migration/migration.h | 1 + migration.c | 15 +++++++++++++-- 3 files changed, 15 insertions(+), 2 deletions(-)