<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>domas mituzas &#187; profiling</title>
	<atom:link href="http://dom.as/tag/profiling/feed/" rel="self" type="application/rss+xml" />
	<link>http://dom.as</link>
	<description></description>
	<lastBuildDate>Thu, 02 Feb 2012 21:29:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='dom.as' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/6e344c6e0cd7462eb056f8b98eb2cbcd?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>domas mituzas &#187; profiling</title>
		<link>http://dom.as</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://dom.as/osd.xml" title="domas mituzas" />
	<atom:link rel='hub' href='http://dom.as/?pushpress=hub'/>
		<item>
		<title>MySQL metrics for read workloads</title>
		<link>http://dom.as/2011/05/19/mysql-metrics-for-read-workloads/</link>
		<comments>http://dom.as/2011/05/19/mysql-metrics-for-read-workloads/#comments</comments>
		<pubDate>Thu, 19 May 2011 13:45:43 +0000</pubDate>
		<dc:creator>Domas Mituzas</dc:creator>
				<category><![CDATA[facebook]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[easy]]></category>
		<category><![CDATA[innodb]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[profiling]]></category>

		<guid isPermaLink="false">http://dom.as/?p=861</guid>
		<description><![CDATA[There are multiple metrics that are really useful for read workload analysis, that should all be tracked and looked at in performance-critical environments. The most commonly used is of course Questions (or &#8216;Queries&#8217;, &#8216;COM_Select&#8217;) &#8211; this is probably primary finger-pointing &#8230; <a href="http://dom.as/2011/05/19/mysql-metrics-for-read-workloads/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dom.as&amp;blog=190075&amp;post=861&amp;subd=domasmituzas&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There are multiple metrics that are really useful for read workload analysis, that should all be tracked and looked at in performance-critical environments.</p>
<p>The most commonly used is of course <strong>Questions</strong> (or &#8216;Queries&#8217;, &#8216;COM_Select&#8217;) &#8211; this is probably primary finger-pointing metric that can be used in communication with different departments (&#8220;why did your qps go up by 30%?&#8221;) &#8211; it doesn&#8217;t always reveal actual cost, it can be increase of actual request rates, it can be new feature, it can be fat fingers error somewhere in the code or improperly handled cache failure.</p>
<p>Another important to note is <strong>Connections</strong> &#8211; MySQL&#8217;s costly bottleneck. Though most of users won&#8217;t be approaching ~10k/s area &#8211; at that point connection pooling starts actually making sense &#8211; it is worth to check for other reasons, such as &#8220;maybe we connect when we shouldn&#8217;t&#8221;, or needlessly reconnect, or actually should start looking more at thread cache performance or pooling options. There&#8217;re some neighboring metrics like &#8216;Bytes_sent&#8217; &#8211; make sure you don&#8217;t hit 120MB/s on a gigabit network :-)</p>
<p>Other metrics usually are way more about what actually gets done. Major query efficiency signal for me for a long time used to be <b>Innodb_rows_read</b>. It is immediately pointing out when there are queries which don&#8217;t use indexes properly or are reading too much data. Gets a bit confusing if logical backup is running, but backup windows aside, this metric is probably one that is easy enough to track and understand. It has been extremely helpful to detect query plans gone wrong too &#8211; quite a few interesting edge cases could be resolved with FORCE INDEX (thats a topic for another post already :-)</p>
<p>For I/O heavy environments there&#8217;re few metrics that show mostly the same &#8211; <strong>Innodb_buffer_pool_reads</strong>, <strong>Innodb_data_reads</strong>, <strong>Innodb_pages_read</strong> &#8211; they all show how much your requests hit underlying storage &#8211; and higher increases ask for better data locality, more in-memory efficiency (smaller object sizes!) or simply more RAM/IO capacity.</p>
<p>For a long time lots of my metrics-oriented performance optimization could be summed up in this very simple ruleset:</p>
<ul>
<li>Number of rows shown to user in the UI has to be as close as possible to rows read from the index/table</li>
<li>Number of physical I/Os done to serve rows has to be as close to 0 as possible :-)</li>
</ul>
<p>Something I like to look at is the I/O queue size (both via iostat and from InnoDB&#8217;s point of view) &#8211; <strong>Innodb_data_pending_reads</strong> can tell how loaded your underlying storage is &#8211; on rotating media you can allow multiples of your disk count, on flash it can already mean something is odd. Do note, innodb_thread_concurrency can be a limiting factor here.</p>
<p>Overloads can be also detected from <strong>Threads_running</strong> &#8211; which is easy enough to track and extremely important quality of service data.</p>
<p>An interesting metric, that lately became more and more important for me is <strong>Innodb_buffer_pool_read_requests</strong>. Though it is often to use buffer pool efficiency in the ratio with &#8216;buffer pool reads&#8217;, it is actually much more interesting if compared against &#8216;Innodb_rows_read&#8217;. While Innodb_rows_read and Handler* metrics essentially show what has been delivered by InnoDB to upper SQL layer, there are certain expensive operations that are not accounted for, like <a href='http://dom.as/2011/01/27/a-case-for-force-index/'>index estimations</a>.</p>
<p>Though tracking this activity helps I/O quite a bit (right FORCE INDEX reduces the amount of data that has to be cached in memory), there can be also various edge cases that will heavily hit CPU itself. A rough example could be:</p>
<p>SELECT * FROM table WHERE parent_id=X and type IN (1,2,4,6,8,&#8230;,20) LIMIT 10;</p>
<p>If there was an index on (parent_id,type) this query would <i>look</i> efficient, but would actually do range estimations for each type in the query, even if they would not be fetched anymore. It gets worse if there&#8217;s separate (type) index &#8211; each time query would be executed, records-in-rage estimation would be done for each type in IN() list &#8211; and usually discarded, as going after id/type lookup is much more efficient.</p>
<p>By looking at Innodb_buffer_pool_read_requests we could identify optimizer inefficiency cases like this &#8211; and FORCE INDEX made certain queries 30x faster, even if we forced exactly same indexes. Unfortunately, there is no per-session or per-query metric that would do same &#8211; it could be extremely useful in sample based profiling analysis.</p>
<p>Innodb_buffer_pool_read_requests:Innodb_rows_read ratio can vary due to multiple reasons &#8211; adaptive hash efficiency, deeper B-Trees because of wide keys (each tree node access will count in), etc &#8211; so there&#8217;s no constant baseline everyone should adjust to.</p>
<p>I deliberately left out query cache (<a href='http://dom.as/tech/query-cache-tuner/'>here&#8217;s the reason</a>), or adaptive hash (I don&#8217;t fully understand performance implications there :). In <a href='https://code.launchpad.net/~mysqlatfacebook/mysqlatfacebook/5.1'>mysql@facebook</a> builds we have some additional extremely useful instrumentation &#8211; wall clock seconds per various server operation types &#8211; execution, I/O, parsing, optimization, etc.</p>
<p>Of course, some people may point out that I&#8217;m writing here from a stone age, and that nowadays performance schema should be used. Maybe there will be more accurate ways to dissect workload costs, but nowadays one can spend few minutes looking at metrics mentioned above and have a decent understanding what the system is or should be doing.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/domasmituzas.wordpress.com/861/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/domasmituzas.wordpress.com/861/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/domasmituzas.wordpress.com/861/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/domasmituzas.wordpress.com/861/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/domasmituzas.wordpress.com/861/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/domasmituzas.wordpress.com/861/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/domasmituzas.wordpress.com/861/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/domasmituzas.wordpress.com/861/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/domasmituzas.wordpress.com/861/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/domasmituzas.wordpress.com/861/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/domasmituzas.wordpress.com/861/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/domasmituzas.wordpress.com/861/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/domasmituzas.wordpress.com/861/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/domasmituzas.wordpress.com/861/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dom.as&amp;blog=190075&amp;post=861&amp;subd=domasmituzas&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dom.as/2011/05/19/mysql-metrics-for-read-workloads/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c660a6eb3a4005232acb111303bef12c?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=G" medium="image">
			<media:title type="html">domasmituzas</media:title>
		</media:content>
	</item>
		<item>
		<title>On database write workload profiling</title>
		<link>http://dom.as/2011/05/10/write-workload-profiling/</link>
		<comments>http://dom.as/2011/05/10/write-workload-profiling/#comments</comments>
		<pubDate>Tue, 10 May 2011 12:18:27 +0000</pubDate>
		<dc:creator>Domas Mituzas</dc:creator>
				<category><![CDATA[facebook]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[oltp]]></category>
		<category><![CDATA[profiling]]></category>
		<category><![CDATA[replication]]></category>

		<guid isPermaLink="false">http://dom.as/?p=849</guid>
		<description><![CDATA[I always have difficulties with complex analysis schemes, so fall back to something that is somewhat easier. Or much easier. Here I will explain the super-powerful method of database write workload analysis. Doing any analysis on master servers is already &#8230; <a href="http://dom.as/2011/05/10/write-workload-profiling/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dom.as&amp;blog=190075&amp;post=849&amp;subd=domasmituzas&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I always have difficulties with complex analysis schemes, so fall back to something that is somewhat easier. Or much easier. Here I will explain the super-powerful method of database write workload analysis.</p>
<p>Doing any analysis on master servers is already too complicated, as instead of analyzing write costs one can be too obsessed with locking and there&#8217;s sometimes uncontrollable amount of workload hitting the server beside writes. Fortunately, slaves are much better targets, not only because writes there are single-threaded, thus exposing every costly I/O as time component, but also one can drain traffic from slaves, or send more in order to cause more natural workload.</p>
<p>Also, there can be multiple states of slave load:</p>
<ul>
<li>Healthy, always at 0-1s lag, write statements are always immediate</li>
<li>Spiky, usually at 0s lag, but has jumps due to sometimes occuring slow statements</li>
<li>Lagging, because of read load stealing I/O capacity</li>
<li>Lagging (or not catching up fast enough), because it can&#8217;t keep up with writes anymore, even with no read load</li>
</ul>
<p>Each of these states are interesting by themselves, and may have slightly different properties, but pretty much all of them are quite easy to look at using replication profiling.</p>
<p>The code for it is somewhat straightforward:<br />
<code><br />
(while true; do<br />
  echo 'SELECT info FROM information_schema.processlist<br />
        WHERE db IS NOT NULL AND user="system user"; '<br />
  sleep 0.1; done) | mysql -BN | head -n 100000 &gt; replication-sample<br />
</code></p>
<p>There are multiple ways to analyze it, e.g. finding slowest statements is as easy as:<br />
<code><br />
uniq -c replication-sample | sort -nr | head<br />
</code></p>
<p>More advanced methods may group up statements by statement types, tables, user IDs or any other random metadata embedded in query comments &#8211; and really lots of value can be obtained by doing ad-hoc analysis using simply &#8216;grep -c keyword replication-sample&#8217; &#8211; to understand what share of your workload certain feature has.</p>
<p>I already mentioned, that there are different shapes of slave performance, and it is easy to test it in different shapes. One of methods is actually stopping a slave for a day, then running the sampler while it is trying to catch up. It will probably have much more buffer pool space usable for write operations, so keep that in mind &#8211; certain operations that are depending on larger buffer pools would be much faster.</p>
<p>This is really simple, although remarkably powerful method, that allows quite deep workload analysis without spending too much time on statistics features. As there&#8217;s no EXPLAIN for UPDATE or DELETE statements, longer, coarser samples allow detecting deviations from good query plans too.</p>
<p>Systematic use of it has allowed to reveal quite a few important issues that had to be fixed &#8211; which were not that obvious from general statistics view. I like.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/domasmituzas.wordpress.com/849/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/domasmituzas.wordpress.com/849/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/domasmituzas.wordpress.com/849/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/domasmituzas.wordpress.com/849/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/domasmituzas.wordpress.com/849/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/domasmituzas.wordpress.com/849/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/domasmituzas.wordpress.com/849/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/domasmituzas.wordpress.com/849/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/domasmituzas.wordpress.com/849/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/domasmituzas.wordpress.com/849/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/domasmituzas.wordpress.com/849/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/domasmituzas.wordpress.com/849/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/domasmituzas.wordpress.com/849/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/domasmituzas.wordpress.com/849/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dom.as&amp;blog=190075&amp;post=849&amp;subd=domasmituzas&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dom.as/2011/05/10/write-workload-profiling/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c660a6eb3a4005232acb111303bef12c?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=G" medium="image">
			<media:title type="html">domasmituzas</media:title>
		</media:content>
	</item>
		<item>
		<title>more on PMP</title>
		<link>http://dom.as/2010/10/08/more-on-pmp/</link>
		<comments>http://dom.as/2010/10/08/more-on-pmp/#comments</comments>
		<pubDate>Fri, 08 Oct 2010 17:23:57 +0000</pubDate>
		<dc:creator>Domas Mituzas</dc:creator>
				<category><![CDATA[facebook]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[gdb]]></category>
		<category><![CDATA[pmp]]></category>
		<category><![CDATA[profiling]]></category>

		<guid isPermaLink="false">http://mituzas.lt/?p=808</guid>
		<description><![CDATA[Lately we have been especially enjoying the opportunities that Poor Man&#8217;s Profiler provides us &#8211; but also the technology has improved a lot too &#8211; there have been few really useful mutations. One mutation (hyper-pmp) was Ryan Mack&#8217;s approach of &#8230; <a href="http://dom.as/2010/10/08/more-on-pmp/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dom.as&amp;blog=190075&amp;post=808&amp;subd=domasmituzas&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Lately we have been especially enjoying the opportunities that <a href="http://poormansprofiler.org/">Poor Man&#8217;s Profiler</a> provides us &#8211; but also the technology has improved a lot too &#8211; there have been few really useful mutations.</p>
<p>One mutation (<a href="http://poormansprofiler.org/hpmp.txt">hyper-pmp</a>) was Ryan Mack&#8217;s approach of having somewhat more efficient sampling &#8211; instead of firing gdb each time, he instructed gdb to get backtraces every time monitored process gets a signal (SIGUSR2 for example). This allows to maintain a persistent debugger attachment &#8211; and then signal periodically to get stacks analyzed.</p>
<p>Other mutation was <a href="http://poormansprofiler.org/apmp.txt">auto-pmp</a> &#8211; high frequency polling of process state (e.g. how many threads are running), and when a certain threshold is exceeded &#8211; obtaining stacks for further analysis (this combines really well with the hpmp approach &#8211; one process is the stacks reader, and other is signaling on thresholds). My major problem in such approach was that the polling methods we chose would be biased to show me end of overload events (because it wouldn&#8217;t return process state due to internal process locking).</p>
<p>At one point in time I had an epiphany, that was quickly melted by the reality &#8211; in theory we could use gdb watchpoints to replace my external process polling. Watchpoints allow to break a process when a change to a variable inside a program happens (and conditions can be applied), so essentially we would be able to instrument gdb to get stacks exactly at the moment when there&#8217;re stalls and spikes. Unfortunately, even though that worked fine in single-threaded or lightly loaded environments, monitored process crashed horribly in more realistic workloads &#8211; we have yet to figure out if it is a fundamental issue of the approach or actually a bug that may have been fixed in later versions.</p>
<p>Of course, there&#8217;s a workaround, that we&#8217;re considering for high performance system analysis &#8211; simply instrumenting a process to fire a signal or do a conditional jump whenever there&#8217;s an overload condition &#8211; so essentially that would be implementing in-process watchpoint-to-breakpoint translation giving us just-in-time analytics &#8211; so we&#8217;d see pretty much every situation where running threads pile up (unless there&#8217;s a bottleneck that simply doesn&#8217;t allow the workload to arrive :)</p>
<p>PMP on-demand allowed us to uncover various issues inside MySQL that have been overlooked in most of benchmarking as non-significant, but they are critical for us in providing better quality of service for each query, not just 99th percentile (I <a title="on performance stalls" href="http://dom.as/2010/09/22/on-performance-stalls/">wrote about that</a> recently). We keep thinking how to provide instrumentation for some of views we get inside MySQL (e.g. an ability to export pthread lock graph without using external tools), as well as better visibility of I/O blocking&#8230;</p>
<p>But for now we have what we have, poor man&#8217;s profiler :-)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/domasmituzas.wordpress.com/808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/domasmituzas.wordpress.com/808/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/domasmituzas.wordpress.com/808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/domasmituzas.wordpress.com/808/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/domasmituzas.wordpress.com/808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/domasmituzas.wordpress.com/808/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/domasmituzas.wordpress.com/808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/domasmituzas.wordpress.com/808/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/domasmituzas.wordpress.com/808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/domasmituzas.wordpress.com/808/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/domasmituzas.wordpress.com/808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/domasmituzas.wordpress.com/808/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/domasmituzas.wordpress.com/808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/domasmituzas.wordpress.com/808/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dom.as&amp;blog=190075&amp;post=808&amp;subd=domasmituzas&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dom.as/2010/10/08/more-on-pmp/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c660a6eb3a4005232acb111303bef12c?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=G" medium="image">
			<media:title type="html">domasmituzas</media:title>
		</media:content>
	</item>
		<item>
		<title>PMP!</title>
		<link>http://dom.as/2009/12/27/pmp/</link>
		<comments>http://dom.as/2009/12/27/pmp/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 20:55:58 +0000</pubDate>
		<dc:creator>Domas Mituzas</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[pmp]]></category>
		<category><![CDATA[profiling]]></category>

		<guid isPermaLink="false">http://mituzas.lt/?p=709</guid>
		<description><![CDATA[It is a glorious day today &#8211; Poor Man&#8217;s Profiler (previously introduced here) just got its own website. Do visit it at http://poormansprofiler.org/ &#8211; and contribute to better tomorrow.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dom.as&amp;blog=190075&amp;post=709&amp;subd=domasmituzas&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It is a glorious day today &#8211; Poor Man&#8217;s Profiler (previously introduced <a href="http://dom.as/2009/02/15/poor-mans-contention-profiling/">here</a>) just got its own website. Do visit it at <a href="http://poormansprofiler.org/">http://poormansprofiler.org/</a> &#8211; and contribute to better tomorrow.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/domasmituzas.wordpress.com/709/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/domasmituzas.wordpress.com/709/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/domasmituzas.wordpress.com/709/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/domasmituzas.wordpress.com/709/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/domasmituzas.wordpress.com/709/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/domasmituzas.wordpress.com/709/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/domasmituzas.wordpress.com/709/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/domasmituzas.wordpress.com/709/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/domasmituzas.wordpress.com/709/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/domasmituzas.wordpress.com/709/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/domasmituzas.wordpress.com/709/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/domasmituzas.wordpress.com/709/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/domasmituzas.wordpress.com/709/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/domasmituzas.wordpress.com/709/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dom.as&amp;blog=190075&amp;post=709&amp;subd=domasmituzas&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dom.as/2009/12/27/pmp/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c660a6eb3a4005232acb111303bef12c?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=G" medium="image">
			<media:title type="html">domasmituzas</media:title>
		</media:content>
	</item>
		<item>
		<title>again, on benchmarks</title>
		<link>http://dom.as/2009/11/19/again-on-benchmarks/</link>
		<comments>http://dom.as/2009/11/19/again-on-benchmarks/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 20:03:34 +0000</pubDate>
		<dc:creator>Domas Mituzas</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[benchmarks]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[profiling]]></category>
		<category><![CDATA[rant]]></category>

		<guid isPermaLink="false">http://mituzas.lt/?p=645</guid>
		<description><![CDATA[Dear interweb, if you have no idea what you&#8217;re writing about, keep it to yourself, don&#8217;t litter into the tubes. Some people may not notice they&#8217;re eating absolute crap and get diarrhea. This particular benchmark has two favorite parts, that &#8230; <a href="http://dom.as/2009/11/19/again-on-benchmarks/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dom.as&amp;blog=190075&amp;post=645&amp;subd=domasmituzas&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Dear interweb, if you have <a href="http://www.ruturaj.net/redis-memcached-tokyo-tyrant-mysql-comparison">no idea</a> what you&#8217;re writing about, keep it to yourself, don&#8217;t litter into the tubes. Some people may not notice they&#8217;re eating absolute crap and get diarrhea.</p>
<p>This particular benchmark has two favorite parts, that go with each other together really well:</p>
<p style="padding-left:30px;">I didnt change absolutely any parameters for the servers, eg didn&#8217;t change the innodb_buffer_pool_size or key_buffer_size.</p>
<p>And..</p>
<p style="padding-left:30px;">If you need speed just to fetch a data for a given combination or key, Redis is a solution that you need to look at. MySQL can no way compare to Redis and Memcache. &#8230;</p>
<p>Seriously, how does one repay for all the damage of such idiotic benchmarks?</p>
<p>P.S. I&#8217;ve <a href="http://dom.as/2009/06/30/on-file-system-benchmarks/">ranted</a> at benchmarks before, and will continue doing so.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/domasmituzas.wordpress.com/645/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/domasmituzas.wordpress.com/645/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/domasmituzas.wordpress.com/645/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/domasmituzas.wordpress.com/645/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/domasmituzas.wordpress.com/645/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/domasmituzas.wordpress.com/645/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/domasmituzas.wordpress.com/645/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/domasmituzas.wordpress.com/645/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/domasmituzas.wordpress.com/645/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/domasmituzas.wordpress.com/645/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/domasmituzas.wordpress.com/645/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/domasmituzas.wordpress.com/645/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/domasmituzas.wordpress.com/645/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/domasmituzas.wordpress.com/645/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dom.as&amp;blog=190075&amp;post=645&amp;subd=domasmituzas&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dom.as/2009/11/19/again-on-benchmarks/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c660a6eb3a4005232acb111303bef12c?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=G" medium="image">
			<media:title type="html">domasmituzas</media:title>
		</media:content>
	</item>
		<item>
		<title>on tools and operating systems</title>
		<link>http://dom.as/2009/03/31/on-tools-and-operating-systems/</link>
		<comments>http://dom.as/2009/03/31/on-tools-and-operating-systems/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 12:24:49 +0000</pubDate>
		<dc:creator>Domas Mituzas</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[wikitech]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[macosx]]></category>
		<category><![CDATA[profiling]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://dammit.lt/?p=466</guid>
		<description><![CDATA[Sometimes people ask why do I use MacOSX as my main work platform (isn&#8217;t that something to do with beliefs?). My answer is &#8220;good foundation with great user interface&#8221;. Though that can be treated as &#8220;he must like unix kernel &#8230; <a href="http://dom.as/2009/03/31/on-tools-and-operating-systems/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dom.as&amp;blog=190075&amp;post=466&amp;subd=domasmituzas&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Sometimes people ask why do I use MacOSX as my main work platform (isn&#8217;t that something to do with beliefs?). My answer is &#8220;good foundation with great user interface&#8221;. Though that can be treated as &#8220;he must like unix kernel and look&amp;feel!&#8221;, it is not exactly that.</p>
<p>What I like is that I can have good graphical stable environment with some mandatory tools (yes, I used OS-supplied browser, mail, etc), but beside that maintain the bleeding edge open-source space (provided by MacPorts).</p>
<p>Also what I like, is OS-supplied development and performance tools. DTrace included is awesome, yes, but Apple did put some special touch on it too. This is visualization environment for dtrace probes and other profiling/debugging tools:</p>
<p><a href="http://domasmituzas.files.wordpress.com/2011/09/instruments-memusage.png"><img class="alignnone size-full wp-image-1233" title="Memory usage analysis" src="http://domasmituzas.files.wordpress.com/2011/09/instruments-memusage.png?w=640&#038;h=429" alt="" width="640" height="429" /></a></p>
<p>Even the web browser (well, I upgraded to Safari4.0 ;-) provides some impressive debugging and profiling capabilities:</p>
<p><a href="http://domasmituzas.files.wordpress.com/2009/03/safari-webinspector.png"><img class="alignnone size-full wp-image-1234" title="Safari Web Inspector" src="http://domasmituzas.files.wordpress.com/2009/03/safari-webinspector.png?w=640&#038;h=526" alt="" width="640" height="526" /></a></p>
<p>Of course, I end up running plethora of virtual machines (switching from Parallels to VirtualBox lately), but even got a KDE/Aqua build (for kcachegrind mostly). I don&#8217;t really need Windows apps, and I can run &#8216;Linux&#8217; ones natively on MacOSX, and I can run MacOSX ones on MacOSX.</p>
<p>There&#8217;s full web stack for my MediaWiki work, there&#8217;re dozens of MySQL builds around, there&#8217;re photo albums, dtrace tools, World of Warcraft, bunch of toy projects, few different office suites, Skype, NetBeans, Eclipse, Xcode, integrated address books and calendars, all major scripting languages, revision control systems &#8211; git, svn, mercurial, bzr, bitkeeper, cvs, etc.</p>
<p>All that on single machine, running for three years, without too much clutter, and nearly zero effort to make it all work. Thats what I want from desktop operating system &#8211; extreme productivity without too much tinkering.</p>
<p>And if anyone blames me that I&#8217;m using non-open-source software, my reply is very simple &#8211; my work output is open-sourced.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/domasmituzas.wordpress.com/466/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/domasmituzas.wordpress.com/466/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/domasmituzas.wordpress.com/466/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/domasmituzas.wordpress.com/466/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/domasmituzas.wordpress.com/466/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/domasmituzas.wordpress.com/466/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/domasmituzas.wordpress.com/466/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/domasmituzas.wordpress.com/466/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/domasmituzas.wordpress.com/466/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/domasmituzas.wordpress.com/466/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/domasmituzas.wordpress.com/466/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/domasmituzas.wordpress.com/466/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/domasmituzas.wordpress.com/466/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/domasmituzas.wordpress.com/466/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dom.as&amp;blog=190075&amp;post=466&amp;subd=domasmituzas&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dom.as/2009/03/31/on-tools-and-operating-systems/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c660a6eb3a4005232acb111303bef12c?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=G" medium="image">
			<media:title type="html">domasmituzas</media:title>
		</media:content>

		<media:content url="http://domasmituzas.files.wordpress.com/2011/09/instruments-memusage.png" medium="image">
			<media:title type="html">Memory usage analysis</media:title>
		</media:content>

		<media:content url="http://domasmituzas.files.wordpress.com/2009/03/safari-webinspector.png" medium="image">
			<media:title type="html">Safari Web Inspector</media:title>
		</media:content>
	</item>
		<item>
		<title>Poor man&#8217;s contention profiling</title>
		<link>http://dom.as/2009/02/15/poor-mans-contention-profiling/</link>
		<comments>http://dom.as/2009/02/15/poor-mans-contention-profiling/#comments</comments>
		<pubDate>Sun, 15 Feb 2009 14:55:50 +0000</pubDate>
		<dc:creator>Domas Mituzas</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[contention]]></category>
		<category><![CDATA[gdb]]></category>
		<category><![CDATA[pmp]]></category>
		<category><![CDATA[profiling]]></category>

		<guid isPermaLink="false">http://dammit.lt/?p=378</guid>
		<description><![CDATA[I wrote already about poor man&#8217;s query profiling techniques last summer. Today I&#8217;m going to share poor man&#8217;s contention profiling tool, for all these poor souls which do not have Solaris with dtrace or pstack, don&#8217;t want to run tcmalloc &#8230; <a href="http://dom.as/2009/02/15/poor-mans-contention-profiling/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dom.as&amp;blog=190075&amp;post=378&amp;subd=domasmituzas&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I wrote already about <a href="http://dom.as/2008/05/22/poor-mans-query-profiling/">poor man&#8217;s query profiling</a> techniques last summer. Today I&#8217;m going to share poor man&#8217;s contention profiling tool, for all these poor souls which do not have Solaris with dtrace or pstack, don&#8217;t want to run tcmalloc contention profiler, and simply need some easy hack to see &#8216;what the heck is going on in my server&#8217;. Here it is:</p>
<pre>gdb \
    -ex "set pagination 0" \
    -ex "thread apply all bt" \
    --batch -p $(pidof mysqld)</pre>
<p>Run few times, and you will have enough samples to start judging. Do note, this may stop the process execution for a second, so do not spam it in too tight loop.<br />
Once you have results it is just a matter of 20-liner script to extract any useful calculations :)</p>
<p>P.S. I&#8217;d love to see efficient pstack implementation for 64-bit Linux :)</p>
<p><strong>update:</strong> this now lives at <a href="http://poormansprofiler.org">http://poormansprofiler.org</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/domasmituzas.wordpress.com/378/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/domasmituzas.wordpress.com/378/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/domasmituzas.wordpress.com/378/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/domasmituzas.wordpress.com/378/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/domasmituzas.wordpress.com/378/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/domasmituzas.wordpress.com/378/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/domasmituzas.wordpress.com/378/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/domasmituzas.wordpress.com/378/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/domasmituzas.wordpress.com/378/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/domasmituzas.wordpress.com/378/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/domasmituzas.wordpress.com/378/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/domasmituzas.wordpress.com/378/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/domasmituzas.wordpress.com/378/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/domasmituzas.wordpress.com/378/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dom.as&amp;blog=190075&amp;post=378&amp;subd=domasmituzas&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dom.as/2009/02/15/poor-mans-contention-profiling/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c660a6eb3a4005232acb111303bef12c?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=G" medium="image">
			<media:title type="html">domasmituzas</media:title>
		</media:content>
	</item>
		<item>
		<title>dtrace!</title>
		<link>http://dom.as/2008/10/03/dtrace/</link>
		<comments>http://dom.as/2008/10/03/dtrace/#comments</comments>
		<pubDate>Fri, 03 Oct 2008 13:13:06 +0000</pubDate>
		<dc:creator>Domas Mituzas</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[dtrace]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[profiling]]></category>

		<guid isPermaLink="false">http://dammit.lt/2008/10/03/218/</guid>
		<description><![CDATA[At the MySQL developer conference I accidently showed up some of things we&#8217;ve been doing with dtrace (I used it in few cases and realized the power it has), and saw some jaws drop. Then I ended up doing small demos &#8230; <a href="http://dom.as/2008/10/03/dtrace/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dom.as&amp;blog=190075&amp;post=218&amp;subd=domasmituzas&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>At the MySQL developer conference I accidently showed up some of things we&#8217;ve been doing with <a id="gonk" href="http://www.sun.com/bigadmin/content/dtrace/" title="dtrace">dtrace</a> (I used it in few cases and realized the power it has), and saw some jaws drop. Then I ended up doing small demos around the event. What most people know about dtrace, is that there&#8217;re some probes and you can trace them. What people don&#8217;t know is that you can actually create lots of probes dynamically, and use them with lots of flexibility.</p>
<p>One of major things not really grasped by many is that dtrace is a combination of a tracing tool, debugger, programming language and a database, having minor, but very valuable functionality for each. It can attach to any place in code, it can get stacks, function arguments, traverse structures, do some evaluations, aggregate data, and in the end &#8211; thats all compiled code executed by kernel (or programs). </p>
<p>Sometimes a probe may look not that useful (strace would provide file writes too?), but once combined with ability to get immediate stack, as well as set or read context variables (a previous probe on any other event could have saved some important information, e.g. host,user,table names, etc) &#8211; so final result may tell statistics correlated to many other activities. </p>
<p>One developer (a traitor who has left support for easier life in engineering dept) listened to all this, and I asked what his current project was &#8211; apparently he was adding static dtrace probes to MySQL. It ended up being quite interesting discussion, as static probes provide two value points. First of all, it provides an interface &#8211; whereas dynamic probes can change with code changes (though, that doesn&#8217;t happen too often :) Second value &#8211; one can do additional calculations on a specific probe, which would be done only on-demand (when the probe is attached). </p>
<p>So, having a static probe that directly maps to easy-mode dynamic one (it is straightforward to attach to a function, and quite easy to read its arguments), is a bit of waste (both in development time, as well as few instructions are actually written there). Dynamic tracing generally modifies binaries on fly &#8211; so it does not carry additional costs otherwise. Though an example where static probe would be awesome &#8211; having &#8220;query start&#8221; event, which would have query string canonized with all literals removed &#8211; this would allow on-demand query profiling for query groups, rather than stand-alone queries.</p>
<p>The other major value is ability to set thread-specific context variables in different probes, so they can read each other data. At the type of incoming packet one can tag the thread with whichever information needed &#8211; then any subsequent actions can reuse such information to filter out important events. That also removes the need of static probes providing multiple-layer information &#8211; it all can be achieved by chaining the events &#8211; without too much complexity. </p>
<p>I took a bit of trollish stance when approached a developer implementing internal performance statistics. We were playing a game &#8211; he&#8217;d tell me what kind of performance information he&#8217;d like to extract, and I&#8217;d show a method to do that with dtrace. More people from monitoring field joined, and we ended up discussing what is the perfect performance monitoring and analysis system. It is quite easy to understand, that different people will need different kinds of metrics. For MySQL development work performance engineer will need mutex contention information, someone fixing a leak will need heap profiling, someone writing a feature will want an easy way to trace how server executes their code &#8211; and all that is way far from any needs actual user or DBA has. Someone who writes a query just wants to see the query plan with some easy-to-understand costs (just need to pump more steroids into EXPLAIN). DBAs may want to see resource consumption per-user, per-table, etc (something <a id="j46_" href="http://code.google.com/p/google-mysql-tools/wiki/Mysql5Patches" title="Google patch">Google patch</a>  provides). It is interesting to find a balance, between external tools and what should be supported out-of-the-box internally &#8211; and it is way easier to force internal crowd to have proper tools, and it is always nice to provide a much as possible instrumentation for anyone externally. </p>
<p>Of course, there&#8217;s poor guy in the middle of two camps &#8211; a support engineer &#8211; who needs easy performance metrics to be accessible from clients, but needs way more depth than standard tools provide. In ideal case dtrace would be everywhere (someone recently said, thats one of coolest things Sun has ever brought) &#8211; then we&#8217;d be able to retrieve on-demand performance metrics from everywhere, and would be tempted to write <a id="q8p:" href="http://opensolaris.org/os/community/dtrace/dtracetoolkit/" title="DTraceToolkit">DTraceToolkit</a>  (a suite of programs that give lots and lots of information based on dtrace) like bunch of stuff for MySQL internals analysis.</p>
<p>I already made <a id="ntzb" href="http://p.defau.lt/?XFyyeBIFiQZLmn7XPXpPWQ" title="one very very simple tool">one very very simple tool</a>  which visualizes dtrace output, so we can have graphviz based SVG callgraph for pretty much any type of probe (like, who in application does expensive file reads) &#8211; all from a single dtrace oneliner. It seems I can sell the tool to Sun&#8217;s performance engineering team &#8211; they liked it. :) </p>
<p>Some people even installed Solaris afterwards for their performance tests. Great, I won&#8217;t have to (haha!).</p>
<p>Though lack of dtrace in Linux is currently a blocker for the technology, lots of engineers already have it on their laptops &#8211; MacOSX 10.5 ships it. It even has visual toolkit, that allows building some dtrace stuff in a GUI. </p>
<p>I&#8217;m pretty sure now, any engineer would love dtrace (or dtrace based tools), they just don&#8217;t know that yet.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/domasmituzas.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/domasmituzas.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/domasmituzas.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/domasmituzas.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/domasmituzas.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/domasmituzas.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/domasmituzas.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/domasmituzas.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/domasmituzas.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/domasmituzas.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/domasmituzas.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/domasmituzas.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/domasmituzas.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/domasmituzas.wordpress.com/218/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dom.as&amp;blog=190075&amp;post=218&amp;subd=domasmituzas&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dom.as/2008/10/03/dtrace/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c660a6eb3a4005232acb111303bef12c?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=G" medium="image">
			<media:title type="html">domasmituzas</media:title>
		</media:content>
	</item>
		<item>
		<title>InnoDB map: bulk inserting</title>
		<link>http://dom.as/2008/05/27/innodb-map-bulk-inserting/</link>
		<comments>http://dom.as/2008/05/27/innodb-map-bulk-inserting/#comments</comments>
		<pubDate>Tue, 27 May 2008 21:50:11 +0000</pubDate>
		<dc:creator>Domas Mituzas</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[dot]]></category>
		<category><![CDATA[innodb]]></category>
		<category><![CDATA[map]]></category>
		<category><![CDATA[profiling]]></category>

		<guid isPermaLink="false">http://dammit.lt/?p=128</guid>
		<description><![CDATA[So, what does InnoDB do while you&#8217;re loading the data in parallel? It looks something like this: Click on image for larger (8MB) version, if you dare, have efficient browser and lots of spare RAM (7k*10k canvas). Generated by: opreport &#8230; <a href="http://dom.as/2008/05/27/innodb-map-bulk-inserting/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dom.as&amp;blog=190075&amp;post=128&amp;subd=domasmituzas&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So, what does InnoDB do while you&#8217;re loading the data in <a href="http://dammit.lt/2008/05/26/insert-speed-paramy-auto-inc/">parallel?</a><br />
It looks something like this:</p>
<p><a href="http://domasmituzas.files.wordpress.com/2011/09/mysql5-insert-work.png"><img class="alignnone size-full wp-image-1249" title="mysql5-insert-work" src="http://domasmituzas.files.wordpress.com/2011/09/mysql5-insert-work.png?w=640&#038;h=875" alt="" width="640" height="875" /></a></p>
<p>Click on image for larger (8MB) version, if you dare, have efficient browser and lots of spare RAM (7k*10k canvas). Generated by:</p>
<pre><a href="http://oprofile.sourceforge.net/about/">opreport</a> | <a href="http://code.google.com/p/jrfonseca/wiki/Gprof2Dot">Gprof2Dot</a> | <a href="http://www.graphviz.org/">dot</a></pre>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/domasmituzas.wordpress.com/128/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/domasmituzas.wordpress.com/128/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/domasmituzas.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/domasmituzas.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/domasmituzas.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/domasmituzas.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/domasmituzas.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/domasmituzas.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/domasmituzas.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/domasmituzas.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/domasmituzas.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/domasmituzas.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/domasmituzas.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/domasmituzas.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/domasmituzas.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/domasmituzas.wordpress.com/128/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dom.as&amp;blog=190075&amp;post=128&amp;subd=domasmituzas&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dom.as/2008/05/27/innodb-map-bulk-inserting/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c660a6eb3a4005232acb111303bef12c?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=G" medium="image">
			<media:title type="html">domasmituzas</media:title>
		</media:content>

		<media:content url="http://domasmituzas.files.wordpress.com/2011/09/mysql5-insert-work.png" medium="image">
			<media:title type="html">mysql5-insert-work</media:title>
		</media:content>
	</item>
		<item>
		<title>Poor man&#039;s query profiling</title>
		<link>http://dom.as/2008/05/22/poor-mans-query-profiling/</link>
		<comments>http://dom.as/2008/05/22/poor-mans-query-profiling/#comments</comments>
		<pubDate>Thu, 22 May 2008 11:19:24 +0000</pubDate>
		<dc:creator>Domas Mituzas</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[pmp]]></category>
		<category><![CDATA[profiling]]></category>

		<guid isPermaLink="false">http://dammit.lt/?p=112</guid>
		<description><![CDATA[There is one very easy way to find database queries that might be performance bottlenecks on properly running servers, without using any sophisticated tools or using precision slowlogs, Just overload your server, and spam &#8216;SHOW FULL PROCESSLIST&#8217;. :)<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dom.as&amp;blog=190075&amp;post=112&amp;subd=domasmituzas&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There is one very easy way to find database queries that might be performance bottlenecks on properly running servers, without using any sophisticated tools or using precision slowlogs,</p>
<p>Just overload your server, and spam &#8216;SHOW FULL PROCESSLIST&#8217;. :)</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/domasmituzas.wordpress.com/112/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/domasmituzas.wordpress.com/112/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/domasmituzas.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/domasmituzas.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/domasmituzas.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/domasmituzas.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/domasmituzas.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/domasmituzas.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/domasmituzas.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/domasmituzas.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/domasmituzas.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/domasmituzas.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/domasmituzas.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/domasmituzas.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/domasmituzas.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/domasmituzas.wordpress.com/112/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dom.as&amp;blog=190075&amp;post=112&amp;subd=domasmituzas&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dom.as/2008/05/22/poor-mans-query-profiling/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c660a6eb3a4005232acb111303bef12c?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif&#38;r=G" medium="image">
			<media:title type="html">domasmituzas</media:title>
		</media:content>
	</item>
	</channel>
</rss>
