Operating System - HP-UX
1834457 Members
2677 Online
110067 Solutions
New Discussion

Re: practical limits of files system

 
Tim Killinger
Regular Advisor

practical limits of files system

In UX 11.0 - Is there a practical limit on the number of directories that can exist within a directory?? i.e.
/dir/dir2 ....dir2 might contain 1100 directories. should we work to break this down for practical reasons relating to file system performance???
6 REPLIES 6
Pete Randall
Outstanding Contributor
Steven E. Protter
Exalted Contributor

Re: practical limits of files system

If there are too many directories, system performance will be degraded, especially if you use nfs or cifs/9000/samba to share the directories.

You can measure these issues by running the attached performance data collection script while at the same time running normal access from your application or however you do it.

1100 directies can be created, though the performance impact depends on a lot of factors.

Script is production, easy to understand, runs in the background and the data collection time period can be modified.

Its not terribly well documented, HP gave it to me.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Michael Steele_2
Honored Contributor

Re: practical limits of files system

Inodes link files and directories, can be measured with sar and won't have a hard limit by file system. Inodes are a system wide parameter, ninode, measured with:

sar -v 5 5

Also refer to ulimit and the maxdsiz kernel parameters which will limit processes and users, or, disk quotas via edquota.
Support Fatherhood - Stop Family Law
Bill Hassell
Honored Contributor

Re: practical limits of files system

Massive numbers of subdirectories can be slower to search but will have no effect once the inode has been cached. So, it would be slow to locate the path (a flat collection of directories at a single level is faster than long subdirectory chains) but once the file(s) are open, there is little effect on read/write performance.

That being said, 1100 directories is not a lot and other than the obvious issues with doing an ls or ll, it shouldn't be too bad. However, a 3-4 level hierarchy would much easier to manage.


Bill Hassell, sysadmin
Gary Yu
Super Advisor

Re: practical limits of files system

there's a kernel parameter "vx_maxlink" which set the max number of subdiretories.
Uday_S_Ankolekar
Honored Contributor

Re: practical limits of files system