LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-14-2005, 02:13 PM   #1
pankajlele
LQ Newbie
 
Registered: Jul 2005
Location: India
Posts: 2

Rep: Reputation: 0
File system


Hi Everybody!

I am working on a project which needs to create a big directory structure.

How many directories can i create under a directory ? e.g. Can i create 4,00,000 directories under one directory ? Does it affect performance at all ?

Waiting for your reply..

Pankaj
 
Old 07-14-2005, 02:37 PM   #2
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
There shouldn't be any performance lost but keep in mind you need 1 inoed for every directory, mean you won't be able to create 4 millions sub-directory on the "usual" filesystem. You will probably need to _at least_ use some weird formatting options to make sure you won't run out of inode. You might even need to tweak the filesystem (as 4,000,000 is quite huge!).

You can go really deep into one directory but if I remember right, there is a limit build into the kernel to avoid easy DDOS risk, probably something like 1024 or 65536. But you can probably disable this.
 
Old 07-14-2005, 02:56 PM   #3
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
I believe ReiserFS would be your best choice for doing this, if it's really what you want to do. I would avoid it, because there are ways to organize data much more efficiently.
 
Old 07-15-2005, 02:14 AM   #4
pankajlele
LQ Newbie
 
Registered: Jul 2005
Location: India
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks for the quick replies.

Half_Elf its 4,00,000 not 4 million


Anyways..

Would it be a good idea if I split the dir structure and put 10,000 in a directory ? So I will have 40 directories each containing 10,000 directories and i don't need to worry about performance.

Thanks!
 
Old 07-15-2005, 09:10 AM   #5
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Quote:
Originally posted by pankajlele
Thanks for the quick replies.

Half_Elf its 4,00,000 not 4 million


Anyways..

Would it be a good idea if I split the dir structure and put 10,000 in a directory ? So I will have 40 directories each containing 10,000 directories and i don't need to worry about performance.

Thanks!
That should significantly boost performance.
 
Old 07-15-2005, 09:48 AM   #6
Ben2210
Member
 
Registered: Feb 2004
Location: Toronto
Distribution: Arch
Posts: 146

Rep: Reputation: 16
You might want to try Reiser4.
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
File recovery after partition table damage - XFS file system gracecourt Linux - General 4 09-28-2017 05:29 PM
An error Occurred during the file system check. Dropping you to shell; the system wil aneikei Linux - Newbie 3 02-11-2010 07:38 PM
How to read .chm file in fedora, can't mount ntfs file system ishti_du Linux - Newbie 12 03-06-2007 03:27 AM
figuring out 'file system' and 'swap file system' types TrulyTessa Linux - Newbie 3 09-26-2005 06:46 PM
System complains failing automounting file system aladin Linux - Hardware 1 08-30-2005 10:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration