<?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; 5.6</title>
	<atom:link href="http://planetmysql.ru/category/5-6/feed/" rel="self" type="application/rss+xml" />
	<link>http://planetmysql.ru</link>
	<description>Блог о самой популярной СУБД MySQL</description>
	<lastBuildDate>Thu, 24 May 2012 05:41:40 +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>MySQL 5.6 Replication: FAQ</title>
		<link>https://blogs.oracle.com/MySQL/entry/mysql_5_6_replication_faq?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mysql-5-6-replication-faq</link>
		<comments>https://blogs.oracle.com/MySQL/entry/mysql_5_6_replication_faq#comments</comments>
		<pubDate>Wed, 23 May 2012 08:16:15 +0000</pubDate>
		<dc:creator>Oracle MySQL Group</dc:creator>
				<category><![CDATA[5.6]]></category>
		<category><![CDATA[gtid]]></category>
		<category><![CDATA[HA]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Replication]]></category>
		<category><![CDATA[scalability]]></category>

		<guid isPermaLink="false">https://blogs.oracle.com/MySQL/entry/mysql_5_6_replication_faq</guid>
		<description><![CDATA[On Wednesday May 16th, we ran a
webinar to provide an overview of all of the new replication features and
enhancements that are previewed in the MySQL 5.6 Development Release –
including Global Transaction IDs, auto-failover and self-healing,
multi-threaded, crash-safe slaves and more. 
  Collectively, these new capabilities enable
MySQL users to scale for next generation web and cloud applications.  
  Attendees posted a number of great
questions to the MySQL developers, serving to&#160;provide additional insights
into how these new features are implemented. So I thought it would be useful to
post those below, for the benefit of those unable to attend the live webinar
(note, you can listen to the On-Demand replay which is available now). 
  Before getting to the Q&#38;A, there are a
couple of other resources that maybe useful to those wanting to learn more
about Replication in MySQL 5.6 
  -&#160;On-Demand webinar  
  -&#160;Slides used during the webinar  
  For more detail on any of the features
discussed below, be sure to check out the Developer Zone article: Replication
developments in MySQL 5.6  
  So here is the Q&#38;A from the event&#160; 
    
  Multi-Threaded
Slaves 
  The results from recent benchmarking of the
Multi-Threaded Slave enhancement&#160;were discussed, prompting the following questions 
  Q. Going
from 0 - 10 threads, did you notice any increase in IOwait on CPU? 
  A. In this case, yes. The actual
amount depends on a number of factors: your hardware, query/transaction
distribution across databases, server general and InnoDB specific configuration
parameters.  
    
  Q. Will the multiple threads work on
different transactions on the same database, or each thread works on a separate
database? 
  A. Each worker thread works on separate
databases (schemas). 
    
  Q. If I set the slave-parallel-workers to
less than the number of databases, can I configure which databases use which worker
threads?  
  A. There is no such configuration option to
assign a certain Worker thread to a database. Configuring slave-parallel-workers
to less than the number of databases is a good setup. A Worker can handle
multiple databases. 
    
  Q. If I create 4 threads and I have 100
databases, can I configure which databases use which threads?  
  A. There won't be 1 worker to a mapping of
exactly 25 databases, but it will be very close to that type of distribution.  
    
  Q. Thank You. I ask as we have about 8
databases that have a lot of transactions and about 30 that are used less
frequently. It would be nice to have the ability to create 9 workers, 1 for
each if the heavy databases and 1 for all the others  
  A. The current design enables relatively
equal distribution of transactions across your databases, but it could be that
9 workers will fit anyway. 
    
  Q. Does multi-thread slave still work if
there is foreign key across database?  
  A. MTS preserves slave consistency *within* a database, but not
necessarily *between* databases. With MTS enabled and replication ongoing, updates to one database can be
executed before updates to another causing them to be temporarily out of sync
with each other. 
    
  Q. How is auto-increment managed with the
multi-thread slave? 
  A. MTS makes sure Worker threads do not
execute concurrently on the same table. Auto-increment
is guaranteed to be handled in the same way as the single threaded
&#34;standard&#34; slave handles auto-increment  
    
  Q. Can you use semi-synchronous replication
on one of the slaves when using MTS?  
  A. Semi-sync is friendly to MTS. MTS is
about parallel execution - so they cooperate well.  
    
  Optimized
Row Based Replication 
  Q. If you only store the PK column in the
Before Image for updates, does this mean you don't care about the slave's data
potentially being out-of-sync? Will we be able to control how much data is
stored in the binary logs?  
  A. The rule is that we ship a *PK
equivalent* so that the slave is always able to find a row. This means: 
&#160; 1. if master table has PK, then we ship the PK only 
&#160; 2. if master table does not have PK, then we ship the entire row 
    
  Global
Transaction IDs and HA Utilities 
  Q. Would the failover utility need to sit
on a 3rd party host to allow arbitration? 
  A. The utility would typically run on a
client, not on the hosts it is monitoring 
    
  Q. Can you explain the upgrade process to move
to MySQL 5.6? I am assuming that the slave(s) are upgraded first and that
replication would be backwards compatible. And after the slave(s) are upgraded,
the master would be next. But then how do you turn on the GTID? 
  A. Right: the slave(s) are upgraded first.
After upgrading Slaves they would be started with --gtid-mode=on (technically a
couple of other options are needed as well). And then the same process would be
followed for the upgraded Master. 
    
  Q. For failover functionality, if I had a
setup like this: Server1 replicates to Server2, Server2 replicates to Server3,
Server4, and Server5. If Server2 were to fail, can I have it configured so that
Server1 can become the new master for Server3/4/5?  
  A. Yes - you can either configure the failover
to the most recent slave based on GTID, or list specific candidates. What will
happen is that Slave 1 will temporarily become a slave of 3, 4 and 5 to ensure
it replicates any more recent transactions those slaves may have, and then it
will become the master 
    
  Replication
Event Checksums  
  Q. What is the overhead of replication
checksums?  
  A. It is minimal - we plan to publish
benchmarks over the summer to better characterize any overhead 
    
  Q. Are you exposing the checksum to the
plugin api so we can add our own checksum types? 
  A. We prepared some of interfaces, i.e.
checksum methods are identified by a specific code byte (1-127) values. But
it's not really a plugin at this point. 
    
  Q. Do checksums verify both replicated data
and the data on slave?  
  A. Yes - checksums are implemented across
the entire path - so you can check for issues in replication itself, or in the
hardware or network 
    
  Q. I think, it is better to turn on
checksums at the relaylog to avoid overhead on the master, but if we do that
and checksum fails (i.e. not matching the master's data) then what happens –
will the slave throw an error 
  A. I agree, it's better to relax the
Master, which verifies the checksum only optionally when the Dump Thread reads
from the binlog prior to the replication event being sent out to the Slave.  The slave mandatorily checks the checksummed
events when they are sent across the network, and optionally when they are read
from Relay-log. In either case, an error is thrown. 
    
  Q. Are checksums optional? In some cases we don't care for huge data
loads 
  A. Yes, checksums are optional. 
    
  Time
Delayed Replication 
  Q. Is Time delayed replication applied at the
database level only and not for the entire slave? 
  A. Applied for the slave as execution is
global. 
    
  Informational
Log Events 
  Q. When we configure information log event,
does it show meaningful query log for any binlog format? (Row based especially)  
  A. When using row based replication, you get
the original query in human readable format... obviously you don’t want to see
all the rows modified in a table of size, which can be huge 
    
  Q. Will the binlog include user id?  
  A. User id is replicated in some cases for
Query-log-event - namely user id of the invoker when a stored routine is
called. 
    
  Remote
Binlog Backup 
  Q. What level of access does the remote
binlog backup need? 
  A. Replication slave 
    
  Summary 
  As you can see, our Engineering team was
kept busy with questions over the course of the webinar. Be sure to check out the MySQL 5.6
Replication webinar replay&#160;and if
you have further questions, please don’t hesitate to use the comments below!]]></description>
			<content:encoded><![CDATA[<!--[if gte mso 9]><xml>
 <o:DocumentProperties>
  <o:Revision>0</o:Revision>
  <o:TotalTime>0</o:TotalTime>
  <o:Pages>1</o:Pages>
  <o:Words>1207</o:Words>
  <o:Characters>6881</o:Characters>
  <o:Company>Homework</o:Company>
  <o:Lines>57</o:Lines>
  <o:Paragraphs>16</o:Paragraphs>
  <o:CharactersWithSpaces>8072</o:CharactersWithSpaces>
  <o:Version>14.0</o:Version>
 </o:DocumentProperties>
 <o:OfficeDocumentSettings>
  <o:AllowPNG/>
 </o:OfficeDocumentSettings>
</xml><![endif]--> <!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:View>Normal</w:View>
  <w:Zoom>0</w:Zoom>
  <w:TrackMoves/>
  <w:TrackFormatting/>
  <w:PunctuationKerning/>
  <w:ValidateAgainstSchemas/>
  <w:SaveIfXMLInval>false</w:SaveIfXMLInvalid>
  <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
  <w:DoNotPromoteQF/>
  <w:LidThemeOther>EN-GB</w:LidThemeOther>
  <w:LidThemeAsian>JA</w:LidThemeAsian>
  <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
  <w:Compatibility>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
   <w:DontGrowAutofit/>
   <w:SplitPgBreakAndParaMark/>
   <w:EnableOpenTypeKerning/>
   <w:DontFlipMirrorIndents/>
   <w:OverrideTableStyleHps/>
   <w:UseFELayout/>
  </w:Compatibility>
  <m:mathPr>
   <m:mathFont m:val="Cambria Math"/>
   <m:brkBin m:val="before"/>
   <m:brkBinSub m:val="&#45;-"/>
   <m:smallFrac m:val="off"/>
   <m:dispDef/>
   <m:lMargin m:val="0"/>
   <m:rMargin m:val="0"/>
   <m:defJc m:val="centerGroup"/>
   <m:wrapIndent m:val="1440"/>
   <m:intLim m:val="subSup"/>
   <m:naryLim m:val="undOvr"/>
  </m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
  DefSemiHidden="true" DefQFormat="false" DefPriority="99"
  LatentStyleCount="276">
  <w:LsdException Locked="false" Priority="0" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
  <w:LsdException Locked="false" Priority="9" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 1"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 2"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 3"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 4"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 5"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 6"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 7"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 8"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 9"/>
  <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
  <w:LsdException Locked="false" Priority="10" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Title"/>
  <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
  <w:LsdException Locked="false" Priority="11" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
  <w:LsdException Locked="false" Priority="22" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
  <w:LsdException Locked="false" Priority="20" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
  <w:LsdException Locked="false" Priority="59" SemiHidden="false"
   UnhideWhenUsed="false" Name="Table Grid"/>
  <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
  <w:LsdException Locked="false" Priority="1" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 1"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
  <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
  <w:LsdException Locked="false" Priority="34" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
  <w:LsdException Locked="false" Priority="29" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
  <w:LsdException Locked="false" Priority="30" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 1"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 2"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 2"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 3"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 3"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 4"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 4"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 5"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 5"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 6"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 6"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
  <w:LsdException Locked="false" Priority="19" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
  <w:LsdException Locked="false" Priority="21" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
  <w:LsdException Locked="false" Priority="31" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
  <w:LsdException Locked="false" Priority="32" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
  <w:LsdException Locked="false" Priority="33" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
  <w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
  <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
 </w:LatentStyles>
</xml><![endif]--> <!--[if gte mso 10]>

<![endif]--> <!--StartFragment--> 
  <p><span lang="EN-US">On Wednesday May 16<sup>th</sup>, we ran a
webinar to provide an overview of all of the new replication features and
enhancements that are previewed in the MySQL 5.6 Development Release –
including Global Transaction IDs, auto-failover and self-healing,
multi-threaded, crash-safe slaves and more.<o:p /></span></p> 
  <p><span lang="EN-US">Collectively, these new capabilities enable
MySQL users to scale for next generation web and cloud applications. <o:p /></span></p> 
  <p><span lang="EN-US">Attendees posted a number of great
questions to the MySQL developers, serving to&nbsp;provide additional insights
into how these new features are implemented. So I thought it would be useful to
post those below, for the benefit of those unable to attend the live webinar
(note, you can listen to the <a href="http://mysql.com/news-and-events/on-demand-webinars/display-od-711.html">On-Demand replay</a> which is available now).</span><o:p /></p> 
  <p><span lang="EN-US">Before getting to the Q&amp;A, there are a
couple of other resources that maybe useful to those wanting to learn more
about Replication in MySQL 5.6</span><o:p /></p> 
  <p><span lang="EN-US">-&nbsp;<a href="http://mysql.com/news-and-events/on-demand-webinars/display-od-711.html">On-Demand webinar</a> <o:p /></span></p> 
  <p><span lang="EN-US">-&nbsp;<a href="http://www.slideshare.net/matkeep/my-sql-56replwebinarmay12">Slides used during the webinar</a> </span><o:p /></p> 
  <p><span lang="EN-US">For more detail on any of the features
discussed below, be sure to check out the <a href="http://dev.mysql.com/tech-resources/articles/mysql-5.6-replication.html">Developer Zone article: Replication
developments in MySQL 5.6</a> </span><o:p /></p> 
  <p><span lang="EN-US">So here is the Q&amp;A from the event&nbsp;</span><o:p /></p> 
  <p><b><span lang="EN-US"> </span></b></p> 
  <p><b><span lang="EN-US">Multi-Threaded
Slaves<o:p /></span></b></p> 
  <p><span lang="EN-US">The results from recent <a href="https://blogs.oracle.com/MySQL/entry/benchmarking_mysql_replication_with_multi">benchmarking of the
Multi-Threaded Slave enhancement</a>&nbsp;were discussed, prompting the following questions<o:p /></span></p> 
  <p><span lang="EN-US">Q. Going
from 0 - 10 threads, did you notice any increase in IOwait on CPU?<o:p /></span></p> 
  <p><span lang="EN-US">A. </span>In this case, yes. The actual
amount depends on a number of factors: your hardware, query/transaction
distribution across databases, server general and InnoDB specific configuration
parameters. <o:p /></p> 
  <p><span lang="EN-US"> </span></p> 
  <p><span lang="EN-US">Q. Will the multiple threads work on
different transactions on the same database, or each thread works on a separate
database?<o:p /></span></p> 
  <p><span lang="EN-US">A. Each worker thread works on separate
databases (schemas).<o:p /></span></p> 
  <p><span lang="EN-US"> </span></p> 
  <p><span lang="EN-US">Q. If I set the slave-parallel-workers to
less than the number of databases, can I configure which databases use which worker
threads? <o:p /></span></p> 
  <p><span lang="EN-US">A. There is no such configuration option to
assign a certain Worker thread to a database. Configuring slave-parallel-workers
to less than the number of databases is a good setup. A Worker can handle
multiple databases.<o:p /></span></p> 
  <p><span lang="EN-US"> </span></p> 
  <p><span lang="EN-US">Q. If I create 4 threads and I have 100
databases, can I configure which databases use which threads? <o:p /></span></p> 
  <p><span lang="EN-US">A. There won't be 1 worker to a mapping of
exactly 25 databases, but it will be very close to that type of distribution. <o:p /></span></p> 
  <p><span lang="EN-US"> </span></p> 
  <p><span lang="EN-US">Q. Thank You. I ask as we have about 8
databases that have a lot of transactions and about 30 that are used less
frequently. It would be nice to have the ability to create 9 workers, 1 for
each if the heavy databases and 1 for all the others <o:p /></span></p> 
  <p><span lang="EN-US">A. The current design enables relatively
equal distribution of transactions across your databases, but it could be that
9 workers will fit anyway.<o:p /></span></p> 
  <p><span lang="EN-US"> </span></p> 
  <p><span lang="EN-US">Q. Does multi-thread slave still work if
there is foreign key across database? <o:p /></span></p> 
  <p><span lang="EN-US">A. </span>MTS preserves slave consistency <b>*within*</b> a database, but not
necessarily <b>*between*</b> databases. With MTS enabled and replication ongoing, updates to one database can be
executed before updates to another causing them to be temporarily out of sync
with each other.<o:p /></p> 
  <p><span lang="EN-US"> <o:p /></span></p> 
  <p><span lang="EN-US">Q. How is auto-increment managed with the
multi-thread slave?<o:p /></span></p> 
  <p><span lang="EN-US">A. MTS makes sure Worker threads do not
execute concurrently on the same table. Auto-increment
is guaranteed to be handled in the same way as the single threaded
&quot;standard&quot; slave handles auto-increment <o:p /></span></p> 
  <p><span lang="EN-US"> </span></p> 
  <p><span lang="EN-US">Q. Can you use semi-synchronous replication
on one of the slaves when using MTS? <o:p /></span></p> 
  <p><span lang="EN-US">A. Semi-sync is friendly to MTS. MTS is
about parallel execution - so they cooperate well. <o:p /></span></p> 
  <p><span lang="EN-US"> </span></p> 
  <p><b><span lang="EN-US">Optimized
Row Based Replication<o:p /></span></b></p> 
  <p><span lang="EN-US">Q. If you only store the PK column in the
Before Image for updates, does this mean you don't care about the slave's data
potentially being out-of-sync? Will we be able to control how much data is
stored in the binary logs? <o:p /></span></p> 
  <p><span lang="EN-US">A. The rule is that we ship a <b>*PK
equivalent*</b> so that the slave is always able to find a row. This means: <br />
&nbsp; 1. if master table has PK, then we ship the PK only <br />
&nbsp; 2. if master table does not have PK, then we ship the entire row</span><o:p /></p> 
  <p><span lang="EN-US"> </span></p> 
  <p><b><span lang="EN-US">Global
Transaction IDs and HA Utilities<o:p /></span></b></p> 
  <p><span lang="EN-US">Q. Would the failover utility need to sit
on a 3rd party host to allow arbitration?<o:p /></span></p> 
  <p><span lang="EN-US">A. The utility would typically run on a
client, not on the hosts it is monitoring<o:p /></span></p> 
  <p><span lang="EN-US"> </span></p> 
  <p><span lang="EN-US">Q. Can you explain the upgrade process to move
to MySQL 5.6? I am assuming that the slave(s) are upgraded first and that
replication would be backwards compatible. And after the slave(s) are upgraded,
the master would be next. But then how do you turn on the GTID?<o:p /></span></p> 
  <p><span lang="EN-US">A. Right: the slave(s) are upgraded first.
After upgrading Slaves they would be started with --gtid-mode=on (technically a
couple of other options are needed as well). And then the same process would be
followed for the upgraded Master.<o:p /></span></p> 
  <p><span lang="EN-US"> </span></p> 
  <p><span lang="EN-US">Q. For failover functionality, if I had a
setup like this: Server1 replicates to Server2, Server2 replicates to Server3,
Server4, and Server5. If Server2 were to fail, can I have it configured so that
Server1 can become the new master for Server3/4/5? <o:p /></span></p> 
  <p><span lang="EN-US">A. Yes - you can either configure the failover
to the most recent slave based on GTID, or list specific candidates. What will
happen is that Slave 1 will temporarily become a slave of 3, 4 and 5 to ensure
it replicates any more recent transactions those slaves may have, and then it
will become the master<o:p /></span></p> 
  <p><span lang="EN-US"> </span></p> 
  <p><b><span lang="EN-US">Replication
Event Checksums</span></b><span lang="EN-US"> <o:p /></span></p> 
  <p><span lang="EN-US">Q. What is the overhead of replication
checksums? <o:p /></span></p> 
  <p><span lang="EN-US">A. It is minimal - we plan to publish
benchmarks over the summer to better characterize any overhead<o:p /></span></p> 
  <p><b><span lang="EN-US"> </span></b></p> 
  <p><span lang="EN-US">Q. Are you exposing the checksum to the
plugin api so we can add our own checksum types?<o:p /></span></p> 
  <p><span lang="EN-US">A. We prepared some of interfaces, i.e.
checksum methods are identified by a specific code byte (1-127) values. But
it's not really a plugin at this point.<o:p /></span></p> 
  <p><span lang="EN-US"> </span></p> 
  <p><span lang="EN-US">Q. Do checksums verify both replicated data
and the data on slave? <o:p /></span></p> 
  <p><span lang="EN-US">A. Yes - checksums are implemented across
the entire path - so you can check for issues in replication itself, or in the
hardware or network<o:p /></span></p> 
  <p><span lang="EN-US"> </span></p> 
  <p><span lang="EN-US">Q. I think, it is better to turn on
checksums at the relaylog to avoid overhead on the master, but if we do that
and checksum fails (i.e. not matching the master's data) then what happens –
will the slave throw an error<o:p /></span></p> 
  <p><span lang="EN-US">A. I agree, it's better to relax the
Master, which verifies the checksum only optionally when the Dump Thread reads
from the binlog prior to the replication event being sent out to the Slave.  The slave mandatorily checks the checksummed
events when they are sent across the network, and optionally when they are read
from Relay-log. In either case, an error is thrown.<o:p /></span></p> 
  <p><span lang="EN-US"> </span></p> 
  <p><span lang="EN-US">Q. Are checksums optional? In some cases we don't care for huge data
loads<o:p /></span></p> 
  <p><span lang="EN-US">A. Yes, checksums are optional.<o:p /></span></p> 
  <p><span lang="EN-US"> </span></p> 
  <p><b><span lang="EN-US">Time
Delayed Replication<o:p /></span></b></p> 
  <p><span lang="EN-US">Q. Is Time delayed replication applied at the
database level only and not for the entire slave?<o:p /></span></p> 
  <p><span lang="EN-US">A. Applied for the slave as execution is
global.<o:p /></span></p> 
  <p><span lang="EN-US"> </span></p> 
  <p><b><span lang="EN-US">Informational
Log Events<o:p /></span></b></p> 
  <p><span lang="EN-US">Q. When we configure information log event,
does it show meaningful query log for any binlog format? (Row based especially) <o:p /></span></p> 
  <p><span lang="EN-US">A. When using row based replication, you get
the original query in human readable format... obviously you don’t want to see
all the rows modified in a table of size, which can be huge<o:p /></span></p> 
  <p><span lang="EN-US"> </span></p> 
  <p><span lang="EN-US">Q. Will the binlog include user id? <o:p /></span></p> 
  <p><span lang="EN-US">A. User id is replicated in some cases for
Query-log-event - namely user id of the invoker when a stored routine is
called.<o:p /></span></p> 
  <p><span lang="EN-US"> </span></p> 
  <p><b><span lang="EN-US">Remote
Binlog Backup<o:p /></span></b></p> 
  <p><span lang="EN-US">Q. What level of access does the remote
binlog backup need?<o:p /></span></p> 
  <p><span lang="EN-US">A. Replication slave<o:p /></span></p> 
  <p><span lang="EN-US"> </span></p> 
  <p><b><span lang="EN-US">Summary<o:p /></span></b></p> 
  <p><span lang="EN-US">As you can see, our Engineering team was
kept busy with questions over the course of the webinar. Be sure to check out the <a href="http://mysql.com/news-and-events/on-demand-webinars/display-od-711.html">MySQL 5.6
Replication webinar replay</a>&nbsp;and </span>if
you have further questions, please don’t hesitate to use the comments below!<o:p /></p> 
  <p><span lang="EN-US"> </span></p> <!--EndFragment--><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=33324&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=33324&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/05/23/mysql-5-6-replication-faq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some lessons from MySQL Conference 2012</title>
		<link>http://datacharmer.blogspot.com/2012/04/some-lessons-from-mysql-conference-2012.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=some-lessons-from-mysql-conference-2012</link>
		<comments>http://datacharmer.blogspot.com/2012/04/some-lessons-from-mysql-conference-2012.html#comments</comments>
		<pubDate>Mon, 16 Apr 2012 22:15:00 +0000</pubDate>
		<dc:creator>Giuseppe Maxia</dc:creator>
				<category><![CDATA[5.5]]></category>
		<category><![CDATA[5.6]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[percona]]></category>
		<category><![CDATA[sandbox]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[tungsten]]></category>

		<guid isPermaLink="false">http://planetmysql.ru/?guid=ca834db85ec0e4ab2101d0d97c442558</guid>
		<description><![CDATA[The Percona Live MySQL Conference and Expo 2012 is over. Together with the SkySQL solutions day, it has kept me occupied for 4 full days, from early morning to late at night. I have to say that I am pleased. The quality of the organization was very high, with a very good lineup of speakers and an excellent technical support.As usual, I have learned a lot during this week, either directly, by attending talks, or indirectly, by meeting people who told me what was juicy at the talks that I had missed.And I have met new interesting people, and caught up with the people that I know already.This conference was particularly intense also because I got myself involved in 5 talks, which was probably more than I should have. How did I end up with such a task? It's a long story.It all started when the CfP opened. In the review committee, we all knew that Oracle was not eager to participate, but we hoped that it would change its mind and send someone in the end. So we planned ahead, and some of us proposed talks aimed at beginner and intermediate users, with topics that are usually best covered by the people who work at the MySQL team. I proposed Replication 101 and What's new in MySQL 5.5 and 5.6 replication, with the idea that I would hand them over to a couple of Oracle engineers, or have them as co-speakers. That, however, didn't happen. So I had to prepare and present these two talks, in addition to the one that I wanted to do on my own (Testing MySQL creatively in a sandbox).That makes 3 talks. Then I got tasked with organizing the lightning Talks, which is not a big deal per se, but it adds to the global effort. 4 talks.And finally, SkySQL organized another beautiful conference on Friday, and I got to present a fifth talk. I enjoyed every bit of them, but boy! the conference was intense!.I have learned not only from the talks that I have attended, but also from the preparation of my own talks. The biggest source of surprises was my talk about MySQL 5.6 replication. I was expecting a mature release, but I found a collection of features that don't play very well together, and can sometimes lead to an unstable server. Since I was trying to get my demos working, rather than isolating the bugs, I didn't submit any reports, but I will come back to that version and do a more thorough analysis as soon as I catch up with my day-by-day work.Speaking about demos, it's quite common for me to include a demo in a technical talk. First, because getting a demo done will make me better acquainted with the features that I am presenting, and also because a presentation with a demo conveys the idea of a mature and reliable product (or the idea that I, as the speaker, know what I am talking about). Either way, I know prepare a demo for every talk where I have sufficient time to show one, and sometimes even for a lightning talk. So it was surprising to hear comments that praised my talks because they contain demos. Is this practice so unusual? I should start taking count of how often this is done.My most satisfactory demo (and the one that almost got me in trouble) happened at the last talk, on Friday, when I had to show features from three different Tungsten topologies, using three separate remote clusters. For these demos to be successful, I needed good internet connection, a solid confidence in the product and the strength of its tests, and to remember the sequence of operations for each demo. To my surprise, everything went so smoothly, that someone in the audience thought that I was running a simulation in my laptop, instead of interacting with servers that were 10,000 Km away. So much for my rehearsals! I must remember to add at least a tiny mistake in an otherwise perfect sequence of tasks, to make the audience aware that I am playing live.The slides for my presentations are available at Slideshare.]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.percona.com/live/mysql-conference-2012/">Percona Live MySQL Conference and Expo 2012</a> is over. Together with the <a href="http://www.skysql.com/mysql-solutions-day">SkySQL solutions day</a>, it has kept me occupied for 4 full days, from early morning to late at night. </p><p>I have to say that I am pleased. The quality of the organization was very high, with a very good lineup of speakers and an excellent technical support.</p><p>As usual, I have learned a lot during this week, either directly, by attending talks, or indirectly, by meeting people who told me what was juicy at the talks that I had missed.And I have met new interesting people, and caught up with the people that I know already.</p><p>This conference was particularly intense also because I got myself involved in 5 talks, which was probably more than I should have. How did I end up with such a task? It's a long story.</p><p>It all started when the CfP opened. In the review committee, we all knew that Oracle was not eager to participate, but we hoped that it would change its mind and send someone in the end. So we planned ahead, and some of us proposed talks aimed at beginner and intermediate users, with topics that are usually best covered by the people who work at the MySQL team. I proposed <i>Replication 101</i> and <i>What's new in MySQL 5.5 and 5.6 replication</i>, with the idea that I would hand them over to a couple of Oracle engineers, or have them as co-speakers. That, however, <a href="http://scale-out-blog.blogspot.com/2012/04/oracle-missed-at-mysql-user.html">didn't happen</a>. So I had to prepare and present these two talks, in addition to the one that I wanted to do on my own (<i>Testing MySQL creatively in a sandbox</i>).<p>That makes 3 talks. Then I got tasked with organizing the lightning Talks, which is not a big deal per se, but it adds to the global effort. 4 talks.</p>And finally, SkySQL organized another beautiful conference on Friday, and I got to present a fifth talk. I enjoyed every bit of them, but boy! the conference was <b>intense</b>!.</p><p>I have learned not only from the talks that I have attended, but also from the preparation of my own talks. The biggest source of surprises was my talk about MySQL 5.6 replication. I was expecting a mature release, but I found a collection of features that don't play very well together, and can sometimes lead to an unstable server. Since I was trying to get my demos working, rather than isolating the bugs, I didn't submit any reports, but I will come back to that version and do a more thorough analysis as soon as I catch up with my day-by-day work.</p><p>Speaking about demos, it's quite common for me to include a demo in a technical talk. First, because getting a demo done will make me better acquainted with the features that I am presenting, and also because a presentation with a demo conveys the idea of a mature and reliable product (or the idea that I, as the speaker, know what I am talking about). Either way, I know prepare a demo for every talk where I have sufficient time to show one, and sometimes even for a lightning talk. So it was surprising to hear comments that praised my talks because they contain demos. Is this practice so unusual? I should start taking count of how often this is done.</p><p>My most satisfactory demo (and the one that almost got me in trouble) happened at the last talk, on Friday, when I had to show features from three different Tungsten topologies, using three separate remote clusters. For these demos to be successful, I needed good internet connection, a solid confidence in the product and the strength of its tests, and to remember the sequence of operations for each demo. To my surprise, everything went so smoothly, that someone in the audience thought that I was running a simulation in my laptop, instead of interacting with servers that were 10,000 Km away. So much for my rehearsals! I must remember to add at least a tiny mistake in an otherwise perfect sequence of tasks, to make the audience aware that I am playing live.</p><p>The slides for my presentations are available at <a href="http://www.slideshare.net/datacharmer">Slideshare</a>.</p><div><img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/16959946-3562241793867896912?l=datacharmer.blogspot.com" alt="" /></div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=32918&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=32918&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/04/17/some-lessons-from-mysql-conference-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Benchmarking MySQL Replication with Multi-Threaded Slaves</title>
		<link>https://blogs.oracle.com/MySQL/entry/benchmarking_mysql_replication_with_multi?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=benchmarking-mysql-replication-with-multi-threaded-slaves</link>
		<comments>https://blogs.oracle.com/MySQL/entry/benchmarking_mysql_replication_with_multi#comments</comments>
		<pubDate>Tue, 10 Apr 2012 12:07:31 +0000</pubDate>
		<dc:creator>Oracle MySQL Group</dc:creator>
				<category><![CDATA[5.6]]></category>
		<category><![CDATA[5.6.5]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[multi-threaded]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[Replication]]></category>
		<category><![CDATA[slaves]]></category>

		<guid isPermaLink="false">https://blogs.oracle.com/MySQL/entry/benchmarking_mysql_replication_with_multi</guid>
		<description><![CDATA[The
objective of this benchmark is to measure the performance improvement achieved
when enabling the Multi-Threaded Slave enhancement&#160;delivered as a part MySQL 5.6.   
    
  As the
results demonstrate, Multi-Threaded Slaves delivers 5x higher replication performance
based on a configuration with 10 databases/schemas. For real-world deployments, higher replication
performance directly translates to: 
  · Improved
consistency of reads from slaves (i.e. reduced risk of reading
&#34;stale&#34; data) 
  · Reduced
risk of data loss should the master fail before replicating all events in its
binary log (binlog) 
    
  The multi-threaded slave
splits processing between worker threads based on schema, allowing updates to
be applied in parallel, rather than sequentially. This delivers benefits to
those workloads that isolate application data using databases - e.g.
multi-tenant systems deployed in cloud environments.  
    
  Multi-Threaded Slaves
are just one of many enhancements to replication previewed as part of the MySQL
5.6 Development Release, which include: 
  · Global Transaction Identifiers coupled with
MySQL utilities for automatic failover / switchover and slave promotion 
  · Crash Safe Slaves and Binlog 
  · Optimized Row Based Replication 
  · Replication Event Checksums 
  · Time Delayed Replication 
    
  These and many more
are discussed in the “MySQL 5.6
Replication: Enabling the Next Generation of Web &#38; Cloud Services”
Developer Zone article&#160; 
    
  Back to the benchmark - details
are as follows. 
   Environment 
The test environment consisted of two Linux servers: 
  · one
running the replication master 
  · one
running the replication slave. 
    
  Only the
slave was involved in the actual measurements, and was based on the following
configuration:   
- Hardware: Oracle Sun Fire X4170 M2 Server 
  - CPU: 2
sockets, 6 cores with hyper-threading, 2930 MHz. 
  - OS: 64-bit
Oracle Enterprise Linux 6.1 
- Memory: 48 GB   Test Procedure  Initial Setup:  
Two MySQL servers were started on two different hosts, configured as
replication master and slave.  
    
  10
sysbench schemas were created, each with a single table:   CREATE TABLE `sbtest` ( 
&#160;&#160; `id` int(10) unsigned NOT NULL AUTO_INCREMENT, 
&#160;&#160; `k` int(10) unsigned NOT NULL DEFAULT '0', 
&#160;&#160; `c` char(120) NOT NULL DEFAULT '', 
&#160;&#160; `pad` char(60) NOT NULL DEFAULT '', 
&#160;&#160; PRIMARY KEY (`id`), 
&#160;&#160; KEY `k` (`k`) 
) ENGINE=InnoDB DEFAULT CHARSET=latin1  
    
  10,000
rows were inserted in each of the 10 tables, for a total of 100,000 rows. When
the inserts had replicated to the slave, the slave threads were stopped. The
slave data directory was copied to a backup location and the slave threads
position in the master binlog noted.   10 sysbench clients, each configured with 10 threads,
were spawned at the same time to generate a random schema load against each of
the 10 schemas on the master. Each sysbench client executed 10,000 &#34;update
key&#34; statements:  
  UPDATE sbtest set k=k+1 WHERE id = &#60;random row&#62; 
    
  In total,
this generated 100,000 update statements to later replicate during the test
itself.   Test Methodology: The number of slave workers to test with was configured using: 
  SET GLOBAL slave_parallel_workers=&#60;workers&#62; 
Then the slave IO thread was started and the test waited for all the update
queries to be copied over to the relay log on the slave.  
The benchmark clock was started and then the slave SQL thread was started. The
test waited for the slave SQL thread to finish executing the 100k update
queries, doing &#34;select master_pos_wait()&#34;.  When master_pos_wait() returned, the benchmark
clock was stopped and the duration calculated.  
The calculated duration from the benchmark clock should be close to the time it
took for the SQL thread to execute the 100,000 update queries.  The 100k queries divided by this duration gave
the benchmark metric, reported as Queries Per Second (QPS).   Test Reset: 
  The
test-reset cycle was implemented as follows: 
  · the
slave was stopped 
  · the
slave data directory replaced with the previous backup 
  · the
slave restarted with the slave threads replication pointer repositioned to the
point before the update queries in the binlog.  
    
  The test
could then be repeated with identical set of queries but a different number of
slave worker threads, enabling a fair comparison.  
The Test-Reset cycle was repeated 3 times for 0-24 number of workers and the
QPS metric calculated and averaged for each worker count.   MySQL Configuration 
The relevant configuration settings used for MySQL are as follows:  
binlog-format=STATEMENT 
relay-log-info-repository=TABLE 
master-info-repository=TABLE  
As described in the test procedure, the slave_parallel_workers setting was modified as part of
the test logic. The consequence of changing this setting is:  
0 worker threads: 
&#160;&#160; - current (i.e. single threaded) sequential mode 
&#160;&#160; - 1 x IO thread and 1 x SQL thread 
&#160;&#160; - SQL thread both reads and executes the events  
1 worker thread: 
&#160;&#160; - sequential mode 
&#160;&#160; - 1 x IO thread, 1 x Coordinator SQL thread and 1 x Worker thread 
&#160;&#160; - coordinator reads the event and hands it to the worker who
executes  
2+ worker threads: 
&#160;&#160; - parallel execution 
&#160;&#160; - 1 x IO thread, 1 x Coordinator SQL thread and 2+ Worker threads 
&#160;&#160; - coordinator reads events and hands them to the workers who execute
them   Results 
Figure 1 below shows that Multi-Threaded Slaves deliver ~5x higher replication
performance when configured with 10 worker threads, with the load evenly
distributed across our 10 x schemas. This result is compared to the current replication implementation which
is based on a single SQL thread only (i.e. zero worker threads). 
    
    
    
    
    
    
  Figure 1: 5x Higher Performance with
Multi-Threaded Slaves 
    
  The
following figure shows more detailed results, with QPS sampled and reported as
the worker threads are incremented.  
    
  The raw
numbers behind this graph are reported in the Appendix section of this post. 
    
    Figure 2: Detailed Results 
    
  As the
results above show, the configuration does not scale noticably from 5 to 9
worker threads. When configured with 10
worker threads however, scalability increases significantly. The conclusion therefore is that it is
desirable to configure the same number of worker threads as schemas.  
    
  Other
conclusions from the results: 
  · Running
with 1 worker compared to zero workers just introduces overhead without the
benefit of parallel execution.  
  · As
expected, having more workers than schemas adds no visible benefit. 
    
  Aside
from what is shown in the results above, testing also demonstrated that the
following  settings had a very positive
effect on slave performance: 
   relay-log-info-repository=TABLE 
master-info-repository=TABLE  
    
  For 5+
workers, it was up to 2.3 times as fast to run with TABLE compared to FILE.  
    
  Conclusion 
  As the
results demonstrate, Multi-Threaded Slaves deliver significant performance
increases to MySQL replication when handling multiple schemas. 
    
  This, and
the other replication enhancements introduced in MySQL 5.6 are fully available
for you to download and evaluate now from the MySQL Developer site&#160;(select Development Release tab). 
    
  You can
learn more about MySQL 5.6 from the documentation&#160; 
    
  Please
don’t hesitate to comment on this or other replication blogs with feedback and
questions.  
    
    
  Appendix – Detailed Results]]></description>
			<content:encoded><![CDATA[<!--[if gte mso 9]><xml>
 <o:DocumentProperties>
  <o:Revision>0</o:Revision>
  <o:TotalTime>0</o:TotalTime>
  <o:Pages>1</o:Pages>
  <o:Words>1145</o:Words>
  <o:Characters>6530</o:Characters>
  <o:Company>Homework</o:Company>
  <o:Lines>54</o:Lines>
  <o:Paragraphs>15</o:Paragraphs>
  <o:CharactersWithSpaces>7660</o:CharactersWithSpaces>
  <o:Version>14.0</o:Version>
 </o:DocumentProperties>
 <o:OfficeDocumentSettings>
  <o:AllowPNG/>
 </o:OfficeDocumentSettings>
</xml><![endif]--> <!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:View>Normal</w:View>
  <w:Zoom>0</w:Zoom>
  <w:TrackMoves/>
  <w:TrackFormatting/>
  <w:PunctuationKerning/>
  <w:ValidateAgainstSchemas/>
  <w:SaveIfXMLInval>false</w:SaveIfXMLInvalid>
  <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
  <w:DoNotPromoteQF/>
  <w:LidThemeOther>EN-US</w:LidThemeOther>
  <w:LidThemeAsian>JA</w:LidThemeAsian>
  <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
  <w:Compatibility>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
   <w:DontGrowAutofit/>
   <w:SplitPgBreakAndParaMark/>
   <w:EnableOpenTypeKerning/>
   <w:DontFlipMirrorIndents/>
   <w:OverrideTableStyleHps/>
   <w:UseFELayout/>
  </w:Compatibility>
  <m:mathPr>
   <m:mathFont m:val="Cambria Math"/>
   <m:brkBin m:val="before"/>
   <m:brkBinSub m:val="&#45;-"/>
   <m:smallFrac m:val="off"/>
   <m:dispDef/>
   <m:lMargin m:val="0"/>
   <m:rMargin m:val="0"/>
   <m:defJc m:val="centerGroup"/>
   <m:wrapIndent m:val="1440"/>
   <m:intLim m:val="subSup"/>
   <m:naryLim m:val="undOvr"/>
  </m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
  DefSemiHidden="true" DefQFormat="false" DefPriority="99"
  LatentStyleCount="276">
  <w:LsdException Locked="false" Priority="0" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
  <w:LsdException Locked="false" Priority="9" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 1"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 2"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 3"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 4"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 5"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 6"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 7"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 8"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 9"/>
  <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
  <w:LsdException Locked="false" Priority="10" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Title"/>
  <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
  <w:LsdException Locked="false" Priority="11" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
  <w:LsdException Locked="false" Priority="22" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
  <w:LsdException Locked="false" Priority="20" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
  <w:LsdException Locked="false" Priority="59" SemiHidden="false"
   UnhideWhenUsed="false" Name="Table Grid"/>
  <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
  <w:LsdException Locked="false" Priority="1" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 1"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
  <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
  <w:LsdException Locked="false" Priority="34" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
  <w:LsdException Locked="false" Priority="29" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
  <w:LsdException Locked="false" Priority="30" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 1"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 2"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 2"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 3"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 3"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 4"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 4"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 5"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 5"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 6"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 6"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
  <w:LsdException Locked="false" Priority="19" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
  <w:LsdException Locked="false" Priority="21" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
  <w:LsdException Locked="false" Priority="31" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
  <w:LsdException Locked="false" Priority="32" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
  <w:LsdException Locked="false" Priority="33" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
  <w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
  <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
 </w:LatentStyles>
</xml><![endif]--> <!--[if gte mso 10]>

<![endif]--> <!--StartFragment--> 
  <p><span lang="UZ-CYR">The
objective of this benchmark is to measure the performance improvement achieved
when enabling the <a href="http://d2-systems.blogspot.co.uk/2011/07/update-on-multi-threaded-slave.html">Multi-Threaded Slave enhancement</a>&nbsp;delivered as a part MySQL 5.6.  <o:p /></span></p> 
  <p><span lang="UZ-CYR"> </span></p> 
  <p><span lang="UZ-CYR">As the
results demonstrate, Multi-Threaded Slaves delivers 5x higher replication performance
based on a configuration with 10 databases/schemas. For real-world deployments, higher replication
performance directly translates to:<o:p /></span></p> 
  <p><!--[if !supportLists]--><span>·<span> </span></span><!--[endif]-->Improved
consistency of reads from slaves (i.e. reduced risk of reading
&quot;stale&quot; data)<o:p /></p> 
  <p><!--[if !supportLists]--><span>·<span> </span></span><!--[endif]-->Reduced
risk of data loss should the master fail before replicating all events in its
binary log (binlog)<o:p /></p> 
  <p><o:p> </o:p></p> 
  <p>The multi-threaded slave
splits processing between worker threads based on schema, allowing updates to
be applied in parallel, rather than sequentially. This delivers benefits to
those workloads that isolate application data using databases - e.g.
multi-tenant systems deployed in cloud environments. <o:p /></p> 
  <p><o:p> </o:p></p> 
  <p>Multi-Threaded Slaves
are just one of many enhancements to replication previewed as part of the MySQL
5.6 Development Release, which include:<o:p /></p> 
  <p><!--[if !supportLists]--><span>·<span> </span></span><!--[endif]-->Global Transaction Identifiers coupled with
MySQL utilities for automatic failover / switchover and slave promotion<o:p /></p> 
  <p><!--[if !supportLists]--><span>·<span> </span></span><!--[endif]-->Crash Safe Slaves and Binlog<o:p /></p> 
  <p><!--[if !supportLists]--><span>·<span> </span></span><!--[endif]-->Optimized Row Based Replication<o:p /></p> 
  <p><!--[if !supportLists]--><span>·<span> </span></span><!--[endif]-->Replication Event Checksums<o:p /></p> 
  <p><!--[if !supportLists]--><span>·<span> </span></span><!--[endif]-->Time Delayed Replication<o:p /></p> 
  <p><o:p> </o:p></p> 
  <p>These and many more
are discussed in the “<a href="http://dev.mysql.com/tech-resources/articles/mysql-5.6-replication.html">MySQL 5.6
Replication: Enabling the Next Generation of Web &amp; Cloud Services”
Developer Zone article&nbsp;</a><o:p /></p> 
  <p><o:p> </o:p></p> 
  <p>Back to the benchmark - details
are as follows.<o:p /></p> 
  <p><span lang="UZ-CYR"><br /> <b>Environment </b><br />
The test environment consisted of two Linux servers:<o:p /></span></p> 
  <p><!--[if !supportLists]--><span lang="UZ-CYR">·<span> </span></span><!--[endif]--><span lang="UZ-CYR">one
running the replication master<o:p /></span></p> 
  <p><!--[if !supportLists]--><span lang="UZ-CYR">·<span> </span></span><!--[endif]--><span lang="UZ-CYR">one
running the replication slave.<o:p /></span></p> 
  <p><span lang="UZ-CYR"> </span></p> 
  <p><span lang="UZ-CYR">Only the
slave was involved in the actual measurements, and was based on the following
configuration:  <br /> <br />
- Hardware: Oracle Sun Fire X4170 M2 Server<o:p /></span></p> 
  <p><span lang="UZ-CYR">- CPU: 2
sockets, 6 cores with hyper-threading, 2930 MHz.<o:p /></span></p> 
  <p><span lang="UZ-CYR">- OS: 64-bit
Oracle Enterprise Linux 6.1 <br />
- Memory: 48 GB <br /> <br /> <b>Test Procedure</b> <br /> <i>Initial Setup:</i> <br /> <br />
Two MySQL servers were started on two different hosts, configured as
replication master and slave. <o:p /></span></p> 
  <p><span lang="UZ-CYR"> </span></p> 
  <p><span lang="UZ-CYR">10
sysbench schemas were created, each with a single table: <br /> <br /> </span><span lang="UZ-CYR">CREATE TABLE `sbtest` ( <br />
&nbsp;&nbsp; `id` int(10) unsigned NOT NULL AUTO_INCREMENT, <br />
&nbsp;&nbsp; `k` int(10) unsigned NOT NULL DEFAULT '0', <br />
&nbsp;&nbsp; `c` char(120) NOT NULL DEFAULT '', <br />
&nbsp;&nbsp; `pad` char(60) NOT NULL DEFAULT '', <br />
&nbsp;&nbsp; PRIMARY KEY (`id`), <br />
&nbsp;&nbsp; KEY `k` (`k`) <br />
) ENGINE=InnoDB DEFAULT CHARSET=latin1 <o:p /></span></p> 
  <p><span lang="UZ-CYR"> </span></p> 
  <p><span lang="UZ-CYR">10,000
rows were inserted in each of the 10 tables, for a total of 100,000 rows. When
the inserts had replicated to the slave, the slave threads were stopped. The
slave data directory was copied to a backup location and the slave threads
position in the master binlog noted. <br /> <br /> </span><span lang="EN-US">10 sysbench clients, each configured with 10 threads,
were spawned at the same time to generate a random schema load against each of
the 10 schemas on the master. Each sysbench client executed 10,000 &quot;update
key&quot; statements: <o:p /></span></p> 
  <p><span lang="UZ-CYR">UPDATE sbtest set k=k+1 WHERE id = &lt;random row&gt;<o:p /></span></p> 
  <p><span lang="UZ-CYR"> </span></p> 
  <p><span lang="UZ-CYR">In total,
this generated 100,000 update statements to later replicate during the test
itself. <br /> <br /> <i>Test Methodology:<br /> </i>The number of slave workers to test with was configured using:<o:p /></span></p> 
  <p><span lang="UZ-CYR">SET GLOBAL slave_parallel_workers=&lt;workers&gt;</span><span lang="UZ-CYR"><br /> <br />
Then the slave IO thread was started and the test waited for all the update
queries to be copied over to the relay log on the slave. <br /> <br />
The benchmark clock was started and then the slave SQL thread was started. The
test waited for the slave SQL thread to finish executing the 100k update
queries, doing &quot;select master_pos_wait()&quot;.  When master_pos_wait() returned, the benchmark
clock was stopped and the duration calculated. <br /> <br />
The calculated duration from the benchmark clock should be close to the time it
took for the SQL thread to execute the 100,000 update queries.  The 100k queries divided by this duration gave
the benchmark metric, reported as Queries Per Second (QPS). <br /> <br /> <i>Test Reset:</i></span></p> 
  <p><span lang="UZ-CYR"><i></i></span>The
test-reset cycle was implemented as follows:</p> 
  <p><!--[if !supportLists]--><span lang="UZ-CYR">·<span> </span></span><!--[endif]--><span lang="UZ-CYR">the
slave was stopped<o:p /></span></p> 
  <p><!--[if !supportLists]--><span lang="UZ-CYR">·<span> </span></span><!--[endif]--><span lang="UZ-CYR">the
slave data directory replaced with the previous backup<o:p /></span></p> 
  <p><!--[if !supportLists]--><span lang="UZ-CYR">·<span> </span></span><!--[endif]--><span lang="UZ-CYR">the
slave restarted with the slave threads replication pointer repositioned to the
point before the update queries in the binlog. <o:p /></span></p> 
  <p><span lang="UZ-CYR"> </span></p> 
  <p><span lang="UZ-CYR">The test
could then be repeated with identical set of queries but a different number of
slave worker threads, enabling a fair comparison. <br /> <br />
The Test-Reset cycle was repeated 3 times for 0-24 number of workers and the
QPS metric calculated and averaged for each worker count. <br /> <br /> <b>MySQL Configuration </b><br />
The relevant configuration settings used for MySQL are as follows: <br /> <br />
binlog-format=STATEMENT <br />
relay-log-info-repository=TABLE <br />
master-info-repository=TABLE <br /> <br />
As described in the test procedure, the </span><span lang="UZ-CYR">slave_parallel_workers</span><span lang="UZ-CYR"> setting was modified as part of
the test logic. The consequence of changing this setting is: <br /> <br />
0 worker threads: <br />
&nbsp;&nbsp; - current (i.e. single threaded) sequential mode <br />
&nbsp;&nbsp; - 1 x IO thread and 1 x SQL thread <br />
&nbsp;&nbsp; - SQL thread both reads and executes the events <br /> <br />
1 worker thread: <br />
&nbsp;&nbsp; - sequential mode <br />
&nbsp;&nbsp; - 1 x IO thread, 1 x Coordinator SQL thread and 1 x Worker thread <br />
&nbsp;&nbsp; - coordinator reads the event and hands it to the worker who
executes <br /> <br />
2+ worker threads: <br />
&nbsp;&nbsp; - parallel execution <br />
&nbsp;&nbsp; - 1 x IO thread, 1 x Coordinator SQL thread and 2+ Worker threads <br />
&nbsp;&nbsp; - coordinator reads events and hands them to the workers who execute
them <br /> <br /> <b>Results </b><br />
Figure 1 below shows that Multi-Threaded Slaves deliver ~5x higher replication
performance when configured with 10 worker threads, with the load evenly
distributed across our 10 x schemas. This result is compared to the current replication implementation which
is based on a single SQL thread only (i.e. zero worker threads).</span></p> 
  <p><img src="https://blogs.oracle.com/MySQL/resource/bm1.jpg" /> </p> 
  <p><span lang="UZ-CYR"> </span></p> 
  <p><span lang="UZ-CYR"> </span></p> 
  <p><span lang="UZ-CYR"> </span></p> 
  <p><span lang="UZ-CYR"> </span></p> 
  <p><span lang="UZ-CYR"> </span></p> 
  <p><i><span lang="UZ-CYR">Figure 1: 5x Higher Performance with
Multi-Threaded Slaves<o:p /></span></i></p> 
  <p><span lang="UZ-CYR"> </span></p> 
  <p><span lang="UZ-CYR">The
following figure shows more detailed results, with QPS sampled and reported as
the worker threads are incremented. <o:p /></span></p> 
  <p><span lang="UZ-CYR"> </span></p> 
  <p><span lang="UZ-CYR">The raw
numbers behind this graph are reported in the Appendix section of this post.<o:p /></span></p> 
  <p><span lang="UZ-CYR"> </span></p> 
  <p><span lang="UZ-CYR"><img src="https://blogs.oracle.com/MySQL/resource/bm2.jpg" /><br /> <br /> <i>Figure 2: Detailed Results<o:p /></i></span></p> 
  <p><span lang="UZ-CYR"> </span></p> 
  <p><span lang="UZ-CYR">As the
results above show, the configuration does not scale noticably from 5 to 9
worker threads. When configured with 10
worker threads however, scalability increases significantly. The conclusion therefore is that it is
desirable to configure the same number of worker threads as schemas. <o:p /></span></p> 
  <p><span lang="UZ-CYR"> </span></p> 
  <p><span lang="UZ-CYR">Other
conclusions from the results:<o:p /></span></p> 
  <p><!--[if !supportLists]--><span lang="UZ-CYR">·<span> </span></span><!--[endif]--><span lang="UZ-CYR">Running
with 1 worker compared to zero workers just introduces overhead without the
benefit of parallel execution. <o:p /></span></p> 
  <p><!--[if !supportLists]--><span lang="UZ-CYR">·<span> </span></span><!--[endif]--><span lang="UZ-CYR">As
expected, having more workers than schemas adds no visible benefit.<o:p /></span></p> 
  <p><span lang="UZ-CYR"> </span></p> 
  <p><span lang="UZ-CYR">Aside
from what is shown in the results above, testing also demonstrated that the
following  settings had a very positive
effect on slave performance:<o:p /></span></p> 
  <p><span lang="UZ-CYR"><br /> </span><span lang="UZ-CYR">relay-log-info-repository=TABLE <br />
master-info-repository=TABLE <o:p /></span></p> 
  <p><span lang="UZ-CYR"> </span></p> 
  <p><span lang="UZ-CYR">For 5+
workers, it was up to 2.3 times as fast to run with TABLE compared to FILE. <o:p /></span></p> 
  <p><span lang="UZ-CYR"> </span></p> 
  <p><b><span lang="UZ-CYR">Conclusion<o:p /></span></b></p> 
  <p><span lang="UZ-CYR">As the
results demonstrate, Multi-Threaded Slaves deliver significant performance
increases to MySQL replication when handling multiple schemas.<o:p /></span></p> 
  <p><span lang="UZ-CYR"> </span></p> 
  <p><span lang="UZ-CYR">This, and
the other replication enhancements introduced in MySQL 5.6 are fully available
for you to download and evaluate now from the <a href="http://dev.mysql.com/downloads/mysql/">MySQL Developer site</a></span><span lang="UZ-CYR">&nbsp;(select Development Release tab).<o:p /></span></p> 
  <p><span lang="UZ-CYR"> </span></p> 
  <p><span lang="UZ-CYR">You can
learn more about <a href="http://dev.mysql.com/doc/refman/5.6/en/index.html">MySQL 5.6 from the documentation&nbsp;</a></span></p> 
  <p><span lang="UZ-CYR"> </span></p> 
  <p><span lang="UZ-CYR">Please
don’t hesitate to comment on this or other replication blogs with feedback and
questions. <o:p /></span></p> 
  <p><span lang="UZ-CYR"> </span></p> 
  <p><span lang="UZ-CYR"> </span></p> 
  <p><b><span lang="UZ-CYR">Appendix – Detailed Results</span></b></p> 
  <p><img src="https://blogs.oracle.com/MySQL/resource/results.jpg" /> </p> 
  <p> </p> <!--EndFragment--><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=32792&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=32792&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/04/10/benchmarking-mysql-replication-with-multi-threaded-slaves/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL 5.6 too verbose when creating data directory</title>
		<link>http://datacharmer.blogspot.com/2012/03/mysql-56-too-verbose-when-creating-data.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mysql-5-6-too-verbose-when-creating-data-directory-2</link>
		<comments>http://datacharmer.blogspot.com/2012/03/mysql-56-too-verbose-when-creating-data.html#comments</comments>
		<pubDate>Sun, 18 Mar 2012 09:37:00 +0000</pubDate>
		<dc:creator>Giuseppe Maxia</dc:creator>
				<category><![CDATA[5.6]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://planetmysql.ru/?guid=dce6c81b91908c2463334eff6cb73ba7</guid>
		<description><![CDATA[When I install a MySQL package using MySQL Sandbox, if everything goes smoothly, I get an informative message on standard output, and I keep working.This is OK $HOME/opt/mysql/5.5.15/scripts/mysql_install_db --no-defaults \  --user=$USER --basedir=$HOME/opt/mysql/5.5.15 \  --datadir=$HOME/sandboxes/msb_5_5_15/data \  --lower_case_table_names=2Installing MySQL system tables...OKFilling help tables...OKTo start mysqld at boot time you have to copysupport-files/mysql.server to the right place for your systemPLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !To do so, start the server, then issue the following commands:/Users/gmax/opt/mysql/5.5.15/bin/mysqladmin -u root password 'new-password'/Users/gmax/opt/mysql/5.5.15/bin/mysqladmin -u root -h gmac4.local password 'new-password'Alternatively you can run:/Users/gmax/opt/mysql/5.5.15/bin/mysql_secure_installationwhich will also give you the option of removing the testdatabases and anonymous user created by default.  This isstrongly recommended for production servers.See the manual for more instructions.You can start the MySQL daemon with:cd /Users/gmax/opt/mysql/5.5.15 ; /Users/gmax/opt/mysql/5.5.15/bin/mysqld_safe &#38;You can test the MySQL daemon with mysql-test-run.plcd /Users/gmax/opt/mysql/5.5.15/mysql-test ; perl mysql-test-run.plPlease report any problems with the /Users/gmax/opt/mysql/5.5.15/scripts/mysqlbug script!I can actually suppress this output, confident that, if something goes wrong, the error comes to my screen loud and clear. For example, if I try to install to a data directory that is write protected, I get this:chmod 444 $HOME/sandboxes/msb_5_5_15/data$HOME/opt/mysql/5.5.15/scripts/mysql_install_db --no-defaults \  --user=$USER --basedir=$HOME/opt/mysql/5.5.15 \  --datadir=$HOME/sandboxes/msb_5_5_15/data \  --lower_case_table_names=2  &#62; /dev/nullmkdir: /Users/gmax/sandboxes/msb_5_5_15/data: Permission deniedchmod: /Users/gmax/sandboxes/msb_5_5_15/data: Permission deniedchown: /Users/gmax/sandboxes/msb_5_5_15/data: Permission deniedThis, way, I know that there was an error, it is very clear and readable. I don't need to hunt it down within the regular messages. The standard error is a separate file descriptor, which can be read independently from the standard input.After fixing permissions:chmod 755 ~/sandboxes/msb_5_5_15/$HOME/opt/mysql/5.5.15/scripts/mysql_install_db --no-defaults \  --user=$USER --basedir=$HOME/opt/mysql/5.5.15 \  --datadir=$HOME/sandboxes/msb_5_5_15/data \  --lower_case_table_names=2  &#62; /dev/null# empty line: means all OKThis is very convenient, and it is the Unix way.This is not OKNow, let's try the same with MySQL 5.6$BASEDIR/scripts/mysql_install_db --no-defaults --user=tungsten \  --basedir=$BASEDIR --datadir=/home/tungsten/sandboxes/msb_5_6_4/data \  --tmpdir=/home/tungsten/sandboxes/msb_5_6_4/tmp  &#62; /dev/null120318 10:10:44 InnoDB: The InnoDB memory heap is disabled120318 10:10:44 InnoDB: Mutexes and rw_locks use GCC atomic builtins120318 10:10:44 InnoDB: Compressed tables use zlib 1.2.3120318 10:10:44 InnoDB: Using Linux native AIO120318 10:10:44 InnoDB: CPU supports crc32 instructions120318 10:10:44 InnoDB: Initializing buffer pool, size = 128.0M120318 10:10:44 InnoDB: Completed initialization of buffer poolInnoDB: The first specified data file ./ibdata1 did not exist:InnoDB: a new database to be created!120318 10:10:44 InnoDB: Setting file ./ibdata1 size to 10 MBInnoDB: Database physically writes the file full: wait...120318 10:10:44 InnoDB: Log file ./ib_logfile0 did not exist: new to be createdInnoDB: Setting log file ./ib_logfile0 size to 5 MBInnoDB: Database physically writes the file full: wait...120318 10:10:44 InnoDB: Log file ./ib_logfile1 did not exist: new to be createdInnoDB: Setting log file ./ib_logfile1 size to 5 MBInnoDB: Database physically writes the file full: wait...InnoDB: Doublewrite buffer not found: creating newInnoDB: Doublewrite buffer created120318 10:10:44 InnoDB: 128 rollback segment(s) are active.InnoDB: Creating foreign key constraint system tablesInnoDB: Foreign key constraint system tables created120318 10:10:44 InnoDB: 1.2.4 started; log sequence number 0120318 10:10:44 [Warning] Info table is not ready to be used. Table 'mysql.slave_master_info' cannot be opened.120318 10:10:44 [Warning] Error while checking replication metadata. Setting the requested repository in order to give users the chance to fix the problem and restart the server. If this is a live upgrade please consider using mysql_upgrade to fix the problem.120318 10:10:44 [Warning] Info table is not ready to be used. Table 'mysql.slave_relay_log_info' cannot be opened.120318 10:10:44 [Warning] Error while checking replication metadata. Setting the requested repository in order to give users the chance to fix the problem and restart the server. If this is a live upgrade please consider using mysql_upgrade to fix the problem.120318 10:10:44 [Note] Binlog end120318 10:10:44 [Note] Shutting down plugin 'partition'120318 10:10:44 [Note] Shutting down plugin 'ARCHIVE'120318 10:10:44 [Note] Shutting down plugin 'BLACKHOLE'120318 10:10:44 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'120318 10:10:44 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'120318 10:10:44 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'120318 10:10:44 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'120318 10:10:44 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'120318 10:10:44 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'120318 10:10:44 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'120318 10:10:44 [Note] Shutting down plugin 'INNODB_SYS_TABLES'120318 10:10:44 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'120318 10:10:44 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'120318 10:10:44 [Note] Shutting down plugin 'INNODB_FT_CONFIG'120318 10:10:44 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'120318 10:10:44 [Note] Shutting down plugin 'INNODB_FT_DELETED'120318 10:10:44 [Note] Shutting down plugin 'INNODB_FT_INSERTED'120318 10:10:44 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'120318 10:10:44 [Note] Shutting down plugin 'INNODB_METRICS'120318 10:10:44 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'120318 10:10:44 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'120318 10:10:44 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'120318 10:10:44 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'120318 10:10:44 [Note] Shutting down plugin 'INNODB_CMPMEM'120318 10:10:44 [Note] Shutting down plugin 'INNODB_CMP_RESET'120318 10:10:44 [Note] Shutting down plugin 'INNODB_CMP'120318 10:10:44 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'120318 10:10:44 [Note] Shutting down plugin 'INNODB_LOCKS'120318 10:10:44 [Note] Shutting down plugin 'INNODB_TRX'120318 10:10:44 [Note] Shutting down plugin 'InnoDB'120318 10:10:44  InnoDB: FTS optimize thread exiting.120318 10:10:44  InnoDB: Starting shutdown...120318 10:10:46 InnoDB: Shutdown completed; log sequence number 1602841120318 10:10:46 [Note] Shutting down plugin 'CSV'120318 10:10:46 [Note] Shutting down plugin 'MEMORY'120318 10:10:46 [Note] Shutting down plugin 'MyISAM'120318 10:10:46 [Note] Shutting down plugin 'MRG_MYISAM'120318 10:10:46 [Note] Shutting down plugin 'mysql_old_password'120318 10:10:46 [Note] Shutting down plugin 'mysql_native_password'120318 10:10:46 [Note] Shutting down plugin 'binlog'120318 10:10:46 InnoDB: The InnoDB memory heap is disabled120318 10:10:46 InnoDB: Mutexes and rw_locks use GCC atomic builtins120318 10:10:46 InnoDB: Compressed tables use zlib 1.2.3120318 10:10:46 InnoDB: Using Linux native AIO120318 10:10:46 InnoDB: CPU supports crc32 instructions120318 10:10:46 InnoDB: Initializing buffer pool, size = 128.0M120318 10:10:46 InnoDB: Completed initialization of buffer pool120318 10:10:46 InnoDB: highest supported file format is Barracuda.120318 10:10:46 InnoDB: 128 rollback segment(s) are active.120318 10:10:46 InnoDB: Waiting for the background threads to start120318 10:10:47 InnoDB: 1.2.4 started; log sequence number 1602841120318 10:10:47 [Note] Binlog end120318 10:10:47 [Note] Shutting down plugin 'partition'120318 10:10:47 [Note] Shutting down plugin 'ARCHIVE'120318 10:10:47 [Note] Shutting down plugin 'BLACKHOLE'120318 10:10:47 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'120318 10:10:47 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'120318 10:10:47 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'120318 10:10:47 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'120318 10:10:47 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'120318 10:10:47 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'120318 10:10:47 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'120318 10:10:47 [Note] Shutting down plugin 'INNODB_SYS_TABLES'120318 10:10:47 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'120318 10:10:47 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'120318 10:10:47 [Note] Shutting down plugin 'INNODB_FT_CONFIG'120318 10:10:47 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'120318 10:10:47 [Note] Shutting down plugin 'INNODB_FT_DELETED'120318 10:10:47 [Note] Shutting down plugin 'INNODB_FT_INSERTED'120318 10:10:47 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'120318 10:10:47 [Note] Shutting down plugin 'INNODB_METRICS'120318 10:10:47 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'120318 10:10:47 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'120318 10:10:47 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'120318 10:10:47 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'120318 10:10:47 [Note] Shutting down plugin 'INNODB_CMPMEM'120318 10:10:47 [Note] Shutting down plugin 'INNODB_CMP_RESET'120318 10:10:47 [Note] Shutting down plugin 'INNODB_CMP'120318 10:10:47 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'120318 10:10:47 [Note] Shutting down plugin 'INNODB_LOCKS'120318 10:10:47 [Note] Shutting down plugin 'INNODB_TRX'120318 10:10:47 [Note] Shutting down plugin 'InnoDB'120318 10:10:47  InnoDB: FTS optimize thread exiting.120318 10:10:47  InnoDB: Starting shutdown...120318 10:10:49 InnoDB: Shutdown completed; log sequence number 1602851120318 10:10:49 [Note] Shutting down plugin 'CSV'120318 10:10:49 [Note] Shutting down plugin 'MEMORY'120318 10:10:49 [Note] Shutting down plugin 'MyISAM'120318 10:10:49 [Note] Shutting down plugin 'MRG_MYISAM'120318 10:10:49 [Note] Shutting down plugin 'mysql_old_password'120318 10:10:49 [Note] Shutting down plugin 'mysql_native_password'120318 10:10:49 [Note] Shutting down plugin 'binlog'Why is this bad? Because you don't see at a glance what is right and what is wrong. All the above messages are printed to the standard error, the kind of output that should be reserved for, well, errors! If the standard error is used for regular messages, you may miss the important error messages that are instead mixed with the "all is OK" messages.There is Bug#60934 filed about this issue, but it has been considered a feature request, and as such unlikely to be fixed.In the above text there is something more. There are warnings, mixed with the standard text, telling me of errors that the bootstrap operation is not in a position to fix, like replication metadata and slave_master_info.MySQL developers, please fix this issue. Users need error messages when there is something wrong, and warning or error messages about something that can actually be fixed. When MySQL 5.6 goes GA, this issue will hit most everybody.]]></description>
			<content:encoded><![CDATA[<p>When I install a MySQL package using <a http://mysqlsandbox.net>MySQL Sandbox</a>, if everything goes smoothly, I get an informative message on standard output, and I keep working.</p><h3>This is OK </h3><pre><br />$HOME/opt/mysql/5.5.15/scripts/mysql_install_db --no-defaults \<br />  --user=$USER --basedir=$HOME/opt/mysql/5.5.15 \<br />  --datadir=$HOME/sandboxes/msb_5_5_15/data \<br />  --lower_case_table_names=2<br />Installing MySQL system tables...<br />OK<br />Filling help tables...<br />OK<br /><br />To start mysqld at boot time you have to copy<br />support-files/mysql.server to the right place for your system<br /><br />PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !<br />To do so, start the server, then issue the following commands:<br /><br />/Users/gmax/opt/mysql/5.5.15/bin/mysqladmin -u root password 'new-password'<br />/Users/gmax/opt/mysql/5.5.15/bin/mysqladmin -u root -h gmac4.local password 'new-password'<br /><br />Alternatively you can run:<br />/Users/gmax/opt/mysql/5.5.15/bin/mysql_secure_installation<br /><br />which will also give you the option of removing the test<br />databases and anonymous user created by default.  This is<br />strongly recommended for production servers.<br /><br />See the manual for more instructions.<br /><br />You can start the MySQL daemon with:<br />cd /Users/gmax/opt/mysql/5.5.15 ; /Users/gmax/opt/mysql/5.5.15/bin/mysqld_safe &<br /><br />You can test the MySQL daemon with mysql-test-run.pl<br />cd /Users/gmax/opt/mysql/5.5.15/mysql-test ; perl mysql-test-run.pl<br /><br />Please report any problems with the /Users/gmax/opt/mysql/5.5.15/scripts/mysqlbug script!<br /></pre>I can actually suppress this output, confident that, if something goes wrong, the error comes to my screen loud and clear. For example, if I try to install to a data directory that is write protected, I get this:<pre><br />chmod 444 $HOME/sandboxes/msb_5_5_15/data<br />$HOME/opt/mysql/5.5.15/scripts/mysql_install_db --no-defaults \<br />  --user=$USER --basedir=$HOME/opt/mysql/5.5.15 \<br />  --datadir=$HOME/sandboxes/msb_5_5_15/data \<br />  --lower_case_table_names=2 <b> &gt; /dev/null</b><br /><br />mkdir: /Users/gmax/sandboxes/msb_5_5_15/data: Permission denied<br />chmod: /Users/gmax/sandboxes/msb_5_5_15/data: Permission denied<br />chown: /Users/gmax/sandboxes/msb_5_5_15/data: Permission denied<br /></pre>This, way, I know that there was an error, it is very clear and readable. I don't need to hunt it down within the regular messages. The standard error is a separate file descriptor, which can be read independently from the standard input.<p>After fixing permissions:</p><pre><br />chmod 755 ~/sandboxes/msb_5_5_15/<br />$HOME/opt/mysql/5.5.15/scripts/mysql_install_db --no-defaults \<br />  --user=$USER --basedir=$HOME/opt/mysql/5.5.15 \<br />  --datadir=$HOME/sandboxes/msb_5_5_15/data \<br />  --lower_case_table_names=2 <b> &gt; /dev/null</b><br /># empty line: means all OK<br /></pre><p>This is very convenient, and it is the Unix way.</p><h3>This is not OK</h3><p>Now, let's try the same with MySQL 5.6</p><pre><br />$BASEDIR/scripts/mysql_install_db --no-defaults --user=tungsten \<br />  --basedir=$BASEDIR --datadir=/home/tungsten/sandboxes/msb_5_6_4/data \<br />  --tmpdir=/home/tungsten/sandboxes/msb_5_6_4/tmp  <b>&gt; /dev/null</b><br />120318 10:10:44 InnoDB: The InnoDB memory heap is disabled<br />120318 10:10:44 InnoDB: Mutexes and rw_locks use GCC atomic builtins<br />120318 10:10:44 InnoDB: Compressed tables use zlib 1.2.3<br />120318 10:10:44 InnoDB: Using Linux native AIO<br />120318 10:10:44 InnoDB: CPU supports crc32 instructions<br />120318 10:10:44 InnoDB: Initializing buffer pool, size = 128.0M<br />120318 10:10:44 InnoDB: Completed initialization of buffer pool<br />InnoDB: The first specified data file ./ibdata1 did not exist:<br />InnoDB: a new database to be created!<br />120318 10:10:44 InnoDB: Setting file ./ibdata1 size to 10 MB<br />InnoDB: Database physically writes the file full: wait...<br />120318 10:10:44 InnoDB: Log file ./ib_logfile0 did not exist: new to be created<br />InnoDB: Setting log file ./ib_logfile0 size to 5 MB<br />InnoDB: Database physically writes the file full: wait...<br />120318 10:10:44 InnoDB: Log file ./ib_logfile1 did not exist: new to be created<br />InnoDB: Setting log file ./ib_logfile1 size to 5 MB<br />InnoDB: Database physically writes the file full: wait...<br />InnoDB: Doublewrite buffer not found: creating new<br />InnoDB: Doublewrite buffer created<br />120318 10:10:44 InnoDB: 128 rollback segment(s) are active.<br />InnoDB: Creating foreign key constraint system tables<br />InnoDB: Foreign key constraint system tables created<br />120318 10:10:44 InnoDB: 1.2.4 started; log sequence number 0<br />120318 10:10:44 [Warning] Info table is not ready to be used. Table 'mysql.slave_master_info' cannot be opened.<br />120318 10:10:44 [Warning] Error while checking replication metadata. Setting the requested repository in order to give users the chance to fix the problem and restart the server. If this is a live upgrade please consider using mysql_upgrade to fix the problem.<br />120318 10:10:44 [Warning] Info table is not ready to be used. Table 'mysql.slave_relay_log_info' cannot be opened.<br />120318 10:10:44 [Warning] Error while checking replication metadata. Setting the requested repository in order to give users the chance to fix the problem and restart the server. If this is a live upgrade please consider using mysql_upgrade to fix the problem.<br />120318 10:10:44 [Note] Binlog end<br />120318 10:10:44 [Note] Shutting down plugin 'partition'<br />120318 10:10:44 [Note] Shutting down plugin 'ARCHIVE'<br />120318 10:10:44 [Note] Shutting down plugin 'BLACKHOLE'<br />120318 10:10:44 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_SYS_TABLES'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_FT_CONFIG'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_FT_DELETED'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_FT_INSERTED'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_METRICS'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_CMPMEM'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_CMP_RESET'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_CMP'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_LOCKS'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_TRX'<br />120318 10:10:44 [Note] Shutting down plugin 'InnoDB'<br />120318 10:10:44  InnoDB: FTS optimize thread exiting.<br />120318 10:10:44  InnoDB: Starting shutdown...<br />120318 10:10:46 InnoDB: Shutdown completed; log sequence number 1602841<br />120318 10:10:46 [Note] Shutting down plugin 'CSV'<br />120318 10:10:46 [Note] Shutting down plugin 'MEMORY'<br />120318 10:10:46 [Note] Shutting down plugin 'MyISAM'<br />120318 10:10:46 [Note] Shutting down plugin 'MRG_MYISAM'<br />120318 10:10:46 [Note] Shutting down plugin 'mysql_old_password'<br />120318 10:10:46 [Note] Shutting down plugin 'mysql_native_password'<br />120318 10:10:46 [Note] Shutting down plugin 'binlog'<br />120318 10:10:46 InnoDB: The InnoDB memory heap is disabled<br />120318 10:10:46 InnoDB: Mutexes and rw_locks use GCC atomic builtins<br />120318 10:10:46 InnoDB: Compressed tables use zlib 1.2.3<br />120318 10:10:46 InnoDB: Using Linux native AIO<br />120318 10:10:46 InnoDB: CPU supports crc32 instructions<br />120318 10:10:46 InnoDB: Initializing buffer pool, size = 128.0M<br />120318 10:10:46 InnoDB: Completed initialization of buffer pool<br />120318 10:10:46 InnoDB: highest supported file format is Barracuda.<br />120318 10:10:46 InnoDB: 128 rollback segment(s) are active.<br />120318 10:10:46 InnoDB: Waiting for the background threads to start<br />120318 10:10:47 InnoDB: 1.2.4 started; log sequence number 1602841<br />120318 10:10:47 [Note] Binlog end<br />120318 10:10:47 [Note] Shutting down plugin 'partition'<br />120318 10:10:47 [Note] Shutting down plugin 'ARCHIVE'<br />120318 10:10:47 [Note] Shutting down plugin 'BLACKHOLE'<br />120318 10:10:47 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_SYS_TABLES'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_FT_CONFIG'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_FT_DELETED'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_FT_INSERTED'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_METRICS'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_CMPMEM'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_CMP_RESET'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_CMP'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_LOCKS'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_TRX'<br />120318 10:10:47 [Note] Shutting down plugin 'InnoDB'<br />120318 10:10:47  InnoDB: FTS optimize thread exiting.<br />120318 10:10:47  InnoDB: Starting shutdown...<br />120318 10:10:49 InnoDB: Shutdown completed; log sequence number 1602851<br />120318 10:10:49 [Note] Shutting down plugin 'CSV'<br />120318 10:10:49 [Note] Shutting down plugin 'MEMORY'<br />120318 10:10:49 [Note] Shutting down plugin 'MyISAM'<br />120318 10:10:49 [Note] Shutting down plugin 'MRG_MYISAM'<br />120318 10:10:49 [Note] Shutting down plugin 'mysql_old_password'<br />120318 10:10:49 [Note] Shutting down plugin 'mysql_native_password'<br />120318 10:10:49 [Note] Shutting down plugin 'binlog'<br /></pre>Why is this bad? Because you don't see at a glance what is right and what is wrong. All the above messages are printed to the <b>standard error</b>, the kind of output that should be reserved for, well, <a href="http://bugs.mysql.com/bug.php?id=60934">errors</a>! If the standard error is used for regular messages, you may miss the important error messages that are instead mixed with the "all is OK" messages.<p>There is <a href="http://bugs.mysql.com/bug.php?id=60934">Bug#60934</a> filed about this issue, but it has been considered a feature request, and as such unlikely to be fixed.</p><p>In the above text there is something more. There are warnings, mixed with the standard text, telling me of errors that the bootstrap operation is not in a position to fix, like replication metadata and slave_master_info.</p>MySQL developers, please fix this issue. Users need error messages when there is something wrong, and warning or error messages about something that can actually be fixed. When MySQL 5.6 goes GA, this issue will hit most everybody.<div><img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/16959946-6338218864607431955?l=datacharmer.blogspot.com" alt="" /></div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=32350&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=32350&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/03/18/mysql-5-6-too-verbose-when-creating-data-directory-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL 5.6 too verbose when creating data directory</title>
		<link>http://datacharmer.blogspot.com/2012/03/mysql-56-too-verbose-when-creating-data.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mysql-5-6-too-verbose-when-creating-data-directory</link>
		<comments>http://datacharmer.blogspot.com/2012/03/mysql-56-too-verbose-when-creating-data.html#comments</comments>
		<pubDate>Sun, 18 Mar 2012 09:37:00 +0000</pubDate>
		<dc:creator>Giuseppe Maxia</dc:creator>
				<category><![CDATA[5.6]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://planetmysql.ru/?guid=dce6c81b91908c2463334eff6cb73ba7</guid>
		<description><![CDATA[When I install a MySQL package using MySQL Sandbox, if everything goes smoothly, I get an informative message on standard output, and I keep working.This is OK $HOME/opt/mysql/5.5.15/scripts/mysql_install_db --no-defaults \  --user=$USER --basedir=$HOME/opt/mysql/5.5.15 \  --datadir=$HOME/sandboxes/msb_5_5_15/data \  --lower_case_table_names=2Installing MySQL system tables...OKFilling help tables...OKTo start mysqld at boot time you have to copysupport-files/mysql.server to the right place for your systemPLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !To do so, start the server, then issue the following commands:/Users/gmax/opt/mysql/5.5.15/bin/mysqladmin -u root password 'new-password'/Users/gmax/opt/mysql/5.5.15/bin/mysqladmin -u root -h gmac4.local password 'new-password'Alternatively you can run:/Users/gmax/opt/mysql/5.5.15/bin/mysql_secure_installationwhich will also give you the option of removing the testdatabases and anonymous user created by default.  This isstrongly recommended for production servers.See the manual for more instructions.You can start the MySQL daemon with:cd /Users/gmax/opt/mysql/5.5.15 ; /Users/gmax/opt/mysql/5.5.15/bin/mysqld_safe &#38;You can test the MySQL daemon with mysql-test-run.plcd /Users/gmax/opt/mysql/5.5.15/mysql-test ; perl mysql-test-run.plPlease report any problems with the /Users/gmax/opt/mysql/5.5.15/scripts/mysqlbug script!I can actually suppress this output, confident that, if something goes wrong, the error comes to my screen loud and clear. For example, if I try to install to a data directory that is write protected, I get this:chmod 444 $HOME/sandboxes/msb_5_5_15/data$HOME/opt/mysql/5.5.15/scripts/mysql_install_db --no-defaults \  --user=$USER --basedir=$HOME/opt/mysql/5.5.15 \  --datadir=$HOME/sandboxes/msb_5_5_15/data \  --lower_case_table_names=2  &#62; /dev/nullmkdir: /Users/gmax/sandboxes/msb_5_5_15/data: Permission deniedchmod: /Users/gmax/sandboxes/msb_5_5_15/data: Permission deniedchown: /Users/gmax/sandboxes/msb_5_5_15/data: Permission deniedThis, way, I know that there was an error, it is very clear and readable. I don't need to hunt it down within the regular messages. The standard error is a separate file descriptor, which can be read independently from the standard input.After fixing permissions:chmod 755 ~/sandboxes/msb_5_5_15/$HOME/opt/mysql/5.5.15/scripts/mysql_install_db --no-defaults \  --user=$USER --basedir=$HOME/opt/mysql/5.5.15 \  --datadir=$HOME/sandboxes/msb_5_5_15/data \  --lower_case_table_names=2  &#62; /dev/null# empty line: means all OKThis is very convenient, and it is the Unix way.This is not OKNow, let's try the same with MySQL 5.6$BASEDIR/scripts/mysql_install_db --no-defaults --user=tungsten \  --basedir=$BASEDIR --datadir=/home/tungsten/sandboxes/msb_5_6_4/data \  --tmpdir=/home/tungsten/sandboxes/msb_5_6_4/tmp  &#62; /dev/null120318 10:10:44 InnoDB: The InnoDB memory heap is disabled120318 10:10:44 InnoDB: Mutexes and rw_locks use GCC atomic builtins120318 10:10:44 InnoDB: Compressed tables use zlib 1.2.3120318 10:10:44 InnoDB: Using Linux native AIO120318 10:10:44 InnoDB: CPU supports crc32 instructions120318 10:10:44 InnoDB: Initializing buffer pool, size = 128.0M120318 10:10:44 InnoDB: Completed initialization of buffer poolInnoDB: The first specified data file ./ibdata1 did not exist:InnoDB: a new database to be created!120318 10:10:44 InnoDB: Setting file ./ibdata1 size to 10 MBInnoDB: Database physically writes the file full: wait...120318 10:10:44 InnoDB: Log file ./ib_logfile0 did not exist: new to be createdInnoDB: Setting log file ./ib_logfile0 size to 5 MBInnoDB: Database physically writes the file full: wait...120318 10:10:44 InnoDB: Log file ./ib_logfile1 did not exist: new to be createdInnoDB: Setting log file ./ib_logfile1 size to 5 MBInnoDB: Database physically writes the file full: wait...InnoDB: Doublewrite buffer not found: creating newInnoDB: Doublewrite buffer created120318 10:10:44 InnoDB: 128 rollback segment(s) are active.InnoDB: Creating foreign key constraint system tablesInnoDB: Foreign key constraint system tables created120318 10:10:44 InnoDB: 1.2.4 started; log sequence number 0120318 10:10:44 [Warning] Info table is not ready to be used. Table 'mysql.slave_master_info' cannot be opened.120318 10:10:44 [Warning] Error while checking replication metadata. Setting the requested repository in order to give users the chance to fix the problem and restart the server. If this is a live upgrade please consider using mysql_upgrade to fix the problem.120318 10:10:44 [Warning] Info table is not ready to be used. Table 'mysql.slave_relay_log_info' cannot be opened.120318 10:10:44 [Warning] Error while checking replication metadata. Setting the requested repository in order to give users the chance to fix the problem and restart the server. If this is a live upgrade please consider using mysql_upgrade to fix the problem.120318 10:10:44 [Note] Binlog end120318 10:10:44 [Note] Shutting down plugin 'partition'120318 10:10:44 [Note] Shutting down plugin 'ARCHIVE'120318 10:10:44 [Note] Shutting down plugin 'BLACKHOLE'120318 10:10:44 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'120318 10:10:44 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'120318 10:10:44 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'120318 10:10:44 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'120318 10:10:44 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'120318 10:10:44 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'120318 10:10:44 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'120318 10:10:44 [Note] Shutting down plugin 'INNODB_SYS_TABLES'120318 10:10:44 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'120318 10:10:44 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'120318 10:10:44 [Note] Shutting down plugin 'INNODB_FT_CONFIG'120318 10:10:44 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'120318 10:10:44 [Note] Shutting down plugin 'INNODB_FT_DELETED'120318 10:10:44 [Note] Shutting down plugin 'INNODB_FT_INSERTED'120318 10:10:44 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'120318 10:10:44 [Note] Shutting down plugin 'INNODB_METRICS'120318 10:10:44 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'120318 10:10:44 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'120318 10:10:44 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'120318 10:10:44 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'120318 10:10:44 [Note] Shutting down plugin 'INNODB_CMPMEM'120318 10:10:44 [Note] Shutting down plugin 'INNODB_CMP_RESET'120318 10:10:44 [Note] Shutting down plugin 'INNODB_CMP'120318 10:10:44 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'120318 10:10:44 [Note] Shutting down plugin 'INNODB_LOCKS'120318 10:10:44 [Note] Shutting down plugin 'INNODB_TRX'120318 10:10:44 [Note] Shutting down plugin 'InnoDB'120318 10:10:44  InnoDB: FTS optimize thread exiting.120318 10:10:44  InnoDB: Starting shutdown...120318 10:10:46 InnoDB: Shutdown completed; log sequence number 1602841120318 10:10:46 [Note] Shutting down plugin 'CSV'120318 10:10:46 [Note] Shutting down plugin 'MEMORY'120318 10:10:46 [Note] Shutting down plugin 'MyISAM'120318 10:10:46 [Note] Shutting down plugin 'MRG_MYISAM'120318 10:10:46 [Note] Shutting down plugin 'mysql_old_password'120318 10:10:46 [Note] Shutting down plugin 'mysql_native_password'120318 10:10:46 [Note] Shutting down plugin 'binlog'120318 10:10:46 InnoDB: The InnoDB memory heap is disabled120318 10:10:46 InnoDB: Mutexes and rw_locks use GCC atomic builtins120318 10:10:46 InnoDB: Compressed tables use zlib 1.2.3120318 10:10:46 InnoDB: Using Linux native AIO120318 10:10:46 InnoDB: CPU supports crc32 instructions120318 10:10:46 InnoDB: Initializing buffer pool, size = 128.0M120318 10:10:46 InnoDB: Completed initialization of buffer pool120318 10:10:46 InnoDB: highest supported file format is Barracuda.120318 10:10:46 InnoDB: 128 rollback segment(s) are active.120318 10:10:46 InnoDB: Waiting for the background threads to start120318 10:10:47 InnoDB: 1.2.4 started; log sequence number 1602841120318 10:10:47 [Note] Binlog end120318 10:10:47 [Note] Shutting down plugin 'partition'120318 10:10:47 [Note] Shutting down plugin 'ARCHIVE'120318 10:10:47 [Note] Shutting down plugin 'BLACKHOLE'120318 10:10:47 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'120318 10:10:47 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'120318 10:10:47 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'120318 10:10:47 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'120318 10:10:47 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'120318 10:10:47 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'120318 10:10:47 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'120318 10:10:47 [Note] Shutting down plugin 'INNODB_SYS_TABLES'120318 10:10:47 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'120318 10:10:47 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'120318 10:10:47 [Note] Shutting down plugin 'INNODB_FT_CONFIG'120318 10:10:47 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'120318 10:10:47 [Note] Shutting down plugin 'INNODB_FT_DELETED'120318 10:10:47 [Note] Shutting down plugin 'INNODB_FT_INSERTED'120318 10:10:47 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'120318 10:10:47 [Note] Shutting down plugin 'INNODB_METRICS'120318 10:10:47 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'120318 10:10:47 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'120318 10:10:47 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'120318 10:10:47 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'120318 10:10:47 [Note] Shutting down plugin 'INNODB_CMPMEM'120318 10:10:47 [Note] Shutting down plugin 'INNODB_CMP_RESET'120318 10:10:47 [Note] Shutting down plugin 'INNODB_CMP'120318 10:10:47 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'120318 10:10:47 [Note] Shutting down plugin 'INNODB_LOCKS'120318 10:10:47 [Note] Shutting down plugin 'INNODB_TRX'120318 10:10:47 [Note] Shutting down plugin 'InnoDB'120318 10:10:47  InnoDB: FTS optimize thread exiting.120318 10:10:47  InnoDB: Starting shutdown...120318 10:10:49 InnoDB: Shutdown completed; log sequence number 1602851120318 10:10:49 [Note] Shutting down plugin 'CSV'120318 10:10:49 [Note] Shutting down plugin 'MEMORY'120318 10:10:49 [Note] Shutting down plugin 'MyISAM'120318 10:10:49 [Note] Shutting down plugin 'MRG_MYISAM'120318 10:10:49 [Note] Shutting down plugin 'mysql_old_password'120318 10:10:49 [Note] Shutting down plugin 'mysql_native_password'120318 10:10:49 [Note] Shutting down plugin 'binlog'Why is this bad? Because you don't see at a glance what is right and what is wrong. All the above messages are printed to the standard error, the kind of output that should be reserved for, well, errors! If the standard error is used for regular messages, you may miss the important error messages that are instead mixed with the "all is OK" messages.There is Bug#60934 filed about this issue, but it has been considered a feature request, and as such unlikely to be fixed.In the above text there is something more. THere are warnings, mixed with the standard text, telling me of errors that the bootstrap operation is not in a position to fix, like replication metadata and slave_master_info.MySQL developers, please fix this issue. Users need error messages when there is something wrong, and warning or error messages about something that can actually be fixed. When MySQL 5.6 goes GA, this issue will hit most everybody.]]></description>
			<content:encoded><![CDATA[When I install a MySQL package using <a http://mysqlsandbox.net>MySQL Sandbox</a>, if everything goes smoothly, I get an informative message on standard output, and I keep working.<h3>This is OK </h3><pre><br />$HOME/opt/mysql/5.5.15/scripts/mysql_install_db --no-defaults \<br />  --user=$USER --basedir=$HOME/opt/mysql/5.5.15 \<br />  --datadir=$HOME/sandboxes/msb_5_5_15/data \<br />  --lower_case_table_names=2<br />Installing MySQL system tables...<br />OK<br />Filling help tables...<br />OK<br /><br />To start mysqld at boot time you have to copy<br />support-files/mysql.server to the right place for your system<br /><br />PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !<br />To do so, start the server, then issue the following commands:<br /><br />/Users/gmax/opt/mysql/5.5.15/bin/mysqladmin -u root password 'new-password'<br />/Users/gmax/opt/mysql/5.5.15/bin/mysqladmin -u root -h gmac4.local password 'new-password'<br /><br />Alternatively you can run:<br />/Users/gmax/opt/mysql/5.5.15/bin/mysql_secure_installation<br /><br />which will also give you the option of removing the test<br />databases and anonymous user created by default.  This is<br />strongly recommended for production servers.<br /><br />See the manual for more instructions.<br /><br />You can start the MySQL daemon with:<br />cd /Users/gmax/opt/mysql/5.5.15 ; /Users/gmax/opt/mysql/5.5.15/bin/mysqld_safe &<br /><br />You can test the MySQL daemon with mysql-test-run.pl<br />cd /Users/gmax/opt/mysql/5.5.15/mysql-test ; perl mysql-test-run.pl<br /><br />Please report any problems with the /Users/gmax/opt/mysql/5.5.15/scripts/mysqlbug script!<br /></pre>I can actually suppress this output, confident that, if something goes wrong, the error comes to my screen loud and clear. For example, if I try to install to a data directory that is write protected, I get this:<pre><br />chmod 444 $HOME/sandboxes/msb_5_5_15/data<br />$HOME/opt/mysql/5.5.15/scripts/mysql_install_db --no-defaults \<br />  --user=$USER --basedir=$HOME/opt/mysql/5.5.15 \<br />  --datadir=$HOME/sandboxes/msb_5_5_15/data \<br />  --lower_case_table_names=2 <b> &gt; /dev/null</b><br /><br />mkdir: /Users/gmax/sandboxes/msb_5_5_15/data: Permission denied<br />chmod: /Users/gmax/sandboxes/msb_5_5_15/data: Permission denied<br />chown: /Users/gmax/sandboxes/msb_5_5_15/data: Permission denied<br /></pre>This, way, I know that there was an error, it is very clear and readable. I don't need to hunt it down within the regular messages. The standard error is a separate file descriptor, which can be read independently from the standard input.After fixing permissions:<pre><br />chmod 755 ~/sandboxes/msb_5_5_15/<br />$HOME/opt/mysql/5.5.15/scripts/mysql_install_db --no-defaults \<br />  --user=$USER --basedir=$HOME/opt/mysql/5.5.15 \<br />  --datadir=$HOME/sandboxes/msb_5_5_15/data \<br />  --lower_case_table_names=2 <b> &gt; /dev/null</b><br /># empty line: means all OK<br /></pre>This is very convenient, and it is the Unix way.<h3>This is not OK</h3>Now, let's try the same with MySQL 5.6<pre><br />$BASEDIR/scripts/mysql_install_db --no-defaults --user=tungsten \<br />  --basedir=$BASEDIR --datadir=/home/tungsten/sandboxes/msb_5_6_4/data \<br />  --tmpdir=/home/tungsten/sandboxes/msb_5_6_4/tmp  <b>&gt; /dev/null</b><br />120318 10:10:44 InnoDB: The InnoDB memory heap is disabled<br />120318 10:10:44 InnoDB: Mutexes and rw_locks use GCC atomic builtins<br />120318 10:10:44 InnoDB: Compressed tables use zlib 1.2.3<br />120318 10:10:44 InnoDB: Using Linux native AIO<br />120318 10:10:44 InnoDB: CPU supports crc32 instructions<br />120318 10:10:44 InnoDB: Initializing buffer pool, size = 128.0M<br />120318 10:10:44 InnoDB: Completed initialization of buffer pool<br />InnoDB: The first specified data file ./ibdata1 did not exist:<br />InnoDB: a new database to be created!<br />120318 10:10:44 InnoDB: Setting file ./ibdata1 size to 10 MB<br />InnoDB: Database physically writes the file full: wait...<br />120318 10:10:44 InnoDB: Log file ./ib_logfile0 did not exist: new to be created<br />InnoDB: Setting log file ./ib_logfile0 size to 5 MB<br />InnoDB: Database physically writes the file full: wait...<br />120318 10:10:44 InnoDB: Log file ./ib_logfile1 did not exist: new to be created<br />InnoDB: Setting log file ./ib_logfile1 size to 5 MB<br />InnoDB: Database physically writes the file full: wait...<br />InnoDB: Doublewrite buffer not found: creating new<br />InnoDB: Doublewrite buffer created<br />120318 10:10:44 InnoDB: 128 rollback segment(s) are active.<br />InnoDB: Creating foreign key constraint system tables<br />InnoDB: Foreign key constraint system tables created<br />120318 10:10:44 InnoDB: 1.2.4 started; log sequence number 0<br />120318 10:10:44 [Warning] Info table is not ready to be used. Table 'mysql.slave_master_info' cannot be opened.<br />120318 10:10:44 [Warning] Error while checking replication metadata. Setting the requested repository in order to give users the chance to fix the problem and restart the server. If this is a live upgrade please consider using mysql_upgrade to fix the problem.<br />120318 10:10:44 [Warning] Info table is not ready to be used. Table 'mysql.slave_relay_log_info' cannot be opened.<br />120318 10:10:44 [Warning] Error while checking replication metadata. Setting the requested repository in order to give users the chance to fix the problem and restart the server. If this is a live upgrade please consider using mysql_upgrade to fix the problem.<br />120318 10:10:44 [Note] Binlog end<br />120318 10:10:44 [Note] Shutting down plugin 'partition'<br />120318 10:10:44 [Note] Shutting down plugin 'ARCHIVE'<br />120318 10:10:44 [Note] Shutting down plugin 'BLACKHOLE'<br />120318 10:10:44 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_SYS_TABLES'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_FT_CONFIG'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_FT_DELETED'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_FT_INSERTED'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_METRICS'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_CMPMEM'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_CMP_RESET'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_CMP'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_LOCKS'<br />120318 10:10:44 [Note] Shutting down plugin 'INNODB_TRX'<br />120318 10:10:44 [Note] Shutting down plugin 'InnoDB'<br />120318 10:10:44  InnoDB: FTS optimize thread exiting.<br />120318 10:10:44  InnoDB: Starting shutdown...<br />120318 10:10:46 InnoDB: Shutdown completed; log sequence number 1602841<br />120318 10:10:46 [Note] Shutting down plugin 'CSV'<br />120318 10:10:46 [Note] Shutting down plugin 'MEMORY'<br />120318 10:10:46 [Note] Shutting down plugin 'MyISAM'<br />120318 10:10:46 [Note] Shutting down plugin 'MRG_MYISAM'<br />120318 10:10:46 [Note] Shutting down plugin 'mysql_old_password'<br />120318 10:10:46 [Note] Shutting down plugin 'mysql_native_password'<br />120318 10:10:46 [Note] Shutting down plugin 'binlog'<br />120318 10:10:46 InnoDB: The InnoDB memory heap is disabled<br />120318 10:10:46 InnoDB: Mutexes and rw_locks use GCC atomic builtins<br />120318 10:10:46 InnoDB: Compressed tables use zlib 1.2.3<br />120318 10:10:46 InnoDB: Using Linux native AIO<br />120318 10:10:46 InnoDB: CPU supports crc32 instructions<br />120318 10:10:46 InnoDB: Initializing buffer pool, size = 128.0M<br />120318 10:10:46 InnoDB: Completed initialization of buffer pool<br />120318 10:10:46 InnoDB: highest supported file format is Barracuda.<br />120318 10:10:46 InnoDB: 128 rollback segment(s) are active.<br />120318 10:10:46 InnoDB: Waiting for the background threads to start<br />120318 10:10:47 InnoDB: 1.2.4 started; log sequence number 1602841<br />120318 10:10:47 [Note] Binlog end<br />120318 10:10:47 [Note] Shutting down plugin 'partition'<br />120318 10:10:47 [Note] Shutting down plugin 'ARCHIVE'<br />120318 10:10:47 [Note] Shutting down plugin 'BLACKHOLE'<br />120318 10:10:47 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_SYS_TABLES'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_FT_CONFIG'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_FT_DELETED'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_FT_INSERTED'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_METRICS'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_CMPMEM'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_CMP_RESET'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_CMP'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_LOCKS'<br />120318 10:10:47 [Note] Shutting down plugin 'INNODB_TRX'<br />120318 10:10:47 [Note] Shutting down plugin 'InnoDB'<br />120318 10:10:47  InnoDB: FTS optimize thread exiting.<br />120318 10:10:47  InnoDB: Starting shutdown...<br />120318 10:10:49 InnoDB: Shutdown completed; log sequence number 1602851<br />120318 10:10:49 [Note] Shutting down plugin 'CSV'<br />120318 10:10:49 [Note] Shutting down plugin 'MEMORY'<br />120318 10:10:49 [Note] Shutting down plugin 'MyISAM'<br />120318 10:10:49 [Note] Shutting down plugin 'MRG_MYISAM'<br />120318 10:10:49 [Note] Shutting down plugin 'mysql_old_password'<br />120318 10:10:49 [Note] Shutting down plugin 'mysql_native_password'<br />120318 10:10:49 [Note] Shutting down plugin 'binlog'<br /></pre>Why is this bad? Because you don't see at a glance what is right and what is wrong. All the above messages are printed to the <b>standard error</b>, the kind of output that should be reserved for, well, <a href="http://bugs.mysql.com/bug.php?id=60934">errors</a>! If the standard error is used for regular messages, you may miss the important error messages that are instead mixed with the "all is OK" messages.There is <a href="http://bugs.mysql.com/bug.php?id=60934">Bug#60934</a> filed about this issue, but it has been considered a feature request, and as such unlikely to be fixed.In the above text there is something more. THere are warnings, mixed with the standard text, telling me of errors that the bootstrap operation is not in a position to fix, like replication metadata and slave_master_info.MySQL developers, please fix this issue. Users need error messages when there is something wrong, and warning or error messages about something that can actually be fixed. When MySQL 5.6 goes GA, this issue will hit most everybody.<div><img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/16959946-6338218864607431955?l=datacharmer.blogspot.com" alt="" /></div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=32350&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=32350&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/03/18/mysql-5-6-too-verbose-when-creating-data-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TIMESTAMP data types and CURRENT_TIMESTAMP attribute</title>
		<link>http://ronaldbradford.com/blog/timestamp-data-types-and-current_timestamp-attribute-2012-03-16/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=timestamp-data-types-and-current_timestamp-attribute</link>
		<comments>http://ronaldbradford.com/blog/timestamp-data-types-and-current_timestamp-attribute-2012-03-16/#comments</comments>
		<pubDate>Fri, 16 Mar 2012 16:19:46 +0000</pubDate>
		<dc:creator>Ronald Bradford</dc:creator>
				<category><![CDATA[5.6]]></category>
		<category><![CDATA[current_timestamp]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Professional]]></category>
		<category><![CDATA[timestamp]]></category>

		<guid isPermaLink="false">http://ronaldbradford.com/blog/?p=3934</guid>
		<description><![CDATA[In the yet to be released MySQL 5.6.6 DMR, there has been a change to the restriction of just one TIMESTAMP column with the DEFAULT CURRENT_TIMESTAMP and ON UPDATE CURRENT_TIMESTAMP syntax.  It is now possible for any TIMESTAMP to have either column defintion.
More information at http://dev.mysql.com/doc/refman/5.6/en/news-5-6-5.html]]></description>
			<content:encoded><![CDATA[<p>In the yet to be released MySQL 5.6.6 DMR, there has been a change to the restriction of just one TIMESTAMP column with the DEFAULT CURRENT_TIMESTAMP and ON UPDATE CURRENT_TIMESTAMP syntax.  It is now possible for any TIMESTAMP to have either column defintion.</p>
<p>More information at <a href="http://dev.mysql.com/doc/refman/5.6/en/news-5-6-5.html">http://dev.mysql.com/doc/refman/5.6/en/news-5-6-5.html</a></p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=32343&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=32343&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/03/16/timestamp-data-types-and-current_timestamp-attribute/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Sandbox at the OTN MySQL Developers day in Paris, March 21st</title>
		<link>http://datacharmer.blogspot.com/2012/03/mysql-sandbox-at-otn-mysql-developers.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mysql-sandbox-at-the-otn-mysql-developers-day-in-paris-march-21st</link>
		<comments>http://datacharmer.blogspot.com/2012/03/mysql-sandbox-at-otn-mysql-developers.html#comments</comments>
		<pubDate>Tue, 13 Mar 2012 08:57:00 +0000</pubDate>
		<dc:creator>Giuseppe Maxia</dc:creator>
				<category><![CDATA[5.0]]></category>
		<category><![CDATA[5.1]]></category>
		<category><![CDATA[5.5]]></category>
		<category><![CDATA[5.6]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Europe]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[sandbox]]></category>

		<guid isPermaLink="false">http://planetmysql.ru/?guid=c30c3c04a7733d33ea08a522aceb15c3</guid>
		<description><![CDATA[On March 21st I will be in Paris, to attend the OTN MySQL Developers Day.Oracle is organizing these events all over the world, and although the majority are in the US, some of them are touching the good old European continent.Previous events were an all-Oracle show. Recently, the MySQL Community team has been asking for cooperation from the community, and in such capacity I am also presenting at the event, on the topic of testing early releases of MySQL in a sandbox. Of course, this is one of my favorite topics, but it is quite appropriate in this period, when Oracle has released a whole lot of preview features in its MySQL Labs. Which is another favorite topic of mine, since I was the one who insisted for having the Labs when I was working in the community team. It's nice to see that the labs are still in place, and being put to good use.Speaking of sandboxes, I was making some quick tests yesterday, and I installed 15 sandboxes at once (all different versions, from 5.0.91 to 5.6.5). Installing a single sandbox, depending on the version, takes from 5 to 19 seconds.Do you know how long it takes to install 15 sandboxes, completely, from tarball to working conditions? It takes 19 seconds. How's so? It's because I have been working at a large project where we are dealing with many replicated clusters spread across three continents. Administering these clusters is a problem in itself, and so we are using tools to do our work in parallel. At the same time, using a host with a fast 16 core CPU I can install many sandboxes at once. It's a real joy to see software behaving efficiently the way it should!It works so fast, in fact, that I found a race condition bug. If you install more than one sandbox at once, the MySQL bootstrap process may try to open the same temporary file from two different servers. That's because I did not indicate a dedicated temporary directory for the bootstrap (I was using one only for the installed sandbox). When this happens, you may find that instead of 15 sandboxes you have installed only 9 or 11. So I fixed the bug, by adding --tmpdir to mysql_install_db, and now you can install more than one sandbox in parallel.]]></description>
			<content:encoded><![CDATA[On March 21st I will be in Paris, to attend the <a href="http://www.oracle.com/webapps/events/ns/EventsDetail.jsp?p_eventId=149253&amp;src=7314534&amp;src=7314534&amp;Act=259">OTN MySQL Developers Day</a>.Oracle is organizing these events all over the world, and although the majority are in the US, some of them are touching the good old European continent.Previous events were an all-Oracle show. Recently, the MySQL Community team has been asking for cooperation from the community, and in such capacity I am also presenting at the event, on the topic of testing early releases of MySQL in a sandbox. Of course, this is one of my favorite topics, but it is quite appropriate in this period, when Oracle has released a whole lot of preview features in its <a href="http://labs.mysql.com/">MySQL Labs</a>. Which is another favorite topic of mine, since I was the one who insisted for having the Labs when I was working in the community team. It's nice to see that the labs are still in place, and being put to good use.<p><img src="http://lh6.ggpht.com/-JJg6UwmaRXU/T18L57WzI_I/AAAAAAAABQc/fv8fINGHReE/MySQL_Sandbox.png?imgmax=800" alt="MySQL Sandbox" title="MySQL_Sandbox.png" border="0" width="600" height="545" /></p>Speaking of sandboxes, I was making some quick tests yesterday, and I installed 15 sandboxes at once (all different versions, from 5.0.91 to 5.6.5). Installing a single sandbox, depending on the version, takes from 5 to 19 seconds.Do you know how long it takes to install 15 sandboxes, completely, from tarball to working conditions? It takes 19 seconds. How's so? It's because I have been working at a large project where we are dealing with many replicated clusters spread across three continents. Administering these clusters is a problem in itself, and so we are using tools to do our work in parallel. At the same time, using a host with a fast 16 core CPU I can install many sandboxes at once. It's a real joy to see software behaving efficiently the way it should!It works so fast, in fact, that I found a race condition bug. If you install more than one sandbox at once, the MySQL bootstrap process may try to open the same temporary file from two different servers. That's because I did not indicate a dedicated temporary directory for the bootstrap (I was using one only for the installed sandbox). When this happens, you may find that instead of 15 sandboxes you have installed only 9 or 11. So I fixed the bug, by adding <i>--tmpdir</i> to <i>mysql_install_db</i>, and now you can install more than one sandbox in parallel.<div><img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/16959946-5623504402958128054?l=datacharmer.blogspot.com" alt="" /></div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=32309&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=32309&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/03/13/mysql-sandbox-at-the-otn-mysql-developers-day-in-paris-march-21st/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Sandbox at the OTN MySQL Developers day in Paris, March 21st</title>
		<link>http://datacharmer.blogspot.com/2012/03/mysql-sandbox-at-otn-mysql-developers.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mysql-sandbox-at-the-otn-mysql-developers-day-in-paris-march-21st</link>
		<comments>http://datacharmer.blogspot.com/2012/03/mysql-sandbox-at-otn-mysql-developers.html#comments</comments>
		<pubDate>Tue, 13 Mar 2012 08:57:00 +0000</pubDate>
		<dc:creator>Giuseppe Maxia</dc:creator>
				<category><![CDATA[5.0]]></category>
		<category><![CDATA[5.1]]></category>
		<category><![CDATA[5.5]]></category>
		<category><![CDATA[5.6]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Europe]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[sandbox]]></category>

		<guid isPermaLink="false">http://planetmysql.ru/?guid=c30c3c04a7733d33ea08a522aceb15c3</guid>
		<description><![CDATA[On March 21st I will be in Paris, to attend the OTN MySQL Developers Day.Oracle is organizing these events all over the world, and although the majority are in the US, some of them are touching the good old European continent.Previous events were an all-Oracle show. Recently, the MySQL Community team has been asking for cooperation from the community, and in such capacity I am also presenting at the event, on the topic of testing early releases of MySQL in a sandbox. Of course, this is one of my favorite topics, but it is quite appropriate in this period, when Oracle has released a whole lot of preview features in its MySQL Labs. Which is another favorite topic of mine, since I was the one who insisted for having the Labs when I was working in the community team. It's nice to see that the labs are still in place, and being put to good use.Speaking of sandboxes, I was making some quick tests yesterday, and I installed 15 sandboxes at once (all different versions, from 5.0.91 to 5.6.5). Installing a single sandbox, depending on the version, takes from 5 to 19 seconds.Do you know how long it takes to install 15 sandboxes, completely, from tarball to working conditions? It takes 19 seconds. How's so? It's because I have been working at a large project where we are dealing with many replicated clusters spread across three continents. Administering these clusters is a problem in itself, and so we are using tools to do our work in parallel. At the same time, using a host with a fast 16 core CPU I can install many sandboxes at once. It's a real joy to see software behaving efficiently the way it should!It works so fast, in fact, that I found a race condition bug. If you install more than one sandbox at once, the MySQL bootstrap process may try to open the same temporary file from two different servers. That's because I did not indicate a dedicated temporary directory for the bootstrap (I was using one only for the installed sandbox). When this happens, you may find that instead of 15 sandboxes you have installed only 9 or 11. So I fixed the bug, by adding --tmpdir to mysql_install_db, and now you can install more than one sandbox in parallel.]]></description>
			<content:encoded><![CDATA[On March 21st I will be in Paris, to attend the <a href="http://www.oracle.com/webapps/events/ns/EventsDetail.jsp?p_eventId=149253&amp;src=7314534&amp;src=7314534&amp;Act=259">OTN MySQL Developers Day</a>.Oracle is organizing these events all over the world, and although the majority are in the US, some of them are touching the good old European continent.Previous events were an all-Oracle show. Recently, the MySQL Community team has been asking for cooperation from the community, and in such capacity I am also presenting at the event, on the topic of testing early releases of MySQL in a sandbox. Of course, this is one of my favorite topics, but it is quite appropriate in this period, when Oracle has released a whole lot of preview features in its <a href="http://labs.mysql.com/">MySQL Labs</a>. Which is another favorite topic of mine, since I was the one who insisted for having the Labs when I was working in the community team. It's nice to see that the labs are still in place, and being put to good use.<p><img src="http://lh6.ggpht.com/-JJg6UwmaRXU/T18L57WzI_I/AAAAAAAABQc/fv8fINGHReE/MySQL_Sandbox.png?imgmax=800" alt="MySQL Sandbox" title="MySQL_Sandbox.png" border="0" width="600" height="545" /></p>Speaking of sandboxes, I was making some quick tests yesterday, and I installed 15 sandboxes at once (all different versions, from 5.0.91 to 5.6.5). Installing a single sandbox, depending on the version, takes from 5 to 19 seconds.Do you know how long it takes to install 15 sandboxes, completely, from tarball to working conditions? It takes 19 seconds. How's so? It's because I have been working at a large project where we are dealing with many replicated clusters spread across three continents. Administering these clusters is a problem in itself, and so we are using tools to do our work in parallel. At the same time, using a host with a fast 16 core CPU I can install many sandboxes at once. It's a real joy to see software behaving efficiently the way it should!It works so fast, in fact, that I found a race condition bug. If you install more than one sandbox at once, the MySQL bootstrap process may try to open the same temporary file from two different servers. That's because I did not indicate a dedicated temporary directory for the bootstrap (I was using one only for the installed sandbox). When this happens, you may find that instead of 15 sandboxes you have installed only 9 or 11. So I fixed the bug, by adding <i>--tmpdir</i> to <i>mysql_install_db</i>, and now you can install more than one sandbox in parallel.<div><img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/16959946-5623504402958128054?l=datacharmer.blogspot.com" alt="" /></div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=32309&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=32309&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/03/13/mysql-sandbox-at-the-otn-mysql-developers-day-in-paris-march-21st/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Better Controlling MySQL Memory Usage</title>
		<link>http://blog.wl0.org/2012/01/better-controlling-mysql-memory-usage/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=better-controlling-mysql-memory-usage</link>
		<comments>http://blog.wl0.org/2012/01/better-controlling-mysql-memory-usage/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 23:32:53 +0000</pubDate>
		<dc:creator>Simon Mudd</dc:creator>
				<category><![CDATA[5.1]]></category>
		<category><![CDATA[5.5]]></category>
		<category><![CDATA[5.6]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[memory allocation]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[resource control]]></category>
		<category><![CDATA[swapping]]></category>

		<guid isPermaLink="false">http://blog.wl0.org/?p=512</guid>
		<description><![CDATA[MySQL, like a lot of other software, has many knobs you can tweak. Most of these knobs may affect behaviour, but more importantly most affect the memory usage of the server, so getting these settings right is very important.
Most of MySQL&#8217;s memory is really used just as a cache, in one form or another, information that otherwise is on disk. So ensuring you have as large a cache as possible is important. However, making these memory sizes too large will trigger the server to start swapping and possibly can cause it to crash or cause the kernel to kill the process when it runs out of memory.  So that&#8217;s something we want to avoid.
Certain settings affect memory allocation on a per connection/thread basis, being bounded by thread_cache_size and max_connections.  If you configure for the worst behaviour (max_connections) you may end up not actually using all the memory you have available, memory which normally could be used for other purposes.
Recently a server I managed was configured incorrectly with a large sort_buffer_size (4M to 256M) and larger read_buffer_size (4M to 20M).  The change in configuration on first glance looks quite innocent, and not noticing that these are per-connection settings this got rolled out. max_connections on this server was set to 1000, while normally there were ~40 connections of which only a few were active. The mysqld memory footprint on startup looked fine. In fact under normal usage it also worked fine. However spiky load suddenly changed this nice behaviour: as configured mysqld ramped up the thread count and hence memory usage, resulting in swapping and finally server death&#8230;
The fault of course was mine for not noticing, but this has been an issue with MySQL forever.  Most other RDBMSes manage memory slightly differently: you define how much memory you want to use (maximum), this is optinally locked into memory, and further requests for different buffers are taken from this global pool.  That is much safer, avoids unexpected swapping, or memory over-allocation, but does raise the question of what happens when a memory request can not be honoured.
Initially I would expect two different behaviours: either

kill a thread whose memory can not be allocated, or
wait a certain time to allocate that memory, after which it gets killed anyway.

Option (2) is probably saner, and possibly some sort of deadlock detection can kick if in all threads are waiting for memory, perhaps killing the younger thread, or thread which has done least work first. Possibly there are other better ways of doing this?
I can imagine that changing MySQL&#8217;s current behaviour to do something like this could be quite hard, especially as ideally the engines would also use the same memory management mechanisms, but I see this as being a good thing and would make MySQL more robust, especially under load, which is after all what counts.  Of course this will not happen in today&#8217;s 5.5 GA version, or tomorrow&#8217;s 5.6 version which is probably likely to appear some time this year. That&#8217;s a major change. It would be nice if Oracle look at this for 5.7 as a way of ensuring that when resource usage does come under pressure MySQL does not go heads up, but attempts to use the allocated resources as best as possible.
In the meantime what would help would be:

better documentation so we can see clearly how all mysql memory is allocated. There are several web pages commenting ways to calculate this, but certainly no definitive guide.
The InnoDB engine&#8217;s documentation talks about memory usage and most people think that the innodb_buffer_pool_size is the main setting. yet read further and there&#8217;s talk of an overhead of perhaps 1/8th. I have recently been playing with innodb_buffer_pool_instances settings &#62; 1 (using values in the range of 20-40) and am inclined to think that this increases that overhead somewhat more, yet there&#8217;s no documentation on this and whether my guess is right or not. Please InnoDB developers improve your documentation, if only to prove me wrong.
Ideally some tools to tell you if you server is possibly misconfigured. Coming from a Sybase environment I&#8217;d be tempted to suggest a stored procedure in the mysql database which can tell you total memory usage and how it is broken down as doing this with a single SELECT is going to be tricky.

Then once that is done consider adding some extra variable to enable total memory usage to be controlled. I made a feature request for this at http://bugs.mysql.com/?id=64108. If you think this feature might interest you please let Oracle know.]]></description>
			<content:encoded><![CDATA[<p>MySQL, like a lot of other software, has many knobs you can tweak. Most of these knobs may affect behaviour, but more importantly most affect the memory usage of the server, so getting these settings right is very important.</p>
<p>Most of MySQL&#8217;s memory is really used just as a cache, in one form or another, information that otherwise is on disk. So ensuring you have as large a cache as possible is important. However, making these memory sizes too large will trigger the server to start swapping and possibly can cause it to crash or cause the kernel to kill the process when it runs out of memory.  So that&#8217;s something we want to avoid.</p>
<p>Certain settings affect memory allocation on a per connection/thread basis, being bounded by thread_cache_size and max_connections.  If you configure for the worst behaviour (max_connections) you may end up not actually using all the memory you have available, memory which normally could be used for other purposes.</p>
<p>Recently a server I managed was configured incorrectly with a large sort_buffer_size (4M to 256M) and larger read_buffer_size (4M to 20M).  The change in configuration on first glance looks quite innocent, and not noticing that these are per-connection settings this got rolled out. max_connections on this server was set to 1000, while normally there were ~40 connections of which only a few were active. The mysqld memory footprint on startup looked fine. In fact under normal usage it also worked fine. However spiky load suddenly changed this <em>nice behaviour</em>: as configured mysqld ramped up the thread count and hence memory usage, resulting in swapping and finally server death&#8230;</p>
<p>The fault of course was mine for not noticing, but this has been an issue with MySQL forever.  Most other RDBMSes manage memory slightly differently: you define how much memory you want to use (maximum), this is optinally locked into memory, and further requests for different <em>buffers</em> are taken from this <em>global pool</em>.  That is much safer, avoids unexpected swapping, or memory over-allocation, but does raise the question of what happens when a memory request can not be honoured.</p>
<p>Initially I would expect two different behaviours: either</p>
<ol>
<li>kill a thread whose memory can not be allocated, or</li>
<li>wait a certain time to allocate that memory, after which it gets killed anyway.</li>
</ol>
<p>Option (2) is probably saner, and possibly some sort of deadlock detection can kick if in all threads are waiting for memory, perhaps killing the <em>younger thread</em>, or thread which has done least work first. Possibly there are other better ways of doing this?</p>
<p>I can imagine that changing MySQL&#8217;s current behaviour to do something like this could be quite hard, especially as ideally the engines would also use the same memory management mechanisms, but I see this as being a good thing and would make MySQL more robust, especially under load, which is after all what counts.  Of course this will not happen in today&#8217;s 5.5 GA version, or tomorrow&#8217;s 5.6 version which is probably likely to appear some time this year. That&#8217;s a major change. It would be nice if Oracle look at this for 5.7 as a way of ensuring that when resource usage does come under pressure MySQL does not go heads up, but attempts to use the allocated resources as best as possible.</p>
<p>In the meantime what would help would be:</p>
<ul>
<li>better documentation so we can see clearly how all mysql memory is allocated. There are several web pages commenting ways to calculate this, but certainly no definitive guide.</li>
<li>The InnoDB engine&#8217;s documentation talks about memory usage and most people think that the innodb_buffer_pool_size is the main setting. yet read further and there&#8217;s talk of an overhead of perhaps 1/8th. I have recently been playing with innodb_buffer_pool_instances settings &gt; 1 (using values in the range of 20-40) and am inclined to think that this increases that overhead somewhat more, yet there&#8217;s no documentation on this and whether my guess is right or not. Please InnoDB developers improve your documentation, if only to prove me wrong.</li>
<li>Ideally some tools to tell you if you server is possibly misconfigured. Coming from a Sybase environment I&#8217;d be tempted to suggest a stored procedure in the mysql database which can tell you total memory usage and how it is broken down as doing this with a single SELECT is going to be tricky.</li>
</ul>
<p>Then once that is done consider adding some extra variable to enable total memory usage to be controlled. I made a feature request for this at <a title="Provide a global maximum_memory setting to limit unexpected memory usage" href="http://bugs.mysql.com/?id=64108" >http://bugs.mysql.com/?id=64108</a>. If you think this feature might interest you please let Oracle know.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31791&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31791&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/01/25/better-controlling-mysql-memory-usage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL 5.6.4 Development Milestone Now Available!</title>
		<link>http://blogs.oracle.com/MySQL/entry/mysql_5_6_4_development?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mysql-5-6-4-development-milestone-now-available</link>
		<comments>http://blogs.oracle.com/MySQL/entry/mysql_5_6_4_development#comments</comments>
		<pubDate>Tue, 20 Dec 2011 17:44:19 +0000</pubDate>
		<dc:creator>Rob Young</dc:creator>
				<category><![CDATA[5.6]]></category>
		<category><![CDATA[InnoDB]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[optimizer]]></category>
		<category><![CDATA[Replication]]></category>

		<guid isPermaLink="false">http://blogs.oracle.com/MySQL/entry/mysql_5_6_4_development</guid>
		<description><![CDATA[I am pleased to announce that the MySQL Database 5.6.4 development milestone release (&#34;DMR&#34;) is now available for download&#160;(select the Development Release tab). MySQL 5.6.4 includes all 5.5 production-ready features and provides an aggreation of all of the new features that have been released in earlier 5.6 DMRs.&#160; 5.6.4 adds many bug fixes and more new &#34;early and often&#34; enhancements that are development and system QA complete and ready for Community evaluation and feedback.&#160; You can get the complete rundown of all the new 5.6.4 specific features here.For those following the progression of the 5.6 DMRs as the trains leave the station, you should bookmark these MySQL Engineering development team specific blogs: 
   
    InnoDB Development Team Blog 
    Specific enhancements in the MySQL 5.6.4 include:InnoDB Full-Text Search Better scaling of read-only workloadsInnoDB 5.6.4 supports databases with 4k and 8k page sizesImproving InnoDB memory usage 
    Other engineering team blogs include:&#160; 
    Marc Alff's Blog on Performance Schema 
     Andew Morgan's MySQL HA Blog 
    Mats Kindahl's Blog on MySQL Replication&#160; 
    Lars Thalmann's Blog on MySQL Replication, Backup, Connectors 
    Chuck Bell's Blog on MySQL GPL Utilities 
   
  You can also track the thought and innovation leaders on the MySQL Optimizer and the new Optimizer specific improvements in 5.6.4 by following the MySQL Optimizer Team member blogs: 
   
    Gleb Shcepa 
    Jorgen Loland 
    Guilhem Bichot 
    Oystein Grovlen 
    Olav Sandsta 
    Tor Didriksen 
   
  And of course you can follow others on the Optimizer team and all of MySQL Engineering teams by bookmarking/subscribing to PlanetMySQL. We look forward to your feedback on MySQL 5.6.4, so please download your copy now and help us make a better MySQL.&#160;  
  As always, a sincere thanks for your continued support of MySQL!&#160;&#160;&#160;]]></description>
			<content:encoded><![CDATA[<p>I am pleased to announce that the MySQL Database 5.6.4 development milestone release (&quot;DMR&quot;) is now available for <a href="http://dev.mysql.com/downloads/mysql/#downloads" title="MySQL Downloads">download</a>&nbsp;(select the Development Release tab). MySQL 5.6.4 includes all 5.5 production-ready features and provides an aggreation of all of the new features that have been released in <a href="http://dev.mysql.com/doc/refman/5.6/en/news-5-6-x.html" title="MySQL 5.6 DMR release notes">earlier 5.6 DMRs</a>.&nbsp; 5.6.4 adds many bug fixes and more new &quot;early and often&quot; enhancements that are development and system QA complete and ready for Community evaluation and feedback.&nbsp; You can get the complete rundown of all the new 5.6.4 specific features <a href="http://dev.mysql.com/doc/refman/5.6/en/news-5-6-4.html" title="MySQL 5.6.4 release notes">here</a>.<br /><br />For those following the progression of the 5.6 DMRs as the trains leave the station, you should bookmark these MySQL Engineering development team specific blogs:</p> 
  <ul> 
    <li><a href="http://blogs.innodb.com/wp/">InnoDB Development Team Blog</a></li> 
    <p>Specific enhancements in the MySQL 5.6.4 include:</p><a href="http://blogs.innodb.com/wp/?p=1474">InnoDB Full-Text Search</a> <br /><br /><a href="http://blogs.innodb.com/wp/?p=1500">Better scaling of read-only workloads</a><br /><br /><a href="http://blogs.innodb.com/wp/?p=1484">InnoDB 5.6.4 supports databases with 4k and 8k page sizes</a><br /><br /><a href="http://blogs.innodb.com/wp/?p=1510">Improving InnoDB memory usage</a><br /><br /> 
    <p>Other engineering team blogs include:&nbsp;</p> 
    <li><a href="http://marcalff.blogspot.com/2011/12/mysql-564-performance-schema.html">Marc Alff's Blog on Performance Schema</a></li> 
    <li><a href="http://marcalff.blogspot.com/"></a> <a href="http://www.clusterdb.com/category/mysql-replication/">Andew Morgan's MySQL HA Blog</a></li> 
    <li><a href="http://www.clusterdb.com/category/mysql-replication/"></a><a href="http://mysqlmusings.blogspot.com/">Mats Kindahl's Blog on MySQL Replication&nbsp;</a></li> 
    <li><a href="http://larsthalmann.blogspot.com/">Lars Thalmann's Blog on MySQL Replication, Backup, Connectors</a></li> 
    <li><a href="http://larsthalmann.blogspot.com/"></a><a href="http://drcharlesbell.blogspot.com/">Chuck Bell's Blog on MySQL GPL Utilities</a></li> 
  </ul> 
  <p>You can also track the thought and innovation leaders on the MySQL Optimizer and the new Optimizer specific improvements in 5.6.4 by following the MySQL Optimizer Team member blogs:<br /></p> 
  <ul> 
    <li><a href="http://glebshchepa.blogspot.com/">Gleb Shcepa</a></li> 
    <li><a href="http://jorgenloland.blogspot.com/">Jorgen Loland</a></li> 
    <li><a href="http://guilhembichot.blogspot.com/">Guilhem Bichot</a></li> 
    <li><a href="http://oysteing.blogspot.com/">Oystein Grovlen</a></li> 
    <li><a href="http://olavsandstaa.blogspot.com/">Olav Sandsta</a></li> 
    <li><a href="http://didrikdidrik.blogspot.com/">Tor Didriksen</a></li> 
  </ul> 
  <p>And of course you can follow others on the Optimizer team and all of MySQL Engineering teams by bookmarking/subscribing to <a href="http://www.planetmysql.org/">PlanetMySQL.</a> <br /><br />We look forward to your feedback on MySQL 5.6.4, so please download your copy now and help us make a better MySQL.&nbsp; </p> 
  <p>As always, a sincere thanks for your continued support of MySQL!&nbsp;&nbsp;&nbsp; <br /></p> 
  <p> </p> 
  <p><br /> </p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31375&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31375&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2011/12/20/mysql-5-6-4-development-milestone-now-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

