<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Segment7: Robot Co-op Software</title>
    <link>http://blog.segment7.net/articles/2006/03/20/robot-co-op-software</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>The Blog</description>
    <item>
      <title>Robot Co-op Software</title>
      <description>&lt;p&gt;I&amp;#8217;ve seen a lot of comments asking for information on our software setup, so here it is.  If you&amp;#8217;d like more detail just ask, I&amp;#8217;ll fill you in as best I can either in a comment or in a future post.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;&lt;span class="caps"&gt;UPDATE&lt;/span&gt;&lt;/strong&gt;: Added link to Wikipedia&amp;#8217;s MySQL configuration&lt;/p&gt;
&lt;p&gt;All our online machines run &lt;a href="http://www.freebsd.org"&gt;FreeBSD&lt;/a&gt; 6.0-RELEASE.  We use &lt;a href="http://www.amanda.org/"&gt;Amanda&lt;/a&gt; for backups which gets rsynced off-site.  &lt;a href="http://subversion.tigris.org/"&gt;Subversion&lt;/a&gt; is used for revision control of all our configuration data.&lt;/p&gt;


	&lt;p&gt;We have our own &lt;a href="http://www.freshports.org/net/cvsup-mirror/"&gt;CVSup mirror&lt;/a&gt; and package build machine which builds packages for all our boxes to keep things in-sync and to decrease the load on FreeBSD&amp;#8217;s CVSup mirrors.  We also &lt;span class="caps"&gt;NFS&lt;/span&gt;-mount the src and ports directories to reduce wasted disk space.  &lt;a href="http://sourceforge.net/projects/portaudit/"&gt;portaudit&lt;/a&gt; is used for vulnerability monitoring and &lt;a href="http://www.freebsddiary.org/portupgrade.php"&gt;portupgrade&lt;/a&gt; for performing package upgrades.&lt;/p&gt;


	&lt;p&gt;Critical processes are watched by &lt;a href="http://siag.nu/dwatch/"&gt;dwatch&lt;/a&gt;.  Clocks are synchronized with &lt;a href="http://www.ntp.org/"&gt;ntpd&lt;/a&gt;.&lt;/p&gt;


&lt;h3&gt;Webservers (x4)&lt;/h3&gt;

	&lt;p&gt;The webservers all run &lt;span class="caps"&gt;PAE&lt;/span&gt; kernels with 6GB of ram.  2GB is allocated to memcached and the rest gets chewed up by Rails processes.  Each of our sites gets its own set of processes and we have 25 total Rails processes running per host.&lt;/p&gt;


	&lt;p&gt;For pages our webservers are all &lt;a href="http://httpd.apache.org/"&gt;Apache 1.3&lt;/a&gt; with &lt;a href="http://www.fastcgi.com/"&gt;mod_fastcgi&lt;/a&gt;.  Apache logs are rotated by &lt;a href="http://cronolog.org/"&gt;cronolog&lt;/a&gt; and processed by &lt;a href="http://awstats.sourceforge.net/"&gt;AWStats&lt;/a&gt; (but I might switch to &lt;a href="http://www.hping.org/visitors/"&gt;Visitors&lt;/a&gt;).&lt;/p&gt;


	&lt;p&gt;We&amp;#8217;re using &lt;a href="http://www.rubyonrails.org/"&gt;Rails&lt;/a&gt; (of course) to generate our pages.  We use a library very similar to &lt;a href="http://dev.robotcoop.com/Libraries/cached_model/index.html"&gt;CachedModel&lt;/a&gt; to fetch ActiveRecord objects out of &lt;a href="http://www.danga.com/memcached/"&gt;memcached&lt;/a&gt;.  We don&amp;#8217;t use any page or fragment caching.&lt;/p&gt;


	&lt;p&gt;For images our webservers are &lt;a href="http://www.webrick.org/"&gt;WEBrick&lt;/a&gt; using a Ruby &lt;a href="http://www.danga.com/mogilefs/"&gt;MogileFS&lt;/a&gt; library I wrote (but have not yet released).  Image resizing is performed by &lt;a href="http://rmagick.rubyforge.org/"&gt;RMagick&lt;/a&gt;, occasionally on-the-fly.&lt;/p&gt;


	&lt;p&gt;We use the &lt;a href="http://www.freshports.org/lang/ruby18-nopthreads/"&gt;lang/ruby18-nopthreads&lt;/a&gt; port of Ruby because we experienced an incredible load increase with the default pthread version.&lt;/p&gt;


	&lt;p&gt;Each machine runs memcached with 2GB of cache (so be sure to set &lt;tt&gt;kern.maxdsiz&lt;/tt&gt; and &lt;tt&gt;kern.maxssiz&lt;/tt&gt; in /boot/loader.conf appropriately).  We store sessions, ActiveRecords and random other expensive-to-compute data in memcache.&lt;/p&gt;


	&lt;p&gt;Each machine is a MogileFS tracker node and file store.  All our images get stored in MogileFS.  We use &lt;span class="caps"&gt;NFS&lt;/span&gt; mode due to problems with components of Perlbal on FreeBSD.  (With the way we&amp;#8217;ve implemented image serving and FreeBSD&amp;#8217;s &lt;span class="caps"&gt;NFS&lt;/span&gt; implementation it works out fine.)&lt;/p&gt;


	&lt;p&gt;Our webservers all run sendmail set up as a smart host pointing to a machine running &lt;a href="http://www.postfix.org/"&gt;postfix&lt;/a&gt;.  This keeps outbound mail sending fast and reduces the amount of maintenance.&lt;/p&gt;


&lt;h3&gt;Database&lt;/h3&gt;

	&lt;p&gt;We have one database server, it runs MySQL 4.1.x and isn&amp;#8217;t all that special.  Bob tuned it based on &lt;a href="http://wikipedia.org/"&gt;Wikipedia&lt;/a&gt;&amp;#8217;s &lt;a href="http://wp.wikidev.net/Ariel_MySQL_configuration"&gt;MySQL configuration&lt;/a&gt;.&lt;/p&gt;


&lt;h3&gt;Miscellaneous&lt;/h3&gt;

	&lt;p&gt;We have one machine that does miscellaneous jobs.  It runs postfix for inbound and outbound mail, runs crons that update memcached, analyzes log files and a small handful of other unimportant things.&lt;/p&gt;</description>
      <pubDate>Mon, 20 Mar 2006 11:28:00 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:64473ad3-dd95-4039-aa52-034c94941a74</guid>
      <author>drbrain@segment7.net (Eric Hodel)</author>
      <link>http://blog.segment7.net/articles/2006/03/20/robot-co-op-software</link>
      <category>Robot Co-op</category>
    </item>
    <item>
      <title>"Robot Co-op Software" by Greg</title>
      <description>&lt;p&gt;Why are you using WEBrick to serve your images (why not something else)? I&amp;#8217;d be really interested in your feedback on that because I&amp;#8217;ll be needing to do something similar.&lt;/p&gt;</description>
      <pubDate>Wed, 22 Mar 2006 11:30:28 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:ba4d4968-d244-417e-8715-72352a4154cc</guid>
      <link>http://blog.segment7.net/articles/2006/03/20/robot-co-op-software#comment-129</link>
    </item>
    <item>
      <title>"Robot Co-op Software" by Eric Hodel</title>
      <description>&lt;p&gt;I just added a new post about &lt;a href="http://blog.segment7.net/articles/2006/03/21/version-control-and-sysadmin" rel="nofollow"&gt;Version Control and Sysadmin&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Tue, 21 Mar 2006 10:43:29 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:ec660d5f-c71e-4215-bf44-dcfbbfd46201</guid>
      <link>http://blog.segment7.net/articles/2006/03/20/robot-co-op-software#comment-120</link>
    </item>
    <item>
      <title>"Robot Co-op Software" by http://blog.inlet-media.de</title>
      <description>&lt;p&gt;Can you tell me how you use Subversion for version control your configuration data? Did you commit the whole /etc directory?&lt;/p&gt;</description>
      <pubDate>Tue, 21 Mar 2006 08:19:46 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:86a34362-7092-47f1-80bf-74ab16b55de9</guid>
      <link>http://blog.segment7.net/articles/2006/03/20/robot-co-op-software#comment-118</link>
    </item>
    <item>
      <title>"Robot Co-op Software" by James</title>
      <description>&lt;p&gt;&lt;a href="http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/GraphicsMagick/" rel="nofollow"&gt;http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/GraphicsMagick/&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Mon, 20 Mar 2006 18:46:47 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:49230ca9-4fed-495d-99a6-59d121c6011e</guid>
      <link>http://blog.segment7.net/articles/2006/03/20/robot-co-op-software#comment-116</link>
    </item>
    <item>
      <title>"Robot Co-op Software" by Eric Hodel</title>
      <description>&lt;p&gt;John: So far there isn&amp;#8217;t a port for GraphicsMagick in FreeBSD&amp;#8217;s ports tree, so I haven&amp;#8217;t even considered it.  We very rarely generate extra images and keep the generated images forever so I haven&amp;#8217;t worried about it.&lt;/p&gt;</description>
      <pubDate>Mon, 20 Mar 2006 17:15:17 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:3827c757-9526-43bf-a89a-9c7cdc298f2f</guid>
      <link>http://blog.segment7.net/articles/2006/03/20/robot-co-op-software#comment-115</link>
    </item>
    <item>
      <title>"Robot Co-op Software" by john</title>
      <description>&lt;p&gt;FWIW:  we use GraphicsMagick where I work, and it&amp;#8217;s much faster and more stable than ImageMagick.  it doesn&amp;#8217;t have all of the features as IM, but has all that we care about.&lt;/p&gt;


	&lt;p&gt;also, when compiled with gcc4, it gives us almost a 20% performance boost with running &amp;#8216;convert&amp;#8217; on large images.&lt;/p&gt;


	&lt;p&gt;you might not have a requirement to process images very fast, tho, since you mentioned that sometimes you&amp;#8217;re doing them on-the-fly.  :)&lt;/p&gt;</description>
      <pubDate>Mon, 20 Mar 2006 17:03:08 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:29c6915f-ae3c-4d9c-ae9f-b76867982646</guid>
      <link>http://blog.segment7.net/articles/2006/03/20/robot-co-op-software#comment-114</link>
    </item>
    <item>
      <title>"Robot Co-op Software" by Eric Hodel</title>
      <description>&lt;p&gt;Cesar: I use FreeBSD for everything.  I&amp;#8217;ll adhere to Don&amp;#8217;t Repeat Yourself and Ya&amp;#8217; Ain&amp;#8217;t Gonna Need It over switching to Linux for the DB.  It would just be too much work to need to upgrade the software twice.&lt;/p&gt;</description>
      <pubDate>Mon, 20 Mar 2006 16:06:15 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:e1284372-66a2-40cf-8e52-d4196492fd77</guid>
      <link>http://blog.segment7.net/articles/2006/03/20/robot-co-op-software#comment-113</link>
    </item>
    <item>
      <title>"Robot Co-op Software" by Cesar </title>
      <description>&lt;p&gt;Eric, do you use FreeBSD for MySQL? Have you tested Linux vs FreeBSD for database performance?, I&amp;#8217;ve heard that MySQL has performance problems on FreeBSD.&lt;/p&gt;</description>
      <pubDate>Mon, 20 Mar 2006 15:34:11 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:7f7af6ea-440c-4cab-90b2-5a7c69576424</guid>
      <link>http://blog.segment7.net/articles/2006/03/20/robot-co-op-software#comment-112</link>
    </item>
    <item>
      <title>"Robot Co-op Software" by Eric Hodel</title>
      <description>&lt;p&gt;Todd: So far we&amp;#8217;re using AWStats just for ballpark figures.&lt;/p&gt;</description>
      <pubDate>Mon, 20 Mar 2006 14:11:01 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:26d6abfe-7537-4125-9003-d0ad0da78207</guid>
      <link>http://blog.segment7.net/articles/2006/03/20/robot-co-op-software#comment-111</link>
    </item>
    <item>
      <title>"Robot Co-op Software" by Eric Hodel</title>
      <description>&lt;p&gt;Alex: No, but I did just see &lt;a href="http://journal.gleepglop.com/articles/2005/12/04/imagemagick-the-ruby-way" rel="nofollow"&gt;MiniMagick&lt;/a&gt;.  I&amp;#8217;ll check both of them out.&lt;/p&gt;</description>
      <pubDate>Mon, 20 Mar 2006 14:10:31 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:2f22ffc5-1469-4219-8232-891eeb1107d2</guid>
      <link>http://blog.segment7.net/articles/2006/03/20/robot-co-op-software#comment-110</link>
    </item>
    <item>
      <title>"Robot Co-op Software" by Alex</title>
      <description>&lt;p&gt;Have you looked at imlib2-ruby at all? [&lt;a href="http://www.pablotron.org/software/imlib2-ruby/doc/" rel="nofollow"&gt;http://www.pablotron.org/software/imlib2-ruby/doc/&lt;/a&gt;]. imlib2 is supposed to be an incredibly fast library. Perhaps you don&amp;#8217;t do enough image work for it to be worth it, but if it&amp;#8217;s less of a memory hog than rmagick then it might be very useful for any app that does a lot of image resizing or basic manipulation.&lt;/p&gt;</description>
      <pubDate>Mon, 20 Mar 2006 13:51:41 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:4cf84f23-4963-43a2-bb4f-702a12a3585d</guid>
      <link>http://blog.segment7.net/articles/2006/03/20/robot-co-op-software#comment-109</link>
    </item>
    <item>
      <title>"Robot Co-op Software" by Todd Huss</title>
      <description>&lt;p&gt;In my experience AwStats tends to really suffer from crawler inflation by overcount page views, unique visitors, and grossly overcounting referrals. Most log based analyzers overcount real user traffic. It&amp;#8217;s fine for ballpark stuff (which is good enough for most sites) but once a site gets big enough there&amp;#8217;s really no substitute for a good client based analytics solution like Google Analytics, Omniture, or Fireclick when it comes to accuracy.&lt;/p&gt;</description>
      <pubDate>Mon, 20 Mar 2006 13:33:27 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:7984123f-e340-46a3-9510-6a716a275771</guid>
      <link>http://blog.segment7.net/articles/2006/03/20/robot-co-op-software#comment-108</link>
    </item>
    <item>
      <title>"Robot Co-op Software" by Eric Hodel</title>
      <description>&lt;p&gt;Chadwick: Yes, we use trac internally.&lt;/p&gt;</description>
      <pubDate>Mon, 20 Mar 2006 13:14:40 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:a748ffe0-34c7-4b12-8d6e-5ca805f5f953</guid>
      <link>http://blog.segment7.net/articles/2006/03/20/robot-co-op-software#comment-107</link>
    </item>
    <item>
      <title>"Robot Co-op Software" by Chadwick</title>
      <description>&lt;p&gt;Thanks for posting this info Eric.  Also of note, didn&amp;#8217;t you once mention that you&amp;#8217;re using &lt;a href="http://www.edgewall.com/trac/" rel="nofollow"&gt;Trac&lt;/a&gt; for internal PM?&lt;/p&gt;</description>
      <pubDate>Mon, 20 Mar 2006 13:02:46 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:29607e5d-53de-408b-8631-2cf986709978</guid>
      <link>http://blog.segment7.net/articles/2006/03/20/robot-co-op-software#comment-106</link>
    </item>
  </channel>
</rss>
