This forum has been archived. Please start a new discussion on GitHub.

How many bytes are really send?


I am currently searching for some informations depending on how many bytes you will really see on the next level.

For example:

When I use ICE all my in SLICE defined structures will be send over TCP / IP or UDP, but ICE will add also some infos to the packet. So how many bytes will this be when I will send a 1 byte element, a 4 byte Integer or 20 byte string?

1 byte element = x byte Header + x byte type + x byte value
4 byte element = x byte Header + x byte type + x byte value
20 byte complex data structure = x byte Header + x byte type + x byte value + ...
20 byte string elemente = x byte Header + x byte type + x byte value

I have already read the documents:

But I didn't get the point how the "on-the-wire" representation is set together. As far as I know currently each message is added a header of 14 byte as mentioned in chapter 38.3. Maybe you can give me an idea how to read the documents correct, so that I can calculate the number of bytes on my own.

The reason for this is to get a feeling how big the overhead of an ICE protocol is. Currently we are evaluating three different middleware approaches (Corba, ICE, Etch).

Thanks for your help.




  • matthew
    matthew NL, Canada
    I don't really understand what problems you are having with the documentation. Perhaps if you tell us what you don't get we'd better be able to help you.

    The Ice representation is very very compact (even moreso if you use protocol compression). You cannot really get smaller unless you start to play very complex encoding tricks (see ASN.1 packed encoding rules to see how these types of tricks can work); these encoding tricks also are not free since they tradeoff complexity & CPU against size.

    One simple method to find out how large the encoding is is to install an Ice::Stats handler. See The Ice::Stats Interface for details.
  • benoit
    benoit Rennes, France
    In addition to the Ice::Stats interface, you can also use --Ice.Trace.Protocol=2 and eventually --Ice.Trace.Network=3 to trace the requests/replies that goes through the wire. These traces will provide the size information you are looking for.

    Otherwise, The size of a request is the size of the header (as defined by 37.3.1 Message Header) plus the size of the request message body (as defined by 37.3.2 Request Message Body). Similarly, the size of a reply is the size of the header plus the size of the reply message body. The Data Encoding section (37.2) defines all you need to compute the size of the message body or reply body.

  • Thanks benoit. Now I have got the idea how to calculate the size of a message.