Slow Connections Performance Tests

Documents over Slow Connections

As our first concrete example, we transferred the first four pages of A Christmas Carol (1241 words, 116 lines) as a sequence of strings, with each sequence element representing one line of text.

In order to have accurate results that reflect a high-speed modem, we used the following code to rate-limit our ethernet connections to 56 kbit/s:

tc qdisc add dev eth0 root handle 1: \
    cbq avpkt 1000 bandwidth 10mbit
tc class add dev eth0 parent 1: \
    classid 1:1 cbq rate 56kbit allot 1500 prio 5 bounded isolated
tc filter add dev eth0 parent 1: \
    protocol ip prio 16 u32 match ip dst 192.168.1.103 flowid 1:1

We measured the number of bytes per transfer using protocol tracing (i.e., Ice.Trace.Network=3 for Ice, and -ORBDebugLevel 10 for TAO). We then transferred the text 1000 times and calculated the mean transfer time.

Our first test did not use Ice protocol compression:

Text over Slow Connections
  Ice TAO Difference
Message Size 6.9 kb 7.6 kb 10%
Transfer Time 1.02 s 1.12 s 10%

For this test data, the Ice protocol has a 10% size advantage over CORBA if no compression is used. Quality of implementation is not important for this test, as the limiting factor is the slow connection rather than any performance bottlenecks in the middleware. Therefore, the 10% size advantage is directly reflected in a 10% improvement in transfer time.

For our second test, we used Ice's built-in protocol compression:

Text over Slow Connections
with Ice Compression
  Ice TAO Difference
Message Size 3.2 kb 7.6 kb 138%
Transfer Time 0.47 s 1.12 s 135%

With compression, Ice can transfer our test data about 2.3 times as fast as CORBA over slow connections, which means substantial bandwidth savings.

Structured Data over Slow Connections

Ice can save even more bandwidth for structured data. For our second test, we transferred the combined bibliography of our Ice Manual and the book Advanced CORBA Programming with C++. The bibliography was represented as follows:

struct Name
{
    string lastname;
    string initials;
};

sequence<Name> NameSeq;

struct Pages
{
   short start;
   short end;
};

struct Entry
{
    NameSeq authors;
    string title;
    string journal;
    short year;
    string publisher;
    string location;
    string edition;
    string hyperlink;
    short volume;
    short issue;
    Pages page;
};

sequence<Entry> Bibliography;

We first ran the test without Ice compression:

Structured Data over Slow Connections
  Ice TAO Difference
Message Size 13.3 kb 17.2 kb 29%
Transfer Time 1.95 s 2.52 s 29%

Even without compression, Ice has a 29% advantage over CORBA for such structured data, due to its compact encoding. Of course, the difference is even greater if compression is used:

Structured Data over Slow Connections
with Ice Compression
  Ice TAO Difference
Message Size 3.9 kb 17.2 kb 341%
Transfer Time 0.57 s 2.52 s 343%

With compression, Ice can transfer the bibliography about 4.4 times faster than CORBA. Note that the difference becomes more pronounced with larger requests because compression works better for large amounts of data.

Batched Oneways and Slow Connections

Ice transfers batched oneways as a single protocol message. This means that even if individual oneway requests are too small to be compressed efficiently, compressing many small oneways together as one batch oneway can yield substantial bandwidth savings.

The Ice firewall solution, Glacier, makes use of batched oneways with compression. By collecting several oneway invocations from different back-end servers and sending them as a single compressed batched oneway request to the client, Glacier not only acts as a firewall, but also serves as a tool to make the transfer of data between client and server more efficient.

 

(Return to the Performance Test Index)

Copyright © 2008 ZeroC, Inc.