Web Services are Faster – Apache Axis2/C Performance: Round 1
Submitted on April 30, 2008 - 03:19. Story : Level : Project : Realm :
This article by Lahiru Gunathilake illustrates the latest performance results of Apache Axis2/C and compares with the performance of Axis2/C with Guththila XML parser and libxml2 XML parser.
Table of Contents
The Test
With this performance test, we intended to carry out the same performance testings as with Apache Axis2/Java performance testing Round #2. Hence we decided to get the same benchmark WSDL and generated the service using Apache Axis2/C code generation tool with ADB (Axis Data Binding) and implemented the services similar to Java services. We also used the same hardware configurations Axis2/Java used with their performance test Round #2.
These are the operations that were tested in the Benchmark Service.
|
echoVoid |
This simply reads a void and returns it |
|
echoInts |
Reads an incoming integer and returns the integer |
|
echoDoubles |
Reads an incoming Double and returns another Double |
|
echoStrings |
Reads an incoming String and returns another String |
|
echoMeshInterfaceObjects |
Reads an incoming Object and returns another |
|
echoSimpleEvents |
Reads Complex type Object and returns another |
Test Environment
The server was running on Red Hat Enterprise Linux Server Release 5 on a 4-way Xeon 3.2Ghz server with 2GB RAM. The client was connected to the server via a dedicated 1Gb Ethernet switch. As the client driver we used the Apache Bench tool shipped with the Apache HTTPD server.
Axis2/C services were run using the httpd module on Apache Http Server version 2.2.6 instance built with prefork MPM(Multi-Processing Modules) which is a non-threaded preforking MPM. We used the default configurations for prefork MPM and kept all the other configurations default in Apache Http Server.
The client driver was running on Red Hat Enterprise Linux Server Release 5 on a 4-way Xeon 3.2Ghz server with 2GB RAM.
Comparison between Axis2/C and Axis2/Java
Here is the comparison between the performance of Axis2/C against Axis2/Java for small and large data types. For this comparison we use Axis2/C with Guththila XML parser and Axis2/Java with default ADB binding.


Performance of Axis2/C with Guththila and Libxml2 parser
Small Datasets
The first chart shows the results for Ints, Doubles, Strings, SimpleEvents and MeshInterface, all at an array size of just 1 element. The Y-axis shows the number of requests per second throughput and the x-axis shows the test name. These engines are able to handle more than 10,000 reqs/sec on a quad-core system. Over the course of a day, this is more than 800 million transactions.
In this scenario we received very high performance levels with Guththila XML parser, that is nearly about 10000 req/sec. But with Libxml2 we can achieve up to a maximum of 8000 req/sec. And therefore, this chart implies that for a service exchanging small datasets Axis2/C results in outstanding performance with Guththila XML parser.

Large Datasets
The next chart shows the performance at array size 100. As one would observe, this starts to stress the engines and thus brings out the core differences in processing. Message sizes in this scenario ranged from 4-6k per invocation, and therefore simulates heavy work load - especially when we look at mesh interface type scenarios.

In these tests, still, Axis2/C built with Guththila XML performs much faster than when built with Libxml2 XML parser.
Note that at these levels, there is serious network utilization going on. There were times during the test when Axis2/C was saturating the dedicated 1Gb/s Ethernet segment that the test was run on. The graph below shows network throughput (as measured by ApacheBench) for echoStrings.

The final graph shows the results for the echoMeshInterface test at different array sizes, ranging from 1 to 5000. It clearly shows how the engine stood up to the increased load presented with complex object types. The first thing to notice is how well Axis2/C scales from 1 through 10 to 50 elements.

Conclusions
- We compared Axis2/C with Axis2/Java and observed that Axis2/C runs at an average speed of 10,000 req/sec as compared to Axis2/Java that runs at an average speed of 3000 req/sec.
- Axis2/C with Guththila parser works well for small data sets. As the payload increases its performance drops and is low compared to Libxml2. Hence, it is better to use Libxml2 as the XML parser when using large data sets and to use Guththila as the parser for small data sets.
Author
Lahiru Gunathilake is a Trainee Software Engineer at WSO2. glahiru at gmail dot com
- Login or register to post comments
- Printer friendly version
- 945 reads










