Web Services are Faster – Apache Axis2/C Performance: Round 1

Archived Content
This article is provided for historical perspective only, and may not reflect current conditions. Please refer to relevant product page for more up-to-date product information and resources.
  • By Lahiru Gunathilake
  • 30 Apr, 2008

Table of Contents

  1. The Test
  2. Summary of Results
  3. Conclusions


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.



This simply reads a void and returns it


Reads an incoming integer and returns the integer


Reads an incoming Double and returns another Double


Reads an incoming String and returns another String


Reads an incoming Object and returns another


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.


Summary of Results

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.


  1. 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.
  2. 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.



Lahiru Gunathilake is a Trainee Software Engineer at WSO2. glahiru at gmail dot com

About Author

  • Lahiru Gunathilake
  • Software Engineer
  • WSO2 Inc.