Once FreeBSD 7 reached it's -BETA state, I tried to reproduce Jeff Roberson's results on MySQL, that it outperforms linux. However I've got a bit different results, showing that Linux still outperforms FreeBSD, almost around two times. And with ZFS it's even worse.
To investigate this issue I've mailed to Jeff and a thread on this issue was started.
There are a few differences between the tests made by Jeff and me, and also between the circumstances. Some I'm aware of:
The hardware I have for this test is the following:
I was focusing on read-write tests, because our realworld workload is most similar to this one. I was using sysbench as a benchmark suite, because it seems to have the most sophisticated, real-like tests amongst all I've checked.
Here, it clearly seems that linux outperforms FreeBSD-7-BETA3. I've tried to also check the performance with ZFS, since in previous non-DB related test I had nice results with ZFS, but it seems to be so oversophisticated or anything, that it's not good for databases, yet. This point still awaits investigation. I had dig through all the ZFS+Database related topics in google, sun, FreeBSD wiki and anything on earth, but I couldn't improve the results.
Well, this is an interesting graph. As it seems MySQL outperforms PostgreSQL on this FreeBSD configuration. The ZFS/UFS refers to the filesystem used underneath, 4BSD/ULE refers to the scheduler in use, and nosync refers to the fsync option turned off in the PostgreSQL configuration. I've read here that fsync decreases PostgreSQL's performance a lot. Note however, that I was using 8.2 and that page's author was using 8.1. But to be honest, I don't think this makes that much difference.
The other interesting thing is the performance of PostgreSQL after around 128 clients. It has a very high performance cut around there. It would probably worth getting the at a higher resultion in that area.
Gergely Czuczy <gergely.czuczy@harmless.hu>
Last updated: 2007-12-04