<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Making Ruby’s garbage collector copy-on-write friendly, part 3</title>
	<link>http://izumi.plan99.net/blog/index.php/2007/07/29/making-ruby%e2%80%99s-garbage-collector-copy-on-write-friendly-part-3/</link>
	<description>Ecchi nanowa ikenai to omoimasu</description>
	<pubDate>Sat, 05 Jul 2008 18:41:20 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: Why mod_rails is a really good thing for light-duty Ruby on Rails at Pervasive Code</title>
		<link>http://izumi.plan99.net/blog/index.php/2007/07/29/making-ruby%e2%80%99s-garbage-collector-copy-on-write-friendly-part-3/#comment-8496</link>
		<dc:creator>Why mod_rails is a really good thing for light-duty Ruby on Rails at Pervasive Code</dc:creator>
		<pubDate>Mon, 14 Apr 2008 20:30:28 +0000</pubDate>
		<guid>http://izumi.plan99.net/blog/index.php/2007/07/29/making-ruby%e2%80%99s-garbage-collector-copy-on-write-friendly-part-3/#comment-8496</guid>
		<description>[...] interesting alternative was some experimental hacking to MRI&#8217;s garbage collector by Hongli Lai, to store its working data separately from the objects being examined, so that preloaded Ruby code [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] interesting alternative was some experimental hacking to MRI&#8217;s garbage collector by Hongli Lai, to store its working data separately from the objects being examined, so that preloaded Ruby code [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 赖洪礼的 blog &#187; Making Ruby’s garbage collector copy-on-write friendly, part 4</title>
		<link>http://izumi.plan99.net/blog/index.php/2007/07/29/making-ruby%e2%80%99s-garbage-collector-copy-on-write-friendly-part-3/#comment-6797</link>
		<dc:creator>赖洪礼的 blog &#187; Making Ruby’s garbage collector copy-on-write friendly, part 4</dc:creator>
		<pubDate>Sat, 13 Oct 2007 20:54:42 +0000</pubDate>
		<guid>http://izumi.plan99.net/blog/index.php/2007/07/29/making-ruby%e2%80%99s-garbage-collector-copy-on-write-friendly-part-3/#comment-6797</guid>
		<description>[...] previous attempt implements the marking table with a set structure. In part 3, Dan42 said that I could use a bit field instead. The idea did occur to me in the past, but I [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] previous attempt implements the marking table with a set structure. In part 3, Dan42 said that I could use a bit field instead. The idea did occur to me in the past, but I [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hongli</title>
		<link>http://izumi.plan99.net/blog/index.php/2007/07/29/making-ruby%e2%80%99s-garbage-collector-copy-on-write-friendly-part-3/#comment-6793</link>
		<dc:creator>Hongli</dc:creator>
		<pubDate>Fri, 12 Oct 2007 09:12:07 +0000</pubDate>
		<guid>http://izumi.plan99.net/blog/index.php/2007/07/29/making-ruby%e2%80%99s-garbage-collector-copy-on-write-friendly-part-3/#comment-6793</guid>
		<description>Dan42, you're brilliant. Why haven't I thought of that. :D I might be able to put a marker bit field in each Ruby heap and use that as mark table instead. I'll give it a try when I have time.</description>
		<content:encoded><![CDATA[<p>Dan42, you&#8217;re brilliant. Why haven&#8217;t I thought of that. <img src='http://izumi.plan99.net/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> I might be able to put a marker bit field in each Ruby heap and use that as mark table instead. I&#8217;ll give it a try when I have time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan42</title>
		<link>http://izumi.plan99.net/blog/index.php/2007/07/29/making-ruby%e2%80%99s-garbage-collector-copy-on-write-friendly-part-3/#comment-6792</link>
		<dc:creator>Dan42</dc:creator>
		<pubDate>Fri, 12 Oct 2007 03:47:02 +0000</pubDate>
		<guid>http://izumi.plan99.net/blog/index.php/2007/07/29/making-ruby%e2%80%99s-garbage-collector-copy-on-write-friendly-part-3/#comment-6792</guid>
		<description>This is all very very interesting. I'm glad I'm not the only one with concerns about ruby's GC memory performance (or lack thereof). Fortunately, this had been fixed in ruby 1.9. Unfortunately, I'm not sure rails will ever be compatible with 1.9.

Have you considered using a large bitfield instead of a hash? If you have 3 chunks with n1, n2 and n3 objects you could allocate a (n1+n2+n3)-bit field (only 1 memory allocation!) and use that instead of FL_MARK. I don't think you can beat 1 bit per object.</description>
		<content:encoded><![CDATA[<p>This is all very very interesting. I&#8217;m glad I&#8217;m not the only one with concerns about ruby&#8217;s GC memory performance (or lack thereof). Fortunately, this had been fixed in ruby 1.9. Unfortunately, I&#8217;m not sure rails will ever be compatible with 1.9.</p>
<p>Have you considered using a large bitfield instead of a hash? If you have 3 chunks with n1, n2 and n3 objects you could allocate a (n1+n2+n3)-bit field (only 1 memory allocation!) and use that instead of FL_MARK. I don&#8217;t think you can beat 1 bit per object.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hongli</title>
		<link>http://izumi.plan99.net/blog/index.php/2007/07/29/making-ruby%e2%80%99s-garbage-collector-copy-on-write-friendly-part-3/#comment-6789</link>
		<dc:creator>Hongli</dc:creator>
		<pubDate>Thu, 11 Oct 2007 09:26:45 +0000</pubDate>
		<guid>http://izumi.plan99.net/blog/index.php/2007/07/29/making-ruby%e2%80%99s-garbage-collector-copy-on-write-friendly-part-3/#comment-6789</guid>
		<description>I haven't worked on this since July. I also tried to do the marking in a separate process in order not to touch the heap of the parent process, but performance degraded literally by a thousand fold (probably because of context switch overhead) so I gave up.

I've tested mongrel_light_cluster + patched Ruby on a small website, and so far it seems to work well (i.e. no stability problems). I've seen mongrel_light_cluster fail on Mephisto, and I later found out that it's because mongrel_light_cluster doesn't properly support RoR's config.load_paths. That's something I should fix some day.

Ben: your approach is very interesting. Your code doesn't seem to be compatible with mine, but perhaps I could use some of your ideas. :)</description>
		<content:encoded><![CDATA[<p>I haven&#8217;t worked on this since July. I also tried to do the marking in a separate process in order not to touch the heap of the parent process, but performance degraded literally by a thousand fold (probably because of context switch overhead) so I gave up.</p>
<p>I&#8217;ve tested mongrel_light_cluster + patched Ruby on a small website, and so far it seems to work well (i.e. no stability problems). I&#8217;ve seen mongrel_light_cluster fail on Mephisto, and I later found out that it&#8217;s because mongrel_light_cluster doesn&#8217;t properly support RoR&#8217;s config.load_paths. That&#8217;s something I should fix some day.</p>
<p>Ben: your approach is very interesting. Your code doesn&#8217;t seem to be compatible with mine, but perhaps I could use some of your ideas. <img src='http://izumi.plan99.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JJV</title>
		<link>http://izumi.plan99.net/blog/index.php/2007/07/29/making-ruby%e2%80%99s-garbage-collector-copy-on-write-friendly-part-3/#comment-6788</link>
		<dc:creator>JJV</dc:creator>
		<pubDate>Thu, 11 Oct 2007 02:22:18 +0000</pubDate>
		<guid>http://izumi.plan99.net/blog/index.php/2007/07/29/making-ruby%e2%80%99s-garbage-collector-copy-on-write-friendly-part-3/#comment-6788</guid>
		<description>Hi, 

I've been looking for a way to reduce mongrel memory usage and came across your blog.

Would like to know your current status on this project and if  you know of anyone that has tried implementing your mongrel_light_cluster and how that has worked for them.

Thanks.</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>I&#8217;ve been looking for a way to reduce mongrel memory usage and came across your blog.</p>
<p>Would like to know your current status on this project and if  you know of anyone that has tried implementing your mongrel_light_cluster and how that has worked for them.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Osheroff</title>
		<link>http://izumi.plan99.net/blog/index.php/2007/07/29/making-ruby%e2%80%99s-garbage-collector-copy-on-write-friendly-part-3/#comment-6787</link>
		<dc:creator>Ben Osheroff</dc:creator>
		<pubDate>Wed, 10 Oct 2007 01:31:04 +0000</pubDate>
		<guid>http://izumi.plan99.net/blog/index.php/2007/07/29/making-ruby%e2%80%99s-garbage-collector-copy-on-write-friendly-part-3/#comment-6787</guid>
		<description>Hi, ruby loves to play around with objects on the heap.  In my work with getting copy-on-write efficiency, I found that I needed to 
sort the nodes into two groups:  those likely to tinkered with later by ruby, and those not).  So, I created two types of heaps: immutable and mutable.  immutable heaps are filled by ruby until you fork(), at which point ruby tries not to touch them, so as not to dirty the vm page.

This patch also has a concept of a separate mark table along with immutable/mutable heaps.  It's against 1.8.5 (with some other patches applied, I forget quite what), but it should give you the general idea.

http://www.gimbo.net/changeset_r7142.diff</description>
		<content:encoded><![CDATA[<p>Hi, ruby loves to play around with objects on the heap.  In my work with getting copy-on-write efficiency, I found that I needed to<br />
sort the nodes into two groups:  those likely to tinkered with later by ruby, and those not).  So, I created two types of heaps: immutable and mutable.  immutable heaps are filled by ruby until you fork(), at which point ruby tries not to touch them, so as not to dirty the vm page.</p>
<p>This patch also has a concept of a separate mark table along with immutable/mutable heaps.  It&#8217;s against 1.8.5 (with some other patches applied, I forget quite what), but it should give you the general idea.</p>
<p><a href="http://www.gimbo.net/changeset_r7142.diff" rel="nofollow">http://www.gimbo.net/changeset_r7142.diff</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://izumi.plan99.net/blog/index.php/2007/07/29/making-ruby%e2%80%99s-garbage-collector-copy-on-write-friendly-part-3/#comment-6782</link>
		<dc:creator>Kevin</dc:creator>
		<pubDate>Fri, 05 Oct 2007 17:12:25 +0000</pubDate>
		<guid>http://izumi.plan99.net/blog/index.php/2007/07/29/making-ruby%e2%80%99s-garbage-collector-copy-on-write-friendly-part-3/#comment-6782</guid>
		<description>Any more progress on this?  I love the work you're doing.  The fact that the ruby core team hasn't looked at how it behaves under fork() really pisses me off.  There are lots of rails processes out there that would run much faster on GBs less of ram if this wasted copy-on-writing was fixed...</description>
		<content:encoded><![CDATA[<p>Any more progress on this?  I love the work you&#8217;re doing.  The fact that the ruby core team hasn&#8217;t looked at how it behaves under fork() really pisses me off.  There are lots of rails processes out there that would run much faster on GBs less of ram if this wasted copy-on-writing was fixed&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
