[comp.protocols.appletalk] Maximum number of open files on AppleShare?

gjb@cs.brown.edu (Gregory Brail) (09/11/90)

Is there a maximum number of files that can be open at once on an
AppleShare server? I administer a network of 13 Macs and a Mac Plus
with 1 MB of RAM running AppleShare. Recently, the network sometimes
gets in the state where no files can be opened from any of the server
volumes. (We get error -54, I think, "Can't open file.") This seems to
happen when all the nodes on the network are in use. It also affects
saving in Microsoft Word -- the error message pops up and the file
becomes "Untitled."

Does this happen because AppleShare can't open enough files? Is there
any way to increase the maxiumum number of files that can be opened,
short of getting an SE/30 or Mac II with lots of RAM for a file
server?

Also, I didn't have this problem until recently, when I made some
changes. Specifically, I started using INITShare for many of the
"diskless" Mac Pluses so I wouldn't have to update 10 startup disks
whenever a new version of the Disinfectant virus-checking INIT comes
along. I imagine this means more files are open on the server, but can
INITShare cause any other unforseen problems?

Thanks for the help.

					-greg


+----------------------------------------------------+
Greg Brail
Internet: gjb@cs.brown.edu  BITNET: gjb@browncs.bitnet
UUCP:	..uunet!brunix!gjb  Home:   (401)273-1172

chrisj@ut-emx (Chris Johnson) (09/15/90)

As it happens, I recently wrote an article on the subject of open file
limits on AppleShare servers and some of the problems you encounter
when you try to exceed them.

Also included are details on getting a piece of software which will
help alleviate these problems.

Rather than summarizing, let me just post the whole article.  I hope
it's of use to someone -- it's helped a number of people on the 
UT Austin campus already.

Cheers,
----Chris (Johnson)
----chrisj@emx.utexas.edu




Reprinted with Permission from the July 1990 issue of "the MicroGram"
(c) 1990 by The University of Texas at Austin

If you're interested in obtaining copies of the MicroGram, send email
to Richard Mendez at:  cdrxm@emx.utexas.edu



"AppleShare:  Busy or Damaged?"

Chris Johnson
Computation Center Microcomputer Technologies
University of Texas at Austin



If you use an AppleShare file server, take a moment to answer a few questions:  
Have you ever seen the "Application is busy or damaged" message when trying 
to run a program that's stored on the server?  Have you ever encountered the 
"Too many files open" message when accessing a file on the server?  How about 
"Couldn't open the file"?  Do applications sometimes fail to start?  Do files 
sometimes refuse to open?  Do the problems mysteriously come and go no matter 
what you do to the file server?

If you answered "yes" to any of those questions, you've probably pondered the 
selfsame question that has often tormented us in Microcomputer Technologies:  
"AppleShare Q is it busy or just damaged?"  The answer depends on how you
look at the problem.

You may not have had occasion to ever notice this, but there's a limit to the 
number of files you can have open at the same time on your Macintosh.  The 
limit originates in an area of memory called the "File Control Block Buffer," 
which is reserved for keeping track of  all the files currently open on the 
machine.  Information concerning each open file is stored in "File Control 
Blocks"  (FCBs) within the buffer.  The size of this buffer determines the 
number of available FCBs which, in turn, corresponds directly to the number of 
files that can be open at once.

Normally, a Macintosh will only support 40 simultaneously open files.  For an 
individual user, this limit is rarely, if ever, a problem.  For a file server, 
however, that limit would be intolerable; if you had 20 Macintoshes on your 
network, each one could only open 2 files from the AppleShare server.  Fortun-
ately for us all, AppleShare always increases the limit to a minimum of 80 
open files.  On a 20 Mac network this would allow for 4 files to be opened 
from the AppleShare server by each Macintosh.  [Note that an AppleShare server 
always keeps at least seven files open for its own use.]  Clearly, this limit 
is reasonable in low- to mid-utilization environments, but it's a serious 
problem in high-utilization environments.

What can be done?  Well, you can buy a Macintosh II or SE/30 for a file server 
and equip it with 2 (or more) megabytes of RAM at which point AppleShare 
automatically increases the number of FCBs to 160.  On that 20 Macintosh 
network, 160 FCBs suddenly means that every Mac can open 8 files from the 
server P a limitation with which many high-utilization environments can 
probably live.

What if you don't happen to have a Macintosh II or SE/30?  You're stuck with 
a limit of 80 open files.  It seems likely that the 80 file limit is intended 
to insure optimum server performance, which is a laudable goal, but what good 
is performance if your users can't run the software they need?  There are 
times when making the system work is more important than making it efficient, 
after all.

In order to determine if your AppleShare server really is running low on 
FCBs, get a copy of "FCB Monitor," a cdev I wrote for the Computation Center 
in order to quantify this problem on our own AppleShare servers.  FCB Monitor 
will tell you the maximum number of files that you can have open, the number 
of files that are currently open, and will display a bar graph showing the 
relationship between the two values.  With FCB Monitor you can determine at 
a glance what sort of load is being placed on your server, and how near your 
server is to its limits.  Recent revisions to FCB Monitor have also given it 
the ability to increase the limit to the number of open files.

When we installed FCB Monitor on the AppleShare servers in the Computation 
Center Microcomputer Laboratory we found that our servers were continuously 
operating at their 80 file limits.  After installing an INIT by Apple's Pete 
Helm entitled "Up Your(FCB)s" which increased the size of the File Control 
Block Buffer such that  it could support 200 simultaneously open files, we 
found that we frequently required as many as 150 files to be open on each 
server.  So it was no wonder that our users had been having problems with 
operations like launching applications from the servers; we needed to be 
serving fully 70 more files than the servers would normally support in order 
for our facility, which is heavily dependent on its servers, to run properly.  
[We have since found that our servers actually peak somewhere in the low 
two hundreds.]

Since this problem is unlikely to be isolated to our microcomputer labor-
atory, we would encourage anyone responsible for an AppleShare server to 
get a copy of "FCB Monitor" and install it on their server.  If you find 
your server frequently running at or near its limit, try using FCB Monitor 
or an equivalent utility to increase the limit.

In the future perhaps we'll see an advanced configuration option added to 
AppleShare that'll make it possible to monitor and alter your open file 
limit without recourse to extra INITs and cdevs, but, for now, at least 
there's a solution.



Where to Find FCB Monitor:
--------------------------

FCB Monitor 1.0 is available for anonymous ftp from:

	ix1.cc.utexas.edu   or   ix2.cc.utexas.edu

It lives in the following directory:

	microlib/mac/cdev

And has the following name:

	fcb-monitor-10.hqx



Quick Disclaimer:
-----------------

FCB Monitor is provided on an "as-is" basis.  It's worked well for us, but
your mileage may vary.