Messages in this thread | | | Date | Wed, 30 Sep 2009 18:34:47 -0400 | From | Theodore Tso <> | Subject | Re: ext4/reiser3/btr directory create/read perf |
| |
On Wed, Sep 30, 2009 at 09:44:04PM +0200, wbrana@gmail.com wrote: > > Times with 1000 directories and dir_index enabled > /mnt/md8: 64 kB chunks > reiser3 > void cfs::vdirs_create(): 973 msec > void cfs::vdirs_read(): 60 msec > ext4 > void cfs::vdirs_create(): 2435 msec > void cfs::vdirs_read(): 3326 msec > btrfs > void cfs::vdirs_create(): 1036 msec > void cfs::vdirs_read(): 155 msec > > ext4 was 55 times slower than reiser3 in vdirs_read()
On a micro brenchmark, simply creating an empty directory will much faster in pure b-tree oriented filesystems, since it's just a node insert. So yes, reiser3 will always be faster for mkdir(), and there's not much that can be done about it.
I suppose we could implement XFS-style short-form directories (where the directory is stored in i_blocks, which would work for directories with 4 or fewer directory entries with short names), but it's not clear it's really worth it, since in practice, there are very few directories that have really small number of entries, and there's a lot more regarding real-world performance than just creating empty directories.
- Ted
| |