Unix Technical Forum

Re: Guidelines for kern.maxfiles and kern.maxvnodes...

This is a discussion on Re: Guidelines for kern.maxfiles and kern.maxvnodes... within the lucky.openbsd.misc forums, part of the OpenBSD category; --> On Thu, 08 Sep 2005 15:05:11 -0600 "Jeff Ross" <jross@wykids.org> wrote: > I posted the following message to misc@ ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > lucky.openbsd.misc

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-17-2008, 06:10 AM
Adam
 
Posts: n/a
Default Re: Guidelines for kern.maxfiles and kern.maxvnodes...

On Thu, 08 Sep 2005 15:05:11 -0600 "Jeff Ross" <jross@wykids.org> wrote:

> I posted the following message to misc@ last May 31 but got no
> replies. The problem has gotten worse, even though I've now raised
>
> kern.maxfiles=16384
> kern.maxvnodes=16384.


Don't forget to make sure your login.conf lets apache have as many
fds as you think it needs too. Also, you know your apache better than
we do, where are those files going? Use fstat and find out. If its TCP
sockets, then you probably want to turn down apache's keepalive
settings so it doesn't hold so many open sockets for such a long time.

> But, I'm just plucking these numbers from air. Can someone point me
> in the general vicinity of a procedure to correctly size these and
> other parameters? This is a moderately busy web server, but its
> load is increasing.


The only person that can point you to the right size for you is you.
sysctl kern.nfiles will tell you how many files are open, fstat will
let you find out what has them open and why. You will have to figure
out from there how many fds you really need, or if something is leaking
fds, or just leaving them open too long.

> I saw in the archives that this would be a temporary fix unless I
> brought the file usage pigs under control. In our case this morning,
> the pig was httpd with over 1200 open files. Stopping and restarting
> apache dropped that down to 168, but in the last hour that number had
> already grown to 324. I'm headed to the apache docs to see if I can
> figure out how to keep apache under control, but any pointers there
> would be greatly appreciated, too.


Its not necessarily a temporary fix, if you just need 6000 open files
on your system, then raising it above 6000 will solve it. But if
something is leaking fds, then it will only delay the problem showing
up. If you're sure its apache using all the fds, then its just an
apache question, not an openbsd question. There's lots of apache
tuning docs out there that should mention turning down or even
disabling keepalives to use fewer fds. But you will need to set
MaxRequestsPerChild if apache is actually leaking fds (from some module
perhaps?).

Adam

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:12 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com