LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 05-28-2012, 11:28 AM   #1
terrytibbs
Member
 
Registered: Jul 2009
Distribution: Solaris (SCSA), Red Hat (RHCT)
Posts: 47

Rep: Reputation: 16
Centos KVM Tuning questions


Hi,

I have a Centos 6.2 host running with one KVM Centos 5.8 guest.

The guest is running as a web server (PHP). The existing web servers are all running on physical hardware, I am seeing a massive increase in CPU load on the guest when compared to the other physical hosts.

I am expecting an overhead due to virtualisation but think I have a bottle neck somewhere.

I have the below setup:

* Using a block device for the guests root disk
* Using virtio drivers for Network and IO
* Pinned Virtual CPU's to the guest
* set deadline scheduler for the host and guest
* disk cache is set to "none"

My top look like this:

Code:
top - 09:21:21 up 11 min,  2 users,  load average: 27.17, 17.06, 7.84
Tasks: 347 total,  11 running, 336 sleeping,   0 stopped,   0 zombie
Cpu(s): 34.8%us, 11.2%sy,  0.0%ni, 47.4%id,  0.6%wa,  1.1%hi,  4.9%si,  0.0%st
Mem:  10237520k total,  4304288k used,  5933232k free,    16912k buffers
Swap: 16386292k total,        0k used, 16386292k free,   294168k cached
You can see my CPU's are being hammered but I'm not sure whats causing this. The load on the physical servers at this time was around 2.5. I would expect a trade off but not this much!

Any ideas?
 
Old 05-28-2012, 12:36 PM   #2
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by terrytibbs View Post
Hi,

I have a Centos 6.2 host running with one KVM Centos 5.8 guest.

The guest is running as a web server (PHP). The existing web servers are all running on physical hardware, I am seeing a massive increase in CPU load on the guest when compared to the other physical hosts.

I am expecting an overhead due to virtualisation but think I have a bottle neck somewhere.

I have the below setup:

* Using a block device for the guests root disk
* Using virtio drivers for Network and IO
* Pinned Virtual CPU's to the guest
* set deadline scheduler for the host and guest
* disk cache is set to "none"

My top look like this:

Code:
top - 09:21:21 up 11 min,  2 users,  load average: 27.17, 17.06, 7.84
Tasks: 347 total,  11 running, 336 sleeping,   0 stopped,   0 zombie
Cpu(s): 34.8%us, 11.2%sy,  0.0%ni, 47.4%id,  0.6%wa,  1.1%hi,  4.9%si,  0.0%st
Mem:  10237520k total,  4304288k used,  5933232k free,    16912k buffers
Swap: 16386292k total,        0k used, 16386292k free,   294168k cached
You can see my CPU's are being hammered but I'm not sure whats causing this. The load on the physical servers at this time was around 2.5. I would expect a trade off but not this much!

Any ideas?
It would help to know a little more about your setup...

* When running a "top" can you press "1" (the number one) to see all CPUs? Maybe one is getting hammered while the others stay idle...
* Where are you storing the VD? On the physical machine or an NFS mount or iSCSI?
* How is the KVM server installed? Did you install "full GUI" or did you install "Minimal Server"? (I've had problems where the "Fingerprint reader" was crashing...on a Server! A very move on my part...)

Also, are you sharing the same network interface as the KVM host? Or is it a dedicated NIC for virtual guests?

-C
 
Old 05-30-2012, 08:24 AM   #3
terrytibbs
Member
 
Registered: Jul 2009
Distribution: Solaris (SCSA), Red Hat (RHCT)
Posts: 47

Original Poster
Rep: Reputation: 16
The disk for this VM is a block device, using the virtio driver, I have a dedicated bridge br1 for this VM. I ran the web server on the physical blade last night just to make sure there was not a problem outside of KVM. I got the expected results from physical hardware.

I'm back using KVM, however.....

I had 16 virtual CPU's available to the host. I read that over committing CPU resource can impact performance, so after reducing Current Allocation to 8 I am seeing the load that resembles the physical servers. I still have some tuning to do, as load is running at 4 in the VM where load is 2 on the physical hardware. But this is closer to the expected results.

Thanks very much for taking the time to reply.
 
Old 05-30-2012, 10:15 AM   #4
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
I'm glad you figured out your issue, and thank you for posting your findings
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kvm on centos 6.2 32-bit? webspacecraft Linux - Virtualization and Cloud 3 04-03-2012 01:38 PM
centos KVM malak33 Linux - Newbie 15 01-17-2012 12:14 AM
Performance tuning questions gosssamer Linux - Server 5 09-13-2011 01:35 PM
CentOS KVM grob115 Linux - Virtualization and Cloud 3 06-13-2010 01:35 PM
LXer: Deploying and tuning Django on CentOS LXer Syndicated Linux News 0 04-26-2008 06:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 12:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration