<?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>Xaprb &#187; Linux</title>
	<atom:link href="http://www.xaprb.com/blog/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.xaprb.com/blog</link>
	<description>Stay curious!</description>
	<lastBuildDate>Thu, 09 Feb 2012 03:58:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>I want simple things to be easy</title>
		<link>http://www.xaprb.com/blog/2010/05/13/i-want-simple-things-to-be-easy/</link>
		<comments>http://www.xaprb.com/blog/2010/05/13/i-want-simple-things-to-be-easy/#comments</comments>
		<pubDate>Thu, 13 May 2010 13:45:55 +0000</pubDate>
		<dc:creator>Xaprb</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[instrumentation]]></category>
		<category><![CDATA[iostat]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Little's Law]]></category>
		<category><![CDATA[Mark Callaghan]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=1845</guid>
		<description><![CDATA[I like to write tools that make hard things easy, when possible. By and large, MySQL is easy and simple. But some simple things are too hard with MySQL. I want to change that, at least for the things that matter the most to me, and which I think I know how to fix. I [...]


<strong>Further Reading:</strong><ul><li><a href='http://www.xaprb.com/blog/2006/03/16/simple-and-complex-types-in-xml-schema/' rel='bookmark' title='Permanent Link: Simple and complex types in XML Schema'>Simple and complex types in XML Schema</a></li>
<li><a href='http://www.xaprb.com/blog/2009/12/31/a-simple-way-to-make-birthday-queries-easier-and-faster/' rel='bookmark' title='Permanent Link: A simple way to make birthday queries easier and faster'>A simple way to make birthday queries easier and faster</a></li>
<li><a href='http://www.xaprb.com/blog/2010/05/12/tis-a-gift-to-be-simple/' rel='bookmark' title='Permanent Link: Tis a gift to be simple'>Tis a gift to be simple</a></li>
<li><a href='http://www.xaprb.com/blog/2009/07/12/a-simple-and-effective-way-to-protest-drm/' rel='bookmark' title='Permanent Link: A simple and effective way to protest DRM'>A simple and effective way to protest DRM</a></li>
<li><a href='http://www.xaprb.com/blog/2009/05/31/dont-forget-about-show-profiles/' rel='bookmark' title='Permanent Link: Don&#8217;t forget about SHOW PROFILES'>Don&#8217;t forget about SHOW PROFILES</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>I like to write tools that make hard things easy, when possible.  By and large, MySQL is easy and simple.  But some simple things are too hard with MySQL.  I want to change that, at least for the things that matter the most to me, and which I think I know how to fix.</p>

<p>I will probably write a lot about this.  I have already written a number of <del datetime="2010-05-13T13:10:55+00:00">rants</del> blog posts about the lack of instrumentation in MySQL, and that is where I&#8217;ll probably continue to put most of my energy.</p>

<p>To begin with, imagine this simple scenario.  You are a remote DBA.  Your client says &#8220;New Relic is showing periods of slow response time from the database.&#8221;  You connect to MySQL at the command line and try to troubleshoot.  How do you catch the problem in action, from within the database itself?  The following are no good:</p>

<ul>
<li>It doesn&#8217;t count to see the problem two minutes later by observing the application tier, as New Relic does.  That&#8217;s too late, and it&#8217;s not from within the database.</li>
<li>It&#8217;s also not good enough to catch just after the slow queries finish executing, which you can get from the slow query log if you have a realtime log analyzer running; that is a) also after the fact, and b) again not possible from within the database itself.</li>
<li>Watching TCP traffic or using a proxy is similarly off limits.</li>
</ul>

<p>This is a database, a complex piece of software &#8212; comparable to an operating system in some respects.  It should be possible to know that response time is spiking <em>while the slow queries are executing slowly, before they even finish and return their results to the application</em>.  This is a simple question that should be easy to answer.</p>

<p>It&#8217;s not currently possible inside MySQL, because MySQL doesn&#8217;t tell you how much time queries spend executing.  It&#8217;s that simple.  Fortunately the fix is equally simple: measure how long queries spend executing.</p>

<p>We can look at the lowly iostat (or /proc/diskstats in Linux) for an example of how this is possible to solve.  We need a counter that shows the sum of execution time, including currently executing queries.  I saw that the <a href="http://www.facebook.com/note.php?note_id=390420710932">Facebook patch</a> adds counters similar to this.  Search for &#8220;Query timing&#8221; on that page.  I want something slightly more complex, <a href="http://www.xaprb.com/blog/2010/01/09/how-linux-iostat-computes-its-results/">the way Linux&#8217;s IO counters work, because they add memory</a>.  Simple is really beautiful; a counter that has memory is an amazing thing, and you can apply Little&#8217;s Law to derive a surprising amount of information from it.</p>

<p>I might change my opinion about some of the more complex things that are being added to MySQL; much smarter people have, and I&#8217;m probably a hold-out because I&#8217;m not that smart.  But I still see the need for simple combinations of counters and timers for essential metrics, which do not need complex queries or tools to use.  I have a few more things on my wishlist, which I&#8217;ll write about later.</p>

<p><strong>Further Reading:</strong><ul><li><a href='http://www.xaprb.com/blog/2006/03/16/simple-and-complex-types-in-xml-schema/' rel='bookmark' title='Permanent Link: Simple and complex types in XML Schema'>Simple and complex types in XML Schema</a></li>
<li><a href='http://www.xaprb.com/blog/2009/12/31/a-simple-way-to-make-birthday-queries-easier-and-faster/' rel='bookmark' title='Permanent Link: A simple way to make birthday queries easier and faster'>A simple way to make birthday queries easier and faster</a></li>
<li><a href='http://www.xaprb.com/blog/2010/05/12/tis-a-gift-to-be-simple/' rel='bookmark' title='Permanent Link: Tis a gift to be simple'>Tis a gift to be simple</a></li>
<li><a href='http://www.xaprb.com/blog/2009/07/12/a-simple-and-effective-way-to-protest-drm/' rel='bookmark' title='Permanent Link: A simple and effective way to protest DRM'>A simple and effective way to protest DRM</a></li>
<li><a href='http://www.xaprb.com/blog/2009/05/31/dont-forget-about-show-profiles/' rel='bookmark' title='Permanent Link: Don&#8217;t forget about SHOW PROFILES'>Don&#8217;t forget about SHOW PROFILES</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://www.xaprb.com/blog/2010/05/13/i-want-simple-things-to-be-easy/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Henceforth, I dub thee GLAMP</title>
		<link>http://www.xaprb.com/blog/2008/02/21/henceforth-i-dub-thee-glamp/</link>
		<comments>http://www.xaprb.com/blog/2008/02/21/henceforth-i-dub-thee-glamp/#comments</comments>
		<pubDate>Thu, 21 Feb 2008 12:37:45 +0000</pubDate>
		<dc:creator>Xaprb</dc:creator>
				<category><![CDATA[Brian Aker]]></category>
		<category><![CDATA[Free Software]]></category>
		<category><![CDATA[GNU]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Richard Stallman]]></category>
		<category><![CDATA[University of Virginia]]></category>

		<guid isPermaLink="false">http://www.xaprb.com/blog/2008/02/21/henceforth-i-dub-thee-glamp/</guid>
		<description><![CDATA[<p>I've decided to start replacing L with GL in acronyms where L supposedly stands for Linux.</p>

<p>I'm not a big user of acronyms, because I think they are exclusionist and they obscure, rather than revealing.  (This wouldn't matter if I wrote for people who already knew what I meant and agreed with me, but that's a waste of time).  However, LAMP is one that I've probably used a few times, without thinking that it is supposed to stand for Linux, Apache, MySQL, and PHP/Perl/Python.  In fact, it doesn't refer to Linux, it refers to GNU/Linux.  Therefore, it should be <acronym title="GNU/Linux, Apache, MySQL, and PHP/Perl/Python">GLAMP</acronym>.</p>

<p>Why does this matter? I try not to say Linux, unless I'm referring to a kernel, because <strong>a kernel is not an operating system</strong>.  I try to be pretty careful about <a href="http://www.gnu.org/gnu/linux-and-gnu.html">saying GNU/Linux when I'm talking about an operating system</a>.  An exception is a recruiting event yesterday at the University of Virginia, where I compromised my principles because of the noise.  Trying to explain myself at that decibel level was just beyond my willingness, so  I said we use Linux.  If the potential recruits hire on with us, they'll get to hear me say GNU/Linux.  And if they don't, maybe they'll attend Richard Stallman's upcoming talk at the engineering school there on March 27th or 28th (sorry, it's not listed online, so I can't link to it).</p>

<p>And you'll see GNU/Linux used conscientiously if you read <a href="http://www.amazon.com/High-Performance-MySQL-Optimization-Replication/dp/0596101716">the book I'm helping to write</a>, too.</p>

<p>GNU matters.  A lot.  You may not think so, but if it ceased to exist, you'd find out.  That applies equally even if you don't think you are a Free Software user.  You have no idea how much you rely on Free Software in your daily life.  And <a href="http://www.fsf.org/">the GNU project</a> has been and continues to be a keystone in that arch of freedom.</p>

<p>Thanks to <a href="http://krow.livejournal.com/583459.html">MySQL's Brian Aker for snapping me out of my LAMP carelessness</a>.</p>


<strong>Further Reading:</strong><ul><li><a href='http://www.xaprb.com/blog/2006/05/23/how-to-use-linuxs-proc-config-feature/' rel='bookmark' title='Permanent Link: How to use Linux&#8217;s CONFIG_IKCONFIG_PROC feature'>How to use Linux&#8217;s CONFIG_IKCONFIG_PROC feature</a></li>
<li><a href='http://www.xaprb.com/blog/2009/07/01/wikipedias-concensus-linux-is-an-operating-system/' rel='bookmark' title='Permanent Link: Wikipedia&#8217;s concensus: Linux is an operating system'>Wikipedia&#8217;s concensus: Linux is an operating system</a></li>
<li><a href='http://www.xaprb.com/blog/2009/06/21/recap-of-southeast-linux-fest-2009/' rel='bookmark' title='Permanent Link: Recap of Southeast Linux Fest 2009'>Recap of Southeast Linux Fest 2009</a></li>
<li><a href='http://www.xaprb.com/blog/2009/01/01/a-new-years-reading-suggestion-for-free-software-advocates/' rel='bookmark' title='Permanent Link: A New Year&#8217;s reading suggestion for Free Software advocates'>A New Year&#8217;s reading suggestion for Free Software advocates</a></li>
<li><a href='http://www.xaprb.com/blog/2006/01/23/firefox-or-opera-on-slow-hardware/' rel='bookmark' title='Permanent Link: Firefox vs. Opera on slow hardware'>Firefox vs. Opera on slow hardware</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve decided to start replacing L with GL in acronyms where L supposedly stands for Linux.</p>

<p>I&#8217;m not a big user of acronyms, because I think they are exclusionist and they obscure, rather than revealing.  (This wouldn&#8217;t matter if I wrote for people who already knew what I meant and agreed with me, but that&#8217;s a waste of time).  However, LAMP is one that I&#8217;ve probably used a few times, without thinking that it is supposed to stand for Linux, Apache, MySQL, and PHP/Perl/Python.  In fact, it doesn&#8217;t refer to Linux, it refers to GNU/Linux.  Therefore, it should be <acronym title="GNU/Linux, Apache, MySQL, and PHP/Perl/Python">GLAMP</acronym>.</p>

<p>Why does this matter? I try not to say Linux, unless I&#8217;m referring to a kernel, because <strong>a kernel is not an operating system</strong>.  I try to be pretty careful about <a href="http://www.gnu.org/gnu/linux-and-gnu.html">saying GNU/Linux when I&#8217;m talking about an operating system</a>.  An exception is a recruiting event yesterday at the University of Virginia, where I compromised my principles because of the noise.  Trying to explain myself at that decibel level was just beyond my willingness, so  I said we use Linux.  If the potential recruits hire on with us, they&#8217;ll get to hear me say GNU/Linux.  And if they don&#8217;t, maybe they&#8217;ll attend Richard Stallman&#8217;s upcoming talk at the engineering school there on March 27th or 28th (sorry, it&#8217;s not listed online, so I can&#8217;t link to it).</p>

<p>And you&#8217;ll see GNU/Linux used conscientiously if you read <a href="http://www.amazon.com/gp/product/0596101716?ie=UTF8&#038;tag=xaprb-20&#038;link_code=as3&#038;camp=211189&#038;creative=373489&#038;creativeASIN=0596101716">the book I&#8217;m helping to write</a>, too.</p>

<p>GNU matters.  A lot.  You may not think so, but if it ceased to exist, you&#8217;d find out.  That applies equally even if you don&#8217;t think you are a Free Software user.  You have no idea how much you rely on Free Software in your daily life.  And <a href="http://www.fsf.org/">the GNU project</a> has been and continues to be a keystone in that arch of freedom.</p>

<p>Thanks to <a href="http://krow.livejournal.com/583459.html">MySQL&#8217;s Brian Aker for snapping me out of my LAMP carelessness</a>.</p>

<p><strong>Further Reading:</strong><ul><li><a href='http://www.xaprb.com/blog/2006/05/23/how-to-use-linuxs-proc-config-feature/' rel='bookmark' title='Permanent Link: How to use Linux&#8217;s CONFIG_IKCONFIG_PROC feature'>How to use Linux&#8217;s CONFIG_IKCONFIG_PROC feature</a></li>
<li><a href='http://www.xaprb.com/blog/2009/07/01/wikipedias-concensus-linux-is-an-operating-system/' rel='bookmark' title='Permanent Link: Wikipedia&#8217;s concensus: Linux is an operating system'>Wikipedia&#8217;s concensus: Linux is an operating system</a></li>
<li><a href='http://www.xaprb.com/blog/2009/06/21/recap-of-southeast-linux-fest-2009/' rel='bookmark' title='Permanent Link: Recap of Southeast Linux Fest 2009'>Recap of Southeast Linux Fest 2009</a></li>
<li><a href='http://www.xaprb.com/blog/2009/01/01/a-new-years-reading-suggestion-for-free-software-advocates/' rel='bookmark' title='Permanent Link: A New Year&#8217;s reading suggestion for Free Software advocates'>A New Year&#8217;s reading suggestion for Free Software advocates</a></li>
<li><a href='http://www.xaprb.com/blog/2006/01/23/firefox-or-opera-on-slow-hardware/' rel='bookmark' title='Permanent Link: Firefox vs. Opera on slow hardware'>Firefox vs. Opera on slow hardware</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://www.xaprb.com/blog/2008/02/21/henceforth-i-dub-thee-glamp/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
	</channel>
</rss>

