wiki:Embedded

This page holds some notes and ideas for "embedded" use of BIND 10. This covers use on systems with known low-power, slow CPU, low memory, slow disk, small disk, etc. (The specific target minimums will be documented here later.) In some cases, the build of the BIND 10 components may be made on a cross-build system targeting the embedded platform.

Some examples of sizes of BIND 9 versus Unbound. On NetBSD/i386 5.0.0_PATCH (July 15, 2009). TODO: add some runtime memory usage examples.

Totals:

/usr/sbin/named with libraries

   text    data     bss     dec     hex filename
2044226   51708    8820 2104754  201db2 (TOTALS) -- without standard libraries
4322292  173856  107316 4603464  463e48 (TOTALS)

/usr/pkg/sbin/named with libraries

   text    data     bss     dec     hex filename
3154405   71596   13184 3239185  316d11 (TOTALS) -- without standard libraries
5594671  195444  111768 5901883  5a0e3b (TOTALS)

/usr/pkg/sbin/unbound with libraries

   text    data     bss     dec     hex filename
 705332   16472     428  722232   b0538 (TOTALS) -- without standard libraries
3300928  158964  105420 3565312  366700 (TOTALS)

(standard libraries include: ssl, c, util, crypt, crypto, pthread, z, m) Details below...

BIND 9.5.0-P2 (from base) built without XML

$ size /usr/sbin/named
   text    data     bss     dec     hex filename
 325740   23816    3568  353124   56364 /usr/sbin/named

$ ldd /usr/sbin/named    
/usr/sbin/named:
        -lc.12 => /usr/lib/libc.so.12
        -lpthread.0 => /usr/lib/libpthread.so.0
        -lcrypt.0 => /lib/libcrypt.so.0
        -lcrypto.4 => /usr/lib/libcrypto.so.4
        -lbind9.1 => /usr/lib/libbind9.so.1
        -ldns.1 => /usr/lib/libdns.so.1
        -llwres.1 => /usr/lib/liblwres.so.1
        -lisccfg.1 => /usr/lib/libisccfg.so.1
        -lisccc.1 => /usr/lib/libisccc.so.1
        -lisc.1 => /usr/lib/libisc.so.1

$ ldd /usr/sbin/named | grep = | cut -d '>' -f 2 | xargs -n 1 size
   text    data     bss     dec     hex filename
 882943   29448   66256  978647   eeed7 /usr/lib/libc.so.12
   text    data     bss     dec     hex filename
  44339    1072    6352   51763    ca33 /usr/lib/libpthread.so.0
   text    data     bss     dec     hex filename
  19520     468   14200   34188    858c /lib/libcrypt.so.0
   text    data     bss     dec     hex filename
1331264   91160   11688 1434112  15e200 /usr/lib/libcrypto.so.4
   text    data     bss     dec     hex filename
  33859    1252      28   35139    8943 /usr/lib/libbind9.so.1
   text    data     bss     dec     hex filename
1270300   12692    1644 1284636  139a1c /usr/lib/libdns.so.1
   text    data     bss     dec     hex filename
  53410     788      36   54234    d3da /usr/lib/liblwres.so.1
   text    data     bss     dec     hex filename
  56432    9516    3204   69152   10e20 /usr/lib/libisccfg.so.1
   text    data     bss     dec     hex filename
  22879     792      32   23703    5c97 /usr/lib/libisccc.so.1
   text    data     bss     dec     hex filename
 281606    2852     308  284766   4585e /usr/lib/libisc.so.1

$ ls -ld /usr/sbin/named                                               
-r-xr-xr-x  2 root  wheel  401727 Jul 16 12:20 /usr/sbin/named

$ ldd /usr/sbin/named | grep = | cut -d '>' -f 2 | xargs -n 1 ls -sk
1120 /usr/lib/libc.so.12
62 /usr/lib/libpthread.so.0
26 /lib/libcrypt.so.0
1584 /usr/lib/libcrypto.so.4
40 /usr/lib/libbind9.so.1
1328 /usr/lib/libdns.so.1
62 /usr/lib/liblwres.so.1
74 /usr/lib/libisccfg.so.1
30 /usr/lib/libisccc.so.1
336 /usr/lib/libisc.so.1

BIND (from pkgsrc)

  • built with pkgsrc using PKG_DEFAULT_OPTIONS=bind-xml-statistics-server
  • dependency is the libxml2-2.7.3 package
    $ size /usr/pkg/sbin/named
       text    data     bss     dec     hex filename
     356864   19452    4080  380396   5cdec /usr/pkg/sbin/named
    
    $ ldd /usr/pkg/sbin/named  
    /usr/pkg/sbin/named:
            -lc.12 => /usr/lib/libc.so.12
            -lpthread.0 => /usr/lib/libpthread.so.0
            -lz.1 => /usr/lib/libz.so.1
            -lm.0 => /usr/lib/libm387.so.0
            -lm.0 => /usr/lib/libm.so.0
            -lxml2.2 => /usr/pkg/lib/libxml2.so.2
            -llwres.50 => /usr/pkg/lib/liblwres.so.50
            -lisc.50 => /usr/pkg/lib/libisc.so.50
            -lcrypt.0 => /lib/libcrypt.so.0
            -lcrypto.4 => /usr/lib/libcrypto.so.4
            -ldns.50 => /usr/pkg/lib/libdns.so.50
            -lisccc.50 => /usr/pkg/lib/libisccc.so.50
            -lisccfg.50 => /usr/pkg/lib/libisccfg.so.50
            -lbind9.50 => /usr/pkg/lib/libbind9.so.50
    
    $ ldd /usr/pkg/sbin/named | grep = | cut -d '>' -f 2 | xargs -n 1 size 
       text    data     bss     dec     hex filename
     882943   29448   66256  978647   eeed7 /usr/lib/libc.so.12
       text    data     bss     dec     hex filename
      44339    1072    6352   51763    ca33 /usr/lib/libpthread.so.0
       text    data     bss     dec     hex filename
      65635     692      28   66355   10333 /usr/lib/libz.so.1
       text    data     bss     dec     hex filename
       1113     252      28    1393     571 /usr/lib/libm387.so.0
       text    data     bss     dec     hex filename
      95452     756      32   96240   177f0 /usr/lib/libm.so.0
       text    data     bss     dec     hex filename
    1085835   22456    3860 1112151  10f857 /usr/pkg/lib/libxml2.so.2
       text    data     bss     dec     hex filename
      57929     816      36   58781    e59d /usr/pkg/lib/liblwres.so.50
       text    data     bss     dec     hex filename
     281357    2936     304  284597   457b5 /usr/pkg/lib/libisc.so.50
       text    data     bss     dec     hex filename
      19520     468   14200   34188    858c /lib/libcrypt.so.0
       text    data     bss     dec     hex filename
    1331264   91160   11688 1434112  15e200 /usr/lib/libcrypto.so.4
       text    data     bss     dec     hex filename
    1261000   13928    1640 1276568  137a98 /usr/pkg/lib/libdns.so.50
       text    data     bss     dec     hex filename
      21430     832      32   22294    5716 /usr/pkg/lib/libisccc.so.50
       text    data     bss     dec     hex filename
      56833    9848    3204   69885   110fd /usr/pkg/lib/libisccfg.so.50
       text    data     bss     dec     hex filename
      33157    1328      28   34513    86d1 /usr/pkg/lib/libbind9.so.50
    
    $ ls -ld /usr/pkg/sbin/named
    -r-xr-xr-x  2 root  wheel  380072 Sep  1 15:47 /usr/pkg/sbin/named
    
    $ ldd /usr/pkg/sbin/named | grep = | cut -d '>' -f 2 | xargs -n 1 ls -lk
    1120 /usr/lib/libc.so.12
    62 /usr/lib/libpthread.so.0
    72 /usr/lib/libz.so.1
    4 /usr/lib/libm387.so.0
    124 /usr/lib/libm.so.0
    1248 /usr/pkg/lib/libxml2.so.2
    72 /usr/pkg/lib/liblwres.so.50
    336 /usr/pkg/lib/libisc.so.50
    26 /lib/libcrypt.so.0
    1584 /usr/lib/libcrypto.so.4
    1376 /usr/pkg/lib/libdns.so.50
    30 /usr/pkg/lib/libisccc.so.50
    86 /usr/pkg/lib/libisccfg.so.50
    40 /usr/pkg/lib/libbind9.so.50
    
    

Unbound 1.3.3 (from pkgsrc)

  • dependency is the ldns-1.6.1 package
$ size /usr/pkg/sbin/unbound                                           
   text    data     bss     dec     hex filename
  72185    1600      48   73833   12069 /usr/pkg/sbin/unbound

$ ldd /usr/pkg/sbin/unbound
/usr/pkg/sbin/unbound:
        -lc.12 => /usr/lib/libc.so.12
        -lcrypt.0 => /lib/libcrypt.so.0
        -lcrypto.4 => /usr/lib/libcrypto.so.4
        -lldns.1 => /usr/pkg/lib/libldns.so.1
        -lutil.7 => /usr/lib/libutil.so.7
        -lpthread.0 => /usr/lib/libpthread.so.0
        -lunbound.1 => /usr/pkg/lib/libunbound.so.1
        -lssl.6 => /usr/lib/libssl.so.6

$ ldd /usr/pkg/sbin/unbound | grep = | cut -d '>' -f 2 | xargs -n 1 size
   text    data     bss     dec     hex filename
 882943   29448   66256  978647   eeed7 /usr/lib/libc.so.12
   text    data     bss     dec     hex filename
  19520     468   14200   34188    858c /lib/libcrypt.so.0
   text    data     bss     dec     hex filename
1331264   91160   11688 1434112  15e200 /usr/lib/libcrypto.so.4
   text    data     bss     dec     hex filename
 225508   11228      28  236764   39cdc /usr/pkg/lib/libldns.so.1
   text    data     bss     dec     hex filename
  59216    4356    6352   69924   11124 /usr/lib/libutil.so.7
   text    data     bss     dec     hex filename
  44339    1072    6352   51763    ca33 /usr/lib/libpthread.so.0
   text    data     bss     dec     hex filename
 407639    3644     352  411635   647f3 /usr/pkg/lib/libunbound.so.1
   text    data     bss     dec     hex filename
 258314   15988     144  274446   4300e /usr/lib/libssl.so.6

$ ls -ld /usr/pkg/sbin/unbound                                         
-rwxr-xr-x  1 root  wheel  350054 Sep  1 15:31 /usr/pkg/sbin/unbound

$ ldd /usr/pkg/sbin/unbound | grep = | cut -d '>' -f 2 | xargs -n 1 ls -lk
1120 /usr/lib/libc.so.12
26 /lib/libcrypt.so.0
1584 /usr/lib/libcrypto.so.4
736 /usr/pkg/lib/libldns.so.1
78 /usr/lib/libutil.so.7
62 /usr/lib/libpthread.so.0
1264 /usr/pkg/lib/libunbound.so.1
320 /usr/lib/libssl.so.6

Last modified 8 years ago Last modified on Sep 1, 2009, 9:24:46 PM