Actually, the one that'll hurt most is ironically the most closely 
related to bad database schema design... With a zillion files in the one 
directory, if someone does an 'ls' in that directory, it'll not only 
take ages, but steal a whole heap of memory and compute power...

Provided the only things that'll be doing *anything* in that directory 
are using indexed methods, there is no real problem from a ZFS 
perspective, but if something decides to list (or worse, list and sort) 
that directory, it won't be that pleasant.

Oh - That's of course assuming you have sufficient memory in the system 
to cache all that metadata somewhere... If you don't then that's another 
zillion I/O's you need to deal with each time you list the entire directory.

an ls -1rt on a directory with about 1.2 million files with names like 
afile1202899 takes minutes to complete on my box, and we see 'ls' get to 
in excess of 700MB rss... (and that's not including the memory zfs is 
using to cache whatever it can.)

My box has the ARC limited to about 1GB, so it's obviously undersized 
for such a workload, but still gives you an indication...

I generally look to keep directories to a size that allows the utilities 
that work on and in it to perform at a reasonable rate... which for the 
most part is around the 100K files or less...

Perhaps you are using larger hardware than I am for some of this stuff? :)

Nathan.

On  1/10/08 07:29 AM, Toby Thain wrote:
> On 30-Sep-08, at 7:50 AM, Ram Sharma wrote:
> 
>> Hi,
>>
>> can anyone please tell me what is the maximum number of files that  
>> can be there in 1 folder in Solaris with ZSF file system.
>>
>> I am working on an application in which I have to support 1mn  
>> users. In my application I am using MySql MyISAM and in MyISAM  
>> there is 3 files created for 1 table. I am having application  
>> architechture in which each user will be having separate table, so  
>> the expected number of files in database folder is 3mn.
> 
> That sounds like a disastrous schema design. Apart from that, you're  
> going to run into problems on several levels, including O/S resources  
> (file descriptors) and filesystem scalability.
> 
> --Toby
> 
>> I have read somewhere that there is a limit of each OS to create  
>> files in a folder.
>> --
>> This message posted from opensolaris.org
>> _______________________________________________
>> zfs-discuss mailing list
>> zfs-discuss@opensolaris.org
>> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
> 
> _______________________________________________
> zfs-discuss mailing list
> zfs-discuss@opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

-- 


//////////////////////////////////////////////////////////////////
// Nathan Kroenert              [EMAIL PROTECTED]               //
// Senior Systems Engineer      Phone:  +61 3 9869 6255         //
// Global Systems Engineering   Fax:    +61 3 9869 6288         //
// Level 7, 476 St. Kilda Road                                  //
// Melbourne 3004   Victoria    Australia                       //
//////////////////////////////////////////////////////////////////
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to