Operating System - HP-UX
1835673 Members
2973 Online
110082 Solutions
New Discussion

HPUX Directory Structures

 
Wayne Bliss_2
New Member

HPUX Directory Structures

In my previous life as an OpenVMS admin, I found that the file lookup method used would cause the system do go from indexed lookups to sequential if we exceeded a certain number of files in a directory. This had rather severe performance implications. Is there a similar issue on HPUX systems, where either depth of directories and/or number of files per directory can affect performance? If so, does anyone know what those limitations are and where I can get documentation of them?
2 REPLIES 2
A. Clay Stephenson
Acclaimed Contributor

Re: HPUX Directory Structures

Depth of directories is no problem but number of files per directory is. All directory searches are linear so that average access is directly proportional to n. If you are having to ask this question then you are probably approaching the limits. In any event, if you are considering more than a few thousand files per directory, you are also considering a bad design. This is not to say that the filesystem will not support millions of files per directory, it will but directory searches are going to take longer and longer. The newest vxfs filesystems handle large directories better so look in docs.hp.com for version 5 vsfs documentation
but in this context "better" does not mean good. Directory tree's are very poor substitutes for databases.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: HPUX Directory Structures

Depth of directories is no problem but number of files per directory is. All directory searches are linear so that average access is directly proportional to n. If you are having to ask this question then you are probably approaching the limits. In any event, if you are considering more than a few thousand files per directory, you are also considering a bad design. This is not to say that the filesystem will not support millions of files per directory, it will but directory searches are going to take longer and longer. The newest vxfs filesystems handle large directories better so look in docs.hp.com for version 5 vsfs documentation
but in this context "better" does not mean good. Directory trees are very poor substitutes for databases.
If it ain't broke, I can fix that.