stdio in smbd

David Collier-Brown davecb at canada.sun.com
Mon Feb 25 11:20:02 GMT 2002


Eric Dirks wrote:
> 
> The stdio library on Sun architecture is limited to file descriptors less than 256 and this
> limitation is being encountered with some regularity in our smbd processes.
[...]

 These problems don't happen unless your clients use a lot
> of open files but a group of our users here seem to have 200-400 open files almost all the time.
> 
> Is anyone working to convert the stdio calls to other functions using file descriptors? 

	Not that I know of: The lower
limit is 0x100 (256), the upper is  1024 (see sysdef on
you machine; my Slolaris 8 (:-)) system says
*
* Process Resource Limit Tunables (Current:Maximum)
*
          Infinity:Infinity             cpu time
          Infinity:Infinity             file size
          Infinity:Infinity             heap size
0x0000000000800000:Infinity             stack size
          Infinity:Infinity             core file size
0x0000000000000100:0x0000000000000400   file descriptors
          Infinity:Infinity             mapped memory


The per-process limit can be set via the ulimit -n command in ksh,
if I remember correctly. 

The limit can be set to 1024 for any 32-bit Solaris
process, and to huge values on 64-bot OSs for 64-bit
smbds by adding the follwoing to /etc/system anbd
then setting ulimit:

set rlim_fd_max = 4096
set rlim_fd_cur = 4096

--dave 
-- 
David Collier-Brown,           | Always do right. This will gratify 
Performance & Engineering      | some people and astonish the rest.
Americas Customer Engineering, |                      -- Mark Twain
(905) 415-2849                 | davecb at canada.sun.com




More information about the samba-technical mailing list