I work in a small development team - PHP/MySQL app.
Each in-house developer has Apache/PHP installed and is accessing a Windows 7 box with MySQL 5.1 installed. Box is 32bit, Pentium D, 4GB ram, nothing tweaked with my.cnf. Network is on a gigabit switch, gigabit NICs.
I am curious why this setup is so obviously slow. Accessing an empty database on this server from my desktop is very, slow. 5 seconds or so just to list databases.
I don't expect it to be as fast as our production cluster @Softlayer, but 5 seconds to display an empty database seems a bit much.
Has anyone done specific things to speed up a office development setup utilizing a database server?
This may sound a little odd, but check that the MySQL server is able to resolve domains quickly and correctly. Some query browsers send authentication with each command and if you have slow resolvers it kills the performance.
We had a very similar problem once when our internal DNS was down for maintenance.
add in my.cnf:
skip_name_resolve in [mysqld_safe] and [mysqld] sections
It should not be so slow based on the configuration you have mentioned even without any optimization/tweaking. Most likely there is some other problem.
Try to use mysql clients on same Windows 7 machine and see if they are slow or not. At least this will help in deciding whether problem is network related or not.
If problem is network related then capturing packets using wireshark to see what is actually on wire is really helpful in troubleshooting delay problems.
If problem is host related check:
Logs will most assuredly help here -
I would start with some basic MySQL monitoring - a few tools that may help here are:
You can also resort to the MySQL monitoring tool from the command line (cli)
Sadly - many folks will use the default templates made available under /usr/share/mysql
I HIGHLY RECOMMEND SKIPPING THEM - they are old and not worth using for the following reasons:
After running those - and doing some tuning - let mysql run for at least 24-48 hours and then use the following diagnostic tools:
MySQL tuner (just type wget mysqltuner.pl in linux to download then chmod755 mysqltuner.pl and run it by doing ./mysqltuner.pl ;-)
mysqlidxchk
(Install by wget hackmysql.com/scripts/mysqlidxchk-1.1 chmod 755 mysqlidxchk* mv mysqlidxchk* mysqlidxchk ) then run by doing something like this: ( ./mysqlidxchk --general /var/lib/mysql/ general.log )
If you need some help installing those as well please let me know
PS - most of these are linux only scripts - but will help a huge amount with the tuning and management of your mySQL server.
Finally - yse a good log parsing tool like mysqlsla and mysqlreport for status reporting