From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laurent Vivier Subject: Re: [ANNOUNCE] kvm-14 release Date: Mon, 26 Feb 2007 16:57:08 +0100 Message-ID: <45E30354.3020407@bull.net> References: <45D98390.6060001@qumranet.com> <45DA25D9.1060509@aurel32.net> <45DA9FFA.2020009@qumranet.com> <45DB7514.3040409@aurel32.net> <45DBFD6E.2060507@qumranet.com> <45DC51E3.7010205@aurel32.net> <45DC54B5.9080608@qumranet.com> <45DC5D4E.5000300@bull.net> <45DC65C9.6010104@codemonkey.ws> <45DDC641.3030001@bull.net> <45E30037.90007@aurel32.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1048960910==" Cc: kvm-devel To: Aurelien Jarno Return-path: In-Reply-To: <45E30037.90007-rXXEIb44qovR7s880joybQ@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --===============1048960910== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig0832F0AB47C1A15E197B2D5A" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig0832F0AB47C1A15E197B2D5A Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Aurelien Jarno wrote: > Laurent Vivier a =E9crit : >> Anthony Liguori wrote: >>> Laurent Vivier wrote: >>>> Avi Kivity wrote: >>>> =20 >>>>> Aurelien Jarno wrote: >>>>> =20 >>>>>> =20 >>>>>> =20 >>>>>>> What is your disk image file format, or are you using a partition= ? >>>>>>> =20 >>>>>>> =20 >>>>>> I am using a raw image file on an ext3 partition. >>>>>> >>>>>> =20 >>>>>> =20 >>>>>>> Do the results change (on kvm-14) if you pin the guest to a core = with=20 >>>>>>> 'taskset 1 qemu ...' >>>>>>> =20 >>>>>>> =20 >>>>>> Bingo. It now works even faster than kvm-13! >>>>>> >>>>>> real 0m22.307s >>>>>> user 0m13.935s >>>>>> sys 0m4.720 >>>>>> >>>>>> =20 >>>>>> =20 >>>>> I'm guessing this is due to the glibc aio implementation, which use= s=20 >>>>> threads instead of true aio. The threads may cause the vcpu to mig= rate=20 >>>>> frequently from one code to another. >>>>> >>>>> There are two possible solutions: >>>>> >>>>> - use native aio from http://www.bullopensource.org/posix/. I thi= nk=20 >>>>> the aio signal patches are not yet in, so this may not work. >>>>> - teach the scheduler about the cost of migrating vcpus >>>>> The first approach will solve itself eventually, though slowly if t= he=20 >>>>> current slow rate of aio merging continues. We'll have to do the s= econd. >>>>> >>>>> =20 >>>> if you prefer the first one, S=E9bastien will release very soon aio = patches for >>>> 2.6.20 with an up-to-date libposix-aio. >>>> =20 >>> Hi Laurent, >>> >>> I gave that a shot a little bit ago. Ran into two problems. >>> >>> 1) Couldn't avoid linking to -lrt as QEMU uses time functions from it= =2E >>> 2) While I could get things compiling (with patches), QEMU would SEGV= =20 >>> almost immediately. >>> >>> Could you guys maybe give compiling QEMU w/libposix-aio a shot? I'm = >>> really interested to see if it makes a difference. >>> >>> Regards, >>> >>> Anthony Liguori >>> >>>> [advertising] Keep an eye on the bullopensource website. [/advertisi= ng] >>>> :-P >>>> >>>> Regards, >>>> Laurent >> OK, I didn' have time to test the performance of the result, but you c= an find >> attached some patches to enable libposix-aio with kvm-14. >> >> first take last patches for linux-2.6.20 and libposix-aio-.0.8.2 from = website : >> >> http://sourceforge.net/projects/paiol >> >> if you are using AMD64, you must patch libposix-aio because there is a= little >> problem remaining to detect lio_submit syscall (first attachment) >> >> then apply following patch to kvm-14 (second attachment). >> >> It works fine on my system except when I use "-hda /dev/sdb" : qemu cr= ashes just >> after mounting filesystems when "init" tries to set kernel parameters = with >> "sysctl" (I use a debian 4.0). If I boot in emergency mode, mounting m= anually >> filesystems and running manually sysctl, all works fine. It looks like= a >> synchronization problem. >> >> There are remaining issues : libposix-aio uses kernel AIO, so files mu= st be >> opened using O_DIRECT and buffers must be aligned. libposix-aio is abl= e to >> manage other cases but this has a performance cost. >> >> Aur=E9lien, do you have any time to test this on your system ? >=20 > It took me some time to test it, I was not at home and I prefer to be > near the machine when I change the kernel! thank you very much to have tested it : I was not able to reproduce your = problem with debian/linux guest on my intel xeon MP. > I have just tried your patches, and I can say it works. I get the same > times (minor measurement issues) as when using kvm without your patches= > and with taskset. Thanks a lot! Good news. > Would it be possible to merge the kvm part, and maybe to send it to the= > qemu mailing list? I can try to send it to qemu mailing list but I think it is not useful fo= r pure qemu. It seems to improve performance only with kvm. Avi, your opinion ? > Regards, > Aurelien Regards, Laurent --=20 ------------- Laurent.Vivier-6ktuUTfB/bM@public.gmane.org -------------- "Any sufficiently advanced technology is indistinguishable from magic." - Arthur C. Clarke --------------enig0832F0AB47C1A15E197B2D5A Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.7 (GNU/Linux) iD8DBQFF4wNX9Kffa9pFVzwRAqpoAJ99leyG5tbk8YrWfxFqJXOJPjlMjgCfY/xO Cjttu7ZRwZu9o1UpJlScsOY= =3I8v -----END PGP SIGNATURE----- --------------enig0832F0AB47C1A15E197B2D5A-- --===============1048960910== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV --===============1048960910== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kvm-devel mailing list kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/kvm-devel --===============1048960910==--