At Fri, 8 Jul 2011 21:10:29 -0400, Christopher Berardi <cberardi%natoufa.com@localhost> wrote: Subject: Slow FFSv1 file system performance > > The Windows version was written in C# with a simple loop and each time the > iterator value was converted to a directory path and a call made to the > Directory.Create() function. The NetBSD version was written in C utilizing 3 > loops (one for each directory level), several string.h functions and mkdir(2) > to actually create the directory. I would have thought that just being in C as > opposed to C# and .NET would have made it faster, but I guess I was wrong. Anything to do with disk I/O is going to be bound by the speed of the disk, given of course that the operations are otherwise identical. :-) > Any ideas on why the lack of performance? FFS (without "mount -o async") gives a lot of guarantees about the integrity of the on-disk filesystem structure, and there's nothing much more critical to filesystem structure than directory creation and deletion. If you want it to go fast you have to remove all the safety lines (i.e. mount your filesystem with "mount -o async", and perhaps add ",noatime,nodevmtime" to those mount options). Soon there will be another option: FFSv2 with WAPBL, and it'll let you keep all the safety lines, but still get some pretty stunning performance improvements for some kinds of workloads (your benchmark included, I think): See slide #21 here: http://www.netbsd.org/gallery/presentations/joerg/bsdcan2009/wapbl.html Compare the "ffs" line with the "ffs log" line to see the improvement. -- Greg A. Woods Planix, Inc. <woods%planix.com@localhost> +1 250 762-7675 http://www.planix.com/
Attachment:
pgpwXVheBp233.pgp
Description: PGP signature