From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56938) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0V9b-0002Mw-Qv for qemu-devel@nongnu.org; Fri, 27 Jun 2014 08:21:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X0V9T-0001Xb-R1 for qemu-devel@nongnu.org; Fri, 27 Jun 2014 08:21:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47426) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0V9T-0001XR-Iu for qemu-devel@nongnu.org; Fri, 27 Jun 2014 08:21:11 -0400 Date: Fri, 27 Jun 2014 14:21:06 +0200 From: Kevin Wolf Message-ID: <20140627122106.GF5223@noname.redhat.com> References: <20140627120129.GO12061@stefanha-thinkpad.muc.redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+QahgC5+KEYLbs62" Content-Disposition: inline In-Reply-To: <20140627120129.GO12061@stefanha-thinkpad.muc.redhat.com> Subject: Re: [Qemu-devel] [regression] dataplane: throughout -40% by commit 580b6b2aa2 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Ming Lei , "Michael S. Tsirkin" , Fam Zheng , qemu-devel@nongnu.org, Paolo Bonzini --+QahgC5+KEYLbs62 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Am 27.06.2014 um 14:01 hat Stefan Hajnoczi geschrieben: > On Thu, Jun 26, 2014 at 11:14:16PM +0800, Ming Lei wrote: > > Hi Stefan, > >=20 > > I found VM block I/O thoughput is decreased by more than 40% > > on my laptop, and looks much worsen in my server environment, > > and it is caused by your commit 580b6b2aa2: > >=20 > > dataplane: use the QEMU block layer for I/O > >=20 > > I run fio with below config to test random read: > >=20 > > [global] > > direct=3D1 > > size=3D4G > > bsrange=3D4k-4k > > timeout=3D20 > > numjobs=3D4 > > ioengine=3Dlibaio > > iodepth=3D64 > > filename=3D/dev/vdc > > group_reporting=3D1 > >=20 > > [f] > > rw=3Drandread > >=20 > > Together with throughput drop, the latency is improved a little. > >=20 > > With this commit, I/O block submitted to fs becomes much smaller > > than before, and more io_submit() need to be called to kernel, that > > means iodepth may become much less. > >=20 > > I am not surprised with the result since I did compare VM I/O > > performance between qemu and lkvm before, which has no big qemu > > lock problem and handle I/O in a dedicated thread, but lkvm's block > > IO is still much worse than qemu from view of throughput, because > > lkvm doesn't submit block I/O at batch like the way of previous > > dataplane, IMO. > >=20 > > But now you change the way of submitting I/O, could you share > > the motivation about the change? Is the throughput drop you expect? >=20 > Thanks for reporting this. 40% is a serious regression. >=20 > We were expecting a regression since the custom Linux AIO codepath has > been replaced with the QEMU block layer (which offers features like > image formats, snapshots, I/O throttling). >=20 > Let me know if you get stuck working on a patch. Implementing batching > sounds like a good idea. I never measured the impact when I wrote the > ioq code, it just seemed like a natural way to structure the code. >=20 > Hopefully this 40% number is purely due to batching and we can get most > of the performance back. Shouldn't it be easy enough to take the old code, remove the batching there and then measure if you get the same 40%? Kevin --+QahgC5+KEYLbs62 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJTrWGyAAoJEH8JsnLIjy/Wl7kP+wd0LCNzEl4rLxSS/ypk1T++ VTuGRjrr1J0nuYxVnKzeS/pGa+7o1nwOTpNVbajDOgU5LwhPht35Ig+lIsjbd2ve 3zpB4HMiA4GbrbMUEIZ/Ga41Cgokhb2qpuTOe0wNwCfy7juAgOCjMcCjxcf3Q2oI lSR2SpmM9bt9lpdcGV5UW2q3xhGlPu8k1ccF+/8mmjiqFGL0YWqUSfIG3eTIkzMc Kh7YlixrwDah9eq3Y0zRtBoeNNlrZ+28+9JoBLAt5DI2YJamf3Fe5Hf6Hs+p7C4C XSFOyq6sxVwu9SqI5E7AcqHWNQ25zjJBg4/bpRhz8aeVd6qd06e8Z4n2O0UIl5fO VkKifz1FPNbk3tI2to3qqbi9Yqr3yVNhrGUCiSnPb2mbt8Onq8zr4w3JHEXFGIZz o+TEZvsvd2LCLAOW8o9ssGMBJ+Pgd5+v/9GtJWBbRLxEJFv15sg5spfYIvi39etV CcJTbu12i1iWNmsdi1vBBy6C88KkgxgLGsziAGvRNLmkhmuCB/w60rjiaQTzd16r OY6tz9cOJtDxRC8OckckLuI1Z8D81pLFBMxSQ8buvHJqZQByTrw0KntMnHTTwBd/ J+1MuuVRffCspVuTj90PftXOyMPyJMit97CeIZqxN6mcI4CG0pCadmpl8SRRyNG0 ww22XEroFbtzphu/7sjQ =hx7o -----END PGP SIGNATURE----- --+QahgC5+KEYLbs62--