Marius van Witzenburg We fight for our survival, we fight!

9Jun/112

How to gain some more performance for MySQL without compiled Linux threads on FreeBSD

I notice a lot of people I talk to are compiling MySQL with Linux Threads to gain performance with MySQL, there is another way!

You can use the thread libraries of FreeBSD to gain some more performance by altering the libmap.conf file to use libthr instead of libpthread.

Add the following to /etc/libmap.conf

[mysqld]
libpthread.so libthr.so
libpthread.so.2 libthr.so.2
libpthread.so.3 libthr.so.3
libpthread.so.4 libthr.so.4
libpthread.so.5 libthr.so.5
 
[/usr/local/libexec/mysqld]
libpthread.so libthr.so
libpthread.so.2 libthr.so.2
libpthread.so.3 libthr.so.3
libpthread.so.4 libthr.so.4
libpthread.so.5 libthr.so.5

Restart mysql

/usr/local/etc/rc.d/mysql-server restart

Check if you are really using libthr.so

ldd /usr/local/libexec/mysqld

Now you can benchmark your installation and check the performance gain.

Note: In the newer versions of FreeBSD/MySQL libthr.so is used by default, you can skip how to.

Posted by mariusvw

Reacties (2) Trackbacks (0)
  1. My port install of 5.1.56 on 8.2-RELEASE appears to already use libthr according to ldd … no mention of libpthread at all …


Leave a comment

(required)

Nog geen trackbacks.