Throughput Performance in Java
I am currently using IceJava to develop a project (java 1.4.2) and thinking about the performance to expect. I am experimenting with the throughput test included with the IceJava distribution:
IceJ-3.1.1-java2/demo/Ice/throughput
In my environment, I see these results for sequences of bytes and strings and struts:
Code:
==> 3
using variable-length struct sequences
==> t
sending 100 variable-length struct sequences of size 50000...
time for 100 sequences: 12029.0ms
time per sequence: 120.29ms
throughput: 43.23Mbps
==> 2
using string sequences
==> t
sending 100 string sequences of size 50000...
time for 100 sequences: 7392.0ms
time per sequence: 73.92ms
throughput: 27.06Mbps
==> 1
using byte sequences
==> t
sending 100 byte sequences of size 500000...
time for 100 sequences: 421.0ms
time per sequence: 4.21ms
throughput: 950.12Mbps
Can you discuss why sending a sequence of strings is 32 times slower than a sequence of bytes? A sequence of structs is 22 times slower.
In my application, I am sending a data structure that contains a sequence <byte> in addition to some other strings, bools, and long. The struct has a bit of hierarchy (i.e. one struct contains another struct). I am using synchronous method invocation and (so far) one Ice thread.
The majoriety of data is contained in the sequence of bytes. The other data is an order of magnitude (or two) smaller.
Given the above, should I expect my performance numbers to be more like the results for the byte test or the struct test? I am seeing actual performance that does not come close to the sequence of bytes test.
In my tests on my actual system, I notice that Ice performance appears to degrade when sending large amounts of data. There seems to be more Ice overhead when sending 20MByte of data than when sending 2MByte of data.
Thanks for your help.
* John Eisenman
* Wink Technologies (wink.com)