I’m continuing my experiments with different OS and today I tested FreeBSD 6.0 on my box.
(more details about box and benchmark see here https://www.percona.com/blog/2006/06/13/quick-look-at-ubuntu-606/).
Initially I was very pessimistic about FreeBSD, as results were (in transactions/sec, more is better.
for comparison the results from Suse 10.0):

InnoDB
threadsFreeBSD 6Suse 10.0Suse/ FreeBSD ratio
1436.97536.911.23
4322.08816.272.53
16519.94639.051.23
64crash547.07
256357.09
MyISAM
threadsFreeBSD 6Suse 10.0Suse/ FreeBSD ratio
1335.56429.891.28
4165.16863.235.23
16322.66537.671.67
64crash516.00
256346.65

The crash with many threads in FreeBSD is known problem and is not MySQL fault. More info is available in FreeBSD bug report

I’m not big expert in FreeBSD and did not saw http://wikitest.freebsd.org/MySQL before. This page recommends to use libthr instead of libthreads.
The results with libthr looks better:

InnoDB
threadsFreeBSD 6Suse 10.0Suse/ FreeBSD ratio
1483.22536.911.11
4852.21816.270.96
16748.89639.050.85
64644.45547.070.85
256273.99357.091.30
MyISAM
threadsFreeBSD 6Suse 10.0Suse/ FreeBSD ratio
1344.72429.891.25
4531.6863.231.62
16494.19537.671.09
64451.72516.001.14
256215.84346.651.61

Interesting thing with 4-64 threads FreeBSD is better than Suse in InnoDB benchmark. I think it is related to InnoDB’s implementation of syncronious primitives. For MyISAM Suse is stable better.

Configuration params:
Box: Dual Core Athlon 3800+, 1Gb of RAM, Motherboard ASUS A8N-E

MySQL 5.0.22

params for InnoDB:
–innodb-buffer-pool-size=500M –max-connections=500

params for MyISAM:
–key-buffer-size=500M –max-connections=500 –skip-innodb

Suse 10.0:
kernel-smp-2.6.13-15.x86_64
NTPL

Schedulers comparsion.
By request I made tests with 4BSD scheduler:

InnoDB
threadsFreeBSD 6 ULEFreeBSD 6 4BSD4BSD / ULE
1483.22438.10.91
4852.21819.140.96
16748.89712.770.95
64644.45639.20.99
256273.99330.111.20
MyISAM
threadsFreeBSD 6 ULEFreeBSD 6 4BSD4BSD / ULE
1344.72324.90.94
4531.6518.960.98
16494.19476.570.96
64451.72444.770.98
256215.84258.421.20

Interesting with 256 threads BSD scheduler looks better.

14 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Eugene Marko

Both servers was just cleanly installed, or something was tuned (except libthr switching)?

Partha Dutta

So out of curiosity what was the mysql configuration, and how much memory on the machine?

stanojr

suse 10 has nptl or linuxthreads ? and what kernel version ?

johnny

from http://wikitest.freebsd.org/MySQL

> There have been several reports that running with the 4BSD > scheduler offers better scheduling for MySQL workloads
> over the ULE scheduler.

R_T_F_M

Which my.cnf was used ? There is big difference between default my.cnf and my-huge.cnf when
benchmarking with super-smack and myisam

Alexander Leidinger

What about testing 6.1 and/or the upcomming 6.2 (beta versions are available)?

Vadim

Alexander,

We do not use FreeBSD 6.1 and 6.2 on our servers.
Maybe somewhen when we have access to such servers we will test it.

clipfish

I am very disappointed, as we are using Linux and always I heard FreeBSD is more faster, more better vs..

Peter Zaitsev

What to be disappointed about ? If you’re using Linux and it looks faster you should be happy with your choice 🙂

Also there are newer versions of FreeBSD which show serious performance gains for some workloads.

james