AppleShare File Server 2.0.x: File Limits and Memory

Are there any limits imposed by AppleShare File Server as far as the following parameters are concerned?

1) Total number of files per volume.
2) Total number of files in a folder.
3) Total number of files on the file server.
4) Total number of open files.
5) The memory used by open and closed files?

Is it possible that a large number of files can cause memory problems on AppleShare File Servers?
AppleShare does not impose any additional limits that HFS does not. HFS and AppleShare allow the following:

1) Total number of files per volume.
A count of the total number of files and directories on the volume is maintained, as a LongInt, in the master directory block (block 2). Directory IDs are also LongInts. This limits the number of files and folders on the volume to 2^32-1 (roughly 4.3 billion). That many folders could be created as long as there's room on the volume to hold the expanding catalog B*-Tree. Because each file occupies at least one allocation block, all of the, at most, 65,536 allocation blocks (also numbered by Integers) will be allocated just before that many files are written on the volume. 65,536 is the maximum number of files on an HFS volume.

2) Total number of files in a folder.
There is another limitation imposed: a directory's valence is an Integer, and, furthermore, on GetCatInfo requests, any negative number in the ioFlIndex field is interpreted as a request for information on the directory itself. So, while HFS allows the creation of up to 65,536 files in each directory, all of which can be accessed by name, only 32,767 can be enumerated--a real limitation on folder contents. In practice, the user's patience will run out well before this many items can be enumerated.

3) Total number of files on the file server.
The maximum number of files on a file server vary depending on the version of AppleShare you use.

AppleShare 2.0.x allows 16 volumes: 16 x 65,536 = 1,048,576

AppleShare 3.0.x and later allows 50 volumes: 50 x 65,536 = 3,276,800


4) Total number of open files.
If the server is equipped with 1MB, the default maximum number of files that can be opened is 80. If you increase the server's RAM to 2MB, the default maximum number of files that can be opened also increases to 160.

The number of FCBs is pointed at by the value in $34E (hex). The number of FCBs is indicated in the first word in that table. On a 1MB machine, the default value is $1D62; on a 2MB server, the value is $3AC2. There is a one-to-one relationship between the File Control Blocks and the number of individual files you can have opened; that is, each file uses one FCB.

An easy solution to problems involving "too many files" is to increase the amount of RAM. If you increase the FCB, you, potentially, would subject your server to system errors, possibly at times when you are maximizing RAM usage.

With servers now having more RAM, there are maximum limits for open files. They are as follows:

AppleShare Pro . . . . . . . 5000
AppleShare 4.2.x . . . . . 3000 *
AppleShare 4.x . . . . . . . 346
AppleShare 3.x . . . . . . . 346
AppleShare 2.0.1 . . . . . 160
Personal File Sharing . . 346

* 3000 instances of 346 unique files.

5) The memory used by open and closed files?
Closed files use no RAM space at all. Just opening a file uses no memory either, but it does take an FCB. Loading the resources into memory uses more memory, and how much depends on the particular files.

And finally, no, an AppleShare File Server is not encumbered by a volume or volumes with a large number of files because it does not cache any of the file directory information.
Published Date: Feb 18, 2012