<?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: Threads, Processes, Rails, TurboGears, and Scalability</title>
	<atom:link href="http://compoundthinking.com/blog/index.php/2008/05/14/threads-processes-rails-trubogears-and-scalability/feed/" rel="self" type="application/rss+xml" />
	<link>http://compoundthinking.com/blog/index.php/2008/05/14/threads-processes-rails-trubogears-and-scalability/</link>
	<description>Thinking about programming in new ways</description>
	<lastBuildDate>Wed, 28 Jul 2010 19:00:53 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Recent Links Tagged With "stackless" - JabberTags</title>
		<link>http://compoundthinking.com/blog/index.php/2008/05/14/threads-processes-rails-trubogears-and-scalability/#comment-304424</link>
		<dc:creator>Recent Links Tagged With "stackless" - JabberTags</dc:creator>
		<pubDate>Tue, 06 Jan 2009 08:04:44 +0000</pubDate>
		<guid isPermaLink="false">http://compoundthinking.com/blog/?p=306#comment-304424</guid>
		<description>[...] public links &gt;&gt; stackless   Mark Ramm: Threads, Processes, Rails, TruboGears, and Scalability Saved by rationalpi on Tue 23-12-2008   What I’ve listened to this week, 29-Mar-2008 Saved by [...]</description>
		<content:encoded><![CDATA[<p>[...] public links &gt;&gt; stackless   Mark Ramm: Threads, Processes, Rails, TruboGears, and Scalability Saved by rationalpi on Tue 23-12-2008   What I’ve listened to this week, 29-Mar-2008 Saved by [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Ramm</title>
		<link>http://compoundthinking.com/blog/index.php/2008/05/14/threads-processes-rails-trubogears-and-scalability/#comment-253812</link>
		<dc:creator>Mark Ramm</dc:creator>
		<pubDate>Thu, 23 Oct 2008 16:23:55 +0000</pubDate>
		<guid isPermaLink="false">http://compoundthinking.com/blog/?p=306#comment-253812</guid>
		<description>Roger, 

I&#039;m very excited to hear that.   Though I&#039;m a bit skeptical that all of the thread-safety issues in Rails will be worked out in time for 2.2.   That kind of thing is hard to bolt onto a framework after the fact.   You need to have thought through the issues up-front and come up with a sane way to handle threads, or you end up in a nightmare scenario  of mutexes, race conditions, and very hard to reproduce bugs.</description>
		<content:encoded><![CDATA[<p>Roger, </p>
<p>I&#8217;m very excited to hear that.   Though I&#8217;m a bit skeptical that all of the thread-safety issues in Rails will be worked out in time for 2.2.   That kind of thing is hard to bolt onto a framework after the fact.   You need to have thought through the issues up-front and come up with a sane way to handle threads, or you end up in a nightmare scenario  of mutexes, race conditions, and very hard to reproduce bugs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: roger</title>
		<link>http://compoundthinking.com/blog/index.php/2008/05/14/threads-processes-rails-trubogears-and-scalability/#comment-253222</link>
		<dc:creator>roger</dc:creator>
		<pubDate>Wed, 22 Oct 2008 17:42:15 +0000</pubDate>
		<guid isPermaLink="false">http://compoundthinking.com/blog/?p=306#comment-253222</guid>
		<description>Note that rails 2.2 will be threadsafe, so the JRuby guys will be able to share memory across threads more easily and have concurrency across all available cores.
http://blog.headius.com/2008/08/qa-what-thread-safe-rails-means.html
-=R</description>
		<content:encoded><![CDATA[<p>Note that rails 2.2 will be threadsafe, so the JRuby guys will be able to share memory across threads more easily and have concurrency across all available cores.<br />
<a href="http://blog.headius.com/2008/08/qa-what-thread-safe-rails-means.html" rel="nofollow">http://blog.headius.com/2008/08/qa-what-thread-safe-rails-means.html</a><br />
-=R</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mormon</title>
		<link>http://compoundthinking.com/blog/index.php/2008/05/14/threads-processes-rails-trubogears-and-scalability/#comment-220675</link>
		<dc:creator>mormon</dc:creator>
		<pubDate>Thu, 07 Aug 2008 05:05:10 +0000</pubDate>
		<guid isPermaLink="false">http://compoundthinking.com/blog/?p=306#comment-220675</guid>
		<description>Nice post.  I&#039;m with Lateef up there--wondering if asynchronousness would also help the throughput or not.  I know there&#039;s been some work in the Ruby world to get asynchronous DB adapters going [http://oldmoe.blogspot.com/ lists some] which will hopefully help with the runtime speed.  Maybe this will help. We can only hope.</description>
		<content:encoded><![CDATA[<p>Nice post.  I&#8217;m with Lateef up there&#8211;wondering if asynchronousness would also help the throughput or not.  I know there&#8217;s been some work in the Ruby world to get asynchronous DB adapters going [http://oldmoe.blogspot.com/ lists some] which will hopefully help with the runtime speed.  Maybe this will help. We can only hope.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Humanist &#8594; Scalable Web Apps: Erlang + Python</title>
		<link>http://compoundthinking.com/blog/index.php/2008/05/14/threads-processes-rails-trubogears-and-scalability/#comment-214494</link>
		<dc:creator>Humanist &#8594; Scalable Web Apps: Erlang + Python</dc:creator>
		<pubDate>Tue, 29 Jul 2008 02:24:35 +0000</pubDate>
		<guid isPermaLink="false">http://compoundthinking.com/blog/?p=306#comment-214494</guid>
		<description>[...] to Django, though I&#8217;ve never used it. In a web application setting, it&#8217;s easy to have too many Apache/Python processes which max out server memory or the CPU. For those tasks, I like Erlang. Erlang has parallelism and [...]</description>
		<content:encoded><![CDATA[<p>[...] to Django, though I&#8217;ve never used it. In a web application setting, it&#8217;s easy to have too many Apache/Python processes which max out server memory or the CPU. For those tasks, I like Erlang. Erlang has parallelism and [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Host TG on IIS at Compound Thinking</title>
		<link>http://compoundthinking.com/blog/index.php/2008/05/14/threads-processes-rails-trubogears-and-scalability/#comment-211520</link>
		<dc:creator>Host TG on IIS at Compound Thinking</dc:creator>
		<pubDate>Fri, 25 Jul 2008 04:20:21 +0000</pubDate>
		<guid isPermaLink="false">http://compoundthinking.com/blog/?p=306#comment-211520</guid>
		<description>[...] is so good that they don&#8217;t need TurboGears. And TurboGears multi-threaded+multiprocess model works better on windows than many of the other &#8220;dynamic language web-frameworks which depend solely on the [...]</description>
		<content:encoded><![CDATA[<p>[...] is so good that they don&#8217;t need TurboGears. And TurboGears multi-threaded+multiprocess model works better on windows than many of the other &#8220;dynamic language web-frameworks which depend solely on the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Ramm</title>
		<link>http://compoundthinking.com/blog/index.php/2008/05/14/threads-processes-rails-trubogears-and-scalability/#comment-190991</link>
		<dc:creator>Mark Ramm</dc:creator>
		<pubDate>Sun, 15 Jun 2008 13:58:07 +0000</pubDate>
		<guid isPermaLink="false">http://compoundthinking.com/blog/?p=306#comment-190991</guid>
		<description>Bill, 

I have moved a heavily multi-process python app from Linux to Window, and we did notice increased latency (due to longer process startup times) and increased memory use.   We ended up needing to use a hybrid model, with several multi-threaded processes in order to get reasonable performance out of the windows solution.  

Some of this could have been ameliorated if we had not been so free with forking off a new process to do some relatively quick job. (We often had started several very short processes which lived 1-2 seconds, did some work and shut down.) 

The fact that windows does not have copy-on-write semantics for forking means that each of those processes made a full copy of our 150 meg or so environment.   On linux we had at most a couple of meg memory increase for the life of the process. 

I don&#039;t think I&#039;ve tested 2003 server, or anything later than that, so it could be that Microsoft has changed things and current tests would fare better. 

My intention was not to bash Microsoft, but to point out one limitation, and to mention that the TurboGears model works better in that environment than other frameworks that rely only on multi-processing for concurrency.</description>
		<content:encoded><![CDATA[<p>Bill, </p>
<p>I have moved a heavily multi-process python app from Linux to Window, and we did notice increased latency (due to longer process startup times) and increased memory use.   We ended up needing to use a hybrid model, with several multi-threaded processes in order to get reasonable performance out of the windows solution.  </p>
<p>Some of this could have been ameliorated if we had not been so free with forking off a new process to do some relatively quick job. (We often had started several very short processes which lived 1-2 seconds, did some work and shut down.) </p>
<p>The fact that windows does not have copy-on-write semantics for forking means that each of those processes made a full copy of our 150 meg or so environment.   On linux we had at most a couple of meg memory increase for the life of the process. </p>
<p>I don&#8217;t think I&#8217;ve tested 2003 server, or anything later than that, so it could be that Microsoft has changed things and current tests would fare better. </p>
<p>My intention was not to bash Microsoft, but to point out one limitation, and to mention that the TurboGears model works better in that environment than other frameworks that rely only on multi-processing for concurrency.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill English</title>
		<link>http://compoundthinking.com/blog/index.php/2008/05/14/threads-processes-rails-trubogears-and-scalability/#comment-190834</link>
		<dc:creator>Bill English</dc:creator>
		<pubDate>Sun, 15 Jun 2008 07:25:22 +0000</pubDate>
		<guid isPermaLink="false">http://compoundthinking.com/blog/?p=306#comment-190834</guid>
		<description>Do you actually have any evidence for your claims about your windows bashing? ... forking a process is more expensive in windows than in unix but is the cost of IPC/sync that far away from the linux model (shm/pipes/sockets) ?  also ... when combined with the overhead of forking an whole interpreter is it really that much higher?</description>
		<content:encoded><![CDATA[<p>Do you actually have any evidence for your claims about your windows bashing? &#8230; forking a process is more expensive in windows than in unix but is the cost of IPC/sync that far away from the linux model (shm/pipes/sockets) ?  also &#8230; when combined with the overhead of forking an whole interpreter is it really that much higher?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lateef Jackson</title>
		<link>http://compoundthinking.com/blog/index.php/2008/05/14/threads-processes-rails-trubogears-and-scalability/#comment-176240</link>
		<dc:creator>Lateef Jackson</dc:creator>
		<pubDate>Tue, 20 May 2008 17:24:50 +0000</pubDate>
		<guid isPermaLink="false">http://compoundthinking.com/blog/?p=306#comment-176240</guid>
		<description>Great post! I did some experiments with ASync and Pylons http://www.hackingthought.com/2007/05/wsgi-async-framework.html, I would love to see if it was possible to also get TurboGears running using an event based web server like I got Pylons to work.</description>
		<content:encoded><![CDATA[<p>Great post! I did some experiments with ASync and Pylons <a href="http://www.hackingthought.com/2007/05/wsgi-async-framework.html" rel="nofollow">http://www.hackingthought.com/2007/05/wsgi-async-framework.html</a>, I would love to see if it was possible to also get TurboGears running using an event based web server like I got Pylons to work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luke Hoersten</title>
		<link>http://compoundthinking.com/blog/index.php/2008/05/14/threads-processes-rails-trubogears-and-scalability/#comment-172916</link>
		<dc:creator>Luke Hoersten</dc:creator>
		<pubDate>Wed, 14 May 2008 20:51:34 +0000</pubDate>
		<guid isPermaLink="false">http://compoundthinking.com/blog/?p=306#comment-172916</guid>
		<description>Great post, Mark! When I wrote about &lt;a href=&quot;http://humani.st/scalable-web-apps-erlang-python/&quot; rel=&quot;nofollow&quot;&gt;computational parallelism to help scale web apps&lt;/a&gt; written in Python, I assumed my readers would already understand all the concepts you&#039;ve outlined above. When I realized most readers didn&#039;t understand, it seemed too much of a daunting tasks to write this post which you&#039;ve so elegantly written. I wish this post existed when I first published my concurrency post. I&#039;ll be post-publish linking to this =)</description>
		<content:encoded><![CDATA[<p>Great post, Mark! When I wrote about <a href="http://humani.st/scalable-web-apps-erlang-python/" rel="nofollow">computational parallelism to help scale web apps</a> written in Python, I assumed my readers would already understand all the concepts you&#8217;ve outlined above. When I realized most readers didn&#8217;t understand, it seemed too much of a daunting tasks to write this post which you&#8217;ve so elegantly written. I wish this post existed when I first published my concurrency post. I&#8217;ll be post-publish linking to this =)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michaek Foord</title>
		<link>http://compoundthinking.com/blog/index.php/2008/05/14/threads-processes-rails-trubogears-and-scalability/#comment-172754</link>
		<dc:creator>Michaek Foord</dc:creator>
		<pubDate>Wed, 14 May 2008 10:22:36 +0000</pubDate>
		<guid isPermaLink="false">http://compoundthinking.com/blog/?p=306#comment-172754</guid>
		<description>Interestingly the .NET Dynamic Language Runtime (and hence IronPython and IronRuby) allows you to instantiate multiple language engines within the same process.

This is really useful even within individual applications (Resolver One uses the IronPython API to create multiple engines - effectively execution environments - all from pure Python code). It is one advantage that IronPython has over CPython, that this is not only possible - but easy!</description>
		<content:encoded><![CDATA[<p>Interestingly the .NET Dynamic Language Runtime (and hence IronPython and IronRuby) allows you to instantiate multiple language engines within the same process.</p>
<p>This is really useful even within individual applications (Resolver One uses the IronPython API to create multiple engines &#8211; effectively execution environments &#8211; all from pure Python code). It is one advantage that IronPython has over CPython, that this is not only possible &#8211; but easy!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
