<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Joel Collins</title>
    <description>Joel's Internet Thoughts</description>
    <link>http://joelcollinsdc.github.io/</link>
    <atom:link href="http://joelcollinsdc.github.io/feed.xml" rel="self" type="application/rss+xml" />
    <pubDate>Sat, 03 Aug 2024 17:04:22 +0000</pubDate>
    <lastBuildDate>Sat, 03 Aug 2024 17:04:22 +0000</lastBuildDate>
    <generator>Jekyll v3.9.5</generator>
    
      <item>
        <title>Useful tools: pt-archiver</title>
        <description>&lt;p&gt;If you have found yourself &lt;a href=&quot;https://blog.engineyard.com/2011/5-subtle-ways-youre-using-mysql-as-a-queue-and-why-itll-bite-you/&quot;&gt;using mysql as a job queue&lt;/a&gt;, eventually you have to deal with the unpleasantness of removing old data from your database.&lt;/p&gt;

&lt;p&gt;Don’t do this:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-sql&quot; data-lang=&quot;sql&quot;&gt;&lt;span class=&quot;k&quot;&gt;delete&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;tablename&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;where&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;created&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'whatever'&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Depending on your database, writes may get locked out and if nothing else your DBA’s will thank you for not making the mysql slaves lag behind master.&lt;/p&gt;

&lt;p&gt;A nice tool for jobs like this is Percona’s &lt;a href=&quot;https://www.percona.com/doc/percona-toolkit/2.1/pt-archiver.html&quot;&gt;pt-archiver&lt;/a&gt;.  Its a beautifully simple tool that does one thing and does it well.  It can move data out of your database efficiently and without negatively impacting app performance.&lt;/p&gt;

&lt;p&gt;I am using something like the following to archive data into a read only analytics database.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;pt-archiver &lt;span class=&quot;nt&quot;&gt;--source&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;... &lt;span class=&quot;nt&quot;&gt;--dest&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;... &lt;span class=&quot;nt&quot;&gt;--columns&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;just,the,ones,i,need &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
 &lt;span class=&quot;nt&quot;&gt;--limit&lt;/span&gt; 1000 &lt;span class=&quot;nt&quot;&gt;--commit-each&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--no-check-columns&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--where&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;1=1&quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Hope this helps someone find &lt;a href=&quot;https://www.percona.com/doc/percona-toolkit/2.1/pt-archiver.html&quot;&gt;pt-archiver&lt;/a&gt;.&lt;/p&gt;
</description>
        <pubDate>Wed, 07 Oct 2015 00:00:00 +0000</pubDate>
        <link>http://joelcollinsdc.github.io/2015/10/07/pt-archiver/</link>
        <guid isPermaLink="true">http://joelcollinsdc.github.io/2015/10/07/pt-archiver/</guid>
        
        
      </item>
    
      <item>
        <title>Vagrant Shared Folder (NFS / Rsync) Performance</title>
        <description>&lt;p&gt;Disclaimer… I’m still learning vagrant &amp;amp; virtualization.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;tl;dr version&lt;/em&gt;: If you need a large codebase accessible via your host, rsync isn’t ready yet and nfs isn’t lighting fast&lt;/p&gt;

&lt;p&gt;I’m spending the thanksgiving weekend trying to get a drupal vm setup using vagrant.  After several past weekends failing to learn chef and docker I think I’m making some progress, but I’m getting stuck on sharing folders with the host.  One of the major goals of this project was to allow developers to utilize IDEs on their host, so I wanted the bulk of the codebase to be accessible from the host.  For the weekend, I’m on my macbook but ideally this setup would work on windows hosts as well.  Unfortunately I think I’m stuck.&lt;/p&gt;

&lt;p&gt;At least in virtualbox, native shared folder performance is not acceptable for hosting the drupal profile that I want hosted.  (Depending on what is included, the codebase can be 50-100mb).  NFS sems acceptable, but not great.  Page load times are 5-10x slower than native.  I haven’t been able to test smb yet but I presume its similar.&lt;/p&gt;

&lt;p&gt;Rsync would seem like a good next step, as in theory the performance would be near native, but as of vagrant 1.6.5 there are &lt;a href=&quot;https://github.com/mitchellh/vagrant/issues/3249&quot;&gt;major issues&lt;/a&gt; with the rsync-auto job.  For now I’m considering either scrapping this for now or looking at some ability to toggle between the codebase living inside the virtual for performance or living on the host for debugging/ide capability.  Another thing I wanted to explore was having the code live in the virtual but use nfs to mount it on the host.&lt;/p&gt;
</description>
        <pubDate>Sat, 29 Nov 2014 00:00:00 +0000</pubDate>
        <link>http://joelcollinsdc.github.io/2014/11/29/vagrant-folder-performance/</link>
        <guid isPermaLink="true">http://joelcollinsdc.github.io/2014/11/29/vagrant-folder-performance/</guid>
        
        
      </item>
    
      <item>
        <title>Soylent</title>
        <description>&lt;p&gt;I finally got my 1 week supply of soylent from kickstarter last week.  I think the biggest advantage for me is the relative ease of tracking macros that is afforded if you replace an entire meal with soylent.  Unfortunatly the default soylent mixture is already too carb-heavy for my goals.&lt;/p&gt;

&lt;p&gt;My current daily targets are 145g protein / 75g fat / 200g carbs.  Soylent, assuming normal ration sizes, is 114g protein / 57g fat / 252g carbs.  Soylent has a &lt;a href=&quot;http://diy.soylent.me&quot;&gt;diy site&lt;/a&gt; that you can use to customize the mixture which looks interesting…&lt;/p&gt;

&lt;p&gt;As far as taste goes…  Its definitely not something to switch to just for the flavor.  I’d rate it 3 or 4 out of 10.  It basically tastes exactly what you would imagine an flavorless meal replacement to taste like.&lt;/p&gt;
</description>
        <pubDate>Mon, 29 Sep 2014 00:00:00 +0000</pubDate>
        <link>http://joelcollinsdc.github.io/2014/09/29/soylent/</link>
        <guid isPermaLink="true">http://joelcollinsdc.github.io/2014/09/29/soylent/</guid>
        
        
      </item>
    
      <item>
        <title>A Jekyll Blog</title>
        <description>&lt;p&gt;About time I started to blog, mostly to force myself to learn things and write about what I learn.  &lt;a href=&quot;http://www.jekyllrb.com&quot;&gt;Jekyll&lt;/a&gt; seems pretty intuitive so far.&lt;/p&gt;

&lt;p&gt;I wonder how tags work.  I’m reading about canoeing right now, so I’m tagging this blog post with canoeing.  But I don’t know how to link to it yet.&lt;/p&gt;

&lt;p&gt;I’m reading &lt;a href=&quot;(http://www.amazon.com/Canoe-Racing-Competitors-Marathon-Downriver/dp/094195037)&quot;&gt;Canoe Racing&lt;/a&gt; right now, its getting me pumped to learn how to make boats go fast.&lt;/p&gt;

</description>
        <pubDate>Mon, 28 Jul 2014 15:00:41 +0000</pubDate>
        <link>http://joelcollinsdc.github.io/2014/07/28/a-jekyll-blog/</link>
        <guid isPermaLink="true">http://joelcollinsdc.github.io/2014/07/28/a-jekyll-blog/</guid>
        
        <category>jekyll</category>
        
        <category>paddling</category>
        
        
      </item>
    
  </channel>
</rss>
