[omniORB] footprint of omniorb is about 900KB; can it be reduced?

Dan Kegel dank@kegel.com
Tue, 20 Nov 2001 13:47:22 -0800


I'm looking for a corba implementation for use in
an embedded system running linux.  The system only
has 16 meg of RAM, so small footprint is important.
(See also my posts about ace/tao's footprint.)

With OmniOrb 3.0.4, running omni/src/examples/echo, ps augx shows

USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
dank     13670  0.0  0.3  9056 1572 pts/0    S    20:52   0:00 ./eg2_impl

and size on "ldd server"'s output shows

   text    data     bss     dec     hex filename
  13336    2636      60   16032    3ea0 ../../../lib/i586_linux_2.0_glibc2.1/libomnithread.so.2
  22652    2588    1796   27036    699c ../../../lib/i586_linux_2.0_glibc2.1/libtcpwrapGK.so.2
  58150   27720     376   86246   150e6 /lib/libpthread.so.0
  86429     768    1112   88309   158f5 /lib/ld-linux.so.2
 137666     452      84  138202   21bda /lib/libm.so.6
 230566   25932    9480  265978   40efa /usr/lib/libstdc++-libc6.2-2.so.3
 793761  108464    3456  905681   dd1d1 ../../../lib/i586_linux_2.0_glibc2.1/libomniORB3.so.0
1259519   18212   16872 1294603  13c10b /lib/libc.so.6

That's quite good.  Still, is there any way to reduce the footprint
further without switching to static linking?

Here's the script I used.  It's self-contained, no configuration
needed; all it needs is the tarball.
- Dan

#/bin/sh
set -xe

PLAT=i586_linux_2.0_glibc2.1
OPTS="platform=$PLAT PYTHON=`which python`"

rm -rf omni
tar -xzvf omniORB_304.tar.gz

cd omni/src
make export $OPTS

LD_PRELOAD_PATH=`cd ../lib/$PLAT; pwd`
export LD_PRELOAD_PATH

cd examples/echo
make all $OPTS
./eg2_impl &
sleep 4

ps up $!
ldd eg2_impl | sed -e 's/.*> //' -e 's/ (.*//' | xargs size | sort -n