Re: Problem: Too Many open files

2002-10-01 Thread Terry Lambert

Justin Lundy wrote:
> You are running out of file descriptors. Tune your kern.maxfiles and
> kern.maxfilesperproc sysctl values to allow the system to open more.
> I had a similar problem after creating 3,400 virtual hosts in Apache
> on one of our production servers.

[ ... ]

> "Each open file, socket, or fifo uses one file descriptor. A large-scale
> production server may easily require many thousands of file descriptors,
> depending on the kind and number of services running concurrently.

This has to be done at boot time, or it will not allocate a
larger number of inpcb's and tcpcb's, which are allocated at
boot time by pre-reserving KVA space for zalloci().

The number of sockets will limit the number of total connections
you can make, even if you jack the "maxfiles" up, if you jack the
number up after boot.

-- Terry

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Problem: Too Many open files

2002-10-01 Thread Justin Lundy

You are running out of file descriptors. Tune your kern.maxfiles and 
kern.maxfilesperproc sysctl values to allow the system to open more.
I had a similar problem after creating 3,400 virtual hosts in Apache
on one of our production servers.

Here is a blockquote from Section 6.10.1 File/Process Limits, subsection 
6.10.1.1 kern.maxfiles in the FreeBSD Handbook that will help: [1]

"Each open file, socket, or fifo uses one file descriptor. A large-scale 
production server may easily require many thousands of file descriptors, 
depending on the kind and number of services running concurrently.

kern.maxfile's default value is dictated by the MAXUSERS option in your 
kernel configuration file. kern.maxfiles grows proportionally to the value
of MAXUSERS. When compiling a custom kernel, it is a good idea to set this
kernel configuration option according to the uses of your system. From this
number, the kernel is given most of its pre-defined limits. Even though a 
production machine may not actually have 256 users connected as once, the 
resources needed may be similar to a high-scale web server.

Note: As of FreeBSD 4.5, setting MAXUSERS to 0 in your kernel configuration
file will choose a reasonable default value based on the amount of RAM 
present in your system."

References:

[1] 
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-kernel-limits.html

--jbl

On Fri, May 31, 2002 at 10:03:09AM +0100, Bri wrote:
> Hi I'm getting a Too Many open files message on a FreeBSD 4.5-RELEASE
> machine of mine I originally had the disk in a AMD k5 150 machine with 48MB
> or RAM and it ran fine and the drive was on the Promise Ultra TX2 controller
> card and it all worked fine. Now that I've put the drive in a much bigger
> machine with 500 K6-2 with 512MB or ram it starts getting a Too many open
> files problem
> 
> Even trying to run ls -l gives the messages all though my net access stays
> running as natd continues not matter what it seems it says its something to
> do with /dev/kmem but I'm not sure what this does with memory.
> 
> I don't see any reason a bigger machine should fail where a smaller one
> worked fine maybe I should cvsup my kernel sources my current compile is
> Feburary 29 09:53am 2002 maybe a bit old.
> 
> oh yeah the Hard disk is my trusty IBM 40GB the 7200RPM with 2MB Cache model
> which has always worked great.
> 
> any help appreicated.
> 
> Bri,
> 
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-hackers" in the body of the message

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Problem: Too Many open files

2002-05-31 Thread Bri

Hi I'm getting a Too Many open files message on a FreeBSD 4.5-RELEASE
machine of mine I originally had the disk in a AMD k5 150 machine with 48MB
or RAM and it ran fine and the drive was on the Promise Ultra TX2 controller
card and it all worked fine. Now that I've put the drive in a much bigger
machine with 500 K6-2 with 512MB or ram it starts getting a Too many open
files problem

Even trying to run ls -l gives the messages all though my net access stays
running as natd continues not matter what it seems it says its something to
do with /dev/kmem but I'm not sure what this does with memory.

I don't see any reason a bigger machine should fail where a smaller one
worked fine maybe I should cvsup my kernel sources my current compile is
Feburary 29 09:53am 2002 maybe a bit old.

oh yeah the Hard disk is my trusty IBM 40GB the 7200RPM with 2MB Cache model
which has always worked great.

any help appreicated.

Bri,


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message