[Freeswitch-users] Virtualisation and freeswitch
Johannes Jakob
jjj at 3js.de
Wed Mar 9 00:19:02 MSK 2011
Hi,
since I'm running a Debian Squeeze domU in a Citrix Xen dom0 with kernel
2.6.32-4-amd64 and having serious latency issues and audio hick-ups in
longer calls, I've to look closer at timing issues.
I didn't see any error messages or warnings, but maybe I don't have the
right debug options set.
# cat /sys/devices/system/clocksource/clocksource0/available_clocksource
xen
# cat /sys/devices/system/clocksource/clocksource0/current_clocksource
xen
The box is running chrony to provide accurate date&time.
Below you'll find the output of timer_test, but I need some help
interpreting this. In comparison to a bare metal box, the last column
shows more "jitter" in the virtual box, but how bad are my values?
According to a little program I found here:
http://www.advenage.com/topics/linux-timer-interrupt-frequency.php :
kernel timer interrupt frequency is approx. 4016 Hz or higher
But how do I check the kernel timer resolution?
All of this leaves me with the following questions:
1) Can I tweak the system to get better results?
2) Would it be better when using CentOS? Would I still have this
problem, or would it be completely gone?
3) Is my latency problem (up to 30seconds of latency(!!!)) timer
related, or do I have an other serious problem?
There aren't any networking issues! Gigabit connections, private
interconnect to the upstream provider and no packet loss at all.
freeswitch at internal> timer_test
Avg: 19.947ms Total Time: 999.762ms
2011-03-08 21:45:42.287865 [CONSOLE] mod_commands.c:461 Timer Test:
samplecount after init: 1
freeswitch at internal> 2011-03-08 21:45:42.293298 [CONSOLE]
mod_commands.c:466 Timer Test: samplecount after first step: 2
2011-03-08 21:45:42.312859 [CONSOLE] mod_commands.c:475 Timer Test: 1
sleep 20 19520
2011-03-08 21:45:42.333572 [CONSOLE] mod_commands.c:475 Timer Test: 2
sleep 20 20644
2011-03-08 21:45:42.353187 [CONSOLE] mod_commands.c:475 Timer Test: 3
sleep 20 19573
2011-03-08 21:45:42.373144 [CONSOLE] mod_commands.c:475 Timer Test: 4
sleep 20 19994
2011-03-08 21:45:42.393090 [CONSOLE] mod_commands.c:475 Timer Test: 5
sleep 20 19900
2011-03-08 21:45:42.412943 [CONSOLE] mod_commands.c:475 Timer Test: 6
sleep 20 19782
2011-03-08 21:45:42.432720 [CONSOLE] mod_commands.c:475 Timer Test: 7
sleep 20 19731
2011-03-08 21:45:42.452532 [CONSOLE] mod_commands.c:475 Timer Test: 8
sleep 20 19835
2011-03-08 21:45:42.473430 [CONSOLE] mod_commands.c:475 Timer Test: 9
sleep 20 20857
2011-03-08 21:45:42.493169 [CONSOLE] mod_commands.c:475 Timer Test: 10
sleep 20 19706
2011-03-08 21:45:42.512776 [CONSOLE] mod_commands.c:475 Timer Test: 11
sleep 20 19563
2011-03-08 21:45:42.533521 [CONSOLE] mod_commands.c:475 Timer Test: 12
sleep 20 20700
2011-03-08 21:45:42.553103 [CONSOLE] mod_commands.c:475 Timer Test: 13
sleep 20 19531
2011-03-08 21:45:42.572708 [CONSOLE] mod_commands.c:475 Timer Test: 14
sleep 20 19536
2011-03-08 21:45:42.593020 [CONSOLE] mod_commands.c:475 Timer Test: 15
sleep 20 20352
2011-03-08 21:45:42.612628 [CONSOLE] mod_commands.c:475 Timer Test: 16
sleep 20 19525
2011-03-08 21:45:42.633322 [CONSOLE] mod_commands.c:475 Timer Test: 17
sleep 20 20686
2011-03-08 21:45:42.652949 [CONSOLE] mod_commands.c:475 Timer Test: 18
sleep 20 19701
2011-03-08 21:45:42.672995 [CONSOLE] mod_commands.c:475 Timer Test: 19
sleep 20 19891
2011-03-08 21:45:42.693032 [CONSOLE] mod_commands.c:475 Timer Test: 20
sleep 20 19990
2011-03-08 21:45:42.713020 [CONSOLE] mod_commands.c:475 Timer Test: 21
sleep 20 19870
2011-03-08 21:45:42.732986 [CONSOLE] mod_commands.c:475 Timer Test: 22
sleep 20 19896
2011-03-08 21:45:42.752899 [CONSOLE] mod_commands.c:475 Timer Test: 23
sleep 20 19839
2011-03-08 21:45:42.772596 [CONSOLE] mod_commands.c:475 Timer Test: 24
sleep 20 19631
2011-03-08 21:45:42.793190 [CONSOLE] mod_commands.c:475 Timer Test: 25
sleep 20 20596
2011-03-08 21:45:42.812808 [CONSOLE] mod_commands.c:475 Timer Test: 26
sleep 20 19542
2011-03-08 21:45:42.833619 [CONSOLE] mod_commands.c:475 Timer Test: 27
sleep 20 20719
2011-03-08 21:45:42.853174 [CONSOLE] mod_commands.c:475 Timer Test: 28
sleep 20 19651
2011-03-08 21:45:42.872883 [CONSOLE] mod_commands.c:475 Timer Test: 29
sleep 20 19567
2011-03-08 21:45:42.893592 [CONSOLE] mod_commands.c:475 Timer Test: 30
sleep 20 20591
2011-03-08 21:45:42.913173 [CONSOLE] mod_commands.c:475 Timer Test: 31
sleep 20 19613
2011-03-08 21:45:42.932796 [CONSOLE] mod_commands.c:475 Timer Test: 32
sleep 20 19547
2011-03-08 21:45:42.953478 [CONSOLE] mod_commands.c:475 Timer Test: 33
sleep 20 20651
2011-03-08 21:45:42.973076 [CONSOLE] mod_commands.c:475 Timer Test: 34
sleep 20 19537
2011-03-08 21:45:42.992682 [CONSOLE] mod_commands.c:475 Timer Test: 35
sleep 20 19558
2011-03-08 21:45:43.013388 [CONSOLE] mod_commands.c:475 Timer Test: 36
sleep 20 20648
2011-03-08 21:45:43.033012 [CONSOLE] mod_commands.c:475 Timer Test: 37
sleep 20 19558
2011-03-08 21:45:43.052626 [CONSOLE] mod_commands.c:475 Timer Test: 38
sleep 20 19545
2011-03-08 21:45:43.073304 [CONSOLE] mod_commands.c:475 Timer Test: 39
sleep 20 20579
2011-03-08 21:45:43.092915 [CONSOLE] mod_commands.c:475 Timer Test: 40
sleep 20 19631
2011-03-08 21:45:43.112525 [CONSOLE] mod_commands.c:475 Timer Test: 41
sleep 20 19515
2011-03-08 21:45:43.133227 [CONSOLE] mod_commands.c:475 Timer Test: 42
sleep 20 20660
2011-03-08 21:45:43.152862 [CONSOLE] mod_commands.c:475 Timer Test: 43
sleep 20 19646
2011-03-08 21:45:43.173575 [CONSOLE] mod_commands.c:475 Timer Test: 44
sleep 20 20647
2011-03-08 21:45:43.193157 [CONSOLE] mod_commands.c:475 Timer Test: 45
sleep 20 19537
2011-03-08 21:45:43.212762 [CONSOLE] mod_commands.c:475 Timer Test: 46
sleep 20 19535
2011-03-08 21:45:43.233524 [CONSOLE] mod_commands.c:475 Timer Test: 47
sleep 20 20669
2011-03-08 21:45:43.252520 [CONSOLE] mod_commands.c:475 Timer Test: 48
sleep 20 19003
2011-03-08 21:45:43.273352 [CONSOLE] mod_commands.c:475 Timer Test: 49
sleep 20 20722
2011-03-08 21:45:43.293062 [CONSOLE] mod_commands.c:475 Timer Test: 50
sleep 20 19676
freeswitch at internal> timer_test 20 3
Avg: 19.792ms Total Time: 59.610ms
2011-03-08 21:48:34.467320 [CONSOLE] mod_commands.c:461 Timer Test:
samplecount after init: 1
freeswitch at internal> 2011-03-08 21:48:34.473424 [CONSOLE]
mod_commands.c:466 Timer Test: samplecount after first step: 2
2011-03-08 21:48:34.493299 [CONSOLE] mod_commands.c:475 Timer Test: 1
sleep 20 19738
2011-03-08 21:48:34.513203 [CONSOLE] mod_commands.c:475 Timer Test: 2
sleep 20 19833
2011-03-08 21:48:34.533075 [CONSOLE] mod_commands.c:475 Timer Test: 3
sleep 20 19805
On 29 Jan 2011, at 21:06, Chris Burns wrote:
> Many Xen kernels are compiled with a lower resolution kernel timer.
> Most
> applications will not notice this, but a VoIP application doing async
> RTP
> probably will. It can make audio quality poor, especially if something
> other
> than FreeSWITCH is trying to get CPU time while you are handling
> media. That
> is the main reason that I found. I have had OK results with Xen with
> the
> proper configuration.
More information about the FreeSWITCH-users
mailing list