P. 1


|Views: 51|Likes:
Published by Robin Cesc

More info:

Published by: Robin Cesc on Jul 18, 2011
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less





Once you’ve deployed your Joomla site, you shouldn’t consider that you’ve reached the finish line. In fact,
tuning the performance once you can evaluate the real loads being placed on it can generate far better
results than tuning based on assumptions. MySQL makes it particularly easy to examine the performance
and helps you to determine where the bottlenecks are occurring.

Profilingis the method of diagnosing a running system and determining where the bottlenecks occur.
One excellent tool you can use in profiling the system is examining the slow queries log. The slow query
log holds all of the SQL statements whose execution exceeded the time set in the long_query_time
parameter. The default value of this variable is set to 10 seconds.


Chapter 11: Managing a Professional Deployment

33941c11.qxd:WroxPro 8/25/07 3:07 PM Page 274

You can activate this log in the Startup Variables of the MySQL Administrator application. On the
“Log files” tab, activate the log as shown in Figure11-12 and provide a filename. If no filename is
specified, it will default to host_name-slow.log. You will need to restart the MySQL server for the
setting to take effect.

You can also activate the log from the command line by starting MySQL like this:

mysqld --log-slow-queries=joomlaSlowQLog

Once you have a query log, you can summarize the log from the MySQL command line with this statement:

mysqldumpslow /joomlaSlowQLog

The --helpswitch can be used to display all the parameters available to the dumpcommand.

You can also obtain data on the MySQL query performance using the myshowmodule. This utility is
slightly complicated to configure and use, so I would suggest you look at the home page (http://
jfontain.free.fr/myshow/myshow.htm) and determine if it suits your needs.

In addition to monitoring MySQL query performance, you should also profile the system in terms of over-
all performance. The MyTop utility (http://jeremy.zawodny.com/mysql/mytop) mimics the function-
ality of the Top utility in Linux but applies itself to monitoring the threads and overall performance of
MySQL. It can be used to execute against local or remote hosts. It runs on Linux, MacOS, and Windows.

Figure11-12: Activate the Slow Queries Log, and set the name of the log.


Chapter 11: Managing a Professional Deployment

33941c11.qxd:WroxPro 8/25/07 3:07 PM Page 275

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->