-----Original Message----- From: Greg Freemyer <greg.freemyer@gmail.com> To: opensuse@opensuse.org Subject: Re: [opensuse] home dirs Date: Wed, 15 May 2013 21:39:42 -0400 On Wed, May 15, 2013 at 6:01 PM, Hans Witvliet <suse@a-domani.nl> wrote:
From: Greg Freemyer <greg.freemyer@gmail.com> To: opensuse@opensuse.org Subject: Re: [opensuse] home dirs Date: Wed, 15 May 2013 12:19:27 -0400
On Wed, May 15, 2013 at 5:25 AM, Hans Witvliet <suse@a-domani.nl> wrote:
It is not so much the client i'm worried about: There it is just adding more clients behind a load balancer. I was warned that i should not use ext3 for /home, as you are limited to 30,000 subdirs. For ext4 i know that limit is raised to 60,000. Is there a known ceiling for btrfs?
Quoting wiki "A directory can have at most 31998 subdirectories, because an inode can have at most 32000 links."
So that's 30,000 immediate subdirectories of a single directory, not for the tree of sub-directories. You can go as deep as you want, but only 31998 wide!
I have never seen /home (or the windows equivalent) with more than a few thousand user directories. Are you sure you need to do that. I would hope you would find a way to break them into groups. /home/sales/*, /home/engineering/*, etc. or /home/a-e/* /home/f-m/*, etc.
If you plan to have a single directory with 30K+ subdirectories, you need to do some performance testing of the potential filesystems to see where they fall off from a usability perspective. I've done that with NTFS and it sees significant degradation when you hit 10,000 items in a directory (folder). That's for basic files. I don't know what happens to it for 10's of thousands of sub-directories within a directory, but it can only be worse.
-----Original Message-----
Hi Greg, Your quote is about btrfs?
Well, i need** it wide, not deep... For my org, all the uid are 8 random alphanumerical characters and between 60k and 70k users, with no respect of department or so. To avoid some illogical from the past, i'll have to assume something above the 64K ceiling ;-)
** need is a big word, currently we use subdirs based upon the latest character (A-Z0-9) of their uid, so 36 subdirs. But is something i would like to avoid...
I was talking about ext3. I was curious why there would be a 30,000 sub-directory limit. If you want 70,000+ sub-directories in one directory I would definitely do some performance testing. Just because a FS may support it doesn't mean it will be efficient. A new thread to discuss just that issue is something I would do in your shoes. Greg -----Original Message----- As said, i did some simple tests: Results are attached. I just wanted to know _if_ that many subdirs were supported, and what the I-node overhead would be. Before things start living a life of their own, let me indicate that test (creating subdirs, deleting subdirs) was done on an idle HP-laptop with as I7-cpu on openSUISE_12.1. Absolute numbers may not be relevant to you, but when doing the same test, you should see same relative results.... (i also did other tests with thousands LVM's filled and getting mounted, but that's beyound the thread ;-) What surprised me was that while ext3 (as expected) can not hold 60K subdirs, it predescessor, ext2, had no problems with it, just as ext4. Furthermore xfs, reiser and btrfs go upto a million subdirs. Also these three prove to be way faster than ext234. Finally, vfat proved to be a PITA, no surprise either ;-) As reiser is (sort of) thing of the past, best results gave XFS and btrfs. For both of them their are pro's and con's. As said by lot of others, there are many,many other aspects to consider. hw