Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
unbound warning increased limit open files from 1024 to 4152
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
jeffk
l33t
l33t


Joined: 13 Sep 2003
Posts: 671

PostPosted: Mon Aug 09, 2010 6:29 pm    Post subject: unbound warning increased limit open files from 1024 to 4152 Reply with quote

On all three of my ~amd64 machines, I see the following warning on boot and when I restart the unbound service:
Code:
# /etc/init.d/unbound restart
 * Stopping unbound ...                                                   [ ok ]
 * Starting unbound ...
[1281378120] unbound[14028:0] warning: increased limit(open files) from 1024 to 4152

What is the recommended configuration unbound's limit of open files on Gentoo? The large config file doesn't show an obvious setting:
Code:
# grep limit /etc/unbound/unbound.conf
# grep files /etc/unbound/unbound.conf
   # for extra security, but make sure all files are in that directory.
   # key files) can be specified in several ways:
   # the working directory. The relative files in this config are
   # result in interesting log files and possibly the AD bit in
# grep 1024 /etc/unbound/unbound.conf
   # num-queries-per-thread: 1024
   # val-nsec3-keysize-iterations: "1024 150 2048 500 4096 2500"

The default /etc/conf.d/unbound only includes the above conf, no settings there.

Thanks.
Back to top
View user's profile Send private message
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2391
Location: Wisconsin (USA)

PostPosted: Mon Aug 09, 2010 8:20 pm    Post subject: Reply with quote

Probably what it's increasing it to is fine, ~4000 files, even if each open file consumes 256 bytes, that's only a megabyte, and I'm guessing the overhead is much less than that. That said, I don't know what unbound does, so I'm just talking out my butt here.
Back to top
View user's profile Send private message
046
Apprentice
Apprentice


Joined: 21 Jul 2004
Posts: 231
Location: Yaroslavl, Russia

PostPosted: Sun Nov 07, 2010 11:14 am    Post subject: Re: unbound warning increased limit open files from 1024 to Reply with quote

jeffk wrote:
What is the recommended configuration unbound's limit of open files on Gentoo? The large config file doesn't show an obvious setting.


decrease outgoing-range

In correct configuration, file limit must be less than treads*outgoing-range + tcp connections + ~10 misc file descriptors.
Back to top
View user's profile Send private message
jeffk
l33t
l33t


Joined: 13 Sep 2003
Posts: 671

PostPosted: Sat Dec 18, 2010 5:51 pm    Post subject: Re: unbound warning increased limit open files from 1024 to Reply with quote

046 wrote:
decrease outgoing-range
In correct configuration, file limit must be less than treads*outgoing-range + tcp connections + ~10 misc file descriptors.

I did notice an interesting item about libevent in this documentation:

http://www.unbound.net/documentation/howto_optimise.html

Quote:
it is better to compile with libevent (see the section below), so that there is no more 1024 limit on outgoing-range.
...
Most pressing is the number of file descriptors, the default has a limit of 1024. To use more than 1024 file descriptors, use libevent or the forked operation method.
...
Unbound can use it to efficiently use more than 1024 file descriptors. Install libevent (and libevent-devel, if it exists) with your favorite package manager. Before compiling unbound run ./configure --with-libevent.

Now you can give any number you like for outgoing-range. Also increase the num-queries-per-thread value.
Code:
# with libevent
outgoing-range: 8192
num-queries-per-thread: 4096

Users report that libevent-1.4.8-stable works well. Users have confirmed it works well on Linux and FreeBSD with 4096 or 8192 as values. Double the num-queries-per-thread and use that as outgoing-range.

libevent-1.4.14b-r1 is installed on my servers and laptop, in fact the only package depending on it is unbound itself, so it appears to be using it.

When I set the configuration to the recommended values:
Code:
# grep -e "outgoing-range\|num-queries-per-thread" /etc/unbound/unbound.conf
        # num-queries-per-thread, or, use as many as the OS will allow you.
        # outgoing-range: 4096
        outgoing-range: 8192
        # num-queries-per-thread: 1024
        num-queries-per-thread: 4096

The numbers look good, but the warning is still issued:
Code:
# /etc/init.d/unbound restart
 * Caching service dependencies ... [ ok ]
 * Stopping unbound ...             [ ok ]
 * Starting unbound ...
[1292694404] unbound[6856:0] warning: increased limit(open files) from 1024 to 8248 [ ok ]

I'd sure like to get rid of the warning if possible.

Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum