<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.qmailtoaster.org:80/index.php?action=history&amp;feed=atom&amp;title=MySQL_-_Tuning_for_QMT</id>
	<title>MySQL - Tuning for QMT - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.qmailtoaster.org:80/index.php?action=history&amp;feed=atom&amp;title=MySQL_-_Tuning_for_QMT"/>
	<link rel="alternate" type="text/html" href="http://wiki.qmailtoaster.org:80/index.php?title=MySQL_-_Tuning_for_QMT&amp;action=history"/>
	<updated>2026-04-29T10:59:48Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>http://wiki.qmailtoaster.org:80/index.php?title=MySQL_-_Tuning_for_QMT&amp;diff=161&amp;oldid=prev</id>
		<title>Ebroch: Created page with &quot;For those who aren&#039;t MySQL DBA&#039;s, here is a good start to tuning the QMT MySQL.  Here is a guy that wrote a nice script for testing the current performance and makes recommendations for improvement.  http://www.day32.com/MySQL and for additional tool you can use MySQLTuner from  http://mysqltuner.com  In order for the script to have a good snapshot of what is happening, your MySQL should be running for at least 48 hours.  When I ran it, it recommended the following: long...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.qmailtoaster.org:80/index.php?title=MySQL_-_Tuning_for_QMT&amp;diff=161&amp;oldid=prev"/>
		<updated>2024-03-16T16:54:00Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;For those who aren&amp;#039;t MySQL DBA&amp;#039;s, here is a good start to tuning the QMT MySQL.  Here is a guy that wrote a nice script for testing the current performance and makes recommendations for improvement.  http://www.day32.com/MySQL and for additional tool you can use MySQLTuner from  http://mysqltuner.com  In order for the script to have a good snapshot of what is happening, your MySQL should be running for at least 48 hours.  When I ran it, it recommended the following: long...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;For those who aren&amp;#039;t MySQL DBA&amp;#039;s, here is a good start to tuning the QMT MySQL.&lt;br /&gt;
&lt;br /&gt;
Here is a guy that wrote a nice script for testing the&lt;br /&gt;
current performance and makes recommendations for improvement.&lt;br /&gt;
 http://www.day32.com/MySQL&lt;br /&gt;
and for additional tool you can use MySQLTuner from&lt;br /&gt;
 http://mysqltuner.com&lt;br /&gt;
&lt;br /&gt;
In order for the script to have a good snapshot of what is&lt;br /&gt;
happening, your MySQL should be running for at least 48 hours.&lt;br /&gt;
&lt;br /&gt;
When I ran it, it recommended the following:&lt;br /&gt;
long_query_time = 5  &amp;lt;&amp;lt; WAS 10&amp;lt;br/&amp;gt;&lt;br /&gt;
query-cache-type = 1  &amp;lt;&amp;lt; WAS NOT RUNNING&amp;lt;br/&amp;gt;&lt;br /&gt;
query-cache-size = 20M &amp;lt;&amp;lt; JUST A STARTING POINT &amp;lt;br/&amp;gt;&lt;br /&gt;
table_cache = 100 &amp;lt;&amp;lt; WAS RUNNING 64 AND FULL.  There are 78&lt;br /&gt;
tables in my database so I just picked 100.&lt;br /&gt;
&lt;br /&gt;
Also, Randy added:&lt;br /&gt;
I recommend adding a query-cache-limit = 1M so that large, infrequent&lt;br /&gt;
queries don&amp;#039;t hog your cache. Also, make sure your key-buffer is set&lt;br /&gt;
properly. Look at top or vmstat and see if you&amp;#039;re using any swap&lt;br /&gt;
space. If so, keep all your buffers small until you add more RAM. In&lt;br /&gt;
fact, make sure your buffers total no more than 80% available RAM.&lt;br /&gt;
Your problem could be that there&amp;#039;s too much unnecessary disk&lt;br /&gt;
thrashing.&lt;br /&gt;
&lt;br /&gt;
As Randy pointed out, tuning MySQL or just about anything in QMT is pretty much an art instead of a science.  Because of hardware, installed apps, system load, etc differences these numbers might not work for you but they are a good start (Your mileage may vary!).  You should test thoroughly.&lt;br /&gt;
&lt;br /&gt;
[[Randy&amp;#039;s no brainer my.cnf for QMT]] &amp;lt;br/&amp;gt;&lt;br /&gt;
set-variable = max_connections=400 &amp;lt;br/&amp;gt;&lt;br /&gt;
set-variable = query_cache_type=1 &amp;lt;br/&amp;gt;&lt;br /&gt;
set-variable = query_cache_limit=1M &amp;lt;br/&amp;gt;&lt;br /&gt;
set-variable = query_cache_size=16M &amp;lt;br/&amp;gt;&lt;br /&gt;
set-variable = thread_cache_size=8 &amp;lt;br/&amp;gt;&lt;br /&gt;
log-slow-queries &amp;lt;br/&amp;gt;&lt;br /&gt;
long_query_time=2 &amp;lt;br/&amp;gt;&lt;br /&gt;
set-variable = key_buffer_size=512M  &amp;lt;br/&amp;gt;&lt;br /&gt;
set-variable = table_cache=256 &amp;lt;br/&amp;gt;&lt;br /&gt;
set-variable = sort_buffer_size=4M &amp;lt;br/&amp;gt;&lt;br /&gt;
set-variable = read_buffer_size=1M &amp;lt;br/&amp;gt;&lt;br /&gt;
To do: ...MySQL5 my.cnf&lt;/div&gt;</summary>
		<author><name>Ebroch</name></author>
	</entry>
</feed>