[Serusers] new MediaProxy release 1.1.0

Andrei Pelinescu-Onciul pelinescu-onciul at fokus.fraunhofer.de
Wed Jun 30 20:18:49 CEST 2004


On Jun 30, 2004 at 08:53, Ezequiel Colombo <ecolombo at arcotel.net> wrote:
> Hi all, i am tested the mediaproxy 1.0.1 version on a dual CPU (2.6GHz) and
> get at least 180 simultaneous calls !
> This is a good and very scalable solution to solve NAT related problems.

I tested it on a dual athlon mp2000.
I've also modified rtpgenerator to work with nathelper (patch for nh
version attached).

rtpgenerator has a few drawbacks: it eats more cpu than rtproxy and
cannot create more than 510 calls (the python code seems to use
internally select witch doesn't work on more than 1024 file
descriptors).

Also mediaproxy cpu usage varies a lot (it doesn't stay constant it has
a lot of peaks).


mediaproxy 1.0  eats all the cpu (100% ) at arround 90-120 simultaneous
calls (it starts reaching 100% at 90 calls).
rtpproxy (unstable, latest cvs) uses only 60-66% cpu for 500
simultaneous calls (rtpgenerator cannot generate more). rtpgenerator
uses 70-81% during this time.


I've measured all this after 3-4 minute from starting rtpgenerator
 (because I was not interested on the initial session creation;, for
 example in the first minute rtpgenerator uses almost 100%).


Another interesting peformance benchmark is how many sessions can be 
 handled per second, without any rtp traffic (the equivalent of a sip
 call: invite -> request, 200 ok -> lookup, bye -> delete). This shows
  how much is ser slowed down by sending commands to the rtp proxy.

Unfortunately my benchmark program works only with rtpproxy (different
commands).
Here are some results (this time on a pentiumM 1.6Ghz single cpu)
 maximum 100 simultaneous session :  5011 sessions/s
 4000 simultaneous seessions :         46 sessions/S
(this happens because poll scales very badly with the number of FDs
used; 4000 sessions => 16000 open fds => rtpproxy spends the most time
in the poll syscall).


Andrei
-------------- next part --------------
--- rtpgenerator.py	2004-06-05 00:02:08.000000000 +0200
+++ rtpgenerator_nh.py	2004-06-30 18:05:48.000000000 +0200
@@ -50,10 +50,10 @@
         self.local = "remote"
         self.session = session or ("%s:%s" % self.addr)
         self.mode = mode
-        command = "%(mode)s %(session)s %(ip)s:%(port)d %(ip)s dummy remote dummy remote dummy-agent info=from:test at test.com,to:test at test.com\n" % self.__dict__
+        command = "%(mode)s %(session)s %(ip)s %(port)d from_tag to_tag\n" % self.__dict__
         proxy = self.sendCommand(command).split()
         if proxy:
-            self.proxy = (proxy[0], int(proxy[1]))
+            self.proxy = (self.ip, int(proxy[0]))
         else:
             raise GeneratorError, "No answer from mediaproxy"
 
@@ -71,7 +71,7 @@
             s.close()
     
     def end(self):
-        self.sendCommand("delete %s\n" % self.session)
+        self.sendCommand("D %s from_tag\n" % self.session)
 
     def writable(self):
         return 1
@@ -163,8 +163,8 @@
     if options.rate<0 or options.rate>512:
         print "Rate must be between 0 and 512 kbps"
         sys.exit(1)
-    if options.count<1 or options.count>30:
-        print "Count must be between 1 and 30"
+    if options.count<1 or options.count>3000:
+        print "Count must be between 1 and 3000"
         sys.exit(1)
     if options.g711:
         dataSize = 172
@@ -185,8 +185,8 @@
     senders = []
     try:
         for i in range(options.count):
-            sender = RTPGenerator('request')
-            receiver = RTPGenerator('lookup', sender.session)
+            sender = RTPGenerator('U')
+            receiver = RTPGenerator('L', sender.session)
             senders.append(sender)
         loop()
     except GeneratorError, why:


More information about the sr-users mailing list