On Sat, May 18, 2013 at 5:59 AM, Florent Peterschmitt <flor...@peterschmitt.fr> wrote: > Le 18/05/2013 06:04, Ivan Voras a écrit : > >> During the BSDCan & DevSummit I got interested in finding out why >> blogbench is so slow on FreeBSD. After talking to jhb, it looked like >> one of the reasons might be that opening files with O_RDWR or O_WRONLY >> (anything opening the file for writing) is serialized. >> >> To check this, I've written a small test program, which I've run on >> CentOS 6.3 and FreeBSD 10-HEAD on the same hardware. Here are the results: >> >> https://wiki.freebsd.org/Benchmarking/OpenCloseBenchmark >> >> Conclusions: >> >> * Linux opens and closes files much faster than FreeBSD >> * Linux does not serialize write-open operations, while FreeBSD does >> * Even with O_RDONLY, FreeBSD is much slower in opening (and closing) >> files. >> >> I'd welcome a review of these results and comments. > > > Hi, > > I'm no able to say anything about that (because I've no idea of how does > Linux or FreeBSD works ), but could it be a problem from filesystem ? > > Everytime I had UFS I found the entire system very slow when doing some I/O > (many little freezes), and with ZFS it's globally much better. > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
I largely reproduced your results, but saw even worse scaling. * Linux was much faster, for all thread counts and on all file systems * Linux's performance degraded by about 25% at high thread counts. FreeBSD's penalty was file-system dependent, but usually higher * The filesystem and hard disk mattered little on linux (tested tmpfs and ext4). The hard disk mattered little on FreeBSD, but the file system was very significant. * On FreeBSD, tmpfs was the fasted for a single thread. For nine threads, tmpfs was fastest for writes (about 33% faster than UFS or ZFS), but substantially slower than ZFS for reads. * For O_RDONLY, ZFS scales much better than UFS as the number of threads increases, but at low thread counts UFS was faster. I was testing on a dual-socket, 6 core/socket Xeon E5645 @ 2.4GHz machine. For Linux, I used Debian 6.0.6 with the 2.6.32-5 kernel. For FreeBSD, I was using a custom kernel based on stable/9.
_______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"