<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet href="/~jesus/templates/default/atom.css" type="text/css" ?>

<feed version="0.3" 
   xmlns="http://purl.org/atom/ns#"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/">
    <link href="http://www.lethargy.org/~jesus/rss.php?version=atom0.3" rel="service.feed" title="Esoteric Curio" type="application/x.atom+xml" />
    <link href="http://www.lethargy.org/~jesus/"                        rel="alternate"    title="Esoteric Curio" type="text/html" />
    <link href="http://www.lethargy.org/~jesus/rss.php?version=2.0"     rel="alternate"    title="Esoteric Curio" type="application/rss+xml" />
    <title mode="escaped" type="text/html">Esoteric Curio</title>
    <tagline mode="escaped" type="text/html">Theo's Contributions to Technological Surreality</tagline>
    <id>http://www.lethargy.org/~jesus/</id>
    <modified>2008-11-06T00:07:17Z</modified>
    <generator url="http://www.s9y.org/" version="1.3.1">Serendipity 1.3.1 - http://www.s9y.org/</generator>
    <dc:language>en</dc:language>
    <info mode="xml" type="text/html">
        <div xmlns="http://www.w3.org/1999/xhtml">You are viewing an ATOM formatted XML site feed. Usually this file is inteded to be viewed in an aggregator or syndication software. If you want to know more about ATOM, please visist <a href="http://atomenabled.org/">Atomenabled.org</a></div>
    </info>

    <entry>
        <link href="http://www.lethargy.org/~jesus/archives/137-DTrace-and-Apache.html" rel="alternate" title="DTrace and Apache" type="text/html" />
        <author>
            <name>Theo Schlossnagle</name>
                    </author>
    
        <issued>2008-11-06T00:05:20Z</issued>
        <created>2008-11-06T00:05:20Z</created>
        <modified>2008-11-06T00:07:17Z</modified>
        <wfw:comment>http://www.lethargy.org/~jesus/wfwcomment.php?cid=137</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.lethargy.org/~jesus/rss.php?version=atom0.3&amp;type=comments&amp;cid=137</wfw:commentRss>
    
        <id>http://www.lethargy.org/~jesus/archives/137-guid.html</id>
        <title mode="escaped" type="text/html">DTrace and Apache</title>
        <content type="application/xhtml+xml" xml:base="http://www.lethargy.org/~jesus/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>DTrace kicks ass.  Everyone knows I love ZFS, but in my opinion DTrace is the most significant and disruptive systems technology in at least 10 years.</p>
<p>Today I gave my talk at ApacheCon; it was well received.  I hope that I inspired some people to go use DTrace and look in their systems' underpants.</p>
<p>Here are <a href="http://lethargy.org/~jesus/misc/d1.pdf">my slides</a> and <a href="http://labs.omniti.com/trac/project-dtrace/browser/trunk/apache22">the scripts</a> I used for my live demo.</p>
<p>I'll update this entry with the video as soon as I have the link.</p>
<p>I mentioned a Linux port underway.  I got the name wrong when I talked about it (sorry Paul!).  The person working on the port is Paul Fox, the author of the CRiSP editor.  For more information, check out <a href="http://www.crisp.demon.co.uk/blog/index.html">his blog</a>.</p> 
            </div>
        </content>

        
    </entry>
    <entry>
        <link href="http://www.lethargy.org/~jesus/archives/136-Eloquence-in-technical-prose..html" rel="alternate" title="Eloquence in technical prose." type="text/html" />
        <author>
            <name>Theo Schlossnagle</name>
                    </author>
    
        <issued>2008-11-05T06:00:15Z</issued>
        <created>2008-11-05T06:00:15Z</created>
        <modified>2008-11-05T15:11:38Z</modified>
        <wfw:comment>http://www.lethargy.org/~jesus/wfwcomment.php?cid=136</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.lethargy.org/~jesus/rss.php?version=atom0.3&amp;type=comments&amp;cid=136</wfw:commentRss>
    
        <id>http://www.lethargy.org/~jesus/archives/136-guid.html</id>
        <title mode="escaped" type="text/html">Eloquence in technical prose.</title>
        <content type="application/xhtml+xml" xml:base="http://www.lethargy.org/~jesus/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>I met Bryan Cantrill a few years back at OSCON where he gave a session on DTrace. As any reader of my blog would know, I'm a big DTrace fan. Bryan's presentation style was passionate and animated and I was quite convinced there was an illegal substance involved. I've come to learn that style is Bryan's style.</p>

<p>Since then, I've had a few opportunities to dialogue with Bryan and on every occasion he reinforced my opinion that he is one of the more insightful minds in today's computer engineering field. His critique and vision has an element of clarity and completeness to it that is far too rare. Combine that with truly elegant written prose and I am unable to resist consuming what he writes.</p>

<p><a href="http://blogs.sun.com/bmc/entry/concurrency_s_shysters">Bryan's latest communication</a> on transactional memory is an exquisite example of poise in both thought and communication.  At one point he states that "experience has taught me to be wary of crooked problem statements." I must admit that in my efforts to play devil's advocate I often construct straw-man arguments and unjustified counterpoints.  I do this in an effort to <span style="text-decoration: line-through;">force</span> lead my counterpart to conciseness and deeper well-founded justification in their argument.  Backing out of a solid justification is, at the very least, revealing.</p>

<p>I took two things away from his prose.  First, his output is very worth digesting.  Second, when I present solutions to problems I should vehemently avoid perfunctory problem definition and invest equal efforts in the completeness of both the problem statement and the solution proposed.</p> 
            </div>
        </content>

        
    </entry>
    <entry>
        <link href="http://www.lethargy.org/~jesus/archives/135-Systems-Operations-and-Fishing..html" rel="alternate" title="Systems Operations and Fishing." type="text/html" />
        <author>
            <name>Theo Schlossnagle</name>
                    </author>
    
        <issued>2008-11-03T13:19:29Z</issued>
        <created>2008-11-03T13:19:29Z</created>
        <modified>2008-11-05T21:59:48Z</modified>
        <wfw:comment>http://www.lethargy.org/~jesus/wfwcomment.php?cid=135</wfw:comment>
        <slash:comments>3</slash:comments>
        <wfw:commentRss>http://www.lethargy.org/~jesus/rss.php?version=atom0.3&amp;type=comments&amp;cid=135</wfw:commentRss>
    
        <id>http://www.lethargy.org/~jesus/archives/135-guid.html</id>
        <title mode="escaped" type="text/html">Systems Operations and Fishing.</title>
        <content type="application/xhtml+xml" xml:base="http://www.lethargy.org/~jesus/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>There is a pleasant dream where the world is black and white, problems are discreet, and solutions are straightforward. People that live in this dream are an obstacle unto themselves. The harsh reality is that we struggle daily to simplify things because they tend to be so complex. Most choices lead to outcomes that have both positive and negative aspects. This includes the choice of inaction (wrongfully referred to as "not choosing"). When presented with options, by and large people tend to make decent choices. The conundrum is identifying good options when none are presented. This skill, in many people, just plain sucks.</p>
<p>There is an old proverb: "Give a man a fish and you have fed him for today. Teach a man to fish and you have fed him for a lifetime." Perhaps I am oversimplifying fishing, but I struggle to adapt this proverb to systems operations. Perhaps it is due to the intangible nature of computing, but the one-step-closer proverb fits better (at least in my twisted brain): "Fix a man's car, and he can drive to the repair shop. Teach man to fix his car and he can go where he pleases." Why is this better? Perhaps it is just how my mind works. Perhaps it is because of the way symptoms present:</p>

<blockquote>Dave: my car has issues.<br />Carl: what's wrong with it?<br />Dave: not sure.<br />Carl: why do you think it has issues?<br />Dave: It seems sluggish when pulling onto the interstate.<br />Carl: so it accelerates inadequately?<br />Dave: I guess.<br />Carl: What kind of car do you have again?<br />Dave: a brown one.<br />Carl: Uh, I mean make and model.<br />Dave: a Ronda Jackel.<br />Carl: is that carbureted or fuel injected?<br />Dave: um... um... it's got carbs.<br />Carl: really? what year?<br />Dave: oh, 2007.<br />Carl: okay, it's fuel injected.<br />Dave: oh, yeah.. That's right.. it's the Jackel GT, with the sports pack.<br />Carl: That has low-profile tires; are they properly inflated?<br />Dave: I think so, they look good.<br />Carl: when was the last time you checked?<br />Dave: last week, when I filled up. It costs like $58 to fill up. Gas prices are crazy!<br />Carl: *thinks*<br />Carl: Wow, where did you find high-test gas at that price?<br />Dave: Oh, I put 87 octane in that... that expensive stuff is a sham...<br />Carl: really? who told you that?<br />Dave: Alan<br />Carl: Who's Alan?<br />Dave: This great guy who taught me to fish.<br /></blockquote>

<p>Most people simply have no idea how their systems operate. They just know they are supposed to "go." Now, the purpose of this rant is really not to complain about car owners and their lack of knowledge (I'm one of them!), but rather to ask a wider audience about techniques to make the Carl's of the world better at their jobs.</p>
<p>Computing systems, like cars, can be immensely complex systems. When things go wrong, as they so often do, I feel you need someone who knows every single part. Not only should they know the part, they should know who built the part, why they built the part, when it was introduced into the system, what component it obsoleted, and what general advantages (and disadvantages) the newer part has over the older part. In car-speak, you should know who invented fuel-injection and when the industry transitioned, what advantages (and disadvantages) FI has over carburetor-based design. That should extend to every other part of the car down to the rubber on the tires and the stitching method used on the seat upholstery.</p>
<p>Note that I said "I feel you need someone..." I know a few people that can walk into a room with systems engineers and (knowing nothing about systems operations) assess a situation, ask a handful of high-level questions that results in at least two engineers slamming their heads into their desks. I call these people "Critical Thinkers." Critical Thinkers have the ability to critically think (surprise surprise), as well as understand other people's thought processes and deduce where they did not think critically.</p>
<p>Critical Thinkers are hard to come by, but they are out there. People with experience in computer science and operations are a little less hard to come by. It would make sense to take a Critical Thinker and teach them systems. However, to be really good at operations work, it takes years (probably five to ten). What is more challenging is finding a good Critical Thinker that actually wants to work in systems operations. What I constantly strive to do is mold people with solid technical skills and knowledge into critical thinkers. This brings us to the heart of this post.</p>
<p>I can hardly articulate my method of teaching critical thinking skills. Much of it is teach-by-example, but that has serious shortcomings in critical thinking scenarios. I could really use some breadth in my teaching/mentoring techniques. Does anyone have any good training materials that could be used to develop critical thinking skills? How do you cultivate and improve intuition?</p> 
            </div>
        </content>

        
    </entry>
    <entry>
        <link href="http://www.lethargy.org/~jesus/archives/134-Scalability-in-Curriculum.html" rel="alternate" title="Scalability in Curriculum" type="text/html" />
        <author>
            <name>Theo Schlossnagle</name>
                    </author>
    
        <issued>2008-10-28T03:50:44Z</issued>
        <created>2008-10-28T03:50:44Z</created>
        <modified>2008-10-28T04:42:16Z</modified>
        <wfw:comment>http://www.lethargy.org/~jesus/wfwcomment.php?cid=134</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.lethargy.org/~jesus/rss.php?version=atom0.3&amp;type=comments&amp;cid=134</wfw:commentRss>
    
        <id>http://www.lethargy.org/~jesus/archives/134-guid.html</id>
        <title mode="escaped" type="text/html">Scalability in Curriculum</title>
        <content type="application/xhtml+xml" xml:base="http://www.lethargy.org/~jesus/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>I'm exciting that the <a href="http://www.ufg.br/page.php">Universidade Federal de Goiás</a> or Brazil has a course called: "Scalable Architectures for Large Scale Applications" in their Computer Science department.</p><p>What's more?  I'm very honored to learn that they are using <a href="http://scalableinternetarchitectures.com/">my book</a> as a part of their curriculum.  I've added a venue for recruiting <a href="http://omniti.com/is/hiring/site-reliability-engineer">Site Reliability Engineers</a> at <a href="http://omniti.com">OmniTI</a>.</p> 
            </div>
        </content>

        
    </entry>
    <entry>
        <link href="http://www.lethargy.org/~jesus/archives/133-Whirlwind.html" rel="alternate" title="Whirlwind" type="text/html" />
        <author>
            <name>Theo Schlossnagle</name>
                    </author>
    
        <issued>2008-10-19T21:48:19Z</issued>
        <created>2008-10-19T21:48:19Z</created>
        <modified>2008-10-21T00:48:30Z</modified>
        <wfw:comment>http://www.lethargy.org/~jesus/wfwcomment.php?cid=133</wfw:comment>
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://www.lethargy.org/~jesus/rss.php?version=atom0.3&amp;type=comments&amp;cid=133</wfw:commentRss>
    
        <id>http://www.lethargy.org/~jesus/archives/133-guid.html</id>
        <title mode="escaped" type="text/html">Whirlwind</title>
        <content type="application/xhtml+xml" xml:base="http://www.lethargy.org/~jesus/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Two weeks ago was a whirlwind.  I thought I'd catch up last week and blog about it, but it was so taxing that my fatigue combined with three germ monsters at home resulted in a severe cold that knocked me out.</p>

<h4>The 8th</h4>

<p>4:28am Amtrak BWI to NYP.  I had the privilege and honor of visiting <a href="http://maps.google.com/maps?hl=en&amp;client=firefox-a&amp;rls=org.mozilla:en-US:official&amp;hs=ps0&amp;um=1&amp;ie=UTF-8&amp;q=club+101+NY&amp;fb=1&amp;view=text&amp;latlng=2452034502024788935">Club 101</a> in New York, NY to speak to the <a href="http://newyorkcto.blogspot.com/2007/05/new-york-cto-club.html">New York CTO Group.</a>  I spoke on the topics of (you guessed it) scalability and performance in Internet applications.  I did my best to integrate some thoughts on cloud computing into the discussion.  As is typical with a short time frame and a first presentation -- I have a lot of things I'd change.  For one, I believe I came across as far too negative toward cloud computing.  I considered the amount of published hype around cloud computing and I wanted to provide a reality check.  Many thinks to Geir Magnusson and Igor Shindel.  This was a truly wonderful experience and I can only hope that the audience was as impressed with me as I was with them.</p>

<h4>The 9th</h4>

<p>6:50am flight from BWI to BUF.  I went on-site with <a href="http://omniti.com/is/ciprian-tutu">Ciprian</a> to a client in Buffalo.  Various documents prevent me from discussing any details.  Suffice it to say, it is an interesting problem and truly challenging technical and business problem solving on a day-to-day basis.  The point?  I leave there tired.  Heading back two days this coming week.</p>

<h4>The 10th through the 12th</h4>

<p>2:30pm Amtrak from BWI to NYP.  <a href="http://omniti.com/is/jason-dixon">Jason Dixon</a> and I went to <a href="http://www.nycbsdcon.org/2008/">NYCBSDCON</a>.  I had a speaking engagement on Sunday morning to reveal (first public presentation of) <a href="https://labs.omniti.com/trac/reconnoiter/">Reconnoiter</a>.  I think it went really well.  I enjoyed meeting a lot of new people with different perspectives.  It was an interesting crowd and a refreshing experience.  Being as tired as I was and around so many chain smokers made me ill on Sunday -- that was no fun.</p>

<h4>Last week.</h4>

<p>I was hoping I could catch up on things last week.  I'm preparing for a lot of action on the Buffalo front, a new person is starting (tomorrow) that will head up OmniTI's internal accounting and I toured many office spaces in search of new offices for the <a href="http://omniti.com/is">ever growing OmniTI</a>.  Running <a href="http://omniti.com/">OmniTI</a> takes pretty much all of my time away from home.  I need to learn that adding more things just hurts.</p>
<p>Murphy certainly had his sights on me.  I promised my wife I'd take a day of much needed vacation on Friday.  I managed to get sick on Thursday which climaxed on Saturday morning.  On top of that, I did my business real-estate tour on Friday morning -- my sick vacation day.  I think I need a do-over.</p>
<p>Last night, I finally started to feel better.  I'm sure the bottle of (local) La Grange Norton red wine and the outdoor fire (thanks Katherine!) helped a lot.</p>
<p>Oh yeah... In two weeks I'll be in New Orleans at <a href="http://us.apachecon.com/c/acus2008/">ApacheCon</a>!  I hope to see you there!</p> 
            </div>
        </content>

        
    </entry>
    <entry>
        <link href="http://www.lethargy.org/~jesus/archives/132-Irony-The-website-is-what.html" rel="alternate" title="Irony: The website is what?" type="text/html" />
        <author>
            <name>Theo Schlossnagle</name>
                    </author>
    
        <issued>2008-09-20T14:40:49Z</issued>
        <created>2008-09-20T14:40:49Z</created>
        <modified>2008-09-25T13:22:22Z</modified>
        <wfw:comment>http://www.lethargy.org/~jesus/wfwcomment.php?cid=132</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.lethargy.org/~jesus/rss.php?version=atom0.3&amp;type=comments&amp;cid=132</wfw:commentRss>
    
        <id>http://www.lethargy.org/~jesus/archives/132-guid.html</id>
        <title mode="escaped" type="text/html">Irony: The website is what?</title>
        <content type="application/xhtml+xml" xml:base="http://www.lethargy.org/~jesus/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>The Internet is not without a sense of irony:</p>

<p><a href="http://thewebsiteisdown.com/">The website is down.</a></p>

<p>The website is up.</p>

<blockquote><p><span style="text-decoration: line-through;">In case they fix it</span> They fixed it... thewebsiteisup.com just spewed PHP errors at the time I wrote this.</p></blockquote> 
            </div>
        </content>

        
    </entry>
    <entry>
        <link href="http://www.lethargy.org/~jesus/archives/131-Zetaback.-Respect..html" rel="alternate" title="Zetaback. Respect." type="text/html" />
        <author>
            <name>Theo Schlossnagle</name>
                    </author>
    
        <issued>2008-09-19T14:02:15Z</issued>
        <created>2008-09-19T14:02:15Z</created>
        <modified>2008-09-21T02:37:16Z</modified>
        <wfw:comment>http://www.lethargy.org/~jesus/wfwcomment.php?cid=131</wfw:comment>
        <slash:comments>5</slash:comments>
        <wfw:commentRss>http://www.lethargy.org/~jesus/rss.php?version=atom0.3&amp;type=comments&amp;cid=131</wfw:commentRss>
    
        <id>http://www.lethargy.org/~jesus/archives/131-guid.html</id>
        <title mode="escaped" type="text/html">Zetaback. Respect.</title>
        <content type="application/xhtml+xml" xml:base="http://www.lethargy.org/~jesus/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>With the release of <a href="http://opensolaris.org/os/community/zfs/">ZFS</a> on Solaris 10, I sat down and marveled at the opportunities for off-site backups.  I have already <a href="http://lethargy.org/~jesus/archives/114-ZFS.-Respect..html">written a bit about ZFS detailing why I think it kicks so much ass</a>.  With zfs send and zfs receive, one can manage block-level incremental backups and restores.  What's missing?  An elegant hack leveraging that to provide a simple and reliable backup infrastructure for a network of ZFS capable machines (including Mac OS X and FreeBSD now, BTW).</p>

<p>So, I sat down and wrote <a href="https://labs.omniti.com/trac/zetaback">Zetaback</a> -- which is currently 1032 lines of perl code (including complete documentations) plus a thin agent on remote machines that is 290 lines of perl code (including complete documentation).  I'd like to note that the only reason there is documentation, let alone complete documentation, is because of <a href="http://omniti.com/is/eric-sproul">Eric Sproul</a>.  This really demonstrates to me that "Keep It Simple Stupid" still works for important tasks.</p>

<p>Zetaback is a rather full features backup and restore system.  It can manage multiple hosts, multiple ZFS per host, both frequency and retention policies on full and incremental backups.  It can report policy violators (things that haven't been backed up within the policy).  It can manage the archiving of backups.  It provides both non-interactive and interactive restores.  It has an excellent command line syntax.  And most importantly, it has saved my ass more times than I can count.</p>

<p>I'm not usually big on awards... I find the single unexpected email from someone saying: "damn that was useful, thanks!" to be more gratifying most of the time.  However, Zetaback was one of the first projects <a href="http://omniti.com/">we</a> put up on <a href="http://labs.omniti.com/">labs</a>, so being a 3rd place winner in the <a href="http://www.opensolaris.org/os/project/awards/awards_land/Entries/">OpenSolaris Community Innovation Awards</a> is pretty exciting.</p> 
            </div>
        </content>

        
    </entry>
    <entry>
        <link href="http://www.lethargy.org/~jesus/archives/130-Last-second-scaling-hack.html" rel="alternate" title="Last second scaling hack" type="text/html" />
        <author>
            <name>Theo Schlossnagle</name>
                    </author>
    
        <issued>2008-09-16T04:17:20Z</issued>
        <created>2008-09-16T04:17:20Z</created>
        <modified>2008-09-19T22:12:24Z</modified>
        <wfw:comment>http://www.lethargy.org/~jesus/wfwcomment.php?cid=130</wfw:comment>
        <slash:comments>3</slash:comments>
        <wfw:commentRss>http://www.lethargy.org/~jesus/rss.php?version=atom0.3&amp;type=comments&amp;cid=130</wfw:commentRss>
    
        <id>http://www.lethargy.org/~jesus/archives/130-guid.html</id>
        <title mode="escaped" type="text/html">Last second scaling hack</title>
        <content type="application/xhtml+xml" xml:base="http://www.lethargy.org/~jesus/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>So, you have an app.  You can't change the code.  Now this isn't the common case when I try to scale things. I usually roll up my sleeves and ignore application stack boundaries.  This is a unique case where for political reasons, I can't touch the app.  So.. the app was a tiny little site, then it got popular on facebook and collegehumor and instead of pushing 5-10 megabits, it was falling apart at around 105 megabits due to resource saturation (one box wasn't enough) and ended up needing to push 200 megabits.</p>

<p>200 megabits isn't all that much traffic anymore, but when the application wasn't written to scale horizontally, you are at the mercy of its raw performance and must scale vertically.  If the application hasn't had a lot of focus on profiling and performance tuning, it means you are going to hit that extremely painful price point of vertical scaling.  In this case, the architecture went live with an expectation of a 20Mbit/s peak and BOOM.  Because it needed to be fixed quickly, purchasing new hardware is now a problem for scheduling reasons more than financial ones, we have plenty of similar hardware available, just nothing with twice the RAM and twice the cores and twice the disks.</p>

<p>The reason that this app couldn't scale is because it used not only a shared DB (which is very very common) it required filesystem use and thus needed a shared filesystem.  So, how do you fix that without modifying the app?  You study the app and look for patterns of use that can be exploited.</p>

<p>First we looked at the database.  In this case, it was not being pushed very hard.  We could easily handle a tenfold increase in traffic without exhausting database resources...  That was a relief, because scaling a database "behind the scenes" without any application access can be more than a few hour exercise.  Next we found that the app itself (PHP) was taxing memory, CPUs and disk I/O pretty heavily.  The most important was memory and CPU, but disk I/O was a close second.  This meant that if we just installed the app on another machine and NFS exported the first machine's mounts, it would "work" but not achieve out performance requirements because of I/O saturation.  Quick testing in this arena showed about 15% increase in capacity -- just not enough.</p>

<p>So, this app needs a shared FS.  Why?  Well the user uploads assets, and then through the life of their session, the app serves them back to that user.  EASY, session sticky load balancing (by source IP or by introduced cookie on the load balancer).  Because of the nature of this app, session sticky load balancing produced extremely inequitable load distribution and we would have had to bump up to three servers.  Not ideal, but acceptable -- this is triage.  One step forward, flat on our face:  it appears that under certain circumstances, the images I upload are served to another.</p>

<p>So, basically, all I need is to glue the static assets (uploaded by users) together under a common URL (and push 200Mbs or so).  Some assets are on one server, some on another, and I have no way of knowing which server owns the asset without looking in the FS... or asking over HTTP and getting a 404 back.</p>

<p>I just happen to have a <a href="http://varnish.projects.linpro.no/">Varnish</a> instance to provide content acceleration for other bits of infrastructure.  And Varnish has (as its major selling point, IMO) the VCL language that allows me to script how it handles requests and satisfies them.</p>

<p>If I get a request, I want to try server one, if I get a 404, I'd like to retry the request against server two.  As the number of servers goes up, this solution completely falls apart as the 404 isn't that cheap.  I want it fast, efficient, and it'd be great to cache it.  If it isn't fast and efficient, I've simply moved my problem instead of addressing it.  This works well because serving a 404 on server one is cheap.  Remember, triage.</p>

<pre>
backend obscuredserver1 {
  .host = "10.225.209.89";
  .port = "80";
}
backend obscuredserver2 {
  .host = "10.225.209.90";
  .port = "80";
}

sub vcl_recv {
  if (req.http.host ~ "^fqdn\.of\.caching\.server$") {
    if (req.restarts == 0) {
      set req.backend = obscuredserver1;
    } else {
      set req.backend = obscuredserver2;
    }
  }
  if (req.request != "GET" &amp;&amp; req.request != "HEAD") {
    pipe;
  }
  lookup;
}

sub vcl_fetch {
  if (req.http.host ~ "^fqdn\.of\.caching\.server$" &amp;&amp;
      req.restarts == 0 &amp;&amp; obj.status == 404) {
    restart;
  }
  if (!obj.cacheable) {
    pass;
  }
  if (obj.http.Set-Cookie) {
    pass;
  }
  set obj.prefetch = -30s;
  deliver;
}
</pre>

<p>Now, this is a excerpt, my varnishes here have some other logic for other services that I can't share... However, they are rather lightly used.  That particular instance went from serving an average of 6 Mbits/second to peaking at 200 Mbits/second.  And the system load jumped from 0.01 to 0.06.  It's nice when a triage exercise results in a quick hack that doesn't bust at the seams -- we've got plenty of headroom.</p>

<p>While I, in no way, consider this successful scaling.  I consider it successful triage by creative engineering (a.k.a. hack).  And for those that like pretty pictures, these demonstrate that when you encounter capacity issues, it isn't always pretty and graceful.  <a href="http://en.wikipedia.org/wiki/Queueing_theory">Queueing theory</a> is complicated and sometimes results in everyone getting screwed.  Here's a visualization of queueing theory making trouble.</p>

<br/>
<div style="text-align: center; border: 1px solid #666; padding: 1em;">
<img src="http://images.omniti.net/www.lethargy.org/%7Ejesus/misc/bad%20days.png" height="196" width="450" /><br />
Queueing theory rears its ugly head
</div>
<br/><br/>
<div style="text-align: center; border: 1px solid #666; padding: 1em;">
<img src="http://images.omniti.net/www.lethargy.org/%7Ejesus/misc/good%20days.png" height="199" width="450" /><br />
What it looks like with some headroom.
</div> 
            </div>
        </content>

        
    </entry>
    <entry>
        <link href="http://www.lethargy.org/~jesus/archives/129-OpenSSH-and-SecurID,-still-a-good-choice..html" rel="alternate" title="OpenSSH and SecurID, still a good choice." type="text/html" />
        <author>
            <name>Theo Schlossnagle</name>
                    </author>
    
        <issued>2008-09-02T15:01:47Z</issued>
        <created>2008-09-02T15:01:47Z</created>
        <modified>2008-09-03T11:45:16Z</modified>
        <wfw:comment>http://www.lethargy.org/~jesus/wfwcomment.php?cid=129</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.lethargy.org/~jesus/rss.php?version=atom0.3&amp;type=comments&amp;cid=129</wfw:commentRss>
    
        <id>http://www.lethargy.org/~jesus/archives/129-guid.html</id>
        <title mode="escaped" type="text/html">OpenSSH and SecurID, still a good choice.</title>
        <content type="application/xhtml+xml" xml:base="http://www.lethargy.org/~jesus/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>A long time ago, I wrote integration into the portable version of OpenSSH to allow direct authentication against an RSA ACE (SecurID) server. I've received many thanks over time for the work and I'm aware that it is used at some (very large) organizations. However, as with most security related things, people tend not to talk about what they do. As it is open source and no registration is required to download the patch, I think I might have underestimated the deployments.</p>

<p>Quite some time ago, Jim Matthews over at NASA took over maintenance of the patch. This sort of seamless transition of ownership is why I really love open source. Jim does a great job.</p>

<p>Since that patch's inception, it has been hosted on my <a href="http://lethargy.org/%7Ejesus/projects/">old static projects page</a>. That meant that James has to send me a copy to post every time a new version of the patch came out. How 1998. Anyway, since <a href="http://omniti.com/">we</a> went through all the effort of setting up <a href="https://labs.omniti.com/">open source hosting</a>, how about I use it!  The <a href="https://labs.omniti.com/trac/openssh-securid">OpenSSH+SecurID</a> integration effort has moved to labs!  Get your one-time-password, two-factor security while it's hot!</p> 
            </div>
        </content>

        
    </entry>
    <entry>
        <link href="http://www.lethargy.org/~jesus/archives/128-XMLXSLT-and-DocBook-for-docs.html" rel="alternate" title="XML/XSLT and DocBook for docs" type="text/html" />
        <author>
            <name>Theo Schlossnagle</name>
                    </author>
    
        <issued>2008-08-31T16:01:28Z</issued>
        <created>2008-08-31T16:01:28Z</created>
        <modified>2008-09-02T16:45:42Z</modified>
        <wfw:comment>http://www.lethargy.org/~jesus/wfwcomment.php?cid=128</wfw:comment>
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://www.lethargy.org/~jesus/rss.php?version=atom0.3&amp;type=comments&amp;cid=128</wfw:commentRss>
    
        <id>http://www.lethargy.org/~jesus/archives/128-guid.html</id>
        <title mode="escaped" type="text/html">XML/XSLT and DocBook for docs</title>
        <content type="application/xhtml+xml" xml:base="http://www.lethargy.org/~jesus/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                I've been writing docs for <a href="https://labs.omniti.com/trac/reconnoiter">Reconnoiter</a>. I selected <a href="http://www.docbook.org/">DocBook</a> for two reasons. First, I hoped that number of polished documents I've seen written in DocBook would mean that if this manual grows in size and usefulness we might be able to achieve some polish "on the cheap." Second, our <a href="https://labs.omniti.com/">open-source site</a> has a really nice automated systems for auto-publishing project documentation... if it is in DocBook. That said, DocBook is a complete pain in the ass. It isn't broken or bad, but it really gets in the way of writing the documentation. There are so many marks, and their use is specific and contextual. I understand that there is a reason for all the marks (provide semantic meaning to what you write), but you must be fluent with the entire specification and practiced to achieve anything useful with DocBook.<br /><br />The fact that DocBook uses <a href="http://www.w3.org/XML/">XML</a> is tiresome. XML itself isn't bad. Despite my extreme ineptitude and writing XML that will <a href="http://en.wikipedia.org/wiki/Lint_programming_tool">lint</a>, I'm rather fond of XML. It just so happens that because I'm fond of XML, the software product I'm using leverage XML in configuration files and support files. This leaves me in the painful position of documenting XML in XML and now I have all sorts of escaping requirements that I'd like to not use CDATA for (cause I want to lint them).<br /><br />Now, enter the next phase of inconvenience (read: torture). Because Reconnoiter is modular, the documentation for the modules needs to be programmatically accessible to assist with online configuration validation. To achieve this, we choose to put the module docs right next to the module itself and from there we produce DocBook snippets for inclusion in the reference manual.  The module documentation is in XML, the configuration of the module is in XML, the configuration of Reconnoiter is in XML, DocBook is in XML... We just need to take them all and compose documentation (with all the right escaping). Enter <a href="http://www.w3.org/XML/">XSLT</a>: a tool of torture. Now, I'm intimately familiar with the inner workings of XSLT transforms from the C side hving worked extensively on <a href="https://labs.omniti.com/trac/fastxsl">FastXSL for PHP</a>, but actually writing XSL documents is something I strive to avoid.  This conflicts with one of my core principles: "use the right tool for the job." The entire purpose of XSL is to translate XML documents into other documents (XML being a first-class target). XSLT it is.<br /><br />I'm left in a position of documenting a component of the system in XML (easy enough) and then writing XML to run on the first XML (which contains both raw docbook XML snipets that cannot be escaped as well as XML configuration snipets which must be escaped) to produce a second XML to be included by a larger XML DocBook document. This now conflicts with another of my core principles: "<a href="http://simple.wikipedia.org/wiki/K.I.S.S.">K.I.S.S.</a>" (I'll note the wikipedia entry says it's used on the Internet in a way that implies it started there.  This term far far predats the Internet. Oh, and the last S is definitely "Stupid").<br /><br />Now, I don't much like DocBook because of my lack of fluency and its interruptive influence on the process of writing documentation. This is mostly my shortcoming, not DocBook's. I never can seem to write an XML document that lints the first time around... Again, my shortcoming, not XMLs.  XSLT is an "ornate, complexly syntaxed, functionally limited shortcoming." I really hate XSLT.  <a href="http://wiki.theory.org/YourLanguageSucks#XSLT.2FXPath_sucks_because:">Here are someone else's reasons</a>.  They are good, but mine reason is that my tasks are usually simple and there is no simple variant of XSLT that can do the job; i.e. the jobs I do are simple and I think XSLT's cost (learning) rarely outweighs the value.<br /><br />This makes me think that most documentations should be written by a tag-team.  A documentation writer that writes in something like <a href="http://perldoc.perl.org/perlpod.html">POD</a> (the ultimate in K.I.S.S.) and a documentation compiler that consumes that and produces all the required DocBook stuff.  Within a company, it's easy to put this process in place, but it's hard to get this sort of collaboration on open-source projects.<br /><br />It's hard enough to get an engineer to write good documentation.  Painful, persistent and minor technical obstacles really don't help.  There should be a really kick-ass opensource docbook editor for technical manuals that integrates with subversion and mult-file layouts.  This won't ever make XSLT better, but it would sure allow engineers to concentrate on content instead of markup.  Anyone know of one?<br /> 
            </div>
        </content>

        
    </entry>
    <entry>
        <link href="http://www.lethargy.org/~jesus/archives/127-My-favorite-cookbook.html" rel="alternate" title="My favorite cookbook" type="text/html" />
        <author>
            <name>Theo Schlossnagle</name>
                    </author>
    
        <issued>2008-08-27T21:43:57Z</issued>
        <created>2008-08-27T21:43:57Z</created>
        <modified>2008-08-28T12:39:34Z</modified>
        <wfw:comment>http://www.lethargy.org/~jesus/wfwcomment.php?cid=127</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.lethargy.org/~jesus/rss.php?version=atom0.3&amp;type=comments&amp;cid=127</wfw:commentRss>
    
        <id>http://www.lethargy.org/~jesus/archives/127-guid.html</id>
        <title mode="escaped" type="text/html">My favorite cookbook</title>
        <content type="application/xhtml+xml" xml:base="http://www.lethargy.org/~jesus/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Many people say that their favorite cookbook is <a href="http://www.amazon.com/gp/product/0026045702?ie=UTF8&tag=lethargy-20&amp;linkCode=as2&camp=1789&amp;creative=9325&amp;creativeASIN=0026045702">Joy of Cooking</a><img src="http://www.assoc-amazon.com/e/ir?t=lethargy-20&l=as2&amp;o=1&amp;a=0026045702" alt="" style="border: medium none  ! important; margin: 0px ! important;" border="0" height="1" width="1" />.  I love that cookbook, it is excellent.  However, when it comes to just getting the job done, I find the ultimate reference manual to be <a href="http://www.amazon.com/gp/product/0824102878?ie=UTF8&tag=lethargy-20&amp;linkCode=as2&camp=1789&amp;creative=9325&amp;creativeASIN=0824102878">The Original Fannie Farmer 1896 Cookbook: The Boston Cooking School</a><img src="http://www.assoc-amazon.com/e/ir?t=lethargy-20&l=as2&amp;o=1&amp;a=0824102878" alt="" style="border: medium none  ! important; margin: 0px ! important;" border="0" height="1" width="1" /></p><br /><br /><p>Just thought I'd share.</p> 
            </div>
        </content>

        
    </entry>
    <entry>
        <link href="http://www.lethargy.org/~jesus/archives/126-Sweet-Shrimp-Goulash.html" rel="alternate" title="Sweet Shrimp Goulash" type="text/html" />
        <author>
            <name>Theo Schlossnagle</name>
                    </author>
    
        <issued>2008-08-27T19:11:25Z</issued>
        <created>2008-08-27T19:11:25Z</created>
        <modified>2008-08-29T08:13:44Z</modified>
        <wfw:comment>http://www.lethargy.org/~jesus/wfwcomment.php?cid=126</wfw:comment>
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://www.lethargy.org/~jesus/rss.php?version=atom0.3&amp;type=comments&amp;cid=126</wfw:commentRss>
    
        <id>http://www.lethargy.org/~jesus/archives/126-guid.html</id>
        <title mode="escaped" type="text/html">Sweet Shrimp Goulash</title>
        <content type="application/xhtml+xml" xml:base="http://www.lethargy.org/~jesus/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Okay, it's not quite Goulash, but I'll call it what I want.  If you want it red, add some paprika.</p>

<p>I made this the other night and it worked well for me.</p>

<h3>Glaze:</h3>

<ul>
<li>1/2 cup of rice wine vinegar</li>
<li>2 tbsp of honey</li>
<li>1/3 tbsp of lemon juice</li>
</ul>

<p>Bring to boil and reduce to coat the back of a spoon.</p>

<h3>Goulash</h3>

<ul>
<li>1 red onion chopped large</li>
<li>6 cloves are garlic shredded or pressed</li>
<li>3 jalepenos sliced (seeds in)</li>
<li>2 thai chilis sliced (seeds in)</li>
<li>3 table spoons of vegetable oil</li>
</ul>

<p>Sweat the the above until onions loose their sharpness (not yet translucent).  Immediately add:</p>

<ul>
<li>4 cups of assorted exotic mushrooms (shitake and others to liking)</li>
</ul>

<p>Cook until mushrooms take on juices and onions are translucent.  Immediately add:</p>

<ul>
<li>1 lbs of 26-30 count shrimp, pealed, tails off</li>
</ul>

<p>Once shrimp are pink evenly add glaze. Cook until shrimp are done (30 seconds or so past pink).</p>

<p>Enjoy!  It has some bite.</p> 
            </div>
        </content>

        
    </entry>
    <entry>
        <link href="http://www.lethargy.org/~jesus/archives/125-Varnish,-get-your-patch-on..html" rel="alternate" title="Varnish, get your patch on." type="text/html" />
        <author>
            <name>Theo Schlossnagle</name>
                    </author>
    
        <issued>2008-08-11T01:50:00Z</issued>
        <created>2008-08-11T01:50:00Z</created>
        <modified>2008-08-11T01:50:00Z</modified>
        <wfw:comment>http://www.lethargy.org/~jesus/wfwcomment.php?cid=125</wfw:comment>
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://www.lethargy.org/~jesus/rss.php?version=atom0.3&amp;type=comments&amp;cid=125</wfw:commentRss>
    
        <id>http://www.lethargy.org/~jesus/archives/125-guid.html</id>
        <title mode="escaped" type="text/html">Varnish, get your patch on.</title>
        <content type="application/xhtml+xml" xml:base="http://www.lethargy.org/~jesus/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p><a href="http://varnish.projects.linpro.no/">Varnish</a> is a "bad ass" new HTTP caching accelerator.  It's developed by <a href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/misc.html#BIKESHED-PAINTING">some crufty old BSD hacker</a> and has a lot of Linux users.  By and large, it has ignored Solaris.  This sort of neglect isn't malicious, it is just neglect... you know: "out of sight, out of mind."</p>

<p>Well, check out <a href="http://varnish.projects.linpro.no/svn/trunk/varnish-cache/">Varnish trunk</a> and give <a href="http://lethargy.org/%7Ejesus/misc/varnish-solaris-trunk-3071.diff">this patch</a> a spin.  Let me know what you think.</p>

<p>Perhaps one day, the Solaris networking team (or someone else) will satisfy this pretty abysmal shortcoming: <a href="http://bugs.opensolaris.org/view_bug.do?bug_id=4641715">BugID 4641715</a>.</p> 
            </div>
        </content>

        
    </entry>
    <entry>
        <link href="http://www.lethargy.org/~jesus/archives/124-BWPUG-The-essential-PostgreSQL.conf.html" rel="alternate" title="BWPUG: The essential PostgreSQL.conf" type="text/html" />
        <author>
            <name>Theo Schlossnagle</name>
                    </author>
    
        <issued>2008-08-08T17:55:44Z</issued>
        <created>2008-08-08T17:55:44Z</created>
        <modified>2008-08-08T17:55:44Z</modified>
        <wfw:comment>http://www.lethargy.org/~jesus/wfwcomment.php?cid=124</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.lethargy.org/~jesus/rss.php?version=atom0.3&amp;type=comments&amp;cid=124</wfw:commentRss>
    
        <id>http://www.lethargy.org/~jesus/archives/124-guid.html</id>
        <title mode="escaped" type="text/html">BWPUG: The essential PostgreSQL.conf</title>
        <content type="application/xhtml+xml" xml:base="http://www.lethargy.org/~jesus/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Howdy folks,</p>

<p>This is a reminder that our monthly meetup is scheduled to take place this coming MONDAY, August 11th.  As requested, we've moved the meetings from Wednesday to Monday to facilitate some of the would-be-attendees that have contacted me out of band.</p>

<p>This month's presentation is titled "The essential PostgreSQL.conf". With almost 200 configuration parameters, some people might think the postgresql.conf is a bit heady, but the truth is there are only about 2 dozen that you really need for everyday use. This talk will discuss the different types of configuration settings, and give an overview of the ones you'll want to know when running PostgreSQL. Speakers for the talk are Greg Smith, Software Engineer at Truviso, and Robert Treat, Database Architect at OmniTI.</p>

<p>Look forward to seeing you all there!</p>

<pre>
2008-08-11 @ 6:30pm
OmniTI
7070 Samuel Morse Dr. Ste 150
Columbia, MD 21046
</pre>

<p>Best regards,</p>

<p>Theo</p>
 
            </div>
        </content>

        
    </entry>
    <entry>
        <link href="http://www.lethargy.org/~jesus/archives/123-OSCON2008-Presentation.html" rel="alternate" title="OSCON2008 Presentation" type="text/html" />
        <author>
            <name>Theo Schlossnagle</name>
                    </author>
    
        <issued>2008-07-24T07:58:09Z</issued>
        <created>2008-07-24T07:58:09Z</created>
        <modified>2008-07-24T07:58:09Z</modified>
        <wfw:comment>http://www.lethargy.org/~jesus/wfwcomment.php?cid=123</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.lethargy.org/~jesus/rss.php?version=atom0.3&amp;type=comments&amp;cid=123</wfw:commentRss>
    
        <id>http://www.lethargy.org/~jesus/archives/123-guid.html</id>
        <title mode="escaped" type="text/html">OSCON2008 Presentation</title>
        <content type="application/xhtml+xml" xml:base="http://www.lethargy.org/~jesus/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Hello from OSCON.  I gave my full-stack introspection crash course talk today.  It has been quite a while since I've presented anything in a 40 minute format, but I think the talk went quite well.  I got a lot of positive feedback.</p>

<p>I decided to take a risky approach inspired by <a href="http://wikis.sun.com/display/DTrace/dtrace.conf">dtrace.conf(08)</a> by demonstrating dtrace on a live, mission-critical system we run at <a href="http://omniti.com/">OmniTI</a>.  The risks of this are: network connections flake out, dtrace doesn't work correctly or I do something stupid and cause some service unavailability.  Well, as I use dtrace just about every day, I wasn't worried about the breaking things.  And while my network connection winked out for about one minute and dtrace has some <a href="http://forums.sun.com/thread.jspa?messageID=10099871">annoying <b>sub-second</b> aborts</a>, I think the demonstration was quite effective.</p>

<p>Many people gave positive commentary at the end and afterward.  People asked for the slide to be put online... and while they have no real content of value (as the demo was everything), I put them here anyway:</p>

<div style="width:425px;text-align:left" id="__ss_526241"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/guestaeae3b/oscon2008-fullstack-introspection-crash-course?src=embed" title="OSCON2008 Full-stack Introspection Crash Course">OSCON2008 Full-stack Introspection Crash Course</a><div class="youtube-video"><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slideshare.net/swf/ssplayer2.swf?doc=oscon2008-1216885292078669-8"> </param><param name="allowFullScreen" value="true"> </param><param name="allowScriptAccess" value="always"> </param><embed src="http://static.slideshare.net/swf/ssplayer2.swf?doc=oscon2008-1216885292078669-8" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"> </embed></object></div><div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">view <a href="http://www.slideshare.net/guestaeae3b/oscon2008-fullstack-introspection-crash-course?src=embed" title="View OSCON2008 Full-stack Introspection Crash Course on SlideShare">presentation</a> (tags: <a style="text-decoration:underline;" href="http://slideshare.net/tag/oscon">oscon</a> <a style="text-decoration:underline;" href="http://slideshare.net/tag/dtrace">dtrace</a>)</div></div>

<p>In addtion to the slide stack, I've included the simple scripts that I used during the demonstration.  I ran
<a href="http://www.lethargy.org/~jesus/misc/oscon2008/qps.d">qps.d</a>,
<a href="http://www.lethargy.org/~jesus/misc/oscon2008/query_speed.d">query_speed.d</a>, and
<a href="http://www.lethargy.org/~jesus/misc/oscon2008/query_speed2.d">query_speed2.d</a> on the database server and
<a href="http://www.lethargy.org/~jesus/misc/oscon2008/r3.sh">r3.sh</a>,
<a href="http://www.lethargy.org/~jesus/misc/oscon2008/perl.d">perl.d</a>,
<a href="http://www.lethargy.org/~jesus/misc/oscon2008/pcpu.d">pcpu.d</a>,
<a href="http://www.lethargy.org/~jesus/misc/oscon2008/papcpu.d">papcpu.d</a>, and
<a href="http://www.lethargy.org/~jesus/misc/oscon2008/papcpu2.d">papcpu2.d</a> on the web server.  These require The Devel::DTrace perl module, <a href="http://labs.omniti.com/trac/project-dtrace/browser/trunk/postgresql">PostgreSQL patches</a>, and <a href="http://labs.omniti.com/trac/project-dtrace/browser/trunk/apache22">Apache 2.2.8 patches</a>.  Some of them are approximations of correctness, so weigh the output appropriately (the perl ones).  Enjoy!</p> 
            </div>
        </content>

        
    </entry>
</feed>