qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] mysql and kvm


From: Donald R Laster Jr
Subject: Re: [Qemu-discuss] mysql and kvm
Date: Sun, 01 Mar 2015 16:50:00 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:33.0) Gecko/20100101 Firefox/33.0 SeaMonkey/2.30

Thomas,

  Take a look at the memory allocation for the VM.  That would be one thing 
that might be an issue.  Maybe in the compute intensive periods unexpected 
paging is going on.  Maybe take a look at the processing with top.

   Don

Thomas Manninger wrote on 02/21/2015 07:02 AM:
Hi,
i have a server with 2x Intel(R) Xeon(R) CPU E5-2660 v3 @ 2.60GHz. I installed 
debian wheezy with qemu-kvm 2.1+dfsg-9~bpo70+1
I have a mysql database with about 150gb datasize. I installed the same 
database physical and in a vm.
After same benchmarks, i see, that the vm is in some operations (mysqlimport / 
export) very slow, some other operations (sqls with many joins), there is not 
so many different between physical and virtual.
as example: the export on the physical machine needs 37 minutes, in the vm 
about 55 minutes.
I think, the problem is only at cpu intensive operations.
iostat in the vm during the mysql export (mysql is on a ssd disk):
Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz 
avgqu-sz   await r_await w_await  svctm  %util
vdb               0.00     0.00  140.00    0.00 17920.00     0.00   256.00     
0.02    0.14    0.14    0.00   0.14   2.00
As disk cache, i tried "none" and "writeback", no differnt.
Some idea, how i can get better performance in my vm??

Thanks!
my libvirt config:
<domain type='kvm'>
   <name>hostname</name>
   <uuid>80901525-05b2-4529-92df-8e2abb7d157a</uuid>
   <memory unit='KiB'>40960000</memory>
   <currentMemory unit='KiB'>40960000</currentMemory>
   <vcpu placement='static' 
cpuset="0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38">8</vcpu>
   <os>
     <type arch='x86_64' machine='pc-i440fx-2.1'>hvm</type>
     <boot dev='hd'/>
     <boot dev='cdrom'/>
   </os>
   <features>
     <acpi/>
     <apic/>
     <pae/>
   </features>
   <cpu mode='host-passthrough'></cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
   <on_crash>restart</on_crash>
   <devices>
     <emulator>/usr/bin/kvm</emulator>
     <disk type='block' device='disk'>
       <driver name='qemu' type='raw' cache='writeback'/>
       <source dev='/vms/disks/srvmysql1-1'/>
       <target dev='vda' bus='virtio'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x04' 
function='0x0'/>
     </disk>
     <disk type='block' device='disk'>
       <driver name='qemu' type='raw' cache='writeback'/>
       <source dev='/vms/disks/srvmysql1-datadir1'/>
       <target dev='vdb' bus='virtio'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x06' 
function='0x0'/>
     </disk>
     <disk type='block' device='disk'>
       <driver name='qemu' type='raw' cache='none'/>
       <source dev='/vms/disks/srvmysql1-datadir2'/>
       <target dev='vdc' bus='virtio'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x07' 
function='0x0'/>
     </disk>
     <disk type='file' device='cdrom'>
       <driver name='qemu' type='raw' cache='none'/>
       <target dev='hdc' bus='ide'/>
<readonly/>
       <address type='drive' controller='0' bus='1' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' 
function='0x2'/>
     </controller>
     <controller type='pci' index='0' model='pci-root'/>
     <controller type='ide' index='0'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' 
function='0x1'/>
     </controller>
     <interface type='bridge'>
       <mac address='52:54:00:be:28:14'/>
       <source bridge='br-lan'/>
       <model type='virtio'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' 
function='0x0'/>
     </interface>
     <serial type='pty'>
       <target port='0'/>
     </serial>
     <console type='pty'>
       <target type='serial' port='0'/>
     </console>
     <input type='tablet' bus='usb'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <graphics passwd='xxxxx'  type='vnc' port='-1' autoport='yes' 
listen='0.0.0.0'>
       <listen type='address' address='0.0.0.0'/>
     </graphics>
     <video>
       <model type='cirrus' vram='9216' heads='1'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x02' 
function='0x0'/>
     </video>
     <memballoon model='virtio'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x05' 
function='0x0'/>
     </memballoon>
   </devices>
</domain>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]