From: Kai Blin on
On Saturday 10 October 2009 19:22:19 theHog wrote:
> Hi,
>
> I have cross compiled samba 3.3.8 for arm, which succeeded.
>
> However, the size of the resulting binaries is large (few MB's per binary)
> so the total installation of samba sums to over 50 megabytes, after
> stripping the binaries.

I've just started looking into Samba on ARM myself, and I can confirm that
binaries are a bit large.

> For example, with samba 2.0.10, the size of smbd was 281 KB. With samba
> 3.3.8 that is 5.2 MB. Same goes for the other binaries. It looks as if
> there is a chunk of code included in every binary instead of using shared
> libs.

Ouch, that's quite a drastic change. This might be due to linking objects into
the binary multiple times, I think we had a similar problem in the Samba4
build. Unfortunately, tracking this is non-trivial. Right now I don't have
any way to do that apart from looking at the Makefile for a long time. Thus,
I don't have a solution for this right now. Sorry.

If you happen to find a way to reduce the binary size, I'd be glad to hear
about it.

Cheers,
Kai
--
Kai Blin
WorldForge developer http://www.worldforge.org/
Wine developer http://wiki.winehq.org/KaiBlin
Samba team member http://www.samba.org/samba/team/
--
Will code for cotton.
From: Volker Lendecke on
On Sat, Oct 10, 2009 at 07:22:19PM +0200, theHog wrote:
> I have cross compiled samba 3.3.8 for arm, which succeeded.
>
> However, the size of the resulting binaries is large (few MB's per binary) so
> the total installation of samba sums to over 50 megabytes, after stripping the
> binaries.
>
> For example, with samba 2.0.10, the size of smbd was 281 KB. With samba 3.3.8
> that is 5.2 MB. Same goes for the other binaries. It looks as if there is a
> chunk of code included in every binary instead of using shared libs.
>
> How can I get the size of the binaries down? I included the configure options
> that I used below and some statistics.

Right now you can't. I've spent a good share of my weekend
trying to trim that down. In particular the (much better and
much more complete) auto-generated RPC marshalling hurts. It
adds 3-4 MB to many binaries, which could be put into shared
libs. It requires some heavy Makefile re-shuffling though,
and this is always tedious work.

Sorry for that, this problem is known but not exactly
trivial to fix the way our code is structured right now.

My current idea is to have .so's per RPC interface for the
marshalling and the client/server stubs. This way you would
be able to drop in new RPC interfaces without recompiling
smbd. It would also be much simpler to add new RPC client
routines as a .so. But as I always have to fight with our
build system a bit, this is an effort of some (few) days.

Volker