VMware Cloud Community
multirotor
Contributor
Contributor

Context Switching ?

After troubleshooting the performance of several database servers running under ESX3.01, I found some threads about Context Switching.

The VM's are Windows 2003 2VCPU IBM DB2 machines with context switching consistently over 5000cswitches/sec with peaks going up to 30000cswitches/sec.

The host is a DL585G2 with 4 dual cores.

I have attached a Sysinternals Process Explorer screen copy.

It is the db2syscs.exe process generating the context switches and it is running 43 threads on its own.

Is there anything that can be done to improve the handling of context switches apart from trying to reduce them ?!

Any magic vmx file setting ?

0 Kudos
4 Replies
TCronin
Expert
Expert

Try going to 1 vcpu, it will be easier for the scheduler to give access to 1 pcpu at a time. 2 vcpus need to be always scheduled at the same time, which is usually troublesome.

Tom Cronin, VCP, VMware vExpert 2009 - 2021, Co-Leader Buffalo, NY VMUG
0 Kudos
multirotor
Contributor
Contributor

1VCPU is what we are coming from. Performance actually improved with the second CPU but probably the overhead also increased. I know one VCPU is easier on the host but I am looking for the best possible performance under ESX, even if that means sacrifices for other VMs.

0 Kudos
TomHowarth
Leadership
Leadership

Setting Processor affinity will help, however this will sacrifice the ability to VMotion the guest.

If you found this or any other post helpful please consider the use of the Helpfull/Correct buttons to award points

Kind Regards

Tom,

Tom Howarth VCP / VCAP / vExpert
VMware Communities User Moderator
Blog: http://www.planetvm.net
Contributing author on VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment
Contributing author on VCP VMware Certified Professional on VSphere 4 Study Guide: Exam VCP-410
0 Kudos
meistermn
Expert
Expert

Did you have a solution?

0 Kudos