[Top][All Lists]

[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


  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.


Thomas Manninger wrote on 02/21/2015 07:02 AM:
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??

my libvirt config:
<domain type='kvm'>
   <memory unit='KiB'>40960000</memory>
   <currentMemory unit='KiB'>40960000</currentMemory>
   <vcpu placement='static' 
     <type arch='x86_64' machine='pc-i440fx-2.1'>hvm</type>
     <boot dev='hd'/>
     <boot dev='cdrom'/>
   <cpu mode='host-passthrough'></cpu>
   <clock offset='utc'/>
     <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' 
     <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' 
     <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' 
     <disk type='file' device='cdrom'>
       <driver name='qemu' type='raw' cache='none'/>
       <target dev='hdc' bus='ide'/>
       <address type='drive' controller='0' bus='1' target='0' unit='0'/>
     <controller type='usb' index='0'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' 
     <controller type='pci' index='0' model='pci-root'/>
     <controller type='ide' index='0'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' 
     <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' 
     <serial type='pty'>
       <target port='0'/>
     <console type='pty'>
       <target type='serial' port='0'/>
     <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 type='address' address=''/>
       <model type='cirrus' vram='9216' heads='1'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x02' 
     <memballoon model='virtio'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x05' 

reply via email to

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