On modern kernels, you no longer need to change NR_FILE;
all you need to do is increase ulimit -n and a few proc
entries; see
http://www.kegel.com/c10k.html#limits.filehandles
> In test applications I have been able to create well
> over 30,000 connections but I am unable to do either
> a select or a poll on them.
select() is usually limited to 1024 file descriptors, so
poll() is a slightly better choice. However, although
it can handle 30000 file descriptors, the performance sucks;
see http://www.kegel.com/dkftpbench/Poller_bench.html#results
You may wish to use an alternative to poll().
See http://www.kegel.com/c10k.html#strategies for a list of possibilities.
The only one that performs well on Linux at 30000 fds would be
the real time signal stuff. That's a little tricky to use.
Or you could recode your app to use one thread or process
per 1000 fd's.
Solaris and FreeBSD both offer friendlier poll alternatives
that perform quite well. You might consider using one of those
operating systems if all else fails.
- Dan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/