I have installed FreeBSD on ZFS, I am going to make it as Apache/MySQL/PHP server. I have read some articles about tuning MySQL on ZFS, I am following the following procedure
Created a zfs file system zroot/svr/mysql (mounted on /svr/mysql)
Moved /var/db/mysql to /svr/mysql/
Now during testing I have observed that MySQL is not as fast as it is working in mu ubuntu 6.10 (i386) server, same queries is taking 1.7 seconds (sime times >2 seconds), where as in ubuntu it is taking <0.8 sec. I have searched more on tuning, and found
but after this command mysql becomes dead slow, and when I again do
it returns to previous status. Is the above method corrected or we should leave the Mysql folder in /var/db? Or some how we can seperate mysql data directory from log directory ?
Is there any other special tuning we need to do in FreeBSD for MySql especially in ZFS.
I have observed that in FreeBSD ufs, even same query it taking 1.2 seconds. I don't know why it is so fast in ubuntu, can it be due to Mysql version 5.0.24 and in FreeBSD 5.5.28?
kindly help
Thanks and regards
Created a zfs file system zroot/svr/mysql (mounted on /svr/mysql)
Code:
atime=off
record size=8kb
exec=off
compression=off
setuid=off
# ln -s /svr/mysql/mysql /var/db/mysql
Now during testing I have observed that MySQL is not as fast as it is working in mu ubuntu 6.10 (i386) server, same queries is taking 1.7 seconds (sime times >2 seconds), where as in ubuntu it is taking <0.8 sec. I have searched more on tuning, and found
# zfs set primarycache=metadata zroot/svr/mysql
but after this command mysql becomes dead slow, and when I again do
# zfs set primarycache=all zroot/svr/mysql
it returns to previous status. Is the above method corrected or we should leave the Mysql folder in /var/db? Or some how we can seperate mysql data directory from log directory ?
Is there any other special tuning we need to do in FreeBSD for MySql especially in ZFS.
I have observed that in FreeBSD ufs, even same query it taking 1.2 seconds. I don't know why it is so fast in ubuntu, can it be due to Mysql version 5.0.24 and in FreeBSD 5.5.28?
kindly help
Thanks and regards