<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>[ themattreid ] &#187; General</title>
	<atom:link href="http://themattreid.com/wordpress/category/general/feed/" rel="self" type="application/rss+xml" />
	<link>http://themattreid.com/wordpress</link>
	<description>MySQL DBA &#124; Linux&#039;er</description>
	<lastBuildDate>Tue, 24 Apr 2012 01:21:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Speeding up webapps</title>
		<link>http://themattreid.com/wordpress/2009/07/05/speeding-up-webapps/</link>
		<comments>http://themattreid.com/wordpress/2009/07/05/speeding-up-webapps/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 02:15:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[tuning]]></category>

		<guid isPermaLink="false">http://themattreid.com/wordpress/?p=195</guid>
		<description><![CDATA[<p>Some quick notes on useful apps for speeding up webapps. I&#8217;ve been working on one application that was suffering some performance issues and needed immediate help. So, with a combination of the following three apps and some hours of configuration tuning, I have the page loads down from 10 seconds to 2 seconds. Not too bad. Still more tuning to go of course.</p>
<p><strong>PHP Acceleration: </strong> http://eaccelerator.net<br />
<strong>Memcached</strong> http://www.danga.com/memcached<br />
<strong>XtraDB</strong> http://www.percona.com/docs/wiki/percona-xtradb:start&#8230; <a href="http://themattreid.com/wordpress/2009/07/05/speeding-up-webapps/" class="read_more">Read the rest</a></p>]]></description>
			<content:encoded><![CDATA[<p>Some quick notes on useful apps for speeding up webapps. I&#8217;ve been working on one application that was suffering some performance issues and needed immediate help. So, with a combination of the following three apps and some hours of configuration tuning, I have the page loads down from 10 seconds to 2 seconds. Not too bad. Still more tuning to go of course.</p>
<p><strong>PHP Acceleration: </strong> http://eaccelerator.net<br />
<strong>Memcached</strong> http://www.danga.com/memcached<br />
<strong>XtraDB</strong> http://www.percona.com/docs/wiki/percona-xtradb:start</p>
]]></content:encoded>
			<wfw:commentRss>http://themattreid.com/wordpress/2009/07/05/speeding-up-webapps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JFS and RHEL5</title>
		<link>http://themattreid.com/wordpress/2009/07/01/jfs-and-rhel5/</link>
		<comments>http://themattreid.com/wordpress/2009/07/01/jfs-and-rhel5/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 16:17:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[filesystems]]></category>
		<category><![CDATA[jfs]]></category>

		<guid isPermaLink="false">http://themattreid.com/wordpress/?p=192</guid>
		<description><![CDATA[<p>Quick one here; If you&#8217;re thinking to yourself &#8220;why can&#8217;t I make the MySQL data partition JFS on my RHEL5 server&#8230;&#8221; here&#8217;s a good how to: <a title="http://phaq.phunsites.net/2008/02/04/enabling-reiserfs-xfs-jfs-on-redhat-enterprise-linux/" href="http://phaq.phunsites.net/2008/02/04/enabling-reiserfs-xfs-jfs-on-redhat-enterprise-linux/" target="_blank">http://phaq.phunsites.net/2008/02/04/enabling-reiserfs-xfs-jfs-on-redhat-enterprise-linux/</a>&#8230; <a href="http://themattreid.com/wordpress/2009/07/01/jfs-and-rhel5/" class="read_more">Read the rest</a></p>]]></description>
			<content:encoded><![CDATA[<p>Quick one here; If you&#8217;re thinking to yourself &#8220;why can&#8217;t I make the MySQL data partition JFS on my RHEL5 server&#8230;&#8221; here&#8217;s a good how to: <a title="http://phaq.phunsites.net/2008/02/04/enabling-reiserfs-xfs-jfs-on-redhat-enterprise-linux/" href="http://phaq.phunsites.net/2008/02/04/enabling-reiserfs-xfs-jfs-on-redhat-enterprise-linux/" target="_blank">http://phaq.phunsites.net/2008/02/04/enabling-reiserfs-xfs-jfs-on-redhat-enterprise-linux/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://themattreid.com/wordpress/2009/07/01/jfs-and-rhel5/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Is this RPM 32bit or 64bit?</title>
		<link>http://themattreid.com/wordpress/2009/06/11/is-this-rpm-32bit-or-64bit/</link>
		<comments>http://themattreid.com/wordpress/2009/06/11/is-this-rpm-32bit-or-64bit/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 23:46:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[rpm]]></category>

		<guid isPermaLink="false">http://themattreid.com/wordpress/?p=187</guid>
		<description><![CDATA[<p>Simple question with a simple answer. Let&#8217;s say you&#8217;re on Redhat 4 or 5 and you need to know if an installed RPM is 32bit or 64bit&#8230;<br />
<code><br />
shellrpm -q --qf '%{NAME}-%{VERSION}(%{ARCH})\n' libaio<br />
libaio-0.3.107(x86_64)<br />
</code>&#8230; <a href="http://themattreid.com/wordpress/2009/06/11/is-this-rpm-32bit-or-64bit/" class="read_more">Read the rest</a></p>]]></description>
			<content:encoded><![CDATA[<p>Simple question with a simple answer. Let&#8217;s say you&#8217;re on Redhat 4 or 5 and you need to know if an installed RPM is 32bit or 64bit&#8230;<br />
<code><br />
shell> rpm -q --qf '%{NAME}-%{VERSION}(%{ARCH})\n' libaio<br />
libaio-0.3.107(x86_64)<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://themattreid.com/wordpress/2009/06/11/is-this-rpm-32bit-or-64bit/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>When to tune query cache settings</title>
		<link>http://themattreid.com/wordpress/2008/03/24/when-to-tune-query-cache-settings/</link>
		<comments>http://themattreid.com/wordpress/2008/03/24/when-to-tune-query-cache-settings/#comments</comments>
		<pubDate>Mon, 24 Mar 2008 16:03:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Monolith]]></category>
		<category><![CDATA[query cache]]></category>

		<guid isPermaLink="false">http://themattreid.com/wordpress/?p=50</guid>
		<description><![CDATA[<p>I saw some bad utilization of the query cache on one of my clusters the other day. I haven&#8217;t tuned the cache since installing the standard cnf file so let&#8217;s take the following usage graph that is output by Monolith.</p>
<p><a href="http://themattreid.com/wordpress/wp-content/uploads/2008/03/graph-querycache.png" title="Qcache1"><img src="http://themattreid.com/wordpress/wp-content/uploads/2008/03/graph-querycache.png" alt="Qcache1" /></a></p>
<p><em><strong>Queries not cached: 40,000</strong></em><br />
<em><strong>Queries in cache: 250</strong></em></p>
<p><a href="http://themattreid.com/wordpress/wp-content/uploads/2008/03/graph-querycache2.png" title="Qcache2"><img src="http://themattreid.com/wordpress/wp-content/uploads/2008/03/graph-querycache2.png" alt="Qcache2" /></a></p>
<p><em><strong>Queries not cached: 7500</strong></em><br />
<em><strong>Queries in cache: 200</strong></em></p>
<p>In the first image we see there are dramatically less queries in the cache vs. the number of queries &#8230; <a href="http://themattreid.com/wordpress/2008/03/24/when-to-tune-query-cache-settings/" class="read_more">Read the rest</a></p>]]></description>
			<content:encoded><![CDATA[<p>I saw some bad utilization of the query cache on one of my clusters the other day. I haven&#8217;t tuned the cache since installing the standard cnf file so let&#8217;s take the following usage graph that is output by Monolith.</p>
<p><a href="http://themattreid.com/wordpress/wp-content/uploads/2008/03/graph-querycache.png" title="Qcache1"><img src="http://themattreid.com/wordpress/wp-content/uploads/2008/03/graph-querycache.png" alt="Qcache1" /></a></p>
<p><em><strong>Queries not cached: 40,000</strong></em><br />
<em><strong>Queries in cache: 250</strong></em></p>
<p><a href="http://themattreid.com/wordpress/wp-content/uploads/2008/03/graph-querycache2.png" title="Qcache2"><img src="http://themattreid.com/wordpress/wp-content/uploads/2008/03/graph-querycache2.png" alt="Qcache2" /></a></p>
<p><em><strong>Queries not cached: 7500</strong></em><br />
<em><strong>Queries in cache: 200</strong></em></p>
<p>In the first image we see there are dramatically less queries in the cache vs. the number of queries not cached. This was pulled with the following variables:</p>
<p><em><strong>query_cache=32M</strong></em><br />
<em><strong>query_cache_limit=1M</strong></em></p>
<p>Take the second graph after changing the settings to:</p>
<p><em><strong>query_cache=8M</strong></em><br />
<em><strong>query_cache_limit=128K</strong></em></p>
<p>So after seeing the visual relation between queries in the cache and queries not cached, tuning and checking again, we have a much better utilization of the cache &#8211; less queries not cached. After watching the server more we might want to change settings again to further tune this. If I increase the query_cache size now, even more queries will stay in the cache which will allow more efficient utilization of the cache, but that&#8217;s for another time.</p>
<p>One thing to watch here in the trend is that the queries not cached does not continue to grow linearly in the manner that the first graph shows.</p>
]]></content:encoded>
			<wfw:commentRss>http://themattreid.com/wordpress/2008/03/24/when-to-tune-query-cache-settings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic requirements of production database environments</title>
		<link>http://themattreid.com/wordpress/2008/02/26/basic-requirements-of-production-database-environments/</link>
		<comments>http://themattreid.com/wordpress/2008/02/26/basic-requirements-of-production-database-environments/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 17:46:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[production]]></category>

		<guid isPermaLink="false">http://themattreid.com/wordpress/?p=46</guid>
		<description><![CDATA[<p>I just need to get some basics off of my chest here, it&#8217;s by no means a full list but it&#8217;s the most basic list I can think of to start with, and it&#8217;s basic because I am surprised by some of the slop I&#8217;ve seen in production environments.</p>
<p>1. Highly available server clusters &#8211; this is different than load balancing cluster, if confused see <a href="http://en.wikipedia.org/wiki/High-availability_cluster" title="wikipedia link" target="_blank">here.</a></p>
<p>2. Disaster recovery</p>
<p>-&#62; this means daily,weekly,monthly backups as &#8230; <a href="http://themattreid.com/wordpress/2008/02/26/basic-requirements-of-production-database-environments/" class="read_more">Read the rest</a></p>]]></description>
			<content:encoded><![CDATA[<p>I just need to get some basics off of my chest here, it&#8217;s by no means a full list but it&#8217;s the most basic list I can think of to start with, and it&#8217;s basic because I am surprised by some of the slop I&#8217;ve seen in production environments.</p>
<p>1. Highly available server clusters &#8211; this is different than load balancing cluster, if confused see <a href="http://en.wikipedia.org/wiki/High-availability_cluster" title="wikipedia link" target="_blank">here.</a></p>
<p>2. Disaster recovery</p>
<p>-&gt; this means daily,weekly,monthly backups as well as off site backups, and tertiary backups as well as a plan to get those backups imported and running in production as fast as possible. Backups should have consistency checking when they are created.</p>
<p>3. Security</p>
<p>-&gt; perimeter on the network, VLAN&#8217;d databases from the web/app servers, firewall, ACLs, etc</p>
<p>-&gt; system level: strong passwords on OS and database accounts (no blank passwords &#8211; that *should* be obvious but you&#8217;d be surprised what I&#8217;ve run into), file permissions,  encryption of sensitive database information.</p>
<p>4. Monitoring: monitor everything possible. Log files, disk partitions, service ports, service details (traffic for a service, memory used, tuning parameters: query cache usage, etc), CPU/RAM usage, logged in users, and most importantly being alerted about monitored services. If you&#8217;re not getting called when something has passed a threshold, you need to pay more attention to the infrastructure.</p>
]]></content:encoded>
			<wfw:commentRss>http://themattreid.com/wordpress/2008/02/26/basic-requirements-of-production-database-environments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>For the love of god please use the following on high traffic servers</title>
		<link>http://themattreid.com/wordpress/2008/02/20/for-the-love-of-god-please-use-the-following-on-high-traffic-servers/</link>
		<comments>http://themattreid.com/wordpress/2008/02/20/for-the-love-of-god-please-use-the-following-on-high-traffic-servers/#comments</comments>
		<pubDate>Thu, 21 Feb 2008 00:20:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Replication]]></category>

		<guid isPermaLink="false">http://themattreid.com/wordpress/?p=45</guid>
		<description><![CDATA[<p>Let&#8217;s begin by assuming you have a server that runs MySQL and lots and lots of traffic flows through it everyday, let&#8217;s say&#8230; something like 50% of the size of the partition that the mysql binary logs are written to is on, then we will assume the binary log is turned on. Then we assume that expire_logs_days is not set.</p>
<p>What happens? Nagios/etc alerts that the partition is reaching a usage threshold because &#8211; low &#8230; <a href="http://themattreid.com/wordpress/2008/02/20/for-the-love-of-god-please-use-the-following-on-high-traffic-servers/" class="read_more">Read the rest</a></p>]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s begin by assuming you have a server that runs MySQL and lots and lots of traffic flows through it everyday, let&#8217;s say&#8230; something like 50% of the size of the partition that the mysql binary logs are written to is on, then we will assume the binary log is turned on. Then we assume that expire_logs_days is not set.</p>
<p>What happens? Nagios/etc alerts that the partition is reaching a usage threshold because &#8211; low and behold the binary logs are filling up the partition. Tuning this variable is also important. It may need to be set to as low as 1 day, in which case I would say we need a bigger partition for binary logs, but setting it so low can cause replication problems if the slave(s) gets behind more than 1 day &#8211; god help us if it does &#8211; then those binary logs that the slave is reading are no longer available, and rebuilding replication will be next on the task list. (or using maatkit)</p>
<p>While I&#8217;m at it here are some good ones for relieving tension. By no means is this a full list but some things on the top of my head at the moment.</p>
<p><code><br />
expire_logs_days = x<br />
myisam_recover<br />
skip_bdb<br />
sql_mode = NO_AUTO_CREATE_USER<br />
max_binlog_size = x<br />
long_query_time = x<br />
log_slow_queries<br />
log_warnings<br />
transaction-isolation=REPEATABLE-READ (or SERIALIZABLE)<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://themattreid.com/wordpress/2008/02/20/for-the-love-of-god-please-use-the-following-on-high-traffic-servers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Certified</title>
		<link>http://themattreid.com/wordpress/2008/01/28/certified/</link>
		<comments>http://themattreid.com/wordpress/2008/01/28/certified/#comments</comments>
		<pubDate>Mon, 28 Jan 2008 21:18:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://themattreid.com/wordpress/?p=31</guid>
		<description><![CDATA[<p>I passed the MySQL 5.0 DBA I and II certification tests today with very nice results. Just figured I&#8217;d post that so it&#8217;s verifiable that I&#8217;m not entirely spewing nonsense and general rabble. Today is a good day, and I will celebrate with the finest wines, and choicest of meats.</p>
<p>Exam Date:      Monday, January 28, 2008 at 9:00 AM<br />
Candidate:     Matthew Reid<br />
Candidate ID:     MYSQL005372<br />
Registration #: xxxxx2740<br />
Exam Series:     005-002<br />
Exam:     Certified MySQL 5.0 &#8230; <a href="http://themattreid.com/wordpress/2008/01/28/certified/" class="read_more">Read the rest</a></p>]]></description>
			<content:encoded><![CDATA[<p>I passed the MySQL 5.0 DBA I and II certification tests today with very nice results. Just figured I&#8217;d post that so it&#8217;s verifiable that I&#8217;m not entirely spewing nonsense and general rabble. Today is a good day, and I will celebrate with the finest wines, and choicest of meats.</p>
<p>Exam Date:      Monday, January 28, 2008 at 9:00 AM<br />
Candidate:     Matthew Reid<br />
Candidate ID:     MYSQL005372<br />
Registration #: xxxxx2740<br />
Exam Series:     005-002<br />
Exam:     Certified MySQL 5.0 DBA Part I<br />
Validation #: xxxxx5662<br />
Grade:     pass</p>
<p>Exam Date:      Monday, January 28, 2008 at 10:30 AM<br />
Candidate:     Matthew Reid<br />
Candidate ID:     MYSQL005372<br />
Registration #: xxxxx7164<br />
Exam Series:     006-002<br />
Exam:     Certified MySQL 5.0 DBA Part II<br />
Validation #: xxxxxx5956<br />
Grade:     pass</p>
]]></content:encoded>
			<wfw:commentRss>http://themattreid.com/wordpress/2008/01/28/certified/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MySQL Competency</title>
		<link>http://themattreid.com/wordpress/2008/01/17/mysql-competency-pdf/</link>
		<comments>http://themattreid.com/wordpress/2008/01/17/mysql-competency-pdf/#comments</comments>
		<pubDate>Fri, 18 Jan 2008 00:25:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://themattreid.com/wordpress/?p=19</guid>
		<description><![CDATA[<p>Here&#8217;s something I wrote up a while back for basic MySQL knowledge. <a href="http://themattreid.com/wordpress/wp-content/uploads/2008/01/mysql-compentencytroubleshoot.pdf" title="MySQL Competency">MySQL Competency</a></p>
<p>This is also a useful list of interview questions for potential hires. <a href="http://themattreid.com/wordpress/wp-content/uploads/2008/01/dba_interview_questions.rtf" title="DBA Interview Questions">DBA Interview Questions</a>&#8230; <a href="http://themattreid.com/wordpress/2008/01/17/mysql-competency-pdf/" class="read_more">Read the rest</a></p>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s something I wrote up a while back for basic MySQL knowledge. <a href="http://themattreid.com/wordpress/wp-content/uploads/2008/01/mysql-compentencytroubleshoot.pdf" title="MySQL Competency">MySQL Competency</a></p>
<p>This is also a useful list of interview questions for potential hires. <a href="http://themattreid.com/wordpress/wp-content/uploads/2008/01/dba_interview_questions.rtf" title="DBA Interview Questions">DBA Interview Questions</a></p>
]]></content:encoded>
			<wfw:commentRss>http://themattreid.com/wordpress/2008/01/17/mysql-competency-pdf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Got an error reading communication packets</title>
		<link>http://themattreid.com/wordpress/2007/12/20/got-an-error-reading-communication-packets/</link>
		<comments>http://themattreid.com/wordpress/2007/12/20/got-an-error-reading-communication-packets/#comments</comments>
		<pubDate>Fri, 21 Dec 2007 00:32:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://themattreid.com/wordpress/?p=15</guid>
		<description><![CDATA[<p>If you look at your error log file for MySQL you&#8217;ll inevitably see the warning: &#8220;got an error reading communication packets&#8221;. The common solution is to increase the max_allowed_packet size.</p>
<p>I&#8217;ve seen this set as high as 1GB but typically the problem is alleviated by running it as max_allowed_packet=64M. If you set this higher &#8211; either by issuing a `set global max_allowed_packet=64M;` or by editing the cnf and restarting the mysqld process &#8211; and the &#8230; <a href="http://themattreid.com/wordpress/2007/12/20/got-an-error-reading-communication-packets/" class="read_more">Read the rest</a></p>]]></description>
			<content:encoded><![CDATA[<p>If you look at your error log file for MySQL you&#8217;ll inevitably see the warning: &#8220;got an error reading communication packets&#8221;. The common solution is to increase the max_allowed_packet size.</p>
<p>I&#8217;ve seen this set as high as 1GB but typically the problem is alleviated by running it as max_allowed_packet=64M. If you set this higher &#8211; either by issuing a `set global max_allowed_packet=64M;` or by editing the cnf and restarting the mysqld process &#8211; and the error persists, I&#8217;d recommend reading the following links. Very informative.</p>
<p><a href="http://dev.mysql.com/doc/refman/5.0/en/communication-errors.html" target="_blank">http://dev.mysql.com/doc/refman/5.0/en/communication-errors.html</a><br />
<a href="http://dev.mysql.com/doc/refman/5.0/en/making-trace-files.html" target="_blank"> http://dev.mysql.com/doc/refman/5.0/en/making-trace-files.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://themattreid.com/wordpress/2007/12/20/got-an-error-reading-communication-packets/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

