About a Solaris system-wide file descriptor limit: The Solaris open() syscall is handled by copen() (common open), which allocates a new file descriptor using falloc(). It's falloc() that can fail due to a limit (usr/src/uts/common/os/fio.c, and this is illumos-joyent based on snv_147): 1034 /* 1035 * Allocate a user file descriptor and a file structure. 1036 * Initialize the descriptor to point at the file structure. 1037 * If fdp is NULL, the user file descriptor will not be allocated. 1038 */ 1039 int 1040 falloc(vnode_t *vp, int flag, file_t **fpp, int *fdp) 1041 { 1042 file_t *fp; 1043 int fd; 1044 1045 if (fdp) { 1046 if ((fd = ufalloc(0)) == -1) 1047 return (EMFILE); 1048 } EMFILE is "Too many open files". ufalloc() just calls ufalloc_file(): 986 /* 987 * Allocate a user file descriptor greater than or equal to "start". 988 */ 989 int 990 ufalloc(int start) 991 { 992 return (ufalloc_file(start, NULL)); 993 } ufalloc_file() checks filelimit: 933 /* 934 * This is a combination of ufalloc() and setf(). 935 */ 936 int 937 ufalloc_file(int start, file_t *fp) 938 { 939 proc_t *p = curproc; 940 uf_info_t *fip = P_FINFO(p); 941 int filelimit; 942 uf_entry_t *ufp; 943 int nfiles; 944 int fd; 945 946 /* 947 * Assertion is to convince the correctness of the following 948 * assignment for filelimit after casting to int. 949 */ 950 ASSERT(p->p_fno_ctl <= INT_MAX); 951 filelimit = (int)p->p_fno_ctl; 952 953 for (;;) { 954 mutex_enter(&fip->fi_lock); 955 fd = fd_find(fip, start); 956 if (fd >= 0 && fd == fip->fi_badfd) { 957 start = fd + 1; 958 mutex_exit(&fip->fi_lock); 959 continue; 960 } 961 if ((uint_t)fd < filelimit) 962 break; 963 if (fd >= filelimit) { 964 mutex_exit(&fip->fi_lock); 965 mutex_enter(&p->p_lock); 966 (void) rctl_action(rctlproc_legacy[RLIMIT_NOFILE], 967 p->p_rctls, p, RCA_SAFE); 968 mutex_exit(&p->p_lock); 969 return (-1); 970 } 971 /* fd_find() returned -1 */ 972 nfiles = fip->fi_nfiles; 973 mutex_exit(&fip->fi_lock); 974 flist_grow(MAX(start, nfiles)); 975 } 976 977 UF_ENTER(ufp, fip, fd); 978 fd_reserve(fip, fd, 1); 979 ASSERT(ufp->uf_file == NULL); 980 ufp->uf_file = fp; 981 UF_EXIT(ufp); 982 mutex_exit(&fip->fi_lock); 983 return (fd); 984 } Which is defined on line 951 as the process file limit, which is defined in proc_t: 330 rlim64_t p_fno_ctl; /* currently enforced file-desc limit */ There is no other limit on the scene. I've seen nothing to indicate that Solaris has a system-wide file descriptor limit. ... Lets look at a different OS. Here is the Mac OS X kernel, which is BSD based. It calls its function fdalloc(), not falloc(). In bsd/kern/kern_descrip.c (xnu-1504.7.4): 2328 /* 2329 * fdalloc 2330 * 2331 * Description: Allocate a file descriptor for the process. 2332 * 2333 * Parameters: p Process to allocate the fd in 2334 * want The fd we would prefer to get 2335 * result Pointer to fd we got 2336 * 2337 * Returns: 0 Success 2338 * EMFILE 2339 * ENOMEM 2340 * 2341 * Implicit returns: 2342 * *result (modified) The fd which was allocated 2343 */ 2344 int 2345 fdalloc(proc_t p, int want, int *result) 2346 { 2347 struct filedesc *fdp = p->p_fd; 2348 int i; 2349 int lim, last, numfiles, oldnfiles; 2350 struct fileproc **newofiles, **ofiles; 2351 char *newofileflags; 2352 2353 /* 2354 * Search for a free descriptor starting at the higher 2355 * of want or fd_freefile. If that fails, consider 2356 * expanding the ofile array. 2357 */ 2358 #if DIAGNOSTIC 2359 proc_fdlock_assert(p, LCK_MTX_ASSERT_OWNED); 2360 #endif 2361 2362 lim = min((int)p->p_rlimit[RLIMIT_NOFILE].rlim_cur, maxfiles); 2363 for (;;) { 2364 last = min(fdp->fd_nfiles, lim); 2365 if ((i = want) < fdp->fd_freefile) 2366 i = fdp->fd_freefile; 2367 for (; i < last; i++) { 2368 if (fdp->fd_ofiles[i] == NULL && !(fdp->fd_ofileflags[i] & UF_RESERVED)) { 2369 procfdtbl_reservefd(p, i); 2370 if (i > fdp->fd_lastfile) 2371 fdp->fd_lastfile = i; 2372 if (want <= fdp->fd_freefile) 2373 fdp->fd_freefile = i; 2374 *result = i; 2375 return (0); 2376 } 2377 } 2378 2379 /* 2380 * No space in current array. Expand? 2381 */ 2382 if (fdp->fd_nfiles >= lim) 2383 return (EMFILE); lim is set on line 2362 to be the max of a process limit and a global variable called "maxfiles", which is defined in bsd/conf/param.c as: 96 #define MAXFILES (OPEN_MAX + 2048) 97 int maxfiles = MAXFILES; OPEN_MAX is in bsd/sys/syslimits.h: 88 #define OPEN_MAX 10240 /* max open files per process - todo, make a config option? */ So, this OS does indeed have a system-wide max for file descriptors, and one that is pretty low: root@macbook:~> dtrace -n 'BEGIN { trace(`maxfiles); exit(0); }' dtrace: description 'BEGIN ' matched 1 probe CPU ID FUNCTION:NAME 0 1 :BEGIN 12288 12k. This one-liner won't work on Solaris, since it doesn't have a kernel global "maxfiles" variable: # dtrace -n 'BEGIN { trace(`maxfiles); exit(0); }' dtrace: invalid probe specifier BEGIN { trace(`maxfiles); exit(0); }: in action list: failed to resolve `maxfiles: Unknown symbol name Brendan