IT Community - Software Programming, Web Development and Technical Support

Limit on Sub-folders / Files in Linux

This is a discussion on Limit on Sub-folders / Files in Linux within the Operating Systems forums, part of the Computer Hardware/Software and Networking category; Hi, I heard that the number of sub-folders / files in a linux directory should not exceed 32,000 . There ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Computer Hardware/Software and Networking > Operating Systems

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 03-30-2008, 09:08 PM
bluesky bluesky is offline
D-Web Analyst
 
Join Date: Jun 2007
Posts: 201
bluesky is on a distinguished road
Default Limit on Sub-folders / Files in Linux

Hi,

I heard that the number of sub-folders / files in a linux directory should
not exceed 32,000 . There is not enough material available in the net.

I am maintaining a blogging server in my company, using Wordpress MU. If
the sub-folders limit is true, then it will critically affect the
application that we are running.

We are using RHEL 4 with ext3 file system.

Can any one provide some details on this..?

Thanks in advance
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-30-2008, 09:15 PM
arjkhanna arjkhanna is offline
D-Web Genius
 
Join Date: Mar 2007
Posts: 1,102
arjkhanna is on a distinguished road
Default Re: Limit on Sub-folders / Files in Linux

Quote:
Originally Posted by bluesky View Post
Hi,

I heard that the number of sub-folders / files in a linux directory should
not exceed 32,000 . There is not enough material available in the net.

I am maintaining a blogging server in my company, using Wordpress MU. If
the sub-folders limit is true, then it will critically affect the
application that we are running.
.....
........
.........
How?

To begin with, I have no experience/knowledge on this.

I only suppose that there is a limit on the number of inodes one can
have.

I think it is possible to raise the limit by changing a #define and
recompiling the kernel. Or there could be other file system specific
fixes.

As to possible choices between file systems under linux again I dunno
much. I would imagine that XFS is good.

Just a wild idea. If you have a problem with this, how about using some
kind of virtual machine? Say qemu or UML?

You could split up the load across them.

Xen is also a good choice.

Anyway already I am out of my province.

Best of luck!
__________________
A.Rajesh Khanna
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-30-2008, 09:40 PM
satheesh satheesh is offline
D-Web Programmer
 
Join Date: Aug 2007
Posts: 95
satheesh is on a distinguished road
Default Re: Limit on Sub-folders / Files in Linux

Quote:
Originally Posted by bluesky View Post
Hi,

I heard that the number of sub-folders / files in a linux directory should
not exceed 32,000 .
.....
...
Yes, you are right, it is not allowing to create more than 32000 subfolders.
This is what I tried
-bash-2.0# for (( i = 0 ; i <= 32001; i++ )); do mkdir test$i;
done
at the end around 3199x count i got the message,
"cannot create directory `last': Too many links"
I used http://linuxzoo.net/ Fedora image as my test machine,

Thanks
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 03-30-2008, 10:02 PM
bluesky bluesky is offline
D-Web Analyst
 
Join Date: Jun 2007
Posts: 201
bluesky is on a distinguished road
Default Re: Limit on Sub-folders / Files in Linux

Thank you friends

Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 03-31-2008, 11:00 PM
shaalini shaalini is offline
D-Web Analyst
 
Join Date: Apr 2007
Posts: 342
shaalini is on a distinguished road
Default Re: Limit on Sub-folders / Files in Linux

But honestly, 32000 subfolders in the same level sounds scary to me.
__________________
Shaalini.S
Be the Best of Whatever you are...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 03-31-2008, 11:03 PM
JSureshkumar JSureshkumar is offline
D-Web Sr.Programmer
 
Join Date: Feb 2007
Location: in someone's heart
Posts: 139
JSureshkumar is on a distinguished road
Send a message via Skype™ to JSureshkumar
Default Re: Limit on Sub-folders / Files in Linux

Quote:
Originally Posted by shaalini View Post
But honestly, 32000 subfolders in the same level sounds scary to me.
...
....
I hope, the limit is hardcoded in the FS header files.

$ grep 32000 /usr/include/linux/*

ext2_fs.h:#define EXT2_LINK_MAX 32000
ext3_fs.h:#define EXT3_LINK_MAX 32000
ufs_fs.h :#define UFS_LINK_MAX 32000

Thanks
__________________
J Suresh Kumar
Google Hacks
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Max User Connection, can limit be increased? senraj PHP Programming 2 12-03-2007 01:59 AM
File Upload Size Limit KiruthikaSambandam ASP and ASP.NET Programming 9 09-27-2007 03:16 AM
How do I limit the number of rows I get out of my database sans PHP Programming 1 09-12-2007 12:20 AM
How to access files and folders inside a ftp site? Sathish Kumar C# Programming 4 07-02-2007 07:29 AM
Limit to $_GET and $_POST method Jeyaseelansarc PHP Programming 1 05-11-2007 12:14 AM


All times are GMT -7. The time now is 01:14 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0