- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- max number of files in a directory
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2006 05:04 AM
04-17-2006 05:04 AM
max number of files in a directory
Is there a maximum number of files that a directory can hold within 11i? Is there a "working" maximum value that should be used?
I know there used to be a performance issue if you had >32000 files in 10.20. What is that number in 11i? or 11.23?
Thanks,
Troy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2006 05:17 AM
04-17-2006 05:17 AM
Re: max number of files in a directory
I did find an old ITRC post stating that there was 20 to 30% in filesystem performance going from 10.20 to 11.00 -- I'm not sure how much of that is related to file structure manipulation improvement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2006 05:19 AM
04-17-2006 05:19 AM
Re: max number of files in a directory
Troy,
there is no limit on the number of files in a directory that I am aware of.
However, as you noted, there can be performance issues when you get a larger number of files in a directory. Lists, sorts,backups, etc can and do take longer to complete. I personnally have seen 100,00+ files in a directory (all under 1K in size) The app owner would not remove/archive the older files even though the backup took over 12 hours!
If you can, archive the older files out on a regular basis (backup to tape and remove from disk, or gzip older files, etc), in order to keep the number of files to a resonable level.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2006 05:38 AM
04-17-2006 05:38 AM
Re: max number of files in a directory
In most cases whenever I see a directory grow beyond a few thousand entries (and even that is marginal) I begin to think there must be a better way. Really horrendus cases try to substitute a filesystem and directory tree for a database.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2006 02:52 PM
04-17-2006 02:52 PM
Re: max number of files in a directory
You can avert most of the issues by simply specifying that these massive directories must be stored on solid state disks (ie, massive RAM boxes that look like a disk). Just calculate the amount of storage needed and present the bill to the applications manager. This usually solves the problem quite rapidly as the app folks are directed to find another way (other than a simple Unix directory) store the logs and PDF files.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2006 10:22 PM
04-17-2006 10:22 PM
Re: max number of files in a directory
The max no of files you can have in a directory depends on the max inodes that the filesystem can have in which your desired directory resides.
The max inodes (which in turn is your max no of files in the filesystem) is determined when you create a filesyetm using mkfs/newfs. This is determined by
max inodes = filesystem size/block size of filesystem.
You can use fstyp to check the parameters of your filesystem
e.g. fstyp -v /dev/vg_migr_01/lvol_uktech
(if you are using LVM)
or
fstyp -v /dev/dsk/c1t0d0
e.g. output
fstyp -v /dev/vg_migr_01/lvol_uktech
vxfs
version: 3
f_bsize: 8192
f_frsize: 8192
f_blocks: 128000
f_bfree: 96163
f_bavail: 95412
f_files: 24832
f_ffree: 24032
f_favail: 24032
f_fsid: 1074790402
f_basetype: vxfs
f_namemax: 254
f_magic: a501fcf5
f_featurebits: 0
f_flag: 16
f_fsindex: 6
f_size: 128000
From the output you can see the block size is f_bsize = 8192 bytes
Max no of files possible = f_files = 24832
No of files that can be created more = f_favail = 24032 - this means I can still create 24302 files in the filesystem.
Hope this helps,
Ninad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2006 04:59 AM
04-18-2006 04:59 AM
Re: max number of files in a directory
Bill Hassell, sysadmin