Unbound on NetBSD

Hello Unbound-users,

I’m trying run Unbound 1.0.1 on NetBSD, and have some trouble all time.

Hello Unbound-users,

I’m trying run Unbound 1.0.1 on NetBSD, and have some trouble all time.

SeaCat schreef:

Hello Unbound-users,

  I'm trying run Unbound 1.0.1 on NetBSD, and have some trouble all time.

Since you have a dual core machine, two threads should be enough.

Your first problem seems to be that you cannot connect (with) TCP to the
internet, the tcp connects failed. Could this be a NetBSD firewall problem?

The second problem (accept failed: resource unavail) seems to be like
you are running out of file descriptors. What is your ulimit? Did you
compile with libevent or not? And a more general, what is your
configuration file?

The third problem is that you are running out of memory, even though you
have 3 Gb. Is this due to threads forking? What configuration do you
use? Did you compile with or without pthreads?

Best regards,
~ Wouter

Hello Wouter,

Since you have a dual core machine, two threads should be enough.

ok, i’m try.

Your first problem seems to be that you cannot connect (with) TCP to the

internet, the tcp connects failed. Could this be a NetBSD firewall problem?

yes, uses PF

..

pass in quick on wm1 inet proto tcp from any to XX.XX.XX.5 port = domain keep state

pass in quick on wm1 inet proto udp from any to XX.XX.XX.5 port = domain keep state

pass out quick on wm1 inet from XX.XX.XX.5 to any keep state

..

The second problem (accept failed: resource unavail) seems to be like

you are running out of file descriptors.

What is your ulimit?

dunno. :frowning:

Did you compile with libevent or not?

nope

./configure --prefix=/usr/pkg --host=i386–netbsdelf --mandir=/usr/pkg/man

i’m use pkgsrc for compile.

And a more general, what is your configuration file?

The third problem is that you are running out of memory, even though you

have 3 Gb. Is this due to threads forking? What configuration do you

use? Did you compile with or without pthreads?

Then unbound reach SIZE=130M and RES>116M he was crash.

(attachments)

Письмо.html (5.77 KB)

Hi,

I've already responded in private to SeaCat. The gist of it is:

you can see ulimit with ulimit -a.
Low setting for heap memory allowed (128M limit in your setup?), or open
files could be the problem.

This message has 1 thread in config, but the logfile shows 4 threads.
This config should be fine with 1 thread (number of file descriptors).

One way to configure to use many, many file descriptors, by the way,
without running against ulimit problems is to compile
- --without-pthreads, but still setting num-threads: 4 . This forks
processes instead of making threads. Every process gets its own ulimit
memory/open files, and this may ease your troubles.
Setting up like this will not share memory; so memory usage increases.

Best regards,
~ Wouter

SeaCat schreef:

Hello Wouter,

> Since you have a dual core machine, two threads should be enough.

ok, i'm try.

> Your first problem seems to be that you cannot connect (with) TCP

to the

> internet, the tcp connects failed. Could this be a NetBSD firewall
problem?

yes, uses PF

..

pass in quick on wm1 inet proto tcp from any to XX.XX.XX.5 port = domain
keep state

pass in quick on wm1 inet proto udp from any to XX.XX.XX.5 port = domain
keep state

pass out quick on wm1 inet from XX.XX.XX.5 to any keep state

..

> The second problem (accept failed: resource unavail) seems to be like

> you are running out of file descriptors.

> What is your ulimit?

dunno. :frowning:

> Did you compile with libevent or not?

nope

./configure --prefix=/usr/pkg --host=i386--netbsdelf --mandir=/usr/pkg/man

i'm use pkgsrc for compile.

> And a more general, what is your configuration file?

> The third problem is that you are running out of memory, even

though you

Hello Wouter,

Friday, July 25, 2008, 4:11:09 PM, you wrote:

you can see ulimit with ulimit -a.

Low setting for heap memory allowed (128M limit in your setup?), or open

files could be the problem.

i’m set ulimit -d 533504 -n 1024. Unbound not more crash.

..

7741 unbound 2 0 333M 328M select/0 86:14 5.42% 5.42% unbound

..

This message has 1 thread in config, but the logfile shows 4 threads.

This config should be fine with 1 thread (number of file descriptors).

now i’m set 2 threads.