<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Latest Ruby on Rails prefork script</title>
	<atom:link href="http://izumi.plan99.net/blog/index.php/2007/04/18/latest-ruby-on-rails-prefork-script/feed/" rel="self" type="application/rss+xml" />
	<link>http://izumi.plan99.net/blog/index.php/2007/04/18/latest-ruby-on-rails-prefork-script/</link>
	<description>Ecchi nanowa ikenai to omoimasu</description>
	<lastBuildDate>Fri, 20 Aug 2010 09:05:42 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Nina</title>
		<link>http://izumi.plan99.net/blog/index.php/2007/04/18/latest-ruby-on-rails-prefork-script/comment-page-1/#comment-9752</link>
		<dc:creator>Nina</dc:creator>
		<pubDate>Wed, 21 Jan 2009 15:05:35 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/?p=34#comment-9752</guid>
		<description>Oh, it&#039;s true, I know!</description>
		<content:encoded><![CDATA[<p>Oh, it&#8217;s true, I know!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 赖洪礼的 blog &#187; Status report</title>
		<link>http://izumi.plan99.net/blog/index.php/2007/04/18/latest-ruby-on-rails-prefork-script/comment-page-1/#comment-6551</link>
		<dc:creator>赖洪礼的 blog &#187; Status report</dc:creator>
		<pubDate>Fri, 20 Jul 2007 12:25:25 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/?p=34#comment-6551</guid>
		<description>[...] been a while since I worked on my Ruby on Rails-related projects, saving memory by using copy-on-write and prepared statements support in ActiveRecord. They were on hold for a while since I&#8217;ve [...]</description>
		<content:encoded><![CDATA[<p>[...] been a while since I worked on my Ruby on Rails-related projects, saving memory by using copy-on-write and prepared statements support in ActiveRecord. They were on hold for a while since I&#8217;ve [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: R.O.</title>
		<link>http://izumi.plan99.net/blog/index.php/2007/04/18/latest-ruby-on-rails-prefork-script/comment-page-1/#comment-6525</link>
		<dc:creator>R.O.</dc:creator>
		<pubDate>Mon, 25 Jun 2007 14:26:50 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/?p=34#comment-6525</guid>
		<description>Would like a followup to this.   This single issue about GC ruining COW semantics.  Is there any work on improving to a more intelligent GC?
Thanks.</description>
		<content:encoded><![CDATA[<p>Would like a followup to this.   This single issue about GC ruining COW semantics.  Is there any work on improving to a more intelligent GC?<br />
Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hongli</title>
		<link>http://izumi.plan99.net/blog/index.php/2007/04/18/latest-ruby-on-rails-prefork-script/comment-page-1/#comment-6497</link>
		<dc:creator>Hongli</dc:creator>
		<pubDate>Tue, 22 May 2007 08:36:51 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/?p=34#comment-6497</guid>
		<description>I&#039;ve had more success with this script:
&lt;pre code=&quot;ruby&quot;&gt;
a = []
(1024 * 1024).times do
	a.push(&quot; &quot; * 200)
end
pid = fork do
	while true
		$stdin.readline
		a = nil
		ObjectSpace.garbage_collect
	end
	exit!
end
Process.waitpid(pid)
&lt;/pre&gt;
Memory usage increased a bit, but not as much as I heard it would.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve had more success with this script:</p>
<pre code="ruby">
a = []
(1024 * 1024).times do
	a.push(" " * 200)
end
pid = fork do
	while true
		$stdin.readline
		a = nil
		ObjectSpace.garbage_collect
	end
	exit!
end
Process.waitpid(pid)
</pre>
<p>Memory usage increased a bit, but not as much as I heard it would.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hongli</title>
		<link>http://izumi.plan99.net/blog/index.php/2007/04/18/latest-ruby-on-rails-prefork-script/comment-page-1/#comment-6476</link>
		<dc:creator>Hongli</dc:creator>
		<pubDate>Mon, 14 May 2007 13:01:51 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/?p=34#comment-6476</guid>
		<description>Is that really so? I have heard of that story but I&#039;m unable to reproduce it. For instance, look at this test script:
&lt;pre&gt;a = &quot; &quot; * 1024 * 1024 * 100
b = &quot; &quot; * 1024 * 1024 * 50
pid = fork do
	$stdin.readline
	b = nil
	ObjectSpace.garbage_collect
	$stdin.readline
end
Process.waitpid(pid)&lt;/pre&gt;
After I press Enter for the first time (thus forcing garbage collection), I do not see my memory usage go up at all.</description>
		<content:encoded><![CDATA[<p>Is that really so? I have heard of that story but I&#8217;m unable to reproduce it. For instance, look at this test script:</p>
<pre>a = " " * 1024 * 1024 * 100
b = " " * 1024 * 1024 * 50
pid = fork do
	$stdin.readline
	b = nil
	ObjectSpace.garbage_collect
	$stdin.readline
end
Process.waitpid(pid)</pre>
<p>After I press Enter for the first time (thus forcing garbage collection), I do not see my memory usage go up at all.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ezra</title>
		<link>http://izumi.plan99.net/blog/index.php/2007/04/18/latest-ruby-on-rails-prefork-script/comment-page-1/#comment-6475</link>
		<dc:creator>Ezra</dc:creator>
		<pubDate>Mon, 14 May 2007 08:52:13 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/?p=34#comment-6475</guid>
		<description>The problem with fork and cow memory in ruby is that as soon as ruby&#039;s GC runs in a child process it walks the ObjectSpace touching every object and basically makes the kernel think it needs its own memory space for all objects. So as soon as GC runs in the forked child it needs as much ram as the parent and cow semantics are ruined.</description>
		<content:encoded><![CDATA[<p>The problem with fork and cow memory in ruby is that as soon as ruby&#8217;s GC runs in a child process it walks the ObjectSpace touching every object and basically makes the kernel think it needs its own memory space for all objects. So as soon as GC runs in the forked child it needs as much ram as the parent and cow semantics are ruined.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
