Ask a Question related to UNIX Programming, Design and Development.
-
Charles Wilkins #1
select() max number of file descriptors
It seems that my system's select call has a limitation of 1024 open
file descriptors.
I need to learn about this restriction as I am programming a
multiplexed I/O server.
Is the 1024 open file descriptor limitation a per process limitation
or a system wide limitation?
How can I find out how many open files my system supports?
Where do I look to find out if my C / C++ implementation has similar
such file limits?
I have done some googling and have a general idea of the implications,
but I need details for my project.
What are some solutions for handling a large number ( 5000+ ) of
simultaneously open sockets?
Thank you for reading,
Charles Wilkins
Charles Wilkins Guest
-
File Descriptors
Greetings, all. Can anyone tell me if there are any risks associated with increasing the number of file descriptors for an application/user... -
Displaying Open File Descriptors for a Process
Is there a system command a user can execute to display the current number of file descriptors a process is using? Thanks, Peter -
Saving file descriptors
Hello, I have the following problem, I close fileno(stdout) and fileno(stderr), then dup() the closed descriptors to the descriptor pointing... -
increasing file descriptors (Solaris 8) on the fly
/bin/sh: % ulimit -a nofiles(descriptors) 256 % ulimit -n 1024 % ulimit -a nofiles(descriptors) 1024 See "man ulimit" -
select only number from varchar2
for example I have this records in varchar2 column: A123D BLA124XX 125 lkl567836785366AW 2Q and now I need select only number for spool : -
DINH Viêt Hoà #2
Re: select() max number of file descriptors
Charles Wilkins wrote :
sysconf(_SC_OPEN_MAX)> Is the 1024 open file descriptor limitation a per process limitation
> or a system wide limitation?
>
> How can I find out how many open files my system supports?
could you use poll() ?> What are some solutions for handling a large number ( 5000+ ) of
> simultaneously open sockets?
But I am wondering if there is no such limit with poll()
--
DINH V. Hoa,
"s/^\(\(\\.\|[^\[]\|\[\(\^.\|[^^]\)[^]]*\]\)*\)\(\\[^\*[]\)/\1\\\4/"
-- Stéphane CHAZELAS
DINH Viêt Hoà Guest
-
Casper H.S. Dik #3
Re: select() max number of file descriptors
DINH =?iso-8859-1?Q?Vi=EAt_Ho=E0?= <dinh.viet.hoa@free.fr> writes:
>Charles Wilkins wrote :>> Is the 1024 open file descriptor limitation a per process limitation
>> or a system wide limitation?
>>
>> How can I find out how many open files my system supports?Might just return your current soft limit and ntot the real system limit.>sysconf(_SC_OPEN_MAX)
Generally, there are three limits:
- max numbers of fds in a single process (could be as low as 1024)
- process hard limit (equal or less than the first)
- process soft limit.
>> What are some solutions for handling a large number ( 5000+ ) of
>> simultaneously open sockets?poll has no restriction on the size of the pollset but your process>could you use poll() ?
>But I am wondering if there is no such limit with poll()
may stil be limited.
Solaris does not have a kernel enforced hard limit but a per-proces
hard limit of 1024 which can be raised or lowered.
Using larger fd sets generally requires a recompile with a certain
flags (typeically -DFD_SETSIZE=value)
Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
Casper H.S. Dik Guest
-
Brian C #4
Re: select() max number of file descriptors
:::Snip:::
It depends on what type of processing will be needed to be done on the> What are some solutions for handling a large number ( 5000+ ) of
> simultaneously open sockets?
messages received by the clients. For instance, I've got servers at work
that handle very little load, and then some that need to process 400-1000+
blocked messages a second, and do alot with each message in the block.
If you want to have 5000+ connections, even if it's the simplest, I
would probably suggest multithreading the application with pthreads. You
could for instance have a thread accepting new connections and then either
pass the connection off to an existing thread (i.e. have 20 connections
per), or create a new thread if that limit has been reached. I've done this
and it allows me to change the connections per thread, and maximum threads
via a config file.
Brian C Guest



Reply With Quote

