Latency Performance Tests
Twoway Latency
For this test, the client first makes one call to the server in order to establish a connection. The time needed for this initial call is not taken into account, as the time for connection establishment is not an aspect of latency. After the initial call, the client sends 100,000 twoway invocations to the server, without any parameters or return values. The test calculates the average time for each invocation.
| Ice | TAO | Difference | |
| Linux | 119.20 µs | 291.50 µs | 145% |
| Windows XP | 123.30 µs | 218.73 µs | 77% |
Ice is about 2.5 times faster than TAO under Linux, and about 1.8 times faster under Windows XP. Note that these results reflect quality of implementation, as Ice has no signifcant design advantage over CORBA with respect to latency.
Twoway Latency with AMI
Both Ice and CORBA support Asynchronous Message Invocation (AMI). This is the same test as the twoway latency test, but using asynchronous invocations instead of synchronous twoway invocations.
| Ice | TAO | Difference | |
| Linux | 132.47 µs | 423.37 µs | 220% |
| Windows XP | 132.52 µs | 312.64 µs | 136% |
For asynchronous invocation, Ice is about 3.2 times faster than TAO under Linux, and about 2.4 times faster under Windows XP.
Oneway Latency
This test was performed under the same conditions as the twoway latency test, except that oneway invocations were used. After the last of the 100,000 oneway invocations, the test makes one final twoway invocation. This is necessary because the TCP/IP protocol stack can buffer data and return control back to the caller before the buffered data has been transmitted; because the final twoway call requires a reply from the server, it ensures that all previously buffered data has actually been sent.
| Ice | TAO | Difference | |
| Linux | 31.32 µs | 132.14 µs | 322% |
| Windows XP | 42.77 µs | 78.47 µs | 83% |
Ice is about 1.8 times faster than TAO under Windows XP, and 4.2 times faster under Linux.
Batched Oneway Latency
Batched performance tests require special consideration. Batched oneway means that several oneway invocations are buffered by the Ice core, which are then sent together in a single request across the network. For this particular test, we used 1,000 batches of 100 oneway invocations. CORBA does not support batched oneways, so we used 100,000 regular oneways.
| Ice | TAO | Difference | |
| Linux | 7.73 µs | 132.14 µs | 1609% |
| Windows XP | 16.78 µs | 78.47 µs | 368% |
While the results for non-batched oneway latency (just as the results for twoway latency) can be attributed to quality of implementation, the performance advantage of batched oneway invocations is due to design advantages of Ice over CORBA.
As can be seen from the results, the ability to send batched oneway invocations can yield large performance gains. For example, under Linux, using batched oneways with Ice, the test runs 17 times faster than using regular oneways with TAO.