dhclient binary size
litt at acm.org
Fri Sep 30 14:47:50 UTC 2016
On 30-Sep-16 10:07, dhcp-users-request at lists.isc.org wrote:
> Message: 1
> Date: Fri, 30 Sep 2016 09:38:25 -0400
> From: Thomas Markwalder <tmark at isc.org>
> To: dhcp-users at lists.isc.org
> Subject: Re: dhclient binary size
> Message-ID: <1a46fcfe-ffeb-be78-0be1-000c8c71fc74 at isc.org>
> Content-Type: text/plain; charset="windows-1252"
> Hi Matt:
> I suspect a fair portion of the size increase comes along with moving to
> the use of the Bind9 libraries, versus the code that resides in the
> "minires" directory. We gained a good great deal by having common
> code, with improved performance and robustness as well as in
> functionality, but apparently at a price of binary footprint.
> It may be possible to reduce the size of the Bind9 libraries based on
> capabilities excluded through compilation flags when building them but
> this would have to be researched.
> Thomas Markwalder
> ISC Software Engineering
The other obvious approach is to make the libraries sharable, which will
help when more than one of dhclient, dhcpd and bind is present. To be
effective, the libraries need to be modular enough that including one
doesn't drag in everything. Optimizing code placement can also help;
many embedded environments have VMs, and can tolerate dead code storage
(but not activation). FLASH is fairly cheap. But if you're storage
limited and stuck with existing hardware, you're left with shrinking the
code. And of course if you only need dhclient, sharable libraries are
counter-productive. This is probably an exercise best left to ISC - or
at least, done once and contributed.
Finally, you can tweak your compiler flags to optimize for (small) code
size at the expense of speed. The defaults will do unrolling & inlining
that you probably don't need. dhcpd can be performance critical (though
rarely when it's embedded). DHClient shouldn't care how slowly it
runs. Perhaps the DHClient build flags should recognize this.
In any case it's nice to hear that there's someone else who care about
embedded systems. I mention them to ISC fairly regularly, but it's not
obvious that we're heard. Yet just about every NAS, router, and CPE
gateway that I look into uses dhcpd/dhclient.
I run dhcpd and bind on old, slow XSCALE processors (and RPi) - but I
have the advantage of USB disks so I just let VM negotiate a reasonable
working set. I don't run DHclient.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4577 bytes
Desc: S/MIME Cryptographic Signature
More information about the dhcp-users