Max Socket & Max Processes

Max Socket & Max Processes

Post by netnews.att.ne » Sat, 02 Oct 1999 04:00:00



I have a few questions. Any help would be greatly appreciated:

1- What is the maximum number of sockets allowed per process on Linux
(assuming that we follow all the instructions available to increase this
number)? I've read most document on this matter and no one seems to know -
Any good documents out there?
2- What is the max number of child processes that can be spawned? (i.e.:
Apache seems to freeze after 255 child processed are spawned) - How can this
number be increased?
3- How do we limit the amount of mem used by each process (or lower the
default allocated amount).

Thanks for any hints or help.

Al

 
 
 

Max Socket & Max Processes

Post by Andi Klee » Sun, 03 Oct 1999 04:00:00


I'll assume you're using a Linux 2.0 kernel because you didn't specify
a version number.

Also note that you should not cross post this way.

Quote:> I have a few questions. Any help would be greatly appreciated:

> 1- What is the maximum number of sockets allowed per process on Linux
> (assuming that we follow all the instructions available to increase this
> number)? I've read most document on this matter and no one seems to know -
> Any good documents out there?

The sockets are limited by the number of file descriptors per process and
globally. On 2.0 increasing the number of fds per process requires a patch,
on later 2.2 kernels (2.2.12 and up) this limit is dynamic and can be tuned
with ulimit -n. On 2.2 before 2.2.12 the default limit is 1024. The global
file limit can be tuned with the /proc/sys/fs/file-max sysctl.

Quote:> 2- What is the max number of child processes that can be spawned? (i.e.:
> Apache seems to freeze after 255 child processed are spawned) - How can this
> number be increased?

ulimit -u for upto 512 processes, more requires recompiling the kernel
with a bigger NR_TASKS setting. The maximum is about 4090 for i386,
this limit is gone in 2.3 development kernels.

Quote:> 3- How do we limit the amount of mem used by each process (or lower the
> default allocated amount).

ulimit -d / -m / -s / -v ... before starting the process. Type help ulimit
in bash for details.

-A.

--
This is like TV. I don't like TV.

 
 
 

Max Socket & Max Processes

Post by Miquel van Smoorenbu » Sun, 03 Oct 1999 04:00:00




>> 2- What is the max number of child processes that can be spawned? (i.e.:
>> Apache seems to freeze after 255 child processed are spawned) - How can this
>> number be increased?

>ulimit -u for upto 512 processes, more requires recompiling the kernel
>with a bigger NR_TASKS setting. The maximum is about 4090 for i386,
>this limit is gone in 2.3 development kernels.

Note that apache has a maximum number of 255 child processes in the
code. If you increase the max # of processes, you must patch & recompile
apache as well. Make sure that between the apache maximum and the OS
maximum there is some room left to allow CGI scripts etc to run!

Mike.
--
First things first, but not necessarily in that order.

 
 
 

Max Socket & Max Processes

Post by BernhardBruec » Sun, 03 Oct 1999 04:00:00



Quote:> I have a few questions. Any help would be greatly appreciated:
> 1- What is the maximum number of sockets allowed per process on Linux
> (assuming that we follow all the instructions available to increase this
> number)? I've read most document on this matter and no one seems to know -
> Any good documents out there?

The number of sockets is limited by the system. There is no limit per
process. In "/proc/sys/fs/file-max" is the max number for the whole system.
To raise the limit use something like
echo 16384 >/proc/sys/fs/file-max

Quote:> 3- How do we limit the amount of mem used by each process (or lower the
> default allocated amount).

Have a look at the man page for bash and search for ulimit.

Bernhard
--
------------------------------------------------------------------------------

 
 
 

Max Socket & Max Processes

Post by David Schwart » Tue, 05 Oct 1999 04:00:00



> I have a few questions. Any help would be greatly appreciated:

> 1- What is the maximum number of sockets allowed per process on Linux
> (assuming that we follow all the instructions available to increase this
> number)?

        Last time I tested, it was 16,000.

        DS

 
 
 

1. Max # of sockets and file descriptors per process

This should be easy to figure out, but I'm having trouble:

Using AIX 4.3.3 we have a ulimit nofiles of 2000.   We have a java web
application running under WebLogic 6.1.  During testing we recieved an
error:

java.io.Exception:  process file table is full

This happened during a write to a log file.

The developer swears that 2000 files could not possibly been open at
once, and that it must be the open sockets which cause us to fill up
the process table, which I find hard to believe.

I created a very simple test to open 3000 files and 3000 ServerSockets
at the same time, one after another.  They fail at 1987 each.

So, my question is... Are the file descriptors and socket descriptors
seperate from each other (ie 2000 each) or is my test acting funny and
should have blown up around 1000 each.

Thanks In Advance,

John Fortin
Pepsi Bottling Group

2. Kernel recompile breaks dial-up

3. MAX i-nodes, MAX open files tuning?

4. Message: hub.c: port1 over-current change ????

5. $299.95 /mo Max/Max 10 GB $119 /GB Charged

6. t2000 oracle database benchmarks

7. 2.4-ac: separate max RT from max user RT

8. Thanx...

9. Limiting max load and max netuse

10. iPlanet Error: JVM exit statistics: AttachedThreads/Max=0/0, ActiveThreads/Max=0/0

11. Limit of MAX VGs and MAX FileSystems per machine

12. username & password format: max length & allowed characters

13. GUS-MAX & Teac SuperQuad 4x Cd-ROM & Linux