Running on VMware

From MiRTA PBX documentation
Jump to navigation Jump to search

Asterisk and MiRTA PBX work great in VMware, but you need to know running a "latency sensitive application" is not the same as running a web or email server. It is really important you are not overbooking the resources of your real servers, allocating more CPU or more Memory than the one really available in the physical system. It can be useful to read the following documentation from VMware

http://www.vmware.com/files/pdf/techpaper/latency-sensitive-perf-vsphere55.pdf

http://www.vmware.com/files/pdf/techpaper/VMW-Tuning-Latency-Sensitive-Workloads.pdf

One of the most common pitfall when running a PBX in a virtualized environment is to increase the number of CPU cores when the performance seems not enough. If there is an oversubscription of CPU in the VMware, it is possible to obtain the complete opposite effect, raising the number of CPU, lower the performance for the PBX. The reason can be counterintuitive, but it is clear when you understand how virtualization works. From

https://communities.vmware.com/servlet/JiveServlet/previewBody/21181-102-1-28328/vsphere-oversubscription-best-practices[1].pdf

"Whenever the virtual machine needs to perform an operation, it has to wait for a number of physical CPUs equal to the number of assigned vCPUs to be available. So, as administrators add more vCPUs to a virtual machine, there is an increased risk of poorer overall performance."

Let's make an example. You have a real server running VMware with 8 pCPU. You are running 4 virtual servers with just 1 vCPU and a PBX with 4 vCPU. All is going well, vCPU:pCPU is 1:1. You'd like to increase performance on the PBX, so you raise the vCPU to 8. Now you have an oversubscription of CPU. Every time the PBX wants to execute a single operation, it has to wait for 8 pCPU to be available. If only 4 pCPU are available because the other 4 virtual servers are busy performing their operations, it will be not able to run any instruction... only when all the virtual servers are quiet, doing nothing, not using the CPU, the PBX will be allowed to perform a single instruction, so your PBX performance with 8 vCPU will be worst than with 4 vCPU.