[Freeswitch-users] KVM vs. XEN virtualization

Sergey Safarov s.safarov at gmail.com
Tue Apr 7 11:48:19 MSD 2015


Why you suggest to use exactly this numbers in cyclictest's switches?

Switches description
1) t42 - how many create threads. I use 42 because FS on my VM create t42
threads.

[root at fs1 dialplan]# ps auxww |grep freeswit
freeswi+ 20425  1.7  3.5 1300368 66432 ?       SNsl Apr06  11:13
/usr/bin/freeswitch -ncwait
root     24474  0.0  0.0 112640   964 pts/2    S+   07:05   0:00 grep
--color=auto freeswit
[root at fs1 dialplan]# ps huH p 20425
freeswi+ 20425  0.0  3.6 1300368 67864 ?       SNsl Apr06   0:02
/usr/bin/freeswitch -ncwait
freeswi+ 20425  0.0  3.6 1300368 67864 ?       SNsl Apr06   0:01
/usr/bin/freeswitch -ncwait
freeswi+ 20425  0.1  3.6 1300368 67864 ?       SNsl Apr06   1:03
/usr/bin/freeswitch -ncwait
freeswi+ 20425  0.0  3.6 1300368 67864 ?       SNsl Apr06   0:04
/usr/bin/freeswitch -ncwait

2) i 125 - time us between software timer interrupts for first thread. It
time is equal time between samples rate in PSTN networks
In order to maintain our sampling rate we have 125 microseconds (uS)
between consecutive samples (1/8,000Hz), which is more than enough time to
transmit the eight bits of information. Multiple samples can then be sent
consecutively, each belonging to a different stream. This is called *Time
Division Multiplexing (TDM)*. Twenty-four such samples can be smashed
together to give the next building block of digital telephony, called the
*DS1*, otherwise known as a *T1*. Each DS1 frame consists of a single
framing bit followed by 24 DS0 samples, for a total of 193 bits per frame.
At 8,000 frames per second, we get the familiar 1.544Mbit/S for a T1. In
Europe they use 32 DS0s and call it an *E1*.
http://archive.oreilly.com/etel/2006/02/07/telecom-terms-and-concepts.html

3) d 0 - this switch will make time between software timer interrupts for
second and following threads is equal timer value for first thread

4) l 240000 - how many timer test must be made. It is adjusted for 30 s
overall test

5) n - use clock_nanosleep. it is allow take more accurate timer test
values on my VM

6) p 80 - it is copied from example on Cyclictest page

And how in your opinion this numbers are related to Freeswitch in VM
environment?
Relation between Cyclictest switches and FS described above.
Relation betwen Cyclictest results and FS simple

Artifacts during a call is probably when Cyclictest max value is more half
of ptime in SDP (my opinion).
Used FS ptime you can see if execute
grep -o "ptime:.*$" /var/log/freeswitch/freeswitch.log| sort | uniq -c

P.S. Helpfull URLs
- typical ptime values for different codecs http://www.bandcalc.com/
(select codec and ptime value will displayed in next field)
- tool to analize RTP stream https://wiki.wireshark.org/RTP_statistics
- where is located ptime value in SDP
https://ask.wireshark.org/questions/36950/finding-the-packetization-interval-of-a-rtp-packet


On Tue, Apr 7, 2015 at 5:38 AM, Dmitry Lysenko <dvl36.ripe.nick at gmail.com>
wrote:

> Sergey,
> Why you suggest to use exactly this numbers in cyclictest's switches?
> And how in your opinion this numbers are related to Freeswitch in VM
> environment?
>
> P.S.
> https://mindlinux.wordpress.com/2013/10/25/using-and-understanding-the-real-time-cyclictest-benchmark-frank-rowand-sony/
>
> 2015-04-06 15:27 GMT+03:00 Sergey Safarov <s.safarov at gmail.com>:
>
>> Errol can you test VM timer with utility
>> https://rt.wiki.kernel.org/index.php/Cyclictest
>>
>> My VM currently have folowing results
>>
>> [root at fs1 ~]#  date && /tmp/rt-tests/cyclictest -t42 -p 80 -d 0 -n -i 125 -l 240000 && date
>> Sun Apr  5 07:01:31 GMT 2015
>> # /dev/cpu_dma_latency set to 0us
>> policy: fifo: loadavg: 2.38 0.93 0.50 1/194 1574
>>
>> T: 0 ( 1531) P:80 I:125 C: 240000 Min:      2 Act:   12 Avg:   16 Max:    1302
>> T: 1 ( 1532) P:80 I:125 C: 240000 Min:      2 Act:   15 Avg:   14 Max:    2895
>> T: 2 ( 1533) P:80 I:125 C: 240000 Min:      3 Act:   10 Avg:   12 Max:    2888
>> T: 3 ( 1534) P:80 I:125 C: 240000 Min:      1 Act:   16 Avg:   13 Max:    1333
>> T: 4 ( 1535) P:80 I:125 C: 240000 Min:      2 Act:   20 Avg:   14 Max:    2962
>> T: 5 ( 1536) P:80 I:125 C: 240000 Min:      1 Act:   12 Avg:   14 Max:    2946
>> T: 6 ( 1537) P:80 I:125 C: 240000 Min:      2 Act:   10 Avg:   13 Max:    1363
>> T: 7 ( 1538) P:80 I:125 C: 240000 Min:      2 Act:   12 Avg:   13 Max:    1344
>> T: 8 ( 1539) P:80 I:125 C: 240000 Min:      3 Act:   12 Avg:   16 Max:    1408
>> T: 9 ( 1540) P:80 I:125 C: 240000 Min:      1 Act:    8 Avg:   13 Max:    2882
>> T:10 ( 1541) P:80 I:125 C: 239974 Min:      2 Act:   12 Avg:   13 Max:    2908
>>
>>
>> On Mon, Apr 6, 2015 at 11:15 AM, Errol Samuels <ewsamuels at gmail.com>
>> wrote:
>>
>>> Good job and Thanks for sharing!
>>>
>>> KVM at digitalocean.com, Debian 7 64bit, FreeSWITCH 1.4.15: bad
>>>> precision
>>>
>>>
>>> As someone who has been using KVM for a few years and has just migrated
>>> about 20 VMs across to Digital Ocean about 6 weeks ago I admit I am a
>>> little concerned about this finding.
>>>
>>> Just out of curiosity can you tell me the specs of the VM that you
>>> tested with and which DO Datacenter?  I am using NYC3 so perhaps and I will
>>> do some tests as soon as I have some time.
>>>
>>> With regards to Xen was this at Linode or inhouse?
>>>
>>> Thanks
>>>
>>> Errol
>>>
>>>
>>>
>>> On Sun, Apr 5, 2015 at 1:37 AM, Stanislav Sinyagin <ssinyagin at gmail.com>
>>> wrote:
>>>
>>>> here we go:
>>>>
>>>> https://txlab.wordpress.com/2015/04/05/testing-rtp-clock-precision-on-a-virtual-machine/
>>>>
>>>>
>>>>
>>>> On Sat, Apr 4, 2015 at 4:26 PM, Stanislav Sinyagin <ssinyagin at gmail.com>
>>>> wrote:
>>>> > On Sat, Apr 4, 2015 at 1:03 PM, Regis M <
>>>> regis.freeswitch.org at tornad.net> wrote:
>>>> >> How do you check wavs together in audacity ?
>>>> >
>>>> > you just open two WAV files, align their starting position, and
>>>> > visually check the waves. If there's a problem, you would see that
>>>> > after few seconds, the waves are not aligned any more.
>>>> >
>>>> >> Can you send me 2 samples wav (send... and recorded) so I could see
>>>> the 20ms
>>>> >> diff that you exposed...
>>>> >>
>>>> >> Is there a way to automate the result checking, so it could help to
>>>> monitor
>>>> >> itsp quality
>>>> >
>>>> > Here
>>>> > https://github.com/openpreserve/scape-xcorrsound/issues/17
>>>> > this is a link to a tool which compares two sound files at the wave
>>>> > level. You can also see the sound samples in the ticket.
>>>> > The problem is, that currently this tool does not detect such
>>>> slipping frames.
>>>> >
>>>> > I will also write a detailed article with examples, during the
>>>> weekend.
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >>
>>>> >>
>>>> >> 2015-04-04 12:53 GMT+02:00 Stanislav Sinyagin <ssinyagin at gmail.com>:
>>>> >>>
>>>> >>> Important is to send the media through two independent carriers -
>>>> then you
>>>> >>> can be sure that your clock is compared against a high quality one.
>>>> >>>
>>>> >>> On Apr 4, 2015 12:46 PM, "Regis M" <regis.freeswitch.org at tornad.net
>>>> >
>>>> >>> wrote:
>>>> >>>>
>>>> >>>> Hi,
>>>> >>>>
>>>> >>>> It's a very interresting test and conclusion.
>>>> >>>>
>>>> >>>> I will try to build a similar environnement on my freeswitch to
>>>> check
>>>> >>>> some system :)
>>>> >>>>
>>>> >>>> thanks
>>>> >>>>
>>>> >>>>
>>>> >>>>
>>>> >>>> 2015-04-04 2:16 GMT+02:00 Stanislav Sinyagin <ssinyagin at gmail.com
>>>> >:
>>>> >>>>>
>>>> >>>>> hi,
>>>> >>>>>
>>>> >>>>> Here are some test results which might be interesting:
>>>> >>>>>
>>>> >>>>> I've set up a test FreeSWITCH server at digitalocean (they use
>>>> KVM),
>>>> >>>>> and originated test calls to some ITSP accounts. Each call played
>>>> a
>>>> >>>>> test sound file (voice samples from ITU:
>>>> >>>>>
>>>> http://www.itu.int/net/itu-t/sigdb/genaudio/AudioForm-g.aspx?val=1000050
>>>> >>>>> ), and on the receiving end another FreeSWITCH server was
>>>> recording
>>>> >>>>> the received session. The receiving server was on a XEN VM. Both
>>>> >>>>> servers talked G711 to their corresponding ITSP accounts.
>>>> >>>>>
>>>> >>>>> Then I compared the source audio and received audio in Audacity
>>>> editor.
>>>> >>>>>
>>>> >>>>> The tests showed that the received voice wave shifts 20ms from the
>>>> >>>>> original sound every few seconds, randomly back and forward. This
>>>> >>>>> skewing was always present, regardless of ITSP and time of day.
>>>> >>>>>
>>>> >>>>> Then I moved the sending server to a XEN VM, and the waves
>>>> appeared
>>>> >>>>> almost perfectly synchronized (there was a 5ms skew in one test,
>>>> and I
>>>> >>>>> guess it's related to transcoding buffer, as the sound was
>>>> obviously
>>>> >>>>> transcoded).
>>>> >>>>>
>>>> >>>>> The effect was always visible with a 30-second sample, and I also
>>>> made
>>>> >>>>> additional tests with 2-minute samples.
>>>> >>>>>
>>>> >>>>> It would also be interesting to test this from a VmWare VM. If
>>>> someone
>>>> >>>>> wants to run such a test, feel free to contact me directly.
>>>> >>>>>
>>>> >>>>>
>>>> >>>>> cheers,
>>>> >>>>> stan
>>>> >>>>>
>>>> >>>>>
>>>> >>>>>
>>>> _________________________________________________________________________
>>>> >>>>> Professional FreeSWITCH Consulting Services:
>>>> >>>>> consulting at freeswitch.org
>>>> >>>>> http://www.freeswitchsolutions.com
>>>> >>>>>
>>>> >>>>> Official FreeSWITCH Sites
>>>> >>>>> http://www.freeswitch.org
>>>> >>>>> http://confluence.freeswitch.org
>>>> >>>>> http://www.cluecon.com
>>>> >>>>>
>>>> >>>>> FreeSWITCH-users mailing list
>>>> >>>>> FreeSWITCH-users at lists.freeswitch.org
>>>> >>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>> >>>>> UNSUBSCRIBE:
>>>> http://lists.freeswitch.org/mailman/options/freeswitch-users
>>>> >>>>> http://www.freeswitch.org
>>>> >>>>
>>>> >>>>
>>>> >>>>
>>>> >>>>
>>>> _________________________________________________________________________
>>>> >>>> Professional FreeSWITCH Consulting Services:
>>>> >>>> consulting at freeswitch.org
>>>> >>>> http://www.freeswitchsolutions.com
>>>> >>>>
>>>> >>>> Official FreeSWITCH Sites
>>>> >>>> http://www.freeswitch.org
>>>> >>>> http://confluence.freeswitch.org
>>>> >>>> http://www.cluecon.com
>>>> >>>>
>>>> >>>> FreeSWITCH-users mailing list
>>>> >>>> FreeSWITCH-users at lists.freeswitch.org
>>>> >>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>> >>>> UNSUBSCRIBE:
>>>> http://lists.freeswitch.org/mailman/options/freeswitch-users
>>>> >>>> http://www.freeswitch.org
>>>> >>>
>>>> >>>
>>>> >>>
>>>> _________________________________________________________________________
>>>> >>> Professional FreeSWITCH Consulting Services:
>>>> >>> consulting at freeswitch.org
>>>> >>> http://www.freeswitchsolutions.com
>>>> >>>
>>>> >>> Official FreeSWITCH Sites
>>>> >>> http://www.freeswitch.org
>>>> >>> http://confluence.freeswitch.org
>>>> >>> http://www.cluecon.com
>>>> >>>
>>>> >>> FreeSWITCH-users mailing list
>>>> >>> FreeSWITCH-users at lists.freeswitch.org
>>>> >>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>> >>> UNSUBSCRIBE:
>>>> http://lists.freeswitch.org/mailman/options/freeswitch-users
>>>> >>> http://www.freeswitch.org
>>>> >>
>>>> >>
>>>> >>
>>>> >>
>>>> _________________________________________________________________________
>>>> >> Professional FreeSWITCH Consulting Services:
>>>> >> consulting at freeswitch.org
>>>> >> http://www.freeswitchsolutions.com
>>>> >>
>>>> >> Official FreeSWITCH Sites
>>>> >> http://www.freeswitch.org
>>>> >> http://confluence.freeswitch.org
>>>> >> http://www.cluecon.com
>>>> >>
>>>> >> FreeSWITCH-users mailing list
>>>> >> FreeSWITCH-users at lists.freeswitch.org
>>>> >> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>> >> UNSUBSCRIBE:
>>>> http://lists.freeswitch.org/mailman/options/freeswitch-users
>>>> >> http://www.freeswitch.org
>>>>
>>>>
>>>> _________________________________________________________________________
>>>> Professional FreeSWITCH Consulting Services:
>>>> consulting at freeswitch.org
>>>> http://www.freeswitchsolutions.com
>>>>
>>>> Official FreeSWITCH Sites
>>>> http://www.freeswitch.org
>>>> http://confluence.freeswitch.org
>>>> http://www.cluecon.com
>>>>
>>>> FreeSWITCH-users mailing list
>>>> FreeSWITCH-users at lists.freeswitch.org
>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>> UNSUBSCRIBE:
>>>> http://lists.freeswitch.org/mailman/options/freeswitch-users
>>>> http://www.freeswitch.org
>>>>
>>>
>>>
>>> _________________________________________________________________________
>>> Professional FreeSWITCH Consulting Services:
>>> consulting at freeswitch.org
>>> http://www.freeswitchsolutions.com
>>>
>>> Official FreeSWITCH Sites
>>> http://www.freeswitch.org
>>> http://confluence.freeswitch.org
>>> http://www.cluecon.com
>>>
>>> FreeSWITCH-users mailing list
>>> FreeSWITCH-users at lists.freeswitch.org
>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>> http://www.freeswitch.org
>>>
>>
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150407/64232036/attachment-0001.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list