From mboxrd@z Thu Jan 1 00:00:00 1970 From: Harald Dunkel Subject: Re: how to tweak kernel to get the best out of kvm? Date: Thu, 11 Mar 2010 14:24:10 +0100 Message-ID: <4B98EEFA.2090208@aixigo.de> References: <4B912156.5020707@darkharri.de> <4B94D947.3060303@redhat.com> <4B979776.1000701@aixigo.de> <4B979B81.5060508@redhat.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------020503030209060709030309" Cc: Harald Dunkel , KVM Mailing List To: Avi Kivity Return-path: Received: from mail.aixigo.de ([195.14.232.227]:20431 "EHLO mail.aixigo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753142Ab0CKNYl (ORCPT ); Thu, 11 Mar 2010 08:24:41 -0500 In-Reply-To: <4B979B81.5060508@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: This is a multi-part message in MIME format. --------------020503030209060709030309 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi Avi, I had missed to include some important syslog lines from the host system. See attachment. On 03/10/10 14:15, Avi Kivity wrote: > > You have tons of iowait time, indicating an I/O bottleneck. > Is this disk IO or network IO? The rsync session puts a high load on both, but actually I do not see how a high load on disk or block IO could make the virtual hosts unresponsive, as shown by the hosts syslog? > What filesystem are you using for the host? Are you using qcow2 or raw > access? What's the qemu command line. > It is ext3 and qcow2. Currently I am testing with reiserfs on the host system. The system performance seems to be worse, compared with ext3. Here is the kvm command line (as generated by libvirt): /usr/bin/kvm -S -M pc-0.11 -enable-kvm -m 1024 -smp 1 -name test0.0 \ -uuid 74e71149-4baf-3af0-9c99-f4e50273296f \ -monitor unix:/var/lib/libvirt/qemu/test0.0.monitor,server,nowait \ -boot c -drive if=ide,media=cdrom,bus=1,unit=0 \ -drive file=/export/storage/test0.0.img,if=virtio,boot=on \ -net nic,macaddr=00:16:36:94:7e:f3,vlan=0,model=virtio,name=net0 \ -net tap,fd=60,vlan=0,name=hostnet0 -serial pty -parallel none \ -usb -vnc 127.0.0.1:0 -k en-us -vga cirrus -balloon virtio >>> >> How many virtual machines would you assume I could run on a >> host with 64 GByte RAM, 2 quad cores, a bonding NIC with >> 4*1Gbit/sec and a hardware RAID? Each vhost is supposed to >> get 4 GByte RAM and 1 CPU. >> > > 15 guests should fit comfortably, more with ksm running if the workloads > are similar, or if you use ballooning. > 15 vhosts would be nice. ksm is in the kernel, but not in my qemu-kvm (yet). > > Here the problem is likely the host filesystem and/or I/O scheduler. > > The optimal layout is placing guest disks in LVM volumes, and accessing > them with -drive file=...,cache=none. However, file-based access should > also work. > I will try LVM tomorrow, when the test with reiserfs is completed. Many thanx Harri --------------020503030209060709030309 Content-Type: application/gzip; name="syslog.gz" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="syslog.gz" H4sICBGqmEsAA3N5c2xvZwC9mctu2zgUhvd9CqLbAjHvF6PoLFoMMIvObGYXGAJFUYngiwJJ dtO3n0M5cVrRkajEHi4cR7b+j4c8PD8pf7cNIhgRsuR0KRhqm8MGU4LWvtn5zRLdKk6EvJHS KExW6K+///xniTrbrtH6sF0yrAzKN7Vb+wKVdYO2deNRd293iFCMWu/qXdHefPieSNGEGLxC H727rxFGX9Dioandov3ZLo5fXdzvd3dZ4GddtfX1vssA0n5ERdXafONbgFct2vq2tXc+HWwY YXQVYkIv7RvCg9Zfhtc+7r4RhB+fP02lKSwoFiuESmhaY848L3N4M+BpGXfg6RbNZMGZkzqZ STSmHJgDwTOIX/8ptR0wyyKdyTA28ncmEcLh+MIJUWAh+PCCytOZnDIGifrVbjbo38Y6v0y+ VXCuIAnQ7efyqWlCvSg9+7JCf6As2+47/5iFdM9cvd3Wu0/4keB8Aa8qT8ZIRQiLMBKEeswL JKhbEGckWVsZaYYhEKyd4r32oWyzsv25c1ljd3ceAFIBwPhkgKGKiwEA56xUxzG68zvfVC4r q43PbFVnP5qqCxzNAqdM5WgsMB0OEvZ54X3PKeqsD+NZ3vkwCYQl6xNNJRnqS27tUd/uO6hk 2/rgsx927bNyv3Nd1U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