<?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: RubyGems Beta Approaching</title>
    <link>http://blog.segment7.net/articles/2007/10/05/rubygems-beta-approaching</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>The Blog</description>
    <item>
      <title>RubyGems Beta Approaching</title>
      <description>&lt;p&gt;RubyGems 0.9.5 is almost done, and has loads of good stuff in it, including platform support and an improved indexer script:&lt;/p&gt;


&lt;blockquote cite="http://tomcopeland.blogs.com/juniordeveloper/2007/10/more-reliable-g.html"&gt;[W]e were rebuilding the gem index on RubyForge, [...] doing it &amp;#8220;in place&amp;#8221;, so that the current index would be overwritten and then populated over the course of the build.&amp;#160; These take a fair while &amp;#8211; 10 minutes or so &amp;#8211; and during that time the index was essentially empty.&amp;#160; Booooo.

	&lt;p&gt;Well, no longer.&amp;#160; Eric Hodel has twiddled the gem index builder to build it in a temporary directory and then move it in place.&amp;#160; So those gem index outages should be a thing of the past.&amp;#160; Thanks Eric!&lt;/blockquote&gt;&lt;/p&gt;


&lt;p style="text-align: right"&gt;&amp;mdash;&lt;a href="http://tomcopeland.blogs.com/juniordeveloper/2007/10/more-reliable-g.html"&gt;More reliable gem installs&lt;/a&gt; via &lt;a href="http://tomcopeland.blogs.com/juniordeveloper/"&gt;Junior developer&lt;/a&gt;

	&lt;p&gt;This will also reduce the number of bulk index updates dramatically, since it&amp;#8217;ll actually be there nearly all the time.&lt;/p&gt;


	&lt;p&gt;Also, &lt;a href="http://metaclass.org/"&gt;Wilson Bilkovich&lt;/a&gt; added a new Marshal formatted index that will reduce both bandwidth usage and memory consumption.  Instead of 120M or so it takes to do a bulk yaml index update, it takes about 30M with a Marshal index update.  You&amp;#8217;ll have to wait for the beta to test this one out, though.&lt;/p&gt;
</description>
      <pubDate>Fri, 05 Oct 2007 11:01:36 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:c067b8d3-9b35-472d-9f5a-6b3fa08014ae</guid>
      <author>drbrain@segment7.net (Eric Hodel)</author>
      <link>http://blog.segment7.net/articles/2007/10/05/rubygems-beta-approaching</link>
      <category>Ruby</category>
      <category>Rubygems</category>
    </item>
    <item>
      <title>"RubyGems Beta Approaching" by raggi</title>
      <description>&lt;p&gt;Quite right,&lt;/p&gt;


	&lt;p&gt;I have come across an interesting article on heap fragmentation in ruby [1], and thought &amp;#8220;hmm that&amp;#8217;s interesting, I wonder how fast that happens&amp;#8221;. I also quite a long time ago read _why&amp;#8217;s notes on ruby garbage collection [2], and in particular noticed the #define GC_MALLOC_LIMIT 8000000 he pointed out.&lt;/p&gt;


	&lt;p&gt;I haven&amp;#8217;t spent the time to look for a proper justification of my gut feeling, but I think maybe it&amp;#8217;s well worth calling the GC earlier rather than later, when you know you might be generating a lot of temporary objects. My second comment regarding running GC manually, was simply that it costs basically nothing to the application load time, but clears up a lot of space (particularly in this case).&lt;/p&gt;


	&lt;p&gt;[1] &lt;a href="http://zdavatz.wordpress.com/2007/07/18/heap-fragmentation-in-a-long-running-ruby-process/" rel="nofollow"&gt;http://zdavatz.wordpress.com/2007/07/18/heap-fragmentation-in-a-long-running-ruby-process/&lt;/a&gt;
[2] &lt;a href="http://whytheluckystiff.net/articles/theFullyUpturnedBin.html" rel="nofollow"&gt;http://whytheluckystiff.net/articles/theFullyUpturnedBin.html&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;:)&lt;/p&gt;</description>
      <pubDate>Mon, 08 Oct 2007 14:49:29 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:500dc655-4c43-4b55-b439-ea9c0fd2262a</guid>
      <link>http://blog.segment7.net/articles/2007/10/05/rubygems-beta-approaching#comment-781</link>
    </item>
    <item>
      <title>"RubyGems Beta Approaching" by Eric Hodel</title>
      <description>&lt;p&gt;Hrm, I should have run it.  I see:&lt;/p&gt;


&lt;pre&gt;#       strings_no_gems.log:            1833 bytes, change:      100%
#    strings_gems_no_gc.log:           38114 bytes, change:     2079%
#          strings_gems.log:           14877 bytes, change:       39%&lt;/pre&gt;

	&lt;p&gt;It looks like its largely interpreter created garbage which will be cleaned up as soon as the heap fills.&lt;/p&gt;</description>
      <pubDate>Mon, 08 Oct 2007 12:15:43 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:6a479c62-61aa-408f-850d-6d448f7d68d5</guid>
      <link>http://blog.segment7.net/articles/2007/10/05/rubygems-beta-approaching#comment-780</link>
    </item>
    <item>
      <title>"RubyGems Beta Approaching" by Eric Hodel</title>
      <description>&lt;p&gt;Yes, I saw that too, and even with GC.start right after require &amp;#8216;rubygems&amp;#8217; I get no difference in size.&lt;/p&gt;</description>
      <pubDate>Mon, 08 Oct 2007 12:11:53 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:678dc5b6-06d7-45e7-845e-a71559327be8</guid>
      <link>http://blog.segment7.net/articles/2007/10/05/rubygems-beta-approaching#comment-779</link>
    </item>
    <item>
      <title>"RubyGems Beta Approaching" by raggi</title>
      <description>&lt;p&gt;It&amp;#8217;s not requiring a specific gem that makes a difference, it&amp;#8217;s requiring rubygems itself (as shown by the test program I left on my blog).&lt;/p&gt;


	&lt;p&gt;I guess I&amp;#8217;ll just wait and have a look at the new release, then explain myself better if it&amp;#8217;s still there&amp;#8230;&lt;/p&gt;</description>
      <pubDate>Mon, 08 Oct 2007 11:31:14 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:a07d7c3b-0c72-4233-adac-9455904963e7</guid>
      <link>http://blog.segment7.net/articles/2007/10/05/rubygems-beta-approaching#comment-778</link>
    </item>
    <item>
      <title>"RubyGems Beta Approaching" by Eric Hodel</title>
      <description>&lt;p&gt;The Marshal index only affects operations with the `gem` command, unless you&amp;#8217;re using rubygems as a library and do a remote operation (installing a gem, listing remote gems, etc.).&lt;/p&gt;


&lt;p&gt;&lt;code&gt;require 'rubygems'&lt;/code&gt; now requires only classes it needs for #gem and #require to work, so without requiring any gems, RubyGems now adds about 1.5M on OS X.  Running GC.start makes no difference for me when requiring ActiveRecord with trunk RubyGems.&lt;/p&gt;</description>
      <pubDate>Fri, 05 Oct 2007 15:38:37 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:536cf0f8-059b-4eed-b1f0-cca679b9d223</guid>
      <link>http://blog.segment7.net/articles/2007/10/05/rubygems-beta-approaching#comment-776</link>
    </item>
    <item>
      <title>"RubyGems Beta Approaching" by raggi</title>
      <description>&lt;p&gt;This all sounds great, thanks :)&lt;/p&gt;


	&lt;p&gt;Does the new marshal index affect the loaded size at all?&lt;/p&gt;


	&lt;p&gt;I was doing some tests recently and found that the strings from loading rubygems don&amp;#8217;t generally get cleared prior to loading the rest of the application (as generally, GC.start doesn&amp;#8217;t get called, and it takes a while of loading to get above the malloc limit). I found it cut raw string memory usage by over half.&lt;/p&gt;


	&lt;p&gt;Test program and a few more minor details are here:
&lt;a href="http://blog.ra66i.org/archives/informatics/2007/10/05/calling-on-the-gc-after-rubygems/" rel="nofollow"&gt;http://blog.ra66i.org/archives/informatics/2007/10/05/calling-on-the-gc-after-rubygems/&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;On my development machine I have quite a lot of gems installed (I think?), around 150 or so. I&amp;#8217;ve added a GC.start call at the end of rubygems.rb locally, and found that I couldn&amp;#8217;t measure the affect on rubygems load times, yet I know it clears at least 45kb of strings out of memory on my machine (from a total of 98kb) (without facets installed, heh).&lt;/p&gt;</description>
      <pubDate>Fri, 05 Oct 2007 14:40:59 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:dfce9c7a-328f-49e0-8d4d-528689ba1c9b</guid>
      <link>http://blog.segment7.net/articles/2007/10/05/rubygems-beta-approaching#comment-775</link>
    </item>
    <item>
      <title>"RubyGems Beta Approaching" by Gavin Kistner</title>
      <description>&lt;p&gt;Ah, this will be nice. Thanks for the ongoing work!&lt;/p&gt;</description>
      <pubDate>Fri, 05 Oct 2007 11:06:43 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:932f9721-da71-4aa6-b303-78f7ce35ff72</guid>
      <link>http://blog.segment7.net/articles/2007/10/05/rubygems-beta-approaching#comment-774</link>
    </item>
  </channel>
</rss>
