Yate and VMWare
Linux guest operating systems are greatly affected by the System clock of the kernel. Linux 2.6 defaults to a 1000Hz clock tick rate, and that will put a strain on the virtual environment, and can cause problems with system time keeping. Linux 2.4 does not have this problem as the clock runs at 100Hz. If running Linux 2.6 based virtual machines, re-compile the kernel to run at 100Hz, or use one of the newer kernels which use the No HZ dynamic clock. Centos offers community developed VMware Kernels with the 100Hz option already compiled in.
Clock drift related to VMware can cause major issues with Yate, but there are a couple of workarounds for this that don't require compiling a custom kernel. Which workaround you use depends on if you need virtual SMP (multi CPU) or not. It is not recommended to run Yate virtualized, but it is acceptable in most cases where Yate is not forwarding (not proxying) RTP traffic and is only doing the signalling work.
Single CPU Virtual Machines
- Insure VMware Tools is installed and running
- Insure that you have enabled "Synchronize guest time with host" from vmware-config-tools.pl or from "Edit Settings" and then "Options" for the Guest (in VCenter/VMWare Server)
- Add: "clock=pit nosmp noapic nolapic apci=off clocksource=acpi_pm elevator=noop" as kernel boot options
- Re-run grub-install or lilo after you have modified the grub/lilo config file
- Reboot
Multi CPU (SMP) Virtual Machines
- Insure VMware Tools is installed and running
- Insure that you have enabled "Synchronize guest time with host" from vmware-config-tools.pl or from "Edit Settings" and then "Options" for the Guest (in VCenter/VMWare Server)
- Add: "clock=pit clocksource=acpi_pm elevator=noop" as kernel boot options
- Re-run grub-install or lilo after you have modified the grub/lilo config file
- Reboot
APCI/APIC support must be enabled if you plan on using SMP virtualization in the guest, setting the clock to PIT has shown to have better time keeping than other clock sources, your mileage may vary. Setting elevator to noop will enable the host operating system to better schedule I/O as it has an overview of the whole system as opposed to just one virtual machine.
* Sample Syntax for LILO: image=/boot/vmlinuz label="linux" root=/dev/hda1 initrd=/boot/initrd.img append="resume=/dev/hda6 splash=silent clock=clock=pit nosmp noapic nolapic apci=off clocksource=acpi_pm elevator=noop" read-only * Sample Syntax for Grub: title Red Hat Linux (2.4.20-28.9) root (hd0,0) kernel /vmlinuz-2.4.20-28.9 ro root=/dev/hda2 clock=pit nosmp noapic nolapic apci=off clocksource=acpi_pm elevator=noop
Tickless Kernels
Since Linux 2.6.21 the NOHz option can be configured at build time. Recent distributions enable by default this option, especially for laptop and desktop systems.
These tickless kernels are supposed to reduce the power consumption by having a variable clock interrupt. Unfortunately this also results in:
* Jitter in delay functions (affects time critical protocols) * Miscalculation of load average (makes Yate appear to consume excessive CPU)
To check if the kernel has this feature configured and active:
# dmesg | grep -i nohz Switched to NOHz mode on CPU #0
This feature can be disabled from the kernel's boot options by adding nohz=off
See also