[comp.sys.mac.system] Limit on number of files/resources per volume?

daniel@sickkids.UUCP (Daniel Guerin) (11/14/90)

I am planning to put a large number of small files on a single
unpartitioned large disk.  I remember reading somewhere that there
was some upper limit on the number of files that one could put on
a single volume.  I may have been instead a limit related to a number
of resources.

Could somebody tell me if there are such limitations, and if so what
they are.  I could not find any limit documented in IM or the technotes.

Thanks in advance.


Daniel Guerin, Computer Coordinator
Research Institute, The Hospital for Sick Children, Toronto
daniel@sickkids.toronto.edu

andyp@treehouse.UUCP (Andy Peterman) (11/15/90)

In article <424@sickkids.UUCP> daniel@sickkids.UUCP (Daniel Guerin) writes:
>I am planning to put a large number of small files on a single
>unpartitioned large disk.  I remember reading somewhere that there
>was some upper limit on the number of files that one could put on
>a single volume.  
>Could somebody tell me if there are such limitations, and if so what
>they are.  I could not find any limit documented in IM or the technotes.

The theoretical limit is  65536 files.  The data for a file is stored in
an allocation block, which is a multiple of 512 bytes.  If a file saves
just one byte, then it uses up an entire allocation block.  Since a
volume can only have a maximum of 65536 allocation blocks, then this
would seem to be the maximum number of files.

However, since an allocation block is a multiple of 512, then a volume
may not be able to hold a full 65536 blocks.  For example, an 80 Meg
volume would use an allocation block of 1536 bytes each and could hold
about 54600 blocks.  This would be your limit on this volume assuming
each file had only one fork and that fork had 1536 bytes or less.

I don't believe the HFS directory system has a file limit, although as
you add files, the directory will increase in size using up some of the
allocation blocks as it goes.

Hope this helps...

-- 
Andy Peterman                       |   Opinions expressed
treehouse!andyp@gvgpsa.gvg.tek.com  | are definitely those of
(916) 273-4569                      |      my employer!

awessels@ccwf.cc.utexas.edu (Allen Wessels) (11/15/90)

In article <645@treehouse.UUCP> andyp@treehouse.UUCP (Andy Peterman) writes:

>I don't believe the HFS directory system has a file limit, although as
>you add files, the directory will increase in size using up some of the
>allocation blocks as it goes.

I think there is also a limit on the number of resources the Desktop file can
handle (the number 2500 comes to mind.)  There is also a practical performance
limit on the number of files in a folder.  for example, I have a folder full of
text files (about 850) that can take a couple of minutes or more to open.

andyp@treehouse.UUCP (Andy Peterman) (11/15/90)

In article <39730@ut-emx.uucp> awessels@ccwf.cc.utexas.edu (Allen Wessels) writes:
>I think there is also a limit on the number of resources the Desktop file can
>handle (the number 2500 comes to mind.)  There is also a practical performance
>limit on the number of files in a folder.  for example, I have a folder full of
>text files (about 850) that can take a couple of minutes or more to open.

The Desktop file only deals with applications - if you're just creating
documents, then it shouldn't be a problem.  Also, it's just Finder that
has the problem with many files in a folder.  Most applications
shouldn't mind (although I'd hate to try opening a specific file with
the Open dialog).

-- 
Andy Peterman                       |   Opinions expressed
treehouse!andyp@gvgpsa.gvg.tek.com  | are definitely those of
(916) 273-4569                      |      my employer!