URGENT REPOST: Maximum number of files i

MCCALL,DON (HP-USA,ex1) don_mccall at hp.com
Fri Sep 21 09:54:01 GMT 2001

Hi Rob,
The message you are getting is basically a 'warning' from samba; samba uses
the system
call setrlimit() to try to set the RLIMIT_NOFILE based on the max open files
parameter; by default max open files = 10000, and the samba routine
set_maxfiles that calls
setrlimit() tacks on 10 additional to take care of files it knows it's going
to have to have open as well;  what the message is saying is that
setrlimit() was called with a value of 10010, and your system returned the
error 'invalid argument'; take a look at the man page for setrlimit() to see
what's going on there.
In general, the number of files in a SHARE is unlimited; where you run into
problems is when you have a really large number of files in a single
directory; this slows samba down in a number of ways, as when it is
processing certain smb requests that have to scan the directory looking for
a file.

Question; when your smbd was taking up so much time, how many files was the
user trying to copy?  And how many files were in the particular directory
that he was trying to copy into/out of?  You said that you could delete some
files from the share and it would work?
The files deleted were from the same directory that the copy was trying to

If you can 'force' this problem to occur, you might want to do a debug
session with a particular client, setting log level = 10 for that particular
client, then 'forcing' the 
problem, and take a look at the log.machinename for that client when the cpu
useage goes up;  that will give you a better handle on WHAT all that
processing time is being used for.

Hope this helps,

-----Original Message-----
From: rob.leadbeater at lynx.co.uk [mailto:rob.leadbeater at lynx.co.uk]
Sent: Friday, September 21, 2001 9:49 AM
To: samba at lists.samba.org; samba-technical at samba.org
Subject: URGENT REPOST: Maximum number of files i


Is anyone out there using samba to share out over 6.4 million files ?
We've just had our production system grind to a halt again when we hit this,
apparently samba, limitation.

The only noticeable thing that I get from the log files is the following

[2001/09/20 00:32:03, 3] lib/util.c:(1627)
  set_maxfiles: setrlimit for RLIMIT_NOFILE for 10010 max files failed with
error Invalid argument
[2001/09/20 00:32:03, 1] smbd/files.c:(151)
  file_init: Information only: requested 10000 open files, 4086 are

However as I understand it, the max files option is the number of open files
per process, rather than the number of actual files...

Could anyone give me some pointers ??


Rob Leadbeater

 -----Original Message-----
From: rob.leadbeater at lynx.co.uk [SMTP:MIME :rob.leadbeater at lynx.co.uk]
Sent: Thursday, September 06, 2001 5:24 PM
To: samba at lists.samba.org
Subject: Maximum number of files in a samba share


Is there a maximum number of files that can be located in a samba share ?

We're running Samba 2.2.0 on Compaq Tru64 Unix 4.0F.
Everything had been running fine up until yesterday when suddenly we were
getting lots of odd network looking faults.

We eventually pin pointed that an smbd process was taking 99.9% CPU time,
which was related to a Windows machine attempting to copy files onto the

The number of files in the file system which is shared out is currently
6.4 million.
I'm pretty sure that we've not got a unix problem, as creating files
from unix works fine.
Attempting to create files via Windows (NT) eventually gives an
network error".
If I delete some files from the samba share, then the Windows to Unix copy
starts working again...

Any ideas would be greatly welcomed.


Rob Leadbeater

This message is intended only for the use of the person(s) ("The intended
Recipient(s)") to whom it is addressed.  It may contain information which
is privileged and confidential within the meaning of applicable law.  If
you are not the intended recipient, please contact the sender as soon as
possible.  The views expressed in this communication are not necessarily
those held by LYNX Express Limited.

To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba

More information about the samba-technical mailing list