Monday, December 22, 2008

Media Gateway Control Protocol Stack Performance improved


Media Gateway Control Protocol (MGCP, RFC 3435 and JSR 23: JAINTM MGCP API Specification) is the only piece as of now that connects the Mobicents Media Server (MMS) and remote application and hence the performance of MGCP stack is crucial for MMS to be called as GA (Stable). Before MMS CR4 is released, the team is doing everything possible to make MMS performance reach the magical figure. In attempt MGCP stack was also scrutinized for every little details, tweaked and modified to bring it upto the mark. And voila! MGCP stack performance test showed 175 CPS on my Dell D630 Laptop which has 4GB RAM and Linux OS.

Above shown is the images of test scenario that shows through put in number of calls completed per second.

The flow of message (equivalent to one call) in test is

Call Agent (CA) <------------> Media Gate Way (MGW)

CRCX ------------>
<----------- CRCX Response RQNT ------------>
<----------- RQNT Response DLCX ------------>
<----------- DLCX Response While this may not be the flow of every MGCP cycle in real world, but covers the most generic scenario. The test is available at http://code.google.com/p/mobicents/source/browse/#svn/trunk/servers/media/controllers/mgcp/mgcp-stack/src/test/java/org/mobicents/mgcp/stack/test/concurrency

Steps to execute test
  1. checkout the code from http://code.google.com/p/mobicents/source/browse/trunk/servers/media/controllers/mgcp/mgcp-stack/ and execute 'mvn install' from mgcp-stack directory
  2. Modify the /mgcp-stack/ant-build-config.properties to point to correct jar file's
  3. Start the MGW by executing command 'ant mgw' from /concurrency folder
  4. Start the CA by executing command 'ant ca' form /concurrency folder
By default the number of MGCP calls(cycles) the test will execute is 10000 (look at NDIALOGS parameter of CA.java) and the concurrent cycles is capped at 100, look at MAXCONCURRENTCRCX parameter of CA.java

Next in-line is measuring and improving performance of MGCP Resource Adaptor.