Received: from eggs.gnu.org ([208.118.235.92]:37654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNj41-0002Rw-7K for qemu-devel@nongnu.org; Thu, 04 Apr 2013 08:14:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNj3s-0001AV-0e for qemu-devel@nongnu.org; Thu, 04 Apr 2013 08:14:45 -0400 Received: from nodalink.pck.nerim.net ([62.212.105.220]:39880 helo=paradis.irqsave.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNj3r-00019u-N3 for qemu-devel@nongnu.org; Thu, 04 Apr 2013 08:14:35 -0400 Date: Thu, 4 Apr 2013 14:15:35 +0200 From: =?iso-8859-1?Q?Beno=EEt?= Canet Message-ID: <20130404121535.GB4250@irqsave.net> References: <1363877399-16339-1-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1363877399-16339-1-git-send-email-stefanha@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC 0/4] block: fix I/O throttling oscillations List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , qemu-devel@nongnu.org, Zhi Yong Wu Hi Stefan, This solve the bug seen by the customer. Whole patchset tested by on behalf of the user. Tested-By: Benoit Canet Best regards Beno=EEt > Le Thursday 21 Mar 2013 =E0 15:49:55 (+0100), Stefan Hajnoczi a =E9crit= : > Beno=EEt Canet reported that QEMU I/O throttling c= an > oscillate under continuous I/O. The test case runs 50 threads performi= ng > random writes and a -drive iops=3D150 limit is used. >=20 > Since QEMU I/O throttling is implemented using 100 millisecond time sli= ces, > we'd expect 150 +/- 15 IOPS. Anything outside that range indicates a p= roblem > with the I/O throttling algorithm. >=20 > It turned out that even a single thread performing sequential I/O conti= nuously > is throttled outside the 150 +/- 15 IOPS range. The continous stream o= f I/O > slows down as time goes on but resets to 150 IOPS again when interrupte= d. This > can be tested with: >=20 > $ iostat -d 1 -x /dev/vdb & > $ dd if=3D/dev/vdb of=3D/dev/null bs=3D4096 iflag=3Ddirect >=20 > This patches addresses these problems as follows: >=20 > 1. Account for I/O requests when they are submitted instead of complete= d. This > ensures that we do not exceed the budget for this slice. Exceeding = the > budget leads to fluctuations since we have to make up for this later= . >=20 > 2. Use constant 100 millisecond slice time. Adjusting the slice time a= t > run-time led to oscillations. Since the reason for adjusting slice = time is > not clear, drop this behavior. >=20 > I have also included two code clean-up patches. >=20 > Beno=EEt: Please let me know if this solves the problems you're seeing. >=20 > Stefan Hajnoczi (4): > block: fix I/O throttling accounting blind spot > block: keep I/O throttling slice time constant > block: drop duplicated slice extension code > block: clean up I/O throttling wait_time code >=20 > block.c | 47 ++++++++++++++++++++-------------------= -------- > blockdev.c | 1 - > include/block/block_int.h | 3 +-- > 3 files changed, 21 insertions(+), 30 deletions(-) >=20 > --=20 > 1.8.1.4 >=20