<?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; sarsql</title>
	<atom:link href="http://planetmysql.ru/category/sarsql/feed/" rel="self" type="application/rss+xml" />
	<link>http://planetmysql.ru</link>
	<description>Блог о самой популярной СУБД MySQL</description>
	<lastBuildDate>Sat, 11 Feb 2012 12:38:35 +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>Speaking At The MySQL Users Conference</title>
		<link>http://mmatemate.blogspot.com/2010/03/speaking-at-mysql-users-conference.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=speaking-at-the-mysql-users-conference</link>
		<comments>http://mmatemate.blogspot.com/2010/03/speaking-at-mysql-users-conference.html#comments</comments>
		<pubDate>Tue, 09 Mar 2010 00:10:00 +0000</pubDate>
		<dc:creator>Gerardo Narvaja</dc:creator>
				<category><![CDATA[dba]]></category>
		<category><![CDATA[diagnosis]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[sarsql]]></category>
		<category><![CDATA[status]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[tuning]]></category>
		<category><![CDATA[users conference]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[My proposal has been accepted, yay!I'll be speaking on a topic that I feel passionate about: MySQL Server Diagnostics Beyond Monitoring. MySQL has limitations when it comes to monitoring and diagnosing as it has been widely documented in several blogs.My goal is to share my experience from the last few years and, hopefully, learn from what others have done. If you have a pressing issue, feel free to comment on this blog and I'll do my best to include the case in my talk and/or post a reply if the time allows.I will also be discussing my future plans on sarsql. I've been silent about this utility mostly because I've been implementing it actively at work. I'll post a road map shortly based on my latest experience.I'm excited about meeting many old friends (and most now fellow MySQL alumni) and making new ones. I hope to see you there!]]></description>
			<content:encoded><![CDATA[My proposal has been accepted, yay!<br /><br />I'll be speaking on a topic that I feel passionate about: <a href="http://en.oreilly.com/mysql2010/public/schedule/detail/13000">MySQL Server Diagnostics Beyond Monitoring</a>. MySQL has limitations when it comes to monitoring and diagnosing as it has been widely documented in several blogs.<br /><br />My goal is to share my experience from the last few years and, hopefully, learn from what others have done. If you have a pressing issue, feel free to comment on this blog and I'll do my best to include the case in my talk and/or post a reply if the time allows.<br /><br />I will also be discussing my future plans on <b>sarsql</b>. I've been silent about this utility mostly because I've been implementing it actively at work. I'll post a road map shortly based on my latest experience.<br /><br />I'm excited about meeting many old friends (and most now fellow MySQL alumni) and making new ones. I hope to see you there!<div><img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/8007802080401497299-5422039330161872806?l=mmatemate.blogspot.com" alt="" /></div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=23808&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=23808&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2010/03/09/speaking-at-the-mysql-users-conference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sar-sql Has A Wiki</title>
		<link>http://mmatemate.blogspot.com/2010/01/sar-sql-has-wiki.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sar-sql-has-a-wiki</link>
		<comments>http://mmatemate.blogspot.com/2010/01/sar-sql-has-wiki.html#comments</comments>
		<pubDate>Thu, 07 Jan 2010 23:13:00 +0000</pubDate>
		<dc:creator>Gerardo Narvaja</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[sarsql]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Finally settled for a wiki for sar-sql using Ubuntu's own wiki. Right now it only has my regular installation procedure. I will enhance and keep adding items as my time allows. I hope it will help to shape the future of the script.Enjoy it with responsibility.PS: I use the Kubuntu format because it is my desktop of choice.]]></description>
			<content:encoded><![CDATA[Finally settled for a <a href="https://wiki.ubuntu.com/sarsql">wiki for <b>sar-sql</b></a> using Ubuntu's own wiki. Right now it only has my regular installation procedure. I will enhance and keep adding items as my time allows. I hope it will help to shape the future of the script.<br /><br />Enjoy it with responsibility.<br /><br />PS: I use the Kubuntu format because it is my desktop of choice.<div><img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/8007802080401497299-2206783209934342701?l=mmatemate.blogspot.com" alt="" /></div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22955&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22955&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2010/01/08/sar-sql-has-a-wiki/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Planet MySQL 2009-12-15 02:49:00</title>
		<link>http://mmatemate.blogspot.com/2009/12/hard-look-into-replication-for-some.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=planet-mysql-2009-12-15-024900</link>
		<comments>http://mmatemate.blogspot.com/2009/12/hard-look-into-replication-for-some.html#comments</comments>
		<pubDate>Mon, 14 Dec 2009 23:49:00 +0000</pubDate>
		<dc:creator>Gerardo Narvaja</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[Replication]]></category>
		<category><![CDATA[sarsql]]></category>
		<category><![CDATA[status]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[A Hard Look Into ReplicationFor some time now I've been struggling with a slave that invariably stays behind its master. I have been looking at every detail I can possibly think and in the process discovered a number of replication details I wasn't aware until now. I haven't too much information about them in the documentation, but they can affect the way you look at your slaves.Seconds Behind MasterThis is the first value that to look at when evaluating replication, most of the monitoring systems I know of rely on it. According to the manual:When the slave SQL thread is actively running(processing updates), this field is the number ofseconds that have elapsed since the timestamp of themost recent event on the master executed by that thread.In fast networks, most of the time, this is an accurate estimate of replication status, but many times you'll see this value to be in the ten of thousands of seconds and not a minute later it falls back to 0. In a chain of master and slaves, the number on the last slave measures how far behind it is from the master at the top of the chain. Under heavy load on the top master, it can even go back and forth wildly. Because of this, I've learned not to trust this value alone. It is a good idea then to compare other variables as well. For example: Master_Log_File / Exec_Master_Log_Pos vs.&#160;Relay_Master_Log_File / Read_Master_Log_Pos. The 2nd pair will point to the last statement executed on the slave in relation to the master's binary log file (keep in mind that the statements are actually being executed from the Relay Log file). The first one, will point to the latest statement read from the master and being copied into the Relay Log. Checking all these variables in context will tell you the real status of the slaves.Sidenote:&#160;These are the variables in the slave snapshot in sar-sql, let me know which ones do you monitor to make your slaves are healthy.Binary Log FormatThis item is important and encompasses which format you choose for replication. In the case I am working on, it was set to STATEMENT. An initial look, revealed that the master had bursts of very high traffic, after which the slaves started lagging behind significantly. Most likely (still trying to prove this), because a number of big INSERTs and UPDATEs are being processed at the same time on the master, and inevitably are serialized on the slaves. Without going into the details, switching to ROW&#160;solved most of the delays.Although binlog_format&#160;is a dynamic variable, the change will not take place right away. It will be applied to newly created threads/connections. Which means that if you have connection pooling&#160;in place &#160;(very common with web applications) , it might take a while until the change actually happens. If you want to force the change as soon as possible, you will have to find a mechanism friendly to your particular environment to regenerate the connections.Another issue that came up is that, in a replication tree, no matter what the binlog_format&#160;variables establishes for the slaves in the middle of the chain. The binary log format of the top master will be used across the chain.Status Variables and LogsAs you may know, SHOW GLOBAL STATUS includes a number of counters that count how many times a command type was issued. So Com_Insert will tell you how many INSERTs were issued since the server is up. That is, without counting the replication thread. So you may issue thousands of INSERTs on the master, and while Com_Insert&#160;will be updated accordingly, it won't change in the slave. Very frustrating when I tried to evaluate if the INSERT rate in the slave matched the rate on the master. The general log has a similar issue, it won't record any statement executed by the slave threads.ConclusionAlthough I understand where these limitations&#160;may originate from the way MySQL replication works, it does frustrate me since it really limits the type of tests and diagnostics that can be set up to find what's causing the issues on these servers.I have to point out that MySQL Sandbox is an invaluable tool to test the different replication scenarios with minimum preparation work.]]></description>
			<content:encoded><![CDATA[<h2>A Hard Look Into Replication</h2><div>For some time now I've been struggling with a slave that invariably stays behind its master. I have been looking at every detail I can possibly think and in the process discovered a number of replication details I wasn't aware until now. I haven't too much information about them in the documentation, but they can affect the way you look at your slaves.<br /></div><h3>Seconds Behind Master</h3><div>This is the first value that to look at when evaluating replication, most of the monitoring systems I know of rely on it. According to the <a href="http://dev.mysql.com/doc/refman/5.1/en/show-slave-status.html"  title="manua">manua</a>l:<br /></div><blockquote>When the slave SQL thread is actively running<br />(processing updates), this field is the number of<br />seconds that have elapsed since the timestamp of the<br />most recent event on the master executed by that thread.<br /></blockquote><div>In fast networks, most of the time, this is an accurate estimate of replication status, but many times you'll see this value to be in the ten of thousands of seconds and not a minute later it falls back to 0. In a chain of master and slaves, the number on the last slave measures how far behind it is from the master at the top of the chain. Under heavy load on the top master, it can even go back and forth wildly. Because of this, I've learned not to trust this value alone. It is a good idea then to compare other variables as well. For example: <b>Master_Log_File / Exec_Master_Log_Pos</b> vs.&nbsp;<b>Relay_Master_Log_File / Read_Master_Log_Pos</b>. The 2nd pair will point to the last statement executed on the slave in relation to the master's binary log file (keep in mind that the statements are actually being executed from the Relay Log file). The first one, will point to the latest statement read from the master and being copied into the Relay Log. Checking all these variables in context will tell you the real status of the slaves.<br /></div><div><br /></div><div><b>Sidenote:&nbsp;</b>These are the variables in the slave snapshot in <b>sar-sql</b>, let me know which ones do you monitor to make your slaves are healthy.<br /></div><h3>Binary Log Format</h3><div>This item is important and encompasses which format you choose for replication. In the case I am working on, it was set to <b>STATEMENT</b>. An initial look, revealed that the master had bursts of very high traffic, after which the slaves started lagging behind significantly. Most likely (still trying to prove this), because a number of big INSERTs and UPDATEs are being processed at the same time on the master, and inevitably are serialized on the slaves. Without going into the details, switching to <b>ROW</b>&nbsp;solved most of the delays.<br /></div><div><br /></div><div>Although <b>binlog_format</b>&nbsp;is a dynamic variable, the change will not take place right away. It will be applied to newly created threads/connections. Which means that if you have c<i>onnection pooling&nbsp;</i>in place &nbsp;(very common with web applications) , it might take a while until the change actually happens. If you want to force the change as soon as possible, you will have to find a mechanism friendly to your particular environment to regenerate the connections.<br /></div><div><br /></div><div>Another issue that came up is that, in a replication tree, no matter what the <b>binlog_format</b>&nbsp;variables establishes for the slaves in the middle of the chain. The binary log format of the top master will be used across the chain.<br /></div><h3>Status Variables and Logs</h3><div>As you may know, S<b>HOW GLOBAL STATUS</b> includes a number of counters that count how many times a command type was issued. So <b>Com_Insert</b> will tell you how many <b>INSERT</b>s were issued since the server is up. That is, without counting the replication thread. So you may issue thousands of INSERTs on the master, and while <b>Com_Insert</b>&nbsp;will be updated accordingly, it won't change in the slave. Very frustrating when I tried to evaluate if the INSERT rate in the slave matched the rate on the master. The general log has a similar issue, it won't record any statement executed by the slave threads.<br /></div><h3>Conclusion</h3><div>Although I understand where these <i>limitations</i>&nbsp;may originate from the way MySQL replication works, it does frustrate me since it really limits the type of tests and diagnostics that can be set up to find what's causing the issues on these servers.<br /></div><div><br /></div><div>I have to point out that <a href="http://www.mysqlsandbox.net/"  title="MySQL Sandbox">MySQL Sandbox</a> is an invaluable tool to test the different replication scenarios with minimum preparation work.<br /></div><div><img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/8007802080401497299-5360467350081889152?l=mmatemate.blogspot.com" alt="" /></div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22634&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=22634&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2009/12/15/planet-mysql-2009-12-15-024900/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

