[OpenIndiana-discuss] Access to ZFS viz CIFS from windows regularly hangs.

James Carlson carlsonj at workingcode.com
Thu Jun 28 15:01:21 UTC 2012


John McEntee wrote:
> Is the open files going to cause CIFS a problem, 256 seems a bit low, could
> easily hit that limit if it is shared amongst all the users.

"man ulimit" and "man getrlimit" for details.  That's a limit on the
number of file descriptors open in any one user process.  It has nothing
to do with the kernel, and shouldn't have anything to do with CIFS.

The default is 256 in order to keep binary compatibility with
fileno(3C).  That library "function" was once (very long ago) defined as
a macro that read a uchar_t directly from the FILE * pointer.  In the
modern implementation, it is a function, and allows a huge number of
open files, but if you were running ancient SunOS binaries, you would
want to be able to avoid problems.

In any event, 256 is darned large for most reasonable applications,
where pfiles will show a few dozen open descriptors.  You can bump it up
if you like; the normal maximum is 64K.  I would recommend bumping it up
*only* when launching programs that really need to have a large number
of descriptors open at once, such as single-process web servers.
Otherwise, a malfunctioning program can really bog things down.  (I'd
expect that most such programs already use setrlimit(2) to do something
reasonable here ...)

-- 
James Carlson         42.703N 71.076W         <carlsonj at workingcode.com>



More information about the OpenIndiana-discuss mailing list