| Task |
Standard
OSGi (in bytes) |
Service
Binder (in bytes) |
Delta |
| Registering
one service |
156 |
537 |
244% |
| Registering
one service and requesting one service |
864 |
1344 |
55% |
| Additionnal
requested services |
768 |
1032 |
34% |
Although the ServiceBinder eases considerably
OSGi programming, its use comes with a cost that reflects itself as an
increase in memorry consumption. To estimate memory consumption, a
series of tests were conducted based on the techniques discussed in [Wilson2000]. These tests are based
on a technique which involves creating a considerable amount of objects
and then dividing the memory increase by the number of objects. Every
test was conducted ten times with the garbage collector disabled. The
tests were realized on a 700Mhz Linux PC with 512Mb of memory, and on
top of the OSCAR platform running in a Blackdown JVM. Three tests were
conducted:
The results from these tests are shown on figure
1. The memory overhead for test no. 1 may seem excessive, but it can be
explained by the fact that to register one service, the component
descriptor must be reified (put into memory) and an instance manager
must be created. Tests no. 2 and 3 show that memory overhead is not
excessive when services are required. We think that the overhead is
acceptable when taking into account the benefits that the ServiceBinder
brings with respect to simplifying development.