Optimal range on inode count for a single folder
I would like to find out what the limitation, or optimal range on inode count for a single folder is in GPFS. We have several users that have caused issues with our current files system by adding up to a million small files (1 ~ 40k) to a single directory. This causes issues during system remount where restarting the system can take excessive amounts of time.
There is no single "optimal" number of files per directory. GPFS can handle millions of files in a directory, rather efficiently. It uses fairly modern extensible hashing and caching techniques that makes lookup, insertions and deletions go fast. But of course, reading or "listing" all directory entries is going to require reading all the disk sectors that contain the directory... "during system remount... restarting the system" -- NO! There is no relation between directory sizes and mount and startup times... If you are experiencing long mount times, something else is happening. IF restart is after a crash of some kind, then it is possible GPFS may need to process many log entries -- but that would be proportional to the number of directory updates "in flight" at the time of the crash... Having said that there are some changeover conditions in the way directories are stored, as one adds more and more entries. Since directory entries are of variable size, varying with the size of the file names, the exact numbers depend on file name length, inode size and (meta)data block size: A) All directory entries fit in the directory inode. Best performance! But I do not recommend deliberately changing apps to avoid spilling to ... B) All directory entries fit in one metadata block. C) Directory entries are spread over several blocks. You can determine how much storage a directory is using by a `stat /path` command or equivalent. From: "Michael Dutchak" <Michael.Dutchak@ibm.com> To: gpfsug-discuss@spectrumscale.org Date: 09/11/2018 09:21 AM Subject: [gpfsug-discuss] Optimal range on inode count for a single folder Sent by: gpfsug-discuss-bounces@spectrumscale.org I would like to find out what the limitation, or optimal range on inode count for a single folder is in GPFS. We have several users that have caused issues with our current files system by adding up to a million small files (1 ~ 40k) to a single directory. This causes issues during system remount where restarting the system can take excessive amounts of time. _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
I am not sure I can provide you an optimal range but I can list some factors to consider. In general the guideline is to keep directories to 500K files or so. Keeping your metadata on separate NSDs, and preferably fast NSDs, helps especially with directory listings. And running the latest version of Scale also helps. It is unclear to me why the number of files in a directory would impact remount unless these are exported directories and the remount is occurring on a user node that also attempts to scan through the directory. Fred __________________________________________________ Fred Stock | IBM Pittsburgh Lab | 720-430-8821 stockf@us.ibm.com From: "Michael Dutchak" <Michael.Dutchak@ibm.com> To: gpfsug-discuss@spectrumscale.org Date: 09/11/2018 09:21 AM Subject: [gpfsug-discuss] Optimal range on inode count for a single folder Sent by: gpfsug-discuss-bounces@spectrumscale.org I would like to find out what the limitation, or optimal range on inode count for a single folder is in GPFS. We have several users that have caused issues with our current files system by adding up to a million small files (1 ~ 40k) to a single directory. This causes issues during system remount where restarting the system can take excessive amounts of time. _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
participants (3)
-
Frederick Stock -
Marc A Kaplan -
Michael Dutchak
