[SunHELP] (no subject)

Nicholas Dronen sunhelp at sunhelp.org
Tue Aug 7 21:34:36 CDT 2001


On Tue, Aug 07, 2001 at 09:25:38PM +0000, Balaji N wrote:
> Hi Admins
> 
> What is Maximum no. of files that can be created on a File system
> on Solaris Platform. Is it possible the no. files can exceed a million (for 
> some web application)? If any one have useful link regarding pls. let me 
> know.

In a case where a filesystem will contain a massive number
of small files, the filesystem will be large enough for both
the total amount of data the files contain *and* the inodes
in the filesystem.  See the nbpi option in mkfs_ufs(1M).
Since the default number of bytes per inode for a UFS is
2048, you should expect the inodes in the filesystem to
use ~1953 MB.

I hope my math is correct:

	Number of B used by inodes in the filesystem:

		2048 bytes * 1,000,000 = 2,048,000,000 B

	Number of MB used by inodes in the filesystem:

		2,048,000,000 / (1024 * 1024 ) = 1953 MB

Also, it's generally not a good idea to put 1,000,000
files in the same directory.  Leaving aside the question
whether it's possible to have this many files in a directory
on Solaris, having a large number of files in a single
directory can and will, on most systems, obliterate directory
read performance.  A directory read is a linear search,
leaving you generally with O(n) directory read times --
extreme cases like 1,000,000 files have side effects,
however, making the search less efficient and painfully
long.

Regards,

Nicholas



More information about the SunHELP mailing list