From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11035d,ca88785884d55ff4 X-Google-Attributes: gid11035d,public X-Google-Thread: fee84,ca88785884d55ff4 X-Google-Attributes: gidfee84,public X-Google-Thread: f9325,ca88785884d55ff4 X-Google-Attributes: gidf9325,public X-Google-Thread: 10a146,f2a38e735076053b X-Google-Attributes: gid10a146,public From: Casper.Dik@Holland.Sun.Com (Casper H.S. Dik - Network Security Engineer) Subject: Re: Single process with many sockets (was: [Q] Where is the select() Java call?) Date: 1999/01/16 Message-ID: #1/1 X-Deja-AN: 433320608 References: <369C2109.1370A274@geocities.com> <369E51A5.36461E3E@bmsi.com> <77pqb5$eil$1@Starbase.NeoSoft.COM> Mail-Copies-To: never Organization: Sun Microsystems, Netherlands Newsgroups: comp.lang.java.programmer,comp.protocols.tcp-ip,comp.unix.osf.osf1,comp.unix.solaris [[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]] claird@Starbase.NeoSoft.COM (Cameron Laird) writes: >I'm interested to learn what Solaris's limits are, also, in this >regard. I've had anecdotal reports of Solaris 2.7 bogging down (in >memory exhaustion?) when running some servers with lots of file >descriptors, where the corresponding 2.6 installation did fine. Well, Solaris 7 should handle more fds better, not worse. The solaris FAQ says: 3.45) How can I increase the number of file descriptors per process? In 2.3 in earlier this requires poking the kernel. In Solaris 2.4+, this can be accomplished by adding the following lines to /etc/system: * set hard limit on file descriptors set rlim_fd_max = 4096 * set soft limit on file descriptors set rlim_fd_cur = 1024 Raising the soft limit past 256 may confuse certain applications, especially BCP applications. Raising the limit past 1024 may confuse applications that use select(). Select() cannot use more than 1024 file descriptors at this time prior to Solaris 7. In Solaris 2.6, the RPC code was rewritten to use poll(), which does work with many more fds than select(). Prior to 2.6, all RPC servers will likely crash and burn if you increase the fd soft limit past 1024. Solaris 7 allows upto 65536 fds passed to select; this does require recompiling with a larger value for FD_SETSIZE. Programs using stdio or even library calls that use stdio may break when they have more than 256 files open as that is the stdio limit. Programs using many filedescriptors should try and reserve a number of low numbered file descriptors for use by stdio. The stdio limit is fixed for 64 bit applications in Solaris 7; if you really need more than 256 FILE * in and you can't use Solaris 7+ or need to run in 32 bits, you can use SFIO from AT&T. --- end of excerpt from the FAQ Questions marked with a * or + have been changed or added since the FAQ was last posted The most recently posted version of the FAQ is available from -- 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.