<?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>PlanetMysql.ru - информация о СУБД MySQL &#187; Software and tools</title>
	<atom:link href="http://planetmysql.ru/category/software-and-tools/feed/" rel="self" type="application/rss+xml" />
	<link>http://planetmysql.ru</link>
	<description>Блог о самой популярной СУБД MySQL</description>
	<lastBuildDate>Thu, 24 May 2012 22:24:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Green HDs and RAID Arrays</title>
		<link>http://openquery.com/blog/green-hds-raid-arrays?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=green-hds-and-raid-arrays</link>
		<comments>http://openquery.com/blog/green-hds-raid-arrays#comments</comments>
		<pubDate>Mon, 26 Sep 2011 02:37:46 +0000</pubDate>
		<dc:creator>Open Query</dc:creator>
				<category><![CDATA[array]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[Green]]></category>
		<category><![CDATA[harddisk]]></category>
		<category><![CDATA[hd]]></category>
		<category><![CDATA[HDD]]></category>
		<category><![CDATA[MariaDB]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[raid]]></category>
		<category><![CDATA[SAS]]></category>
		<category><![CDATA[SATA]]></category>
		<category><![CDATA[Software and tools]]></category>

		<guid isPermaLink="false">http://openquery.com/blog/?p=1562</guid>
		<description><![CDATA[Some so-called &#8220;Green&#8221; harddisks don&#8217;t like being in a RAID array. These are primarily SATA drives, and they gain their green credentials by being able reduce their RPM when not in use, as well as other aggressive power management trickery. That&#8217;s all cool and in a way desirable &#8211; we want our hardware to use less power whenever possible! &#8211; but the time it takes some drives to &#8220;wake up&#8221; again is longer than a RAID setup is willing to tolerate.
First of all, you may wonder why I bother with SATA disks at all for RAID. I&#8217;ve written about this before, but they simply deliver plenty for much less money. Higher RPM doesn&#8217;t necessarily help you for a db-related (random access) workload, and for tasks like backups which do have a lot of speed may not be a primary concern. SATA disks have a shorter command queue than SAS, so that means they might need to seek more &#8211; however a smart RAID controller would already arrange its I/O in such a way as to optimise that.
The particular application where I tripped over Green disks was a backup array using software RAID10. Yep, a cheap setup &#8211; the objective is to have lots of diskspace with resilience, and access speed is not a requirement.
Not all Green HDs are the same. Western Digital ones allow their settings to be changed, although that does need a DOS tool (just a bit of a pest using a USB stick with FreeDOS and the WD tool, but it&#8217;s doable), whereas Seagate has decided to restrict their Green models such that they don&#8217;t accept any APM commands and can&#8217;t change their configuration.
I&#8217;ve now replaced Seagates with (non-Green) Hitachi drives, and I&#8217;m told that Samsung disks are also ok.
So this is something to keep in mind when looking at SATA RAID arrays. I also think it might be a topic that the Linux software RAID code could address &#8211; if it were &#8220;Green HD aware&#8221; it could a) make sure that they don&#8217;t go to a state that is unacceptable, and b) be tolerant with their response time &#8211; this could be configurable. Obviously, some applications of RAID have higher demands than others, not all are the same.]]></description>
			<content:encoded><![CDATA[<p>Some so-called &#8220;Green&#8221; harddisks don&#8217;t like being in a RAID array. These are primarily SATA drives, and they gain their green credentials by being able reduce their RPM when not in use, as well as other aggressive power management trickery. That&#8217;s all cool and in a way desirable &#8211; we want our hardware to use less power whenever possible! &#8211; but the time it takes some drives to &#8220;wake up&#8221; again is longer than a RAID setup is willing to tolerate.</p>
<p>First of all, you may wonder why I bother with SATA disks at all for RAID. I&#8217;ve written about this before, but they simply deliver plenty for much less money. Higher RPM doesn&#8217;t necessarily help you for a db-related (random access) workload, and for tasks like backups which do have a lot of speed may not be a primary concern. SATA disks have a shorter command queue than SAS, so that means they might need to seek more &#8211; however a smart RAID controller would already arrange its I/O in such a way as to optimise that.</p>
<p>The particular application where I tripped over Green disks was a backup array using software RAID10. Yep, a cheap setup &#8211; the objective is to have lots of diskspace with resilience, and access speed is not a requirement.</p>
<p>Not all Green HDs are the same. Western Digital ones allow their settings to be changed, although that does need a DOS tool (just a bit of a pest using a USB stick with FreeDOS and the WD tool, but it&#8217;s doable), whereas Seagate has decided to restrict their Green models such that they don&#8217;t accept any APM commands and can&#8217;t change their configuration.</p>
<p>I&#8217;ve now replaced Seagates with (non-Green) Hitachi drives, and I&#8217;m told that Samsung disks are also ok.</p>
<p>So this is something to keep in mind when looking at SATA RAID arrays. I also think it might be a topic that the Linux software RAID code could address &#8211; if it were &#8220;Green HD aware&#8221; it could a) make sure that they don&#8217;t go to a state that is unacceptable, and b) be tolerant with their response time &#8211; this could be configurable. Obviously, some applications of RAID have higher demands than others, not all are the same.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=30089&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=30089&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2011/09/26/green-hds-and-raid-arrays/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL data backup: going beyond mysqldump</title>
		<link>http://openquery.com/blog/mysql-data-backup-mysqldump?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mysql-data-backup-going-beyond-mysqldump</link>
		<comments>http://openquery.com/blog/mysql-data-backup-mysqldump#comments</comments>
		<pubDate>Tue, 29 Mar 2011 00:25:36 +0000</pubDate>
		<dc:creator>Open Query</dc:creator>
				<category><![CDATA[backup]]></category>
		<category><![CDATA[Good practice / Bad practice]]></category>
		<category><![CDATA[MariaDB]]></category>
		<category><![CDATA[mmm]]></category>
		<category><![CDATA[mysqldump]]></category>
		<category><![CDATA[recovery]]></category>
		<category><![CDATA[Replication]]></category>
		<category><![CDATA[restore]]></category>
		<category><![CDATA[Software and tools]]></category>
		<category><![CDATA[XtraBackup]]></category>

		<guid isPermaLink="false">http://openquery.com/blog/?p=1446</guid>
		<description><![CDATA[A user on a linux user group mailing list asked about this, and I was one of the people replying. Re-posting here as I reckon it&#8217;s of wider interest.
&#62; [...] tens of gigs of data in MySQL databases.
&#62; Some in memory tables, some MyISAM, a fair bit InnoDB. According to my
&#62; understanding, when one doesn&#8217;t have several hours to take a DB
&#62; offline and do dbbackup, there was/is ibbackup from InnoBase.. but now
&#62; that MySQL and InnoBase have both been &#8216;Oracle Enterprised&#8217;, said
&#62; product is now restricted to MySQL Enterprise customers..
&#62;
&#62; Some quick searching has suggested Percona XtraBackup as a potential
&#62; FOSS alternative.
&#62; What backup techniques do people employ around these parts for backups
&#62; of large mixed MySQL data sets where downtime *must* be minimised?
&#62;
&#62; Has your backup plan ever been put to the test?
You should put it to the test regularly, not just when it&#8217;s needed.
An untested backup is not really a backup, I think.
At  Open Query we tend to use dual master setups with MMM, other  replication slaves, mysqldump, and XtracBackup or LVM snapshots. It&#8217;s  not just about having backups, but also about general resilience,  maintenance options, and scalability. I&#8217;ll clarify:

XtraBackup and LVM give you physical backups. that&#8217;s nice if you want to  recover or clone a complete instance as-is. But if anything is wrong,  it&#8217;ll be all stuffed (that is, you can sometimes recover InnoDB  tablespaces and there are tools for it, but time may not be on your  side). Note that LVM cannot snapshot between multiple volumes  consistently, so if you have your InnoDB ibdata/IBD files and iblog  files on separate spindles, using LVM is not suitable.


mysqldump for logical (SQL) backups. Most if not all setups should have  this. Even if the file(s) were to be corrupted, they&#8217;re still readable  since it&#8217;s plain SQL. You can do partial restores, which is handy in  some cases. It&#8217;ll be slower to load so having *only* an SQL dump of a  larger dataset is not a good idea.


some of the above backups  can and should *also* be copied off-site. that&#8217;s for extra safety, but  in terms of recovery speed it may not be optimal and should not be  relied upon.


having dual masters is for easier maintenance  without scheduled outages, as well as resilience when for instance  hardware breaks (and it does).


slaves. You can even delay a  slave (Maatkit has a tool for this), so that would give you a live  correct image even in case of a user error, provided you get to it in  time. Also, you want enough slack in your infra to be able to initialise  a new slave off an existing one. Scaling up at a time when high load is  already occurring can become painful if your infra is not prepared for  it.

A key issue to consider is this&#8230; if the dataset is  sufficiently large, and the online requirements high enough, you can&#8217;t  afford to just have backups. Why? Because, how quickly can you deploy  new suitable hardware, install OS, do restore, validate, put back  online?
In many cases one or more aspects of the above list simply  take too long, so my summary would be &#8220;then you don&#8217;t really have a  backup&#8221;. Clients tend to argue with me on that, but only fairly briefly, until  they see the point: if a restore takes longer than you can afford, that  backup mechanism is unsuitable.
So, we use a combination of tools  and approaches depending on needs, but in general terms we aim for  keeping the overall environment online (individual machines can and will  fail! relying on a magic box or SAN to not fail *will* get you bitten)  to vastly reduce the instances where an actual restore is required.
Into  that picture also comes using separate test/staging servers to not have  developers stuff around on live servers (human error is an important  cause of hassles).
In our training modules, we&#8217;ve combined the  backups, recovery and replication topics as it&#8217;s clearly all intertwined  and overlapping. Discussing backup techniques separate from replication  and dual master setups makes no sense to us. It needs to be put in  place with an overall vision.
Note that a SAN is not a backup strategy. And neither is replication on its own.]]></description>
			<content:encoded><![CDATA[<p>A user on a linux user group mailing list asked about this, and I was one of the people replying. Re-posting here as I reckon it&#8217;s of wider interest.</p>
<p>&gt; [...] tens of gigs of data in MySQL databases.<br />
&gt; Some in memory tables, some MyISAM, a fair bit InnoDB. According to my<br />
&gt; understanding, when one doesn&#8217;t have several hours to take a DB<br />
&gt; offline and do dbbackup, there was/is ibbackup from InnoBase.. but now<br />
&gt; that MySQL and InnoBase have both been &#8216;Oracle Enterprised&#8217;, said<br />
&gt; product is now restricted to MySQL Enterprise customers..<br />
&gt;<br />
&gt; Some quick searching has suggested Percona XtraBackup as a potential<br />
&gt; FOSS alternative.<br />
&gt; What backup techniques do people employ around these parts for backups<br />
&gt; of large mixed MySQL data sets where downtime *must* be minimised?<br />
&gt;<br />
&gt; Has your backup plan ever been put to the test?</p>
<p>You should put it to the test regularly, not just when it&#8217;s needed.<br />
An untested backup is not really a backup, I think.</p>
<p>At  <a href="http://openquery.com/" >Open Query</a> we tend to use dual master setups with MMM, other  replication slaves, mysqldump, and XtracBackup or LVM snapshots. It&#8217;s  not just about having backups, but also about general resilience,  maintenance options, and scalability. I&#8217;ll clarify:</p>
<ul>
<li>XtraBackup and LVM give you physical backups. that&#8217;s nice if you want to  recover or clone a complete instance as-is. But if anything is wrong,  it&#8217;ll be all stuffed (that is, you can sometimes recover InnoDB  tablespaces and there are tools for it, but time may not be on your  side). Note that LVM cannot snapshot between multiple volumes  consistently, so if you have your InnoDB ibdata/IBD files and iblog  files on separate spindles, using LVM is not suitable.</li>
</ul>
<ul>
<li>mysqldump for logical (SQL) backups. Most if not all setups should have  this. Even if the file(s) were to be corrupted, they&#8217;re still readable  since it&#8217;s plain SQL. You can do partial restores, which is handy in  some cases. It&#8217;ll be slower to load so having *only* an SQL dump of a  larger dataset is not a good idea.</li>
</ul>
<ul>
<li>some of the above backups  can and should *also* be copied off-site. that&#8217;s for extra safety, but  in terms of recovery speed it may not be optimal and should not be  relied upon.</li>
</ul>
<ul>
<li>having dual masters is for easier maintenance  without scheduled outages, as well as resilience when for instance  hardware breaks (and it does).</li>
</ul>
<ul>
<li>slaves. You can even delay a  slave (Maatkit has a tool for this), so that would give you a live  correct image even in case of a user error, provided you get to it in  time. Also, you want enough slack in your infra to be able to initialise  a new slave off an existing one. Scaling up at a time when high load is  already occurring can become painful if your infra is not prepared for  it.</li>
</ul>
<p><strong>A key issue to consider is this&#8230; if the dataset is  sufficiently large, and the online requirements high enough, you can&#8217;t  afford to just have backups. Why? Because, how quickly can you deploy  new suitable hardware, install OS, do restore, validate, put back  online?</strong></p>
<p><em>In many cases one or more aspects of the above list simply  take too long, so my summary would be &#8220;then you don&#8217;t really have a  backup&#8221;. Clients tend to argue with me on that, but only fairly briefly, until  they see the point: if a restore takes longer than you can afford, that  backup mechanism is unsuitable.</em></p>
<p>So, we use a combination of tools  and approaches depending on needs, but in general terms we aim for  keeping the overall environment online (individual machines can and will  fail! relying on a magic box or SAN to not fail *will* get you bitten)  to vastly reduce the instances where an actual restore is required.<br />
Into  that picture also comes using separate test/staging servers to not have  developers stuff around on live servers (human error is an important  cause of hassles).</p>
<p>In our training modules, we&#8217;ve combined the  backups, recovery and replication topics as it&#8217;s clearly all intertwined  and overlapping. Discussing backup techniques separate from replication  and dual master setups makes no sense to us. It needs to be put in  place with an overall vision.</p>
<p>Note that a SAN is not a backup strategy. And neither is replication on its own.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=27766&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=27766&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2011/03/29/mysql-data-backup-going-beyond-mysqldump/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PBXT early impressions in production use</title>
		<link>http://openquery.com/blog/pbxt-early-impressions-production?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=pbxt-early-impressions-in-production-use</link>
		<comments>http://openquery.com/blog/pbxt-early-impressions-production#comments</comments>
		<pubDate>Thu, 27 May 2010 02:03:19 +0000</pubDate>
		<dc:creator>Open Query</dc:creator>
				<category><![CDATA[InnoDB]]></category>
		<category><![CDATA[MariaDB]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[PBXT]]></category>
		<category><![CDATA[Software and tools]]></category>
		<category><![CDATA[storage engine]]></category>
		<category><![CDATA[xa]]></category>

		<guid isPermaLink="false">http://openquery.com/blog/?p=1257</guid>
		<description><![CDATA[With Paul McCullagh&#8217;s PBXT storage engine getting integrated into MariaDB 5.1, it&#8217;s never been easier to it out. So we have, on a slave off one of our own production systems which gets lots of inserts from our Zabbix monitoring system.
That&#8217;s possibly an ideal usage profile, since PBXT is a log based engine (simplistically stated, it indexes its transaction logs, rather than rewriting data from log into index and indexing that) so it should require less disk I/O than say InnoDB. And that means it should be particularly suited to for instance logging, which have lots of inserts on a sustained basis. Note that for short insert burst you may not see a difference with InnoDB because of caching, but sustain it and then you can notice.
Because PBXT has such different/distinct architecture there&#8217;s a lot of learning involved. Together with Paul and help from Roland Bouman we also created a stored procedure that can calculate the optimal average row size for PBXT, and even ALTER TABLE statements you can paste to convert tables. The AVG_ROW_LENGTH option is quite critical with PBXT, if set too big (or if you let PBXT guess and it gets it wrong) it&#8217;ll eat heaps more diskspace as well as being much slower, and if too small it&#8217;ll be slower also; this, it needs to be in the right ballpark. For existing datasets it can be calculated, so that&#8217;s what we&#8217;ve worked on. The procs will be published shortly, and Paul will also put them in with the rest of the PBXT files.
Another important aspect for PBXT is having sufficient cache memory allocated, otherwise operations can take much much longer. While the exact &#8220;cause&#8221; is different, one would notice similar performance aspects when using InnoDB on larger datasets and buffers that are too small for the purpose.
So, while using or converting some tables to PBXT takes a bit of consideration, effort and learning, it appears to be dealing with the real world very well so far &#8211; and that&#8217;s a testament to Paul&#8217;s experience. Paul is also very responsive to questions. As we gain more experience, it is our intent to try PBXT for some of our clients that have operational needs that might be a particularly good fit for PBXT.
I should also mention that it is possible to have a consistent  transaction between PBXT, InnoDB and the binary log, because of the  2-phase commit (XA) infrastructure. This means that you should even be  able to do a mysqldump with &#8211;single-transaction if you have both PBXT  and InnoDB tables, and acquire a consistent snapshot!
More experiences and details to come.]]></description>
			<content:encoded><![CDATA[<p>With Paul McCullagh&#8217;s <a href="http://primebase.org" >PBXT</a> storage engine getting integrated into <a href="http://askmonty.org" >MariaDB 5.1</a>, it&#8217;s never been easier to it out. So we have, on a slave off one of our own production systems which gets lots of inserts from our Zabbix monitoring system.</p>
<p>That&#8217;s possibly an ideal usage profile, since PBXT is a log based engine (simplistically stated, it indexes its transaction logs, rather than rewriting data from log into index and indexing that) so it should require less disk I/O than say InnoDB. And that means it should be particularly suited to for instance logging, which have lots of inserts on a sustained basis. Note that for short insert burst you may not see a difference with InnoDB because of caching, but sustain it and then you can notice.</p>
<p>Because PBXT has such different/distinct architecture there&#8217;s a lot of learning involved. Together with Paul and help from Roland Bouman we also created a stored procedure that can calculate the optimal average row size for PBXT, and even ALTER TABLE statements you can paste to convert tables. The AVG_ROW_LENGTH option is quite critical with PBXT, if set too big (or if you let PBXT guess and it gets it wrong) it&#8217;ll eat heaps more diskspace as well as being much slower, and if too small it&#8217;ll be slower also; this, it needs to be in the right ballpark. For existing datasets it can be calculated, so that&#8217;s what we&#8217;ve worked on. The procs will be published shortly, and Paul will also put them in with the rest of the PBXT files.</p>
<p>Another important aspect for PBXT is having sufficient cache memory allocated, otherwise operations can take much much longer. While the exact &#8220;cause&#8221; is different, one would notice similar performance aspects when using InnoDB on larger datasets and buffers that are too small for the purpose.</p>
<p>So, while using or converting some tables to PBXT takes a bit of consideration, effort and learning, it appears to be dealing with the real world very well so far &#8211; and that&#8217;s a testament to Paul&#8217;s experience. Paul is also very responsive to questions. As we gain more experience, it is our intent to try PBXT for some of our clients that have operational needs that might be a particularly good fit for PBXT.</p>
<p>I should also mention that it is possible to have a consistent  transaction between PBXT, InnoDB and the binary log, because of the  2-phase commit (XA) infrastructure. This means that you should even be  able to do a mysqldump with &#8211;single-transaction if you have both PBXT  and InnoDB tables, and acquire a consistent snapshot!</p>
<p>More experiences and details to come.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=24877&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=24877&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2010/05/27/pbxt-early-impressions-in-production-use/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quest for Resilience: Multi-DC Masters</title>
		<link>http://openquery.com/blog/quest-resilience-multidc-masters?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=quest-for-resilience-multi-dc-masters</link>
		<comments>http://openquery.com/blog/quest-resilience-multidc-masters#comments</comments>
		<pubDate>Fri, 14 May 2010 01:07:57 +0000</pubDate>
		<dc:creator>Open Query</dc:creator>
				<category><![CDATA[datacentre]]></category>
		<category><![CDATA[drbd]]></category>
		<category><![CDATA[failover]]></category>
		<category><![CDATA[MariaDB]]></category>
		<category><![CDATA[mmm]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Replication]]></category>
		<category><![CDATA[resilience]]></category>
		<category><![CDATA[SAN]]></category>
		<category><![CDATA[Software and tools]]></category>
		<category><![CDATA[VM]]></category>

		<guid isPermaLink="false">http://openquery.com/blog/?p=1241</guid>
		<description><![CDATA[This is a Request for Input. Dual MySQL masters with MMM in a single datacentre are in common use, and other setups like DRBD and of course VM/SAN based failover solutions are conceptually straightforward also. Thus, achieving various forms of resilience within a single data-centre is doable and not costly.
Doing the same across multiple (let&#8217;s for simplicity sake limit it to two) datacentres is another matter. MySQL replication works well across longer links, and it can use MySQL&#8217;s in-built SSL or tools like stunnel. Of course it needs to be kept an eye on, as usual, but since it&#8217;s asynchronous the latency between the datacentres is not a big issue (apart from the fact that the second server gets up-to-date a little bit later).
But as those who have tried will know, having a client (application server) connection to a MySQL instance in a remote data-centre is a whole other matter, latency becomes a big issue and is generally very noticeable on the front-end. One solution for that is to have application servers only connect to their &#8220;local&#8221; MySQL server.
So the question to you is, do you now have (or have you had in the past) a setup with MySQL masters in different datacentres, what did that setup look like (which additional tools and infra did you use for it), and what were your experiences (good and bad, solutions to issues, etc). I&#8217;m trying to gather additional expertise that might already be about, which can help us all. Please add your input! thanks]]></description>
			<content:encoded><![CDATA[<p>This is a Request for Input. Dual MySQL masters with MMM in a single datacentre are in common use, and other setups like DRBD and of course VM/SAN based failover solutions are conceptually straightforward also. Thus, achieving various forms of resilience within a single data-centre is doable and not costly.</p>
<p>Doing the same across multiple (let&#8217;s for simplicity sake limit it to two) datacentres is another matter. MySQL replication works well across longer links, and it can use MySQL&#8217;s in-built SSL or tools like stunnel. Of course it needs to be kept an eye on, as usual, but since it&#8217;s asynchronous the latency between the datacentres is not a big issue (apart from the fact that the second server gets up-to-date a little bit later).</p>
<p>But as those who have tried will know, having a client (application server) connection to a MySQL instance in a remote data-centre is a whole other matter, latency becomes a big issue and is generally very noticeable on the front-end. One solution for that is to have application servers only connect to their &#8220;local&#8221; MySQL server.</p>
<p>So the question to you is, do you now have (or have you had in the past) a setup with MySQL masters in different datacentres, what did that setup look like (which additional tools and infra did you use for it), and what were your experiences (good and bad, solutions to issues, etc). I&#8217;m trying to gather additional expertise that might already be about, which can help us all. Please add your input! thanks</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=24751&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=24751&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2010/05/14/quest-for-resilience-multi-dc-masters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open Query @ MySQL Conf &amp; Expo 2010</title>
		<link>http://openquery.com/blog/open-query-mysql-conf-expo-2010?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=open-query-mysql-conf-expo-2010</link>
		<comments>http://openquery.com/blog/open-query-mysql-conf-expo-2010#comments</comments>
		<pubDate>Thu, 08 Apr 2010 14:53:18 +0000</pubDate>
		<dc:creator>Open Query</dc:creator>
				<category><![CDATA[conferences]]></category>
		<category><![CDATA[GRAPH engine]]></category>
		<category><![CDATA[graphengine]]></category>
		<category><![CDATA[MariaDB]]></category>
		<category><![CDATA[mmm]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysqlconf]]></category>
		<category><![CDATA[neo4j]]></category>
		<category><![CDATA[Open Query]]></category>
		<category><![CDATA[OQGRAPH]]></category>
		<category><![CDATA[Software and tools]]></category>

		<guid isPermaLink="false">http://openquery.com/blog/?p=1216</guid>
		<description><![CDATA[Walter and I are giving a tutorial on Monday morning, MySQL (and MariaDB) Dual Master Setups with MMM, I believe there are still some seats available &#8211; tutorials are a bit extra when you register for the conference, so you do need to sign up if you want to be there! It&#8217;s a hands-on tutorial/workshop, we&#8217;ll be setting up multiple clusters with dual master and the whole rest of the MMM fun, using VMs on your laptops and a separate wired network. Nothing beats messing with something live, breaking it, and seeing what happens!
Then on Tuesday afternoon (5:15pm, Ballroom F), Antony and I will do a session on the OQGRAPH engine: hierarchies/graphs inside the database made easy. If you&#8217;ve been struggling with trees in SQL, would really like to effectively use social networking in your applications, need to work with RDF datasets, or have been exploring neo4j but otherwise have everything in MySQL or MariaDB, this session is for you.
We (and a few others from OQ) will be around for the entire conference, the community dinner (Monday evening) and other social events, and are happy to answer any questions you might have. You&#8217;ll be to easily recognise us in the crowds by our distinct friendly Open Query olive green shirts (green stands out because most companies mainly use blue/grey and orange/red).
Naturally we would love to do business with you (proactive support services, OQGRAPH development), but we don&#8217;t push ourselves on to unsuitable scenarios. In fact, we&#8217;re known to refer and even actively introduce clients to competent other vendors where appropriate. In any case, it&#8217;s our pleasure and privilege to meet you!
See you all in Santa Clara in a few days.]]></description>
			<content:encoded><![CDATA[<p>Walter and I are giving a tutorial on Monday morning, <a href="http://en.oreilly.com/mysql2010/public/schedule/detail/12434" >MySQL (and MariaDB) Dual Master Setups with MMM</a>, I believe there are still some seats available &#8211; tutorials are a bit extra when you <a href="https://en.oreilly.com/mysql2010/public/register" >register for the conference</a>, so you do need to sign up if you want to be there! It&#8217;s a hands-on tutorial/workshop, we&#8217;ll be setting up multiple clusters with dual master and the whole rest of the MMM fun, using VMs on your laptops and a separate wired network. Nothing beats messing with something live, breaking it, and seeing what happens!</p>
<p>Then on Tuesday afternoon (5:15pm, Ballroom F), Antony and I will do a session on the <a href="http://en.oreilly.com/mysql2010/public/schedule/detail/12586" >OQGRAPH engine: hierarchies/graphs inside the database made easy</a>. If you&#8217;ve been struggling with trees in SQL, would really like to effectively use social networking in your applications, need to work with RDF datasets, or have been exploring <em>neo4j</em> but otherwise have everything in MySQL or MariaDB, this session is for you.</p>
<p>We (and a few others from OQ) will be around for the entire conference, the <a href="http://www.pythian.com/news/8809/announcing-monday-night-community-dinner-at-pedros-during-the-oreilly-mysql-conference-expo/" >community dinner</a> (Monday evening) and other social events, and are happy to answer any questions you might have. You&#8217;ll be to easily recognise us in the crowds by our distinct friendly <a href="http://openquery.com" >Open Query</a> olive green shirts (green stands out because most companies mainly use blue/grey and orange/red).</p>
<p>Naturally we would love to do business with you (<a href="http://openquery.com/services/proactive" >proactive support services</a>, <a href="http://openquery.com/graph" >OQGRAPH development</a>), but we don&#8217;t push ourselves on to unsuitable scenarios. In fact, we&#8217;re known to refer and even actively introduce clients to competent other vendors where appropriate. In any case, it&#8217;s our pleasure and privilege to meet you!</p>
<p>See you all in Santa Clara in a few days.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=24237&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=24237&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2010/04/08/open-query-mysql-conf-expo-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL University session Oct 22: Dual Master Setups With MMM</title>
		<link>http://openquery.com/blog/mysql-university-session-oct-22-dual-master-setups-mmm?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mysql-university-session-oct-22-dual-master-setups-with-mmm</link>
		<comments>http://openquery.com/blog/mysql-university-session-oct-22-dual-master-setups-mmm#comments</comments>
		<pubDate>Wed, 21 Oct 2009 22:52:17 +0000</pubDate>
		<dc:creator>Open Query</dc:creator>
				<category><![CDATA[dual master]]></category>
		<category><![CDATA[failover]]></category>
		<category><![CDATA[loadbalancing]]></category>
		<category><![CDATA[mmm]]></category>
		<category><![CDATA[multi-master]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[MySQL University]]></category>
		<category><![CDATA[Open Query]]></category>
		<category><![CDATA[Replication]]></category>
		<category><![CDATA[Software and tools]]></category>
		<category><![CDATA[Walter Heck]]></category>

		<guid isPermaLink="false">http://openquery.com/blog/?p=1052</guid>
		<description><![CDATA[This Thursday (October 22nd, 13:00 UTC), Walter Heck (of Open Query) will present Dual Master Setups With MMM. MMM (Multi-Master Replication Manager for MySQL) is a set of flexible scripts to perform monitoring/failover and management of MySQL master-master replication configurations (with only one node writable at any time). Session slides (PDF).
The toolset also has the ability to read balance standard master/slave configurations with any number of slaves, so you can use it to move virtual IP addresses around a group of servers depending on whether they are behind in replication. For more
information, see mysql-mmm.org.
For MySQL University sessions you point your browser here. You need a browser with a working Flash plugin. You may register for a Dimdim account, but you don&#8217;t have to.]]></description>
			<content:encoded><![CDATA[<p>This Thursday (October 22nd, 13:00 UTC), Walter Heck (of Open Query) will present <a href="http://forge.mysql.com/wiki/Dual_Master_Setups_With_MMM">Dual Master Setups With MMM</a>. MMM (Multi-Master Replication Manager for MySQL) is a set of flexible scripts to perform monitoring/failover and management of MySQL master-master replication configurations (with only one node writable at any time). Session <a href="http://forge.mysql.com/w/images/0/05/DualMasterSetupsWithMMM.pdf">slides</a> (PDF).</p>
<p>The toolset also has the ability to read balance standard master/slave configurations with any number of slaves, so you can use it to move virtual IP addresses around a group of servers depending on whether they are behind in replication. For more<br />
information, see <a href="http://mysql-mmm.org/">mysql-mmm.org</a>.</p>
<p>For MySQL University sessions you point your browser <a href="http://webmeeting.dimdim.com/portal/JoinForm.action?confKey=mysqluniversity">here</a>. You need a browser with a working Flash plugin. You may register for a Dimdim account, but you don&#8217;t have to.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=21854&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=21854&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2009/10/22/mysql-university-session-oct-22-dual-master-setups-with-mmm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tool of the Day: rsnapshot</title>
		<link>http://openquery.com/blog/tool-day-rsnapshot?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tool-of-the-day-rsnapshot</link>
		<comments>http://openquery.com/blog/tool-day-rsnapshot#comments</comments>
		<pubDate>Thu, 17 Sep 2009 02:06:19 +0000</pubDate>
		<dc:creator>Open Query</dc:creator>
				<category><![CDATA[backup]]></category>
		<category><![CDATA[InnoDB]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Open Query]]></category>
		<category><![CDATA[recovery]]></category>
		<category><![CDATA[restore]]></category>
		<category><![CDATA[rsnapshot]]></category>
		<category><![CDATA[Software and tools]]></category>
		<category><![CDATA[XtraBackup]]></category>

		<guid isPermaLink="false">http://openquery.com/blog/?p=946</guid>
		<description><![CDATA[rsnapshot is a filesystem snapshot utility for making backups of local and remote systems, based on rsync. Rather than just doing a complete copy every time, it uses hardlinks to create incrementals (which are from a local perspective a full backup also). You can specify how long to keep old backups, and all the other usual jazz. You&#8217;d generally have it connect over ssh. You&#8217;ll want/need to run it on a filesystem that supports hardlinks, so that precludes NTFS.
In the context of MySQL, you can&#8217;t just do a filesystem copy of your MySQL data/logs, that would be inconsistent and broken. (amazingly, I still see people insisting/arguing on this &#8211; but heck it&#8217;s your business/data to gamble with, right?)
Anyway, if you do a local mysqldump also, or for instance use XtraBackup to take a binary backup of your InnoDB tablespace/logs, then rsnapshot can be used to automate the transfer of those files to a different geographical location.
Two extra things you need to do:

Regularly test your backups. They can fail, and that can be fatal. For XtraBackup, run the prepare command and essentially start up a MySQL instance on it to make sure it&#8217;s all happy. Havint this already done also saves time if you need to restore.
For restore time, you need to include the time needed to transfer files back to the target server.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://rsnapshot.org/" >rsnapshot</a> is a filesystem snapshot utility for making backups of local and remote systems, based on <a href="http://www.samba.org/rsync/" >rsync</a>. Rather than just doing a complete copy every time, it uses hardlinks to create incrementals (which are from a local perspective a full backup also). You can specify how long to keep old backups, and all the other usual jazz. You&#8217;d generally have it connect over ssh. You&#8217;ll want/need to run it on a filesystem that supports hardlinks, so that precludes NTFS.</p>
<p>In the context of MySQL, you can&#8217;t just do a filesystem copy of your MySQL data/logs, that would be inconsistent and broken.<em> (amazingly, I still see people insisting/arguing on this &#8211; but heck it&#8217;s your business/data to gamble with, right?)</em></p>
<p>Anyway, if you do a local mysqldump also, or for instance use <a href="https://launchpad.net/percona-xtrabackup" >XtraBackup</a> to take a binary backup of your InnoDB tablespace/logs, then rsnapshot can be used to automate the transfer of those files to a different geographical location.</p>
<p>Two extra things you need to do:</p>
<ul>
<li>Regularly <strong>test your backups</strong>. They can fail, and that can be fatal. For XtraBackup, run the <em>prepare</em> command and essentially start up a MySQL instance on it to make sure it&#8217;s all happy. Havint this already done also saves time if you need to restore.</li>
<li>For restore time, you need to <strong>include the time needed to transfer files back</strong> to the target server.</li>
</ul><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=21207&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=21207&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2009/09/17/tool-of-the-day-rsnapshot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tool of the Day: rsnapshot</title>
		<link>http://openquery.com/blog/tool-day-rsnapshot?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tool-of-the-day-rsnapshot</link>
		<comments>http://openquery.com/blog/tool-day-rsnapshot#comments</comments>
		<pubDate>Thu, 17 Sep 2009 02:06:19 +0000</pubDate>
		<dc:creator>Open Query</dc:creator>
				<category><![CDATA[backup]]></category>
		<category><![CDATA[InnoDB]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Open Query]]></category>
		<category><![CDATA[recovery]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[Software and tools]]></category>
		<category><![CDATA[XtraBackup]]></category>

		<guid isPermaLink="false">http://openquery.com/blog/?p=946</guid>
		<description><![CDATA[rsnapshot is a filesystem snapshot utility for making backups of local and remote systems, based on rsync. Rather than just doing a complete copy every time, it uses hardlinks to create incrementals (which are from a local perspective a full backup also). You can specify how long to keep old backups, and all the other usual jazz. You&#8217;d generally have it connect over ssh. You&#8217;ll want/need to run it on a filesystem that supports hardlinks, so that precludes NTFS.
In the context of MySQL, you can&#8217;t just do a filesystem copy of your MySQL data/logs, that would be inconsistent and broken. (amazingly, I still see people insisting/arguing on this &#8211; but heck it&#8217;s your business/data to gamble with, right?)
Anyway, if you do a local mysqldump also, or for instance use XtraBackup to take a binary backup of your InnoDB tablespace/logs, then rsnapshot can be used to automate the transfer of those files to a different geographical location.
Two extra things you need to do:

Regularly test your backups. They can fail, and that can be fatal. For XtraBackup, run the prepare command and essentially start up a MySQL instance on it to make sure it&#8217;s all happy. Havint this already done also saves time if you need to restore.
For restore time, you need to include the time needed to transfer files back to the target server.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://rsnapshot.org/" >rsnapshot</a> is a filesystem snapshot utility for making backups of local and remote systems, based on <a href="http://www.samba.org/rsync/" >rsync</a>. Rather than just doing a complete copy every time, it uses hardlinks to create incrementals (which are from a local perspective a full backup also). You can specify how long to keep old backups, and all the other usual jazz. You&#8217;d generally have it connect over ssh. You&#8217;ll want/need to run it on a filesystem that supports hardlinks, so that precludes NTFS.</p>
<p>In the context of MySQL, you can&#8217;t just do a filesystem copy of your MySQL data/logs, that would be inconsistent and broken.<em> (amazingly, I still see people insisting/arguing on this &#8211; but heck it&#8217;s your business/data to gamble with, right?)</em></p>
<p>Anyway, if you do a local mysqldump also, or for instance use <a href="https://launchpad.net/percona-xtrabackup" >XtraBackup</a> to take a binary backup of your InnoDB tablespace/logs, then rsnapshot can be used to automate the transfer of those files to a different geographical location.</p>
<p>Two extra things you need to do:</p>
<ul>
<li>Regularly <strong>test your backups</strong>. They can fail, and that can be fatal. For XtraBackup, run the <em>prepare</em> command and essentially start up a MySQL instance on it to make sure it&#8217;s all happy. Havint this already done also saves time if you need to restore.</li>
<li>For restore time, you need to <strong>include the time needed to transfer files back</strong> to the target server.</li>
</ul><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=21207&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=21207&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2009/09/17/tool-of-the-day-rsnapshot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tool of the Day: screen</title>
		<link>http://openquery.com/blog/tool-day-screen?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tool-of-the-day-screen</link>
		<comments>http://openquery.com/blog/tool-day-screen#comments</comments>
		<pubDate>Fri, 07 Aug 2009 00:43:10 +0000</pubDate>
		<dc:creator>Open Query</dc:creator>
				<category><![CDATA[dba]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Open Query]]></category>
		<category><![CDATA[remote]]></category>
		<category><![CDATA[screen]]></category>
		<category><![CDATA[Software and tools]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://openquery.com/blog/?p=891</guid>
		<description><![CDATA[Only the other day I was talking with someone who does a lot of work on the shell command line, but hadn&#8217;t used the GNU screen tool, so I&#8217;d better scribble a post about it as I regard it as an absolute must-have for any remote work, for multiple reasons.
First of all, what screen does. You start screen inside a terminal session (local or SSH remote), and then you can create additional sessions though Ctrl-A C. The initial screen is number 0, the next one 1, and so on. You can switch between screens with Ctrl-A # where # is the screen number. This way, you can have multiple things going within a single ssh connection, very handy. But that&#8217;s not all!
If you get disconnected (it happens   and you reconnect, your screen sessions will still be there, and running too. You can reattach with screen -r. To do a nice disconnect, you can do Ctrl-A D (detach) before closing your ssh connection.
You can also have multiple screen sessions by name, screens within screens (that confuses me for the control keys so I tend not to use that), and an absolute supertrick is that you can actually share a screen session with someone else. That&#8217;s sometimes mighty handy with two engineers to look at something, and also for showing things to clients.
The tool itself is absolutely ancient (aka rock solid, in maintenance mode), I did a quick check and I see references as far back as 1987. I remember using it long long ago, might&#8217;ve been a XENIX box. I reckon screen&#8217;s authors deserve a prize for creating one of the most useful tools ever!
Default Linux installs often don&#8217;t have it, but rectifying that is as simple as sudo apt-get install screen or sudo yum install screen. Then, man screen is your friend, but there are also quite a few decent tutorials on the web.]]></description>
			<content:encoded><![CDATA[<p>Only the other day I was talking with someone who does a lot of work on the shell command line, but hadn&#8217;t used the GNU <a href="http://www.gnu.org/software/screen/">screen</a> tool, so I&#8217;d better scribble a post about it as I regard it as an absolute must-have for any remote work, for multiple reasons.</p>
<p>First of all, what screen does. You start screen inside a terminal session (local or SSH remote), and then you can create additional sessions though Ctrl-A C. The initial screen is number 0, the next one 1, and so on. You can switch between screens with Ctrl-A # where # is the screen number. This way, you can have multiple things going within a single ssh connection, very handy. But that&#8217;s not all!</p>
<p>If you get disconnected (it happens <img src="http://openquery.com/blog/wp-includes/images/smilies/icon_wink.gif" alt=";-)" class="wp-smiley" />  and you reconnect, your screen sessions will still be there, and running too. You can reattach with screen -r. To do a nice disconnect, you can do Ctrl-A D (detach) before closing your ssh connection.</p>
<p>You can also have multiple screen sessions by name, screens within screens (that confuses me for the control keys so I tend not to use that), and an absolute supertrick is that you can actually share a screen session with someone else. That&#8217;s sometimes mighty handy with two engineers to look at something, and also for showing things to clients.</p>
<p>The tool itself is absolutely ancient (aka rock solid, in maintenance mode), I did a quick check and I see references as far back as 1987. I remember using it long long ago, might&#8217;ve been a XENIX box. I reckon screen&#8217;s authors deserve a prize for creating one of the most useful tools ever!</p>
<p>Default Linux installs often don&#8217;t have it, but rectifying that is as simple as <strong>sudo apt-get install screen</strong> or <strong>sudo yum install screen</strong>. Then, <strong>man screen</strong> is your friend, but there are also quite a few decent tutorials on the web.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=20541&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=20541&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2009/08/07/tool-of-the-day-screen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tool of the day: inotify</title>
		<link>http://openquery.com/blog/tool-day-inotify?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tool-of-the-day-inotify</link>
		<comments>http://openquery.com/blog/tool-day-inotify#comments</comments>
		<pubDate>Fri, 31 Jul 2009 05:56:40 +0000</pubDate>
		<dc:creator>Open Query</dc:creator>
				<category><![CDATA[analysis]]></category>
		<category><![CDATA[inotify]]></category>
		<category><![CDATA[inotify-tools]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql server]]></category>
		<category><![CDATA[mysqld]]></category>
		<category><![CDATA[Open Query]]></category>
		<category><![CDATA[Software and tools]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://openquery.com/blog/?p=876</guid>
		<description><![CDATA[I was actually exploring inotify-tools for something else, but they can also be handy for seeing what goes on below a mysqld process. inotify hooks into the filesystem handlers, and sees which files are accessed. You can then set triggers, or just display a tally over a certain period.
It has been a standard Linux kernel module since 2.6.13 (2005, wow that&#8217;s a long time ago already) and can be used through calls or the inotify-tools (commandline). So with the instrumentation already in the kernel, apt-get install inotify-tools is all you need to get started.
 # inotifywatch -v -t 20 -r /var/lib/mysql/* /var/lib/mysql/zabbix/*
Establishing watches...
Setting up watch(es) on /var/lib/mysql/mysql/user.frm
OK, /var/lib/mysql/mysql/user.frm is now being watched.
[...]
Total of 212 watches.
Finished establishing watches, now collecting statistics.
Will listen for events for 60 seconds.
total  modify  filename
2371   2371    /var/lib/mysql/relay-log.info
2148   2148    /var/lib/mysql/master.info
1157   1157    /var/lib/mysql/ib_logfile0
24     24      /var/lib/mysql/zabbix/
24     24      /var/lib/mysql/zabbix/history.ibd
8      8       /var/lib/mysql/zabbix/trends_uint.ibd
6      6       /var/lib/mysql/zabbix/items.ibd
5      5       /var/lib/mysql/ibdata1

This is just a limited example from a dev box, but you can see the benefit. You can see which files have been accessed, in what way, and how many times over the specified period. Consequently this provides the most insight if you&#8217;re using innodb-file-per-table (or MyISAM) rather than a single InnoDB tablespace. But of course it depends a bit on what you&#8217;re looking for.]]></description>
			<content:encoded><![CDATA[<p>I was actually exploring <a href="http://inotify-tools.sourceforge.net/">inotify-tools</a> for something else, but they can also be handy for seeing what goes on below a mysqld process. <strong>inotify</strong> hooks into the filesystem handlers, and sees which files are accessed. You can then set triggers, or just display a tally over a certain period.</p>
<p>It has been a standard Linux kernel module since 2.6.13 (<em>2005, wow that&#8217;s a long time ago already</em>) and can be used through calls or the inotify-tools (commandline). So with the instrumentation already in the kernel, <code>apt-get install inotify-tools</code> is all you need to get started.</p>
<pre> # inotifywatch -v -t 20 -r /var/lib/mysql/* /var/lib/mysql/zabbix/*
Establishing watches...
Setting up watch(es) on /var/lib/mysql/mysql/user.frm
OK, /var/lib/mysql/mysql/user.frm is now being watched.
[...]
Total of 212 watches.
Finished establishing watches, now collecting statistics.
Will listen for events for 60 seconds.
total  modify  filename
2371   2371    /var/lib/mysql/relay-log.info
2148   2148    /var/lib/mysql/master.info
1157   1157    /var/lib/mysql/ib_logfile0
24     24      /var/lib/mysql/zabbix/
24     24      /var/lib/mysql/zabbix/history.ibd
8      8       /var/lib/mysql/zabbix/trends_uint.ibd
6      6       /var/lib/mysql/zabbix/items.ibd
5      5       /var/lib/mysql/ibdata1
</pre>
<p>This is just a limited example from a dev box, but you can see the benefit. You can see which files have been accessed, in what way, and how many times over the specified period. Consequently this provides the most insight if you&#8217;re using innodb-file-per-table (or MyISAM) rather than a single InnoDB tablespace. But of course it depends a bit on what you&#8217;re looking for.</p>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2009/07/31/tool-of-the-day-inotify/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

