VMware Cloud Community
kenw232
Enthusiast
Enthusiast

Add vCPUs to Linux 2.4 guest to speed it up?

Hello, I was hoping someone could answers some questions for me.  I'm running vSphere 4.0 with about 5 32-bit Linux guests running kernel 2.4.  All have 1 vCPU.  Everything has been fine for years but now with the growth of one of the web server machines it seems to get bogged down easily and I've tried everything to speed it up.  I get load spikes easily and have concluded the guest does not have enough CPU resources to keep it consistent anymore.  I've allotted more memory to the guest and tried to provide more CPU shares but I'm not getting far.  The physical server (Dell Poweredge R610 with two E5520/2.26GHZ CPU's) is not a slow machine and the other guests are perfectly fine and load values don't go above .5 for them.

1) Would adding one or more vCPUs to this existing linux guest help speed it up at all.  What is the best way to do this?  Just increase the number in the VM settings?

2) If I add more vCPUs should I be recompiling the Kernel with SMP support?  Should I also recompile Apache afterwards?

3) How do I check what the guest is currently set to for "CPU/MMU Virtualization"?  In the settings for the VM its only set to automatic so I don't know what it ends up being.

0 Kudos
3 Replies
marcelo_soares
Champion
Champion

1- It can speed it up if you are seeing consistent CPU spikes (like almost 100% a lot of the time, on %user and %system). If you are seeing a lot of %wait time, it means the CPU is waiting for IO (memory, disk) and you need to investigate it further.

2- Usually common kernels come compiled for SMP. You can check by doing an "uname -a" (you should see the "SMP" word somewhere at the output).

3- If you have a 32 bit OS, you don't need to worry about CPU Virtualization. Let the hypervisor choose it for you.

Marcelo Soares
0 Kudos
kenw232
Enthusiast
Enthusiast

I do get CPU spikes now and again and it's very annoying.  Like an average load of 2 and then its like 50 for the next five minutes.  I'm trying to stop that.  Its mostly because of apache.

So SMP is required for anything more then 1 vCPU correct? 

0 Kudos
marcelo_soares
Champion
Champion

Yes, it is required. You can add the vCPU anyway and check if it shows up on /proc/cpuinfo. If yes, SMP is active, if not, you will need to recompile the kernel, or install an SMP one.

If the spike still exists, than maybe the problem is somewhere else (disk latency, or application mibehavior).

Marcelo Soares
0 Kudos