lkml.org 
[lkml]   [1999]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: > 15,000 Simultaneous Connections
Date
From
mingo@chiara.csoma.elte.hu wrote:
>
> > /proc/sys/fs/file-max is the system-wide fd descriptor limit. Currently
> > this can be upped to over 1 million.
>
> correction - the per-process limit is currently over a million fds, the
> system-wide number of file descriptors-max is only limited by RAM.

Aaargh. I should check all my mail before replying...

I've rewritten the last few paragraphs:

-------------------------------------------------------------------

It however complicates the server a bit. You have both the fork code
and the select loop. The advantage of being able to handle thousands
of clients is however worth it if you expect that useage pattern.

Oh, the "select" system call has limits independent of the kernel. So
if you really want many file descriptors, you should use "poll"
instead of "select".

With the current limit of over a million filedescriptors per process,
the system doesn't really force you to use mixed
forking-for-every-N-connections method. However, for efficiency
reasons you may still want to implement this: If you only have one
process, if it happens to block somewhere (e.g. paging, or a normal
disk IO) all its clients will be "dead". This is alleviated somewhat
by creating one server process for every somany clients.


The kernel.
----------

Newer Kernels can support many descriptors per process. The limit is
about 1 million. You need kernel 2.2.12? for this to be in the
standard kernel.

Linux no longer has a per-system filedescriptor limit as many other
systems have.


--
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
------ Microsoft SELLS you Windows, Linux GIVES you the whole house ------


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.098 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site