[Unbound-users] Newbie seeks config advice

Steve Snyder swsnyder at snydernet.net
Fri Aug 19 19:06:29 UTC 2011


Hello.

I am very new to unbound.  I've used BIND for years, though, so I understand the DNS concepts.  Mind if I ask a few questions?

Below is my unbound configuration and farther below are the stats from an 18-hour run of unbound.  I am running RHEL 5.7 on a dual-core CPU with SMT enabled (i.e. the OS sees 4 processors) with plenty of RAM.  Unbound was built against the current versions of it's dependencies, except for version 2.5 of GLibC.

1. I built unbound with the libevent library because I read that it improved scalability, which seemed reasonable given that I can run 4 threads simultaneously.  After 18 hours with what I think is a representative load I get this:

  info: server stats for thread 0: 622 queries, 98 answers from cache, 524 recursions, 10 prefetch
  info: server stats for thread 1: 18161 queries, 3186 answers from cache, 14975 recursions, 265 prefetch
  info: server stats for thread 2: 15963 queries, 2746 answers from cache, 13217 recursions, 248 prefetch
  info: server stats for thread 3: 1064 queries, 179 answers from cache, 885 recursions, 20 prefetch

  info: server stats for thread 0: requestlist max 6 avg 0.153558 exceeded 0 jostled 0
  info: server stats for thread 1: requestlist max 11 avg 0.594094 exceeded 0 jostled 0
  info: server stats for thread 2: requestlist max 11 avg 0.496547 exceeded 0 jostled 0
  info: server stats for thread 3: requestlist max 3 avg 0.109392 exceeded 0 jostled 0

It looks to me like 2 of unbound's 4 threads are superfluous.  Given this load (roughly 2000 queries per hour) I wonder if I would be better off giving up on the libevent config and just running 2 threads in a forked configuration.  Opinions?

2. Of the roughly 26,000 recursions done, 11 of them took over 512 seconds (1 over 1024 seconds!).  I realize that 11 out of 26,000 is a tiny percentage, but I'm concerned that unbound didn't give up on these recursions earlier.  Does unbound impose a max recursion time, or do stuck recursions linger until the program is terminated?

Thank you.

----------------------

server:
    verbosity: 1
    logfile: /var/unbound/unbound.log
    interface: 127.0.0.1
    port: 53
    do-ip4: yes
    do-ip6: no
    do-udp: yes
    do-tcp: yes
    statistics-interval: 0
    extended-statistics: yes
    statistics-cumulative: no
    access-control: 127.0.0.0/8 allow
    root-hints: "/var/unbound/etc/root.hints"
    hide-identity: yes
    hide-version: yes
    harden-glue: yes
    harden-dnssec-stripped: yes
    use-caps-for-id: yes
    cache-min-ttl: 3600
    cache-max-ttl: 86400
    prefetch: yes
    num-threads: 4
    msg-cache-slabs: 8
    rrset-cache-slabs: 8
    infra-cache-slabs: 8
    key-cache-slabs: 8
    rrset-cache-size: 256m
    msg-cache-size: 128m
    so-rcvbuf: 8m
    unwanted-reply-threshold: 10000
    do-not-query-localhost: no
    auto-trust-anchor-file: "/var/unbound/etc/root.key"
    val-clean-additional: yes
remote-control:
    control-enable: yes
    control-interface: 127.0.0.1
    control-interface: ::1
    control-port: 8953
    server-key-file: "/var/unbound/unbound_server.key"
    server-cert-file: "/var/unbound/unbound_server.pem"
    control-key-file: "/var/unbound/unbound_control.key"
    control-cert-file: "/var/unbound/unbound_control.pem"

----------------------

[1313775217] unbound[13949:0] info: service stopped (unbound 1.4.12).
[1313775217] unbound[13949:0] info: server stats for thread 0: 622 queries, 98 answers from cache, 524 recursions, 10 prefetch
[1313775217] unbound[13949:0] info: server stats for thread 0: requestlist max 6 avg 0.153558 exceeded 0 jostled 0
[1313775217] unbound[13949:0] info: average recursion processing time 5.813445 sec
[1313775217] unbound[13949:0] info: histogram of recursion processing times
[1313775217] unbound[13949:0] info: [25%]=0.0138354 median[50%]=0.0429744 [75%]=0.0246724
[1313775217] unbound[13949:0] info: lower(secs) upper(secs) recursions
[1313775217] unbound[13949:0] info:    0.000000    0.000001 15
[1313775217] unbound[13949:0] info:    0.008192    0.016384 1
[1313775217] unbound[13949:0] info:    0.016384    0.032768 31
[1313775217] unbound[13949:0] info:    0.032768    0.065536 65
[1313775217] unbound[13949:0] info:    0.065536    0.131072 90
[1313775217] unbound[13949:0] info:    0.131072    0.262144 183
[1313775217] unbound[13949:0] info:    0.262144    0.524288 85
[1313775217] unbound[13949:0] info:    0.524288    1.000000 26
[1313775217] unbound[13949:0] info:    1.000000    2.000000 9
[1313775217] unbound[13949:0] info:    2.000000    4.000000 2
[1313775217] unbound[13949:0] info:    4.000000    8.000000 3
[1313775217] unbound[13949:0] info:    8.000000   16.000000 1
[1313775217] unbound[13949:0] info:   16.000000   32.000000 2
[1313775217] unbound[13949:0] info:   64.000000  128.000000 1
[1313775217] unbound[13949:0] info:  128.000000  256.000000 5
[1313775217] unbound[13949:0] info:  256.000000  512.000000 5
[1313775217] unbound[13949:0] info: server stats for thread 1: 18161 queries, 3186 answers from cache, 14975 recursions, 265 prefetch
[1313775217] unbound[13949:0] info: server stats for thread 1: requestlist max 11 avg 0.594094 exceeded 0 jostled 0
[1313775217] unbound[13949:0] info: average recursion processing time 1.006430 sec
[1313775217] unbound[13949:0] info: histogram of recursion processing times
[1313775217] unbound[13949:0] info: [25%]=0.0065687 median[50%]=0.0344844 [75%]=0.0331288
[1313775217] unbound[13949:0] info: lower(secs) upper(secs) recursions
[1313775217] unbound[13949:0] info:    0.000000    0.000001 512
[1313775217] unbound[13949:0] info:    0.008192    0.016384 52
[1313775217] unbound[13949:0] info:    0.016384    0.032768 1032
[1313775217] unbound[13949:0] info:    0.032768    0.065536 1865
[1313775217] unbound[13949:0] info:    0.065536    0.131072 2821
[1313775217] unbound[13949:0] info:    0.131072    0.262144 4582
[1313775217] unbound[13949:0] info:    0.262144    0.524288 2906
[1313775217] unbound[13949:0] info:    0.524288    1.000000 799
[1313775217] unbound[13949:0] info:    1.000000    2.000000 133
[1313775217] unbound[13949:0] info:    2.000000    4.000000 53
[1313775217] unbound[13949:0] info:    4.000000    8.000000 43
[1313775217] unbound[13949:0] info:    8.000000   16.000000 37
[1313775217] unbound[13949:0] info:   16.000000   32.000000 43
[1313775217] unbound[13949:0] info:   32.000000   64.000000 3
[1313775217] unbound[13949:0] info:   64.000000  128.000000 11
[1313775217] unbound[13949:0] info:  128.000000  256.000000 52
[1313775217] unbound[13949:0] info:  256.000000  512.000000 24
[1313775217] unbound[13949:0] info:  512.000000 1024.000000 7
[1313775218] unbound[13949:0] info: server stats for thread 2: 15963 queries, 2746 answers from cache, 13217 recursions, 248 prefetch
[1313775218] unbound[13949:0] info: server stats for thread 2: requestlist max 11 avg 0.496547 exceeded 0 jostled 0
[1313775218] unbound[13949:0] info: average recursion processing time 2.012690 sec
[1313775218] unbound[13949:0] info: histogram of recursion processing times
[1313775218] unbound[13949:0] info: [25%]=0.00832985 median[50%]=0.0363712 [75%]=0.0380048
[1313775218] unbound[13949:0] info: lower(secs) upper(secs) recursions
[1313775218] unbound[13949:0] info:    0.000000    0.000001 431
[1313775218] unbound[13949:0] info:    0.000512    0.001024 1
[1313775218] unbound[13949:0] info:    0.004096    0.008192 1
[1313775218] unbound[13949:0] info:    0.008192    0.016384 25
[1313775218] unbound[13949:0] info:    0.016384    0.032768 961
[1313775218] unbound[13949:0] info:    0.032768    0.065536 1568
[1313775218] unbound[13949:0] info:    0.065536    0.131072 2496
[1313775218] unbound[13949:0] info:    0.131072    0.262144 4056
[1313775218] unbound[13949:0] info:    0.262144    0.524288 2578
[1313775218] unbound[13949:0] info:    0.524288    1.000000 706
[1313775218] unbound[13949:0] info:    1.000000    2.000000 143
[1313775218] unbound[13949:0] info:    2.000000    4.000000 43
[1313775218] unbound[13949:0] info:    4.000000    8.000000 33
[1313775218] unbound[13949:0] info:    8.000000   16.000000 36
[1313775218] unbound[13949:0] info:   16.000000   32.000000 41
[1313775218] unbound[13949:0] info:   32.000000   64.000000 3
[1313775218] unbound[13949:0] info:   64.000000  128.000000 9
[1313775218] unbound[13949:0] info:  128.000000  256.000000 51
[1313775218] unbound[13949:0] info:  256.000000  512.000000 34
[1313775218] unbound[13949:0] info:  512.000000 1024.000000 1
[1313775218] unbound[13949:0] info: server stats for thread 3: 1064 queries, 179 answers from cache, 885 recursions, 20 prefetch
[1313775218] unbound[13949:0] info: server stats for thread 3: requestlist max 3 avg 0.109392 exceeded 0 jostled 0
[1313775218] unbound[13949:0] info: average recursion processing time 5.461816 sec
[1313775218] unbound[13949:0] info: histogram of recursion processing times
[1313775218] unbound[13949:0] info: [25%]=0.00880758 median[50%]=0.0356336 [75%]=0.0435686
[1313775218] unbound[13949:0] info: lower(secs) upper(secs) recursions
[1313775218] unbound[13949:0] info:    0.000000    0.000001 31
[1313775218] unbound[13949:0] info:    0.008192    0.016384 2
[1313775218] unbound[13949:0] info:    0.016384    0.032768 66
[1313775218] unbound[13949:0] info:    0.032768    0.065536 99
[1313775218] unbound[13949:0] info:    0.065536    0.131072 173
[1313775218] unbound[13949:0] info:    0.131072    0.262144 263
[1313775218] unbound[13949:0] info:    0.262144    0.524288 179
[1313775218] unbound[13949:0] info:    0.524288    1.000000 39
[1313775218] unbound[13949:0] info:    1.000000    2.000000 12
[1313775218] unbound[13949:0] info:    2.000000    4.000000 3
[1313775218] unbound[13949:0] info:    4.000000    8.000000 1
[1313775218] unbound[13949:0] info:    8.000000   16.000000 1
[1313775218] unbound[13949:0] info:   16.000000   32.000000 2
[1313775218] unbound[13949:0] info:   32.000000   64.000000 1
[1313775218] unbound[13949:0] info:   64.000000  128.000000 1
[1313775218] unbound[13949:0] info:  128.000000  256.000000 5
[1313775218] unbound[13949:0] info:  256.000000  512.000000 4
[1313775218] unbound[13949:0] info:  512.000000 1024.000000 2
[1313775218] unbound[13949:0] info: 1024.000000 2048.000000 1






More information about the Unbound-users mailing list