Portal Home > Knowledgebase > Articles Database > is ufs slower then ext2 for lots of files in a single directory?


is ufs slower then ext2 for lots of files in a single directory?




Posted by nkad, 08-23-2007, 02:47 PM
We used Red Hat with ext2 as our file system on an old server with 100k+ of image files in a single directory. This seemed to preform ok until we switched to FreeBSD using UFS. Now images load very slow. I have read that Ext2 uses and internal hash to speed lookups, while UFS does linear searches for lookups. Is this correct?

Posted by dexxtreme, 08-25-2007, 12:40 AM
I don't know the specific details about internal filesystem lookups, however I do know that having 100k+ files in a single directory is a major problem waiting to happen. Your best bet would be to figure out how to reconfigure your site to split some of those files out into subdirectories.

Posted by ximi, 08-25-2007, 03:07 AM
Try ReiserFS (if you don't care about the whole murder thing), it can scale to lots and lots of small files in the same directory. XFS also works works well. ext3 poops out with a few thousand unless you have htrees to improve scaling but still doesn't scale as well as ReiserFS or XFS.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read