a word of caution about the new default of so-reuseport on FreeBSD

Hi,

this is a heads-up for people that are about to upgrade to Unbound 1.8.0
on FreeBSD.

When upgrading (and before restarting unbound) I explicitly set
the new defaults in the conf file to make their value explicit.
( so-reuseport, harden-below-nxdomain, minimal-responses)

After I upgraded and restarted unbound all queries were handled by only a single thread
even though I have multiple threads enabled in the config, as a result of that the number of
queries in the queue skyrocketed.

I expected this to be related to so-reuseport and after setting that to 'no',
things were back to normal (all threads handled queries again, queue size back to normal).

kind regards,
nusenu

Thank you for bringing this to our attention. so-reuseport behaves
indeed different for Linux and FreeBSD. We will schedule a different
default so-reuseport config setting for FreeBSD in Unbound 1.8.2. (It
will not appear in 1.8.1 which will released this week.)

Best regards,

-- Benno

The upcoming FreeBSD 12 has a new SO_REUSEPORT_LB setsockopt that does
the same thing as Linux's SO_REUSEPORT.

Hi,

Just had a chance to test it. It works great, thanks!

# unbound-control stats_noreset | grep 'num.queries='
thread0.num.queries=17662
thread1.num.queries=17191
thread2.num.queries=17269
thread3.num.queries=17419
total.num.queries=69541

Wouter Wijngaards via Unbound-users:

Hi,

The upcoming FreeBSD 12 has a new SO_REUSEPORT_LB setsockopt that does
the same thing as Linux's SO_REUSEPORT.

Thanks for telling that, I have implemented support! It tries to set
the SO_REUSEPORT_LB option when the so-reuseport config option is used.

after enabling so-reuseport on FreeBSD 12.0 (unbound 1.8.2)
the number of handled qps dropped to 0 on half of the threads.
Is this expected?