What directory structure should I use to avoid maxdirsize issues?
Applies to
- ONTAP 9
- Cloud Volumes ONTAP
- Data ONTAP 8
- Maximum Directory size
Answer
The best way to reduce the performance effect in directories with large numbers of files is to spread files across more directories in the file system.
- Newer platforms offer more memory and CPU capacity, and AFF systems provide performance benefits for high-file-count environments.
- The maxdirsize value can be a concern when you are using flat directory structures, where a single folder contains millions of files at a single level.
- Folder structures where files, folders, and subfolders are interspersed have a low impact on maxdirsize.
There are several directory structure methodologies
- For the best performance, avoid flat directory structures in ONTAP if at all possible.
- Wide or deep directory structures work best, as long as the path length of the file or folder does not exceed NAS protocol standards.
Directory Structure | Layout | Recommended |
Flat directory structureA single directory with many files |
||
Wide directory structureMany top-level directories with files spread across directories. |
||
Deep directory structureFewer top-level directories, but with many subfolders; files spread across directories. |
||
|