Skip to main content

Exciting new changes are coming to the Knowledge Base site soon!
Starting April 4, 2023, you will notice Support-Specific categorization and improvements to the search filters on the site. In May, we will be launching a new and enhanced Site UI and Navigation. To know more, read our Knowledge Article.

NetApp Knowledge Base

What directory structure should I use to avoid maxdirsize issues?

Views:
1,330
Visibility:
Public
Votes:
1
Category:
ontap-9
Specialty:
core
Last Updated:

 

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 structure

A single directory with many files

maxdirsize issues maxdirsize issues
Wide directory structure

Many top-level directories with files spread across directories.

maxdirsize issues maxdirsize issues
Deep directory structure

Fewer top-level directories, but with many subfolders; files spread across directories.

maxdirsize issues maxdirsize issues
  • If flat directory structures are unavoidable, pay close attention to the maxdirsize values for the volume and increase them as necessary.
  • NFS path lengths are defined by the client OS.
  • For information about SMB path lengths, see this Microsoft Dev Center link.

 

Scan to view the article on your device