dhclient binary size

Bancroft, Matt matt.bancroft at unify.com
Fri Sep 30 14:07:16 UTC 2016


That was my thought also. I am looking at the bind configure and make to see what I can do ;)

Any ideas or pointers would be helpful.

Regards,
Matt

From: dhcp-users [mailto:dhcp-users-bounces at lists.isc.org] On Behalf Of Thomas Markwalder
Sent: 30 September 2016 14:38
To: dhcp-users at lists.isc.org
Subject: Re: dhclient binary size

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.

Regards,

Thomas Markwalder
ISC Software Engineering



On 9/30/16 9:09 AM, Bancroft, Matt wrote:
It is 1.8Mb stripped with the changes you suggested :)

It would be great to have it at about 500Kb.

Matt

From: dhcp-users [mailto:dhcp-users-bounces at lists.isc.org] On Behalf Of Thomas Markwalder
Sent: 30 September 2016 13:30
To: Users of ISC DHCP
Subject: Re: dhclient binary size

Matt:

To get a 4.1 size of 500Kb, the executable must be stripped.  The default bin produced isn't stripped, so you can start there.

Thomas

On 9/30/16 6:23 AM, Bancroft, Matt wrote:
Thomas,

Thanks for the suggestion. Your changes reduce the binary size by 100Kb. However, the binary went from ~500Kb to 2Mb when updating from 4.1-ESV-Rx to 4.3.4, so the 100Kb is not really a significant reduction.
I am compiling for arm if that makes any difference. And the main reason for the upgrade is to support all the new dhcpv6 options, particularly the -D option introduce in 4.2.
The client is being used in an embedded environment so binary size is an important issue.

Can you suggest any other way to reduce the binary size?

Kind Regards,
Matt Bancroft

From: dhcp-users [mailto:dhcp-users-bounces at lists.isc.org] On Behalf Of Thomas Markwalder
Sent: 28 September 2016 15:55
To: dhcp-users at lists.isc.org<mailto:dhcp-users at lists.isc.org>
Subject: Re: dhclient binary size

On 9/28/16 10:23 AM, Bancroft, Matt wrote:
Hi,

Between 4.1-ESV-R12b1 and 4.3.4 the binary size of the dhclient significantly increased.

I've had a search back through posts and cannot see any discussion about why this is; presumably the DDNS changes?

Is there any way to compile a minimum feature version to maintain a small binary size for the client?

Kind Regards,
Matt Bancroft




Hello Matt:

If you do not need the client to support DNS updates, you can compile it out.  To do so you need to:

1. Undefine NSUPDATE (comment it out) in includes/site.
2. dhclient_ddns_cb_free(), needs to be wrapped with NSUPDATE conditional compilation.

Rebuild.

I  have attached a diff, containing these changes.  The resulting client is notably smaller.   Please note that, these changes have
not been tested and are use-at-your-own-risk.

Sincerely,

Thomas Markwalder
ISC Software Engineering













_______________________________________________

dhcp-users mailing list

dhcp-users at lists.isc.org<mailto:dhcp-users at lists.isc.org>

https://lists.isc.org/mailman/listinfo/dhcp-users







_______________________________________________

dhcp-users mailing list

dhcp-users at lists.isc.org<mailto:dhcp-users at lists.isc.org>

https://lists.isc.org/mailman/listinfo/dhcp-users






_______________________________________________

dhcp-users mailing list

dhcp-users at lists.isc.org<mailto:dhcp-users at lists.isc.org>

https://lists.isc.org/mailman/listinfo/dhcp-users


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20160930/89526094/attachment-0001.html>


More information about the dhcp-users mailing list