kernel option HZ and mysql
Chad Leigh -- Shire.Net LLC
chad at shire.net
Wed Apr 20 10:25:42 PDT 2005
I have a self-compiled mysql 4.1 (4.1.9) on FreeBSD 5.3. (Not built
from ports for various reasons). The system load skyrockets when the
web server that is using the mysql for its PHPnuke storage starts to
get 100 or so or more active sessions. It appears that mysql is the
"culprit." The webserver is a prefork apache 2 with php5 and runs on
the same system. top and other monitors show very little cpu on the
httpd processes but lots on the mysql.
There is plenty of free and inactive RAM and the CPUs are not
particularly stresses (dual Opteron 2.0ghz in i386 mode).
I am thinking that maybe the HZ setting could be causing some
inefficiencies for mysql.
It is set at HZ=1300
mysql itself was compiled with
$ ./configure --prefix=/usr/public/mysql/mysql4.1 --enable-assembler
--enable-thread-safe-client --without-debug
--with-extra-charsets=complex
and it uses
> ldd mysqld
mysqld:
libz.so.2 => /lib/libz.so.2 (0x283c2000)
libcrypt.so.2 => /lib/libcrypt.so.2 (0x283d2000)
libpthread.so.1 => /usr/lib/libpthread.so.1 (0x283ea000)
libstdc++.so.4 => /usr/lib/libstdc++.so.4 (0x2840e000)
libm.so.3 => /lib/libm.so.3 (0x284e0000)
libc.so.5 => /lib/libc.so.5 (0x284fa000)
>
I would appreciate it if someone who has experience in this with mysql
and HZ and HZ in general could comment on how HZ might affect mysql
performance and system load.
Thanks
Chad
More information about the freebsd-questions
mailing list