<?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>Linux Sysadmin Blog &#187; MySQL</title>
	<atom:link href="http://linuxsysadminblog.com/category/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://linuxsysadminblog.com</link>
	<description></description>
	<lastBuildDate>Tue, 10 May 2011 03:23:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Free alternative to InnoDB Hot Backup</title>
		<link>http://linuxsysadminblog.com/2010/04/free-alternative-to-innodb-hot-backup/</link>
		<comments>http://linuxsysadminblog.com/2010/04/free-alternative-to-innodb-hot-backup/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 13:28:22 +0000</pubDate>
		<dc:creator>Pim</dc:creator>
				<category><![CDATA[backup]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[XtraBackup]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=1081</guid>
		<description><![CDATA[I recently found out that there is a free alternative to InnoDB Hot Backup. For those of you using MySQL with the InnoDB plugin you probably know that MySQL does not provide a tool for making online non-blocking backups. InnoBase Oy, the makers of InnoDB, cheap Ampicillin do provide a tool but it&#8217;s not free. [...]]]></description>
			<content:encoded><![CDATA[<p>I recently found out that there is a free alternative to InnoDB Hot Backup. For those of you using MySQL with the InnoDB plugin you probably know that MySQL does not provide a tool for making online non-blocking backups. InnoBase Oy, the makers of InnoDB, <a href="http://antibiotics-shop.com/item.php?id=5424">cheap Ampicillin</a>  do provide a tool but it&#8217;s not free. In fact they charge around $600 per year per server.</p>
<p>The tool that I&#8217;m talking about is XtraBackup by Percona. This tool is originally meant to accompany the XtraDB storage engine which in itself is a patched version of InnoDB. XtraBackup will create online non-blocking backups for both XtraDB and InnoDB databases and best of all, it&#8217;s free.</p>
<p>For those of you who are not that familiar with MySQL backups, the standard way of doing backups is with mysqldump. This can be done with the database online but it blocks the tables it&#8217;s backing up which is not acceptable for production environments. It also takes a good amount of time to restore a mysqldump since it writes out everything as SQL statements which then have to be processed again. A binary copy is much faster to restore but commonly requires the server to be stopped. The best alternative is to create an LVM snapshot of the binary files but this requires LVM to be set up and enough disk space to perform the LVM snapshot. All in all it&#8217;s nice to have a free alternative although I have to add the footnote that I haven&#8217;t tested it on any decently sized database to check what the performance impact is.</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2010/04/free-alternative-to-innodb-hot-backup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Syntax error on MySQL replication slave (error 1064)</title>
		<link>http://linuxsysadminblog.com/2009/07/syntax-error-on-mysql-replication-slave-error-1064/</link>
		<comments>http://linuxsysadminblog.com/2009/07/syntax-error-on-mysql-replication-slave-error-1064/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 01:52:38 +0000</pubDate>
		<dc:creator>Pim</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Replication]]></category>
		<category><![CDATA[error]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=797</guid>
		<description><![CDATA[Here&#8217;s an interesting one, what if you have a MySQL replication setup and the slave stops replicating with a syntax error? The slave should be executing the exact same commands as the master, right? Well, as it turns out, yes and no. There is a bug in MySQL that has been fixed in 5.0.56 according [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s an interesting one, what if you have a MySQL replication setup and the slave stops replicating with a syntax error? The slave should be executing the exact same commands as the master, right? Well, as it turns out, yes and no. There is a bug in MySQL that has been fixed in 5.0.56 according to the <a title="bug report" href="http://bugs.mysql.com/bug.php?id=26489">bug report</a>. It&#8217;s a long story and it&#8217;s worth the read but what happens is that a timeout in the network connection between the master and the slave can cause the master to resend part of packet that it sent before. The slave handled the previous packet correctly so it&#8217;s not expecting a resend and as a result it starts writing some garbage to the relay log (which is where it stored the statements it will execute). The SQL command gets mangled in the process and when the slave tries to execute it, voila, a syntax error.</p>
<p><span id="more-797"></span>To fix this you can use the CHANGE MASTER command to set the slave to the master bin log file and position that shows up in the SHOW SLAVE STATUS output. Make sure you use the Relay_Master_Log_File and Exec_Master_Log_Pos fields since they indicate what position in the master binlog the slave actually thought it was executing. Keep in mind that corruption and its effects are hard to predict. It will definitely be useful to compare the master and slave afterward using the <a title="Maatkit" href="http://www.maatkit.org/">MaatKit </a>tools.</p>
<p>As some more background, the server log will be probably show and error like this to indicate there was a network error:<br />
[ERROR] Error reading packet from server: Lost connection to MySQL server during query (server_errno=2013)</p>
<p>And finally, if you do read the entire bug thread you will notice that the original developer of MySQL also has an opinion on this.</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2009/07/syntax-error-on-mysql-replication-slave-error-1064/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cacti and MySQL counters problem</title>
		<link>http://linuxsysadminblog.com/2009/06/cacti-and-mysql-counters-problem/</link>
		<comments>http://linuxsysadminblog.com/2009/06/cacti-and-mysql-counters-problem/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 01:46:15 +0000</pubDate>
		<dc:creator>Pim</dc:creator>
				<category><![CDATA[Cacti]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[InnoDB]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=740</guid>
		<description><![CDATA[We recently came across a problem with Cacti and the MySQL counters. For those of you who don&#8217;t know how to integrate MySQL statistics into Cacti have a look at this: http://code.google.com/p/mysql-cacti-templates/. These templates are a great way to gain some insight into how your MySQL database servers perform. The templates are actually PHP pages [...]]]></description>
			<content:encoded><![CDATA[<p>We recently came across a problem with Cacti and the MySQL counters. For those of you who don&#8217;t know how to integrate MySQL statistics into Cacti have a look at this: <a href="http://code.google.com/p/mysql-cacti-templates/" target="_blank">http://code.google.com/p/mysql-cacti-templates/</a>. These templates are a great way to gain some insight into how your MySQL database servers perform. The templates are actually PHP pages that query the databases through a variety of commands like SHOW STATUS and SHOW ENGINE INNODB STATUS.</p>
<p>The issue that we encountered was that some statistics like the InnoDB buffer pool activity were not displaying anything for one server. Other servers were displaying it just fine and other statistics for that server were also fine.</p>
<p>Among other things the SHOW ENGINE INNODB STATUS command shows deadlock information pertaining to the last deadlock that the InnoDB engine encountered. In some cases this information will be quite extensive and this causes a problem. The output of this command is one giant text field with a limit of 64KB. If the deadlock information is very large other information will get cut off which means certain statistics are lost. The easy fix for this is to restart the database server but in case this is not an option you can always use the innotop utility to wipe the deadlock information by causing a small deadlock.</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2009/06/cacti-and-mysql-counters-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Great Cloud Shootout at MySQL conference</title>
		<link>http://linuxsysadminblog.com/2009/04/the-great-cloud-shootout-at-mysql-conference/</link>
		<comments>http://linuxsysadminblog.com/2009/04/the-great-cloud-shootout-at-mysql-conference/#comments</comments>
		<pubDate>Fri, 01 May 2009 02:29:38 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[cloud computing]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=579</guid>
		<description><![CDATA[MySQL conference notes on cloud computing shoot out text summary atranscript Lew Tucker, Cloud CTO, sun Monty Taylor, MySQL Drissel Geek, Sun Jeremy Zawodny, MySQL hacker, craigslist Chander Kant, CEO, Zmanda Thorsten von Ficon, CTO, Rightscale Prashant Malik, Cassandra Dude, Facebook Mike Culver, Evangerlist, Amazon Web Services Some interesting subjects touched upon were: elasticity &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p><object width="640" height="390" data="http://blip.tv/play/AfymZYa8EA" type="application/x-shockwave-flash"><param name="src" value="http://blip.tv/play/AfymZYa8EA" /><param name="allowfullscreen" value="true" /></object></p>
<p>MySQL conference notes on cloud computing shoot out text summary atranscript</p>
<p>Lew Tucker, Cloud CTO, sun<br />
Monty Taylor, MySQL Drissel Geek, Sun<br />
Jeremy Zawodny, MySQL hacker, craigslist<br />
Chander Kant, CEO, Zmanda<br />
Thorsten von Ficon, CTO, Rightscale<br />
Prashant Malik, Cassandra Dude, Facebook<br />
Mike Culver, Evangerlist, Amazon Web Services</p>
<p>Some interesting subjects touched upon were:</p>
<p>elasticity &#8211; allowing even a small company to shoot for the moon without shooting itself in the foot<br />
like utilities, much like electricity &#8211; you dont think about the electricyt company running out of electricity<br />
new way of packaging the technology with a pay as you go model, way to provision your application</p>
<p>Different Types of Clouds<br />
Layers of Clouds<br />
Amazon like<br />
Google<br />
SaaS</p>
<p>Who is the cloud for?<br />
even ERP in the cloud?</p>
<p>How would an existing application benefit from the cloud?<br />
- scaling an application<br />
- leverage the collective scalability of the cloud<br />
- forklifting an application out of datacenter or in house colo<br />
- scalability testing?</p>
<p>Cloud adoption barriers<br />
- privacy<br />
- performance<br />
- network latency<br />
- trust and privacy<br />
- mindset on owning your own datacenter<br />
- competition (lack of)</p>
<p>What applications fit best into the cloud<br />
- own</p>
<p>Business Opportunities?<br />
- dev pay &#8211; the customer signs up for SaaS or Software as an annuity<br />
- learn how to do performance tuning and optimization and do that for cloud infrastructures (41:50)<br />
-</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2009/04/the-great-cloud-shootout-at-mysql-conference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Query Cache, Good or Bad?</title>
		<link>http://linuxsysadminblog.com/2009/04/mysql-query-cache-good-or-bad/</link>
		<comments>http://linuxsysadminblog.com/2009/04/mysql-query-cache-good-or-bad/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 01:55:06 +0000</pubDate>
		<dc:creator>Pim</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[tuning]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=536</guid>
		<description><![CDATA[MySQL has a number of different caches. Most of those are dependent on the storage engine that is used. The key buffer for example caches the indexes for MyISAM tables while the caching of data is left to the OS. InnoDB has the buffer pool for both data and indexes and so on. The query [...]]]></description>
			<content:encoded><![CDATA[<p>MySQL has a number of different caches. Most of those are dependent on the storage engine that is used. The key buffer for example caches the indexes for MyISAM tables while the caching of data is left to the OS. InnoDB has the buffer pool for both data and indexes and so on. The query cache however, is independent of the storage engine that is used. Unlike most caches it does not store records or pages of data but complete result sets and the queries that caused those results to be returned. This is a very disputable concept since the way that it works is that if any of the tables  used in a result set is modified, the whole cached result set is thrown out of the cache.</p>
<p><span id="more-536"></span>The good news is that if you have data that does not change very much the query cache can give you an enormous performance boost. It even bypasses the query optimizer so that if the query is complex even more cpu time is saved. Knowing this you can optimize your application by chopping complex queries into smaller queries that only use that data that never changes.</p>
<p>Of course there are some tricks to using the query cache. The first one is the size of the query cache. The default is 16MB which doesn&#8217;t do much. However, keep in mind that any memory assigned to the query cache is removed from another cache so it&#8217;s very important to strike a good balance. Of course the balance is very application dependent. The second parameter is the maximum allowed result set size. It really doesn&#8217;t do any good to allow 16MB result sets into the cache because it would take only one badly written query to flush out the entire cache. 1MB is standard but in my personal experience queries that return 1MB of results on a frequent basis usually indicate that the software needs to be optimized.</p>
<p>So when is the query cache a bad thing? Well, in short, when the cache gets flushed out all the time and only adds to the overhead it&#8217;s usually better to assign the memory to storage engine dependent cache. If there are constant updates and inserts to most of your tables it will invalidate the results in the query cache pretty quickly and assigning memory to it is a waste of resources.</p>
<p>Useful tools like <a title="MySQL Tuner" href="http://wiki.mysqltuner.com/MySQLTuner" target="_blank">MySQL Tuner</a> will give some quick information about the efficiency of the query cache but I do think it is a bit quick in suggesting more memory for the cache.</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2009/04/mysql-query-cache-good-or-bad/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Toughest MySQL CEO email &#8220;ever had to write&#8221;.</title>
		<link>http://linuxsysadminblog.com/2009/04/toughest-mysql-ceo-email-ever-had-to-write/</link>
		<comments>http://linuxsysadminblog.com/2009/04/toughest-mysql-ceo-email-ever-had-to-write/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 00:58:29 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=534</guid>
		<description><![CDATA[When I saw this text in this WSJ article about the Sun&#8217;s Jonathan Schwartz email, it really sounded like I was re-living the year 2000 doc com bubble and I was reading www.fuckedcompany.com. We use MySQL extnsivly and for very high availability applications so naturally there was a lot of discussion about the future of [...]]]></description>
			<content:encoded><![CDATA[<p>When I saw this text in this WSJ article about the <a href="http://blogs.wsj.com/digits/2009/04/21/suns-schwartz-tries-to-reassure-his-troops-in-email/" target="_blank">Sun&#8217;s Jonathan Schwartz email</a>, it really sounded like I was re-living the year 2000 doc com bubble and I was reading www.fuckedcompany.com.</p>
<p>We use MySQL extnsivly and for very high availability applications so naturally there was a lot of discussion about the future of MySQL.  We believe that it will be for the better.  I hope the MySQL folks who created this super popular database feel the same.</p>
<p>But, how would you feel if you got this email?  Here is the copy.</p>
<blockquote><p>This is one of the toughest emails I’ve ever had to write.</p>
<p>It’s also one of the most hopeful about Sun’s future in the industry.</p>
<p>For 27 years, Sun has stood for courage, innovation, a willingness to blaze trails, to envision and engineer the future. No matter our ups and downs, we’ve remained committed to those ideals, and to the R&amp;D that’s allowed us to differentiate. We’ve committed to decade-long pursuits, from the evolution of one of the world’s most powerful datacenter operating systems, to one of the world’s most advanced multi-core microelectronics. We’ve never walked away from the wholesale reinvention of business models, the redefinition of technology boundaries or the pursuit of new routes to market.</p>
<p>Because of the unparalleled talent at Sun, we’ve also fueled entire industries with our people and technologies, and fostered extraordinary companies and market successes. Our products and services have driven the discovery of new drugs, transformed social media, and created a better understanding of the world and marketplace around us. All, while we’ve undergone a near constant transformation in the face of a rapidly changing marketplace and global economy. We’ve never walked away from a challenge &#8211; or an opportunity.</p>
<p>So today we take another step forward in our journey, but along a different path &#8211; by announcing that this weekend, our board of directors and I approved the acquisition of Sun Microsystems by the Oracle Corporation for $9.50/share in cash.</p>
<p>All members of the board present at the meeting to review the transaction voted for it with enthusiasm, and the transaction stands to utterly transform the marketplace &#8211; bringing together two companies with a long history of working together to create a newly unified vision of the future.</p>
<p>Oracle’s interest in Sun is very clear &#8211; they aspire to help customers simplify the development, deployment and operation of high value business systems, from applications all the way to datacenters. By acquiring Sun, Oracle will be well positioned to help customers solve the most complex technology problems related to running a business.</p>
<p>To me, this proposed acquisition totally redefines the industry, resetting the competitive landscape by creating a company with great reach, expertise and innovation. A combined Oracle/Sun will be capable of cultivating one of the world’s most vibrant and far reaching developer communities, accelerating the convergence of storage, networking and computing, and delivering one of the world’s most powerful and complete portfolios of business and technical software.</p>
<p>I do not consider the announcement to be the end of the road, not by any stretch of the imagination. I believe this is the first step down a different path, one that takes us and our innovations to an even broader market, one that ensures the ubiquitous role we play in the world around us. The deal was announced today, and, after regulatory review and shareholder approval, will take some months to close &#8211; until that close occurs, however, we are a separate company, operating independently. No matter how long it takes, the world changed starting today.</p>
<p>But it’s important to note it’s not the acquisition that’s changing the world &#8211; it’s the people that fuel both companies. Having spent a considerable amount of time talking to Oracle, let me assure you they are single minded in their focus on the one asset that doesn’t appear in our financial statements: our people. That’s their highest priority &#8211; creating an inviting and compelling environment in which our brightest minds can continue to invent and deliver the future.</p>
<p>Thank you for everything you’ve done over the years, and for everything you will do in the future to carry the business forward. I’m incredibly proud of this company and what we’ve accomplished together.</p>
<p>Details will be forthcoming as we work together on the integration planning process.</p>
<p>Jonathan</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2009/04/toughest-mysql-ceo-email-ever-had-to-write/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Videos of Google Data Centers and presentation video from the Google Efficent Data Center Summit</title>
		<link>http://linuxsysadminblog.com/2009/04/videos-of-google-data-centers-and-presentation-video-from-the-google-efficent-data-center-summit/</link>
		<comments>http://linuxsysadminblog.com/2009/04/videos-of-google-data-centers-and-presentation-video-from-the-google-efficent-data-center-summit/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 14:34:54 +0000</pubDate>
		<dc:creator>andrew</dc:creator>
				<category><![CDATA[Installation]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[datacenter]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=519</guid>
		<description><![CDATA[On April 1st Google hosted a Efficient Data Center Summit .    The videos below are of the Google container based data centers, outlining the design of cooling systems, the containers themselves hosing hundreds of thousands of servers.  It shows their water cooling systems, and video shots of inside of the containers as well as what [...]]]></description>
			<content:encoded><![CDATA[<p>On April 1st Google hosted a <a href="http://www.google.com/corporate/green/datacenters/summit.html" target="_blank">Efficient Data Center Summit</a> .    The videos below are of the Google container based data centers, outlining the design of cooling systems, the containers themselves hosing hundreds of thousands of servers.  It shows their water cooling systems, and video shots of inside of the containers as well as what they call &#8216;Google night life&#8217;.  Unfortunately the slide our servers are not on cork boards, but they do look to be attached to a fairly flimsy rail system.  <img src='http://linuxsysadminblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>My favorites are the server swap and a <a href="&lt;a href=&quot;http://googleblog.blogspot.com/2009/04/designing-lean-green-energy-saving.html&quot;&gt;Official Google Blog: Designing lean, green, energy-saving machines&lt;/a&gt;" target="_blank">Google provided Personal Transportation Device (PTD)</a>.</p>
<p>These are great videos providing a glimpse into the usually locked down giant data centers housing thousands of servers.  This is how its done!</p>
<p><object width="560" height="340" data="http://www.youtube.com/v/zRwPSFpLX8I&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/zRwPSFpLX8I&amp;hl=en&amp;fs=1" /><param name="allowfullscreen" value="true" /></object></p>
<p>That was the summary video overview of a google data center &#8211; container based.</p>
<p>Below are a few more videos from the above mentioned Efficency Data Center Summit.  Here is part one overview the google green grid.</p>
<p><object width="425" height="344" data="http://www.youtube.com/v/Ho1GEyftpmQ&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/Ho1GEyftpmQ&amp;hl=en&amp;fs=1" /><param name="allowfullscreen" value="true" /></object></p>
<p>Here is the google provided summary of the event, and the following part 2 and 3 videos of the event.</p>
<p>On April 1<sup>st</sup>, we hosted leaders of the IT industry to discuss best practices for improving data center efficiency. The day was spent discussing how to make significant reductions in resource use while meeting service requirements. Saving electricity and water is not just good for the environment, it makes good business sense too. Being &#8220;green&#8221; reduces operating costs and can keep our industry competitive; it is the economic advantage that makes efficiency truly sustainable.</p>
<p><object width="425" height="344" data="http://www.youtube.com/v/m03vdyCuWS0&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/m03vdyCuWS0&amp;hl=en&amp;fs=1" /><param name="allowfullscreen" value="true" /></object></p>
<p><object width="425" height="344" data="http://www.youtube.com/v/91I_Ftsd-7s&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/91I_Ftsd-7s&amp;hl=en&amp;fs=1" /><param name="allowfullscreen" value="true" /></object></p>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2009/04/videos-of-google-data-centers-and-presentation-video-from-the-google-efficent-data-center-summit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cloud computing scenario&#8217;s for database servers</title>
		<link>http://linuxsysadminblog.com/2009/02/cloud-computing-scenarios-for-database-servers/</link>
		<comments>http://linuxsysadminblog.com/2009/02/cloud-computing-scenarios-for-database-servers/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 15:09:35 +0000</pubDate>
		<dc:creator>Pim</dc:creator>
				<category><![CDATA[Down Time]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Replication]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[ec2]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=322</guid>
		<description><![CDATA[We&#8217;ve been investigating the possibilities of using cloud computing for our clients. Especially Amazon EC2 has the potential to be be really effective in offering flexible, pay-as-you-go computing. From my own perspective I have been looking at how to use cloud computing in combination with MySQL and I must say that I&#8217;m a bit sceptical [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve been investigating the possibilities of using cloud computing for our clients. Especially Amazon EC2 has the potential to be be really effective in offering flexible, pay-as-you-go computing. From my own perspective I have been looking at how to use cloud computing in combination with MySQL and I must say that I&#8217;m a bit sceptical about the effectiveness of cloud computing in replacing the primary database server. First off there does not seem to be that much in the way of performance data for this type of installation. Can a cloud server really offer the I/O performance necessary to replace a dedicated database server? And even if the performance is equal, what is the main advantage? Scaling web sites is done by adding more servers in most cases but the same approach only works for database servers when clusters are used. So in what other scenario&#8217;s does cloud computing give us an edge?</p>
<p><span id="more-322"></span><strong>Temporary reporting servers<br />
</strong>Create a one time copy of an existing production database server to run specific heavy reports. This is ideal for monthly reports since the server only needs to be up and running for several hours per month.</p>
<p><strong>Backup database server<br />
</strong>This is a backup solution where the server is only allocated once there is a problem with the primary server which makes a lot of sense because the client only pays for the server once it is used. One downside to this scenario is that the server has to created and loaded with the latest backup which will result in a decent amount of downtime but at least all of this can be automated. A bigger problem is the loss of data since the latest backup.For our high availability sites we have a standby database server replicating all changes from the master so we can switch over at a moment&#8217;s notice without losing any data.</p>
<p><strong>Migrations<br />
</strong>Performing a migration or a system upgrade usually brings some downtime. Promoting a standby system to primary creates a single point of failure so it makes sense to create a remporary standby of the standby.</p>
<p><strong>Development branches and testing environments<br />
</strong>For development branches we usually only need an extra database for a short amount of time although truth be told, those database are not very large in general so we tend to put them on the same development database server anyway. The same is true for testing and QA. These activities usually occur in cycles which means that they are very attractive targets for cloud based servers.</p>
<p><strong>Alternative data center<br />
</strong>Yes, it happened to us once that our datacenter went off line due to a very heavy attack. Instead of finding another data center for these eventualities it could be useful to have cloud based backup servers defined. However, this requires the extra effort of keeping these instances up to date for this eventuality. Additionally, DNS caching will stop the switch from being instantaneous. A geographical load balancing solution would be the answer to that but at that point the cost for preparing for this eventuality will have to be compared to the loss due to down time.</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2009/02/cloud-computing-scenarios-for-database-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extending the slow query log</title>
		<link>http://linuxsysadminblog.com/2009/02/extending-the-slow-query-log/</link>
		<comments>http://linuxsysadminblog.com/2009/02/extending-the-slow-query-log/#comments</comments>
		<pubDate>Wed, 04 Feb 2009 20:54:30 +0000</pubDate>
		<dc:creator>Pim</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[slow query log]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=302</guid>
		<description><![CDATA[Andy posted some very good links recently to video&#8217;s on how to optimize your web site. Although I spend more time optimizing the database you always have to go where the actual performance is lost. For MySQL the place to check for performance issues is the slow query log which I have mentioned in earlier [...]]]></description>
			<content:encoded><![CDATA[<p>Andy posted some very good links recently to video&#8217;s on how to optimize your web site. Although I spend more time optimizing the database you always have to go where the actual performance is lost. For MySQL the place to check for performance issues is the slow query log which I have mentioned in earlier posts. The limitation of this log is that a query has to take at least one second to appear in this log. This skips over queries that are executed thousands if not millions of times and which take less than a second. These queries might have just as much of a performance impact as queries that last several seconds each.</p>
<p>In the article below it shows how to patch the slow query log to track queries that last less than a second. Obviously you don&#8217;t want to have this running continually in production because the amount of logging would be enormous but in test environments or for a limited time in production this can be very useful. Be prepared to analyse some huge amounts of data though.</p>
<p><a href="http://www.mysqlperformanceblog.com/2006/09/06/slow-query-log-analyzes-tools/" target="_blank">http://www.mysqlperformanceblog.com/2006/09/06/slow-query-log-analyzes-tools/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2009/02/extending-the-slow-query-log/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL query optimization for network throughput</title>
		<link>http://linuxsysadminblog.com/2008/12/mysql-query-optimization-for-network-throughput/</link>
		<comments>http://linuxsysadminblog.com/2008/12/mysql-query-optimization-for-network-throughput/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 15:42:46 +0000</pubDate>
		<dc:creator>Pim</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Cyber Monday]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[traffic]]></category>

		<guid isPermaLink="false">http://linuxsysadminblog.com/?p=155</guid>
		<description><![CDATA[It&#8217;s a bit of a long title for a blog post but the point I want to make is that not every query optimization is aimed at making the query faster. As a case in point we have a client that has a web shop and their network traffic between the web servers and the [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s a bit of a long title for a blog post but the point I want to make is that not every query optimization is aimed at making the query faster. As a case in point we have a client that has a web shop and their network traffic between the web servers and the database servers has been sizable to say the least. There was a good amount of old code that probably worked pretty well when the shop just started out and had small amounts of data. Now the shop has grown certain queries suddenly don&#8217;t perform so good anymore.</p>
<p>On any weekday around lunch time network traffic between web and data servers was around 80Mb/s. On a 100Mb/s connection that is dangerously high and to address this we&#8217;ve been in the process of modifying queries that do a SELECT *. There really hardly ever is a reason to do a SELECT * except when you have very flexible code that automatically deals with extra columns. That was not the case with this application.</p>
<p>On Cyber Monday we found that traffic for this shop was touching 100Mb/s and web site performance really suffered. As a temporary measure we switched the database server to a 1Gb/s connection but both web servers stayed on 100Mb/s connections.</p>
<p>Looking at the slow query log and mtop revealed a ton of similar queries:<br />
<code><br />
# User@Host: username[username] @  [10.0.0.123]<br />
# Query_time: 2  Lock_time: 0  Rows_sent: 1948  Rows_examined: 2047<br />
SELECT * FROM sites, sites_to_bundle WHERE sites_to_bundle.sites_id = sites.sites_id AND sites.site_name ='shop1';</code></p>
<p>In and by them selves these queries look pretty harmless. 2000 rows is not that much. Maybe more than is needed but not enough to choke up the network either. The problem turns out to be that this query was executed several times for each page in the check out process. The database server was not overloaded since it had the whole result set in its cache, but it had to transfer 2MB of data for each request. When a developer investigated it turned out that only one 2 digit value of the entire result set was used.</p>
<p>We rewrote query and pushed to production on that same day. Yes, I know that a previous blog post tells us not to do that but in this case I&#8217;m glad we did. Network traffic dropped below 10Mb/s and the web site was flying. Below is the Cacti graph that shows that difference. Shortly after 15:00 we implemented the optimization and traffic dropped dramatically.</p>
<div id="attachment_162" class="wp-caption alignnone" style="width: 510px"><a href="http://linuxsysadminblog.com/wp-content/uploads/2008/12/network_traffic_improvement.png"><img class="size-full wp-image-162" title="Cacti network graph" src="http://linuxsysadminblog.com/wp-content/uploads/2008/12/network_traffic_improvement.png" alt="" width="500" height="207" /></a><p class="wp-caption-text">Network traffic decrease after query optimization</p></div>
]]></content:encoded>
			<wfw:commentRss>http://linuxsysadminblog.com/2008/12/mysql-query-optimization-for-network-throughput/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

