[Ericsson Utvecklings AB]

7 Performace comparison

7.1 Comparison of encoder/decoders

The Megaco/H.248 standard defines both a plain text encoding and a binary encoding (ASN.1 BER) and we have implemented encoders and decoders for both. We do supply a bunch of different encoding/decoding modules and the user may in fact implement their own (like our erl_dist module). Using a non-standard encoding format has its obvious drawbacks, but may be useful in some configurations.

We have made four different measurements of our Erlang/OTP implementation of the Megaco/H.248 protocol stack, in order to compare our different encoders/decoders. The result of each one is summarized in a line chart:

7.1.1 Encoded message size in bytes

message_size
Encoded message size in bytes

7.1.2 Encode time in micro seconds

encode_time
Encode time in micro seconds

7.1.3 Decode time in micro seconds

decode_time
Decode time in micro seconds

7.1.4 Sum of encode and decode time in micro seconds

total_time
Sum of encode and decode time in micro seconds

7.2 Description of encoders/decoders

In Appendix A of the Megaco/H.248 specification (RFC 3015), there are about 30 messages that shows a representative call flow. We have used these example messages as basis for our measurements. The numbers within parentheses are the plain average values. Our figures have not been weighted in regard to how frequent the different kinds of messages that are sent between the media gateway and its controller.

The test compares the following encoder/decoders:

The actual encoded messages have been collected in one directory per encoding type, containing one file per encoded message.

Here follows an example of a text message to give a feeling of the difference between the pretty and compact versions of text messages. First the pretty printed, well indented version with long keywords:

MEGACO/1 [124.124.124.222] 
  Transaction = 9998 { 
    Context = - { 
      ServiceChange = ROOT { 
        Services { 
          Method = Restart, 
          ServiceChangeAddress = 55555, 
          Profile = ResGW/1, 
          Reason = "901 MG Cold Boot"
        }
      }  
    }
  }

Then the compact text version without indentation and with short keywords:

!/1 [124.124.124.222] T=9998{
  C=-{SC=ROOT{SV{MT=RS,AD=55555,PF=ResGW/1,RE="901 MG Cold Boot"}}}}

7.3 Setup

The measurements has been performed on a Dell Inspiron 5000e laptop, with an Intel PIII 700 MHz CPU, 128 MB SDRAM memory running RedHat Linux 7.2, kernel 2.4.16. Open source Erlang/OTP R8B-0 has been used.

7.4 Summary

In our measurements we have seen that there are no significant differences in message sizes between ASN.1 BER and the compact text format. Some care should be taken when using the pretty text style (which is used in all the examples included in the protocol specification and preferred during debugging sessions) since the messages can then be quite large. If the message size really is a serious issue, our per encoder should be used, as the ASN.1 PER format is much more compact than all the other alternatives. Its major drawback is that it is has not been approved as a valid Megaco/H.248 message encoding.

When it comes to pure encode/decode performance, it turns out that our text encoders are about 3 times faster than our binary ones. While our text decoders are "only" 60 % times faster than our binary ones. Please, observe that these performance figures are related to our implementation in Erlang/OTP. Measurements of other implementations using other tools and techniques may of course result in other figures. If the pure encode/decode performance really is a serious issue, our erl_dist encoder should be used, as the encoding/decoding of the erlang distribution format is much faster than all the other alternatives. Its major drawback is that it is has not been approved as a valid Megaco/H.248 message encoding.


Copyright © 1991-2002 Ericsson Utvecklings AB