<?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: Web server performance shoot out &#8211; simple pages</title>
	<atom:link href="http://blog.davber.com/2007/12/10/web-server-performance-shoot-out-simple-pages/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.davber.com/2007/12/10/web-server-performance-shoot-out-simple-pages/</link>
	<description>Functional functional programming - Haskell, Ruby, Erlang, Scala...</description>
	<lastBuildDate>Mon, 04 Jan 2010 21:38:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: davber</title>
		<link>http://blog.davber.com/2007/12/10/web-server-performance-shoot-out-simple-pages/comment-page-1/#comment-294</link>
		<dc:creator>davber</dc:creator>
		<pubDate>Tue, 11 Dec 2007 05:45:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.davber.com/2007/12/10/web-server-performance-shoot-out-simple-pages/#comment-294</guid>
		<description>Tom:

&lt;i&gt; “I try to get out and they keep dragging me back in!”&lt;/i&gt; ;-)

I was primarily thinking about intramodular references when I wrote about not-as-late-binding in Erlang (cf Ruby), so at least one gets some help at compile-time ;-) Yes, you are of course right, and that should be stated explicitly for people seeking the Holy Grail of problem solving: binding is deferred &lt;strong&gt;between&lt;/strong&gt; modules in Erlang!

And, if one wants really late binding, one can use reflection, where even signature is decided &lt;strong&gt;after&lt;/strong&gt; process startup...

Regarding mulitple Mongrel instances on one box, I promise you to use that as one of the framework environments in next revision of this test.

Ok, one discussion I will not have (here and now) is that of implicit type conversion, user-defined or not, and arithmetic propagation constituting a weaker type system ;-)</description>
		<content:encoded><![CDATA[<p>Tom:</p>
<p><i> “I try to get out and they keep dragging me back in!”</i> <img src='http://blog.davber.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>I was primarily thinking about intramodular references when I wrote about not-as-late-binding in Erlang (cf Ruby), so at least one gets some help at compile-time <img src='http://blog.davber.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  Yes, you are of course right, and that should be stated explicitly for people seeking the Holy Grail of problem solving: binding is deferred <strong>between</strong> modules in Erlang!</p>
<p>And, if one wants really late binding, one can use reflection, where even signature is decided <strong>after</strong> process startup&#8230;</p>
<p>Regarding mulitple Mongrel instances on one box, I promise you to use that as one of the framework environments in next revision of this test.</p>
<p>Ok, one discussion I will not have (here and now) is that of implicit type conversion, user-defined or not, and arithmetic propagation constituting a weaker type system <img src='http://blog.davber.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erlang-China &#187; about "Ror vs ErlyWeb perfomance"</title>
		<link>http://blog.davber.com/2007/12/10/web-server-performance-shoot-out-simple-pages/comment-page-1/#comment-293</link>
		<dc:creator>Erlang-China &#187; about "Ror vs ErlyWeb perfomance"</dc:creator>
		<pubDate>Tue, 11 Dec 2007 04:25:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.davber.com/2007/12/10/web-server-performance-shoot-out-simple-pages/#comment-293</guid>
		<description>[...] 首先 Erlyweb 尚待优化的地方还有很多。比如［这里］提到： ErlyWeb had a hard time handling 1000 requests coming within an interval of a few seconds, so I had to lower the burst to 500 requests there. It did not have as a severe problem if one bypassed the dispatch and used raw Yaws. [...]</description>
		<content:encoded><![CDATA[<p>[...] 首先 Erlyweb 尚待优化的地方还有很多。比如［这里］提到： ErlyWeb had a hard time handling 1000 requests coming within an interval of a few seconds, so I had to lower the burst to 500 requests there. It did not have as a severe problem if one bypassed the dispatch and used raw Yaws. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tom</title>
		<link>http://blog.davber.com/2007/12/10/web-server-performance-shoot-out-simple-pages/comment-page-1/#comment-292</link>
		<dc:creator>tom</dc:creator>
		<pubDate>Tue, 11 Dec 2007 04:04:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.davber.com/2007/12/10/web-server-performance-shoot-out-simple-pages/#comment-292</guid>
		<description>Erlang actually does late binding.  There are really two types of function references, local and external.  External funs, outside of the current module, are late bound.  The distinction between the two becomes very important when dealing with code swapping.  I&#039;m trying to find a online reference that explains this better than I, but am coming up short.  It&#039;s explained well in Joe Armstrong&#039;s book.

Also, since the arguments are untyped, just checking arity and existance is pretty weak compile time checking.  There is, however, a tool called the dialyzer  that does static analysis getting much of the error detection benefit of a language that actually is statically typed.

Rails deployments do typically use mongrel these days, but you do have to be running a bunch of them as separate processes for the reasons previously discussed.  I just think it&#039;s important from looking at the relative advantages of the systems to realize that even though you have all these heavy mongrels running around doing serial processing of the dynamic requests, they aren&#039;t going to be interfering with the serving of your static content.  

Also, this is a big deal when thinking about caching.  By having parameters in the path, as opposed to the query string, you can cache the page to disk and hand it off to the static web server.  In which case, it doesn&#039;t even go near the mongrel until you invalidate the cache.  It is important to realize that for many common caching situations, mongrel will be out of the loop entirely.

I actually agree on the static/dynamic naming issue confusing the hell out of people.  There is also a strong tendency to confuse dynamic and weak typing.  Ruby, for instance, is strongly typed in a way that C/C++/Java are not, since there is no such thing as casting.  I don&#039;t really have a preference.  My last professional incarnation was doing console game development in C++ which obviously places a radically different priority on questions of brute efficiency.  I will say that I find myself very productive in Ruby and Erlang but do not attribute that much to the type system.</description>
		<content:encoded><![CDATA[<p>Erlang actually does late binding.  There are really two types of function references, local and external.  External funs, outside of the current module, are late bound.  The distinction between the two becomes very important when dealing with code swapping.  I&#8217;m trying to find a online reference that explains this better than I, but am coming up short.  It&#8217;s explained well in Joe Armstrong&#8217;s book.</p>
<p>Also, since the arguments are untyped, just checking arity and existance is pretty weak compile time checking.  There is, however, a tool called the dialyzer  that does static analysis getting much of the error detection benefit of a language that actually is statically typed.</p>
<p>Rails deployments do typically use mongrel these days, but you do have to be running a bunch of them as separate processes for the reasons previously discussed.  I just think it&#8217;s important from looking at the relative advantages of the systems to realize that even though you have all these heavy mongrels running around doing serial processing of the dynamic requests, they aren&#8217;t going to be interfering with the serving of your static content.  </p>
<p>Also, this is a big deal when thinking about caching.  By having parameters in the path, as opposed to the query string, you can cache the page to disk and hand it off to the static web server.  In which case, it doesn&#8217;t even go near the mongrel until you invalidate the cache.  It is important to realize that for many common caching situations, mongrel will be out of the loop entirely.</p>
<p>I actually agree on the static/dynamic naming issue confusing the hell out of people.  There is also a strong tendency to confuse dynamic and weak typing.  Ruby, for instance, is strongly typed in a way that C/C++/Java are not, since there is no such thing as casting.  I don&#8217;t really have a preference.  My last professional incarnation was doing console game development in C++ which obviously places a radically different priority on questions of brute efficiency.  I will say that I find myself very productive in Ruby and Erlang but do not attribute that much to the type system.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: davber</title>
		<link>http://blog.davber.com/2007/12/10/web-server-performance-shoot-out-simple-pages/comment-page-1/#comment-291</link>
		<dc:creator>davber</dc:creator>
		<pubDate>Tue, 11 Dec 2007 02:16:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.davber.com/2007/12/10/web-server-performance-shoot-out-simple-pages/#comment-291</guid>
		<description>Ok, this is my last Static/Dynamic flame war post - in this thread:

I really dislike the classification &lt;strong&gt;dynamic&lt;/strong&gt; for &lt;strong&gt;dynamically typed&lt;/strong&gt; languages. It feels like they are, well, more &lt;i&gt;dynamic&lt;/i&gt; which is simply not true, in general. For instance, the generic programming notions of templates in C++ and classes in Haskell make for quite dynamic programming and solutions. If you add the meta facilities induced by those C++ templates (and advanced use thereof) or the true compilation-phase execution model of Template Haskell, you get &lt;strong&gt;highly dynamic&lt;/strong&gt; languages.</description>
		<content:encoded><![CDATA[<p>Ok, this is my last Static/Dynamic flame war post &#8211; in this thread:</p>
<p>I really dislike the classification <strong>dynamic</strong> for <strong>dynamically typed</strong> languages. It feels like they are, well, more <i>dynamic</i> which is simply not true, in general. For instance, the generic programming notions of templates in C++ and classes in Haskell make for quite dynamic programming and solutions. If you add the meta facilities induced by those C++ templates (and advanced use thereof) or the true compilation-phase execution model of Template Haskell, you get <strong>highly dynamic</strong> languages.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: davber</title>
		<link>http://blog.davber.com/2007/12/10/web-server-performance-shoot-out-simple-pages/comment-page-1/#comment-290</link>
		<dc:creator>davber</dc:creator>
		<pubDate>Tue, 11 Dec 2007 02:12:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.davber.com/2007/12/10/web-server-performance-shoot-out-simple-pages/#comment-290</guid>
		<description>&lt;strong&gt;disclaimer:&lt;/strong&gt; I do like Ruby (on or off Rails) and Erlang :-) It is just that I think there is something to gain in telling others - and computer - what your intention of use is for various variables and constructs, which is more doable in a statically typed language. In my extremely humble opinion, the only time dynamic types - which is *distinct* (although not completely orthogonal...) from late binding of constructs - is qualitatively beneficial is when hard core run-time polymorphism is used; note that this latter methodology can also be referred to as &lt;i&gt;&quot;not knowing what one does and/or not having really decided on what these thingies passed around are yet&quot;&lt;/i&gt; ;-)

Ok, I admit to enjoy the lenient nature of dynamic(ally typed) languages at times, so take my criticism above with a grain of salt.</description>
		<content:encoded><![CDATA[<p><strong>disclaimer:</strong> I do like Ruby (on or off Rails) and Erlang <img src='http://blog.davber.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  It is just that I think there is something to gain in telling others &#8211; and computer &#8211; what your intention of use is for various variables and constructs, which is more doable in a statically typed language. In my extremely humble opinion, the only time dynamic types &#8211; which is *distinct* (although not completely orthogonal&#8230;) from late binding of constructs &#8211; is qualitatively beneficial is when hard core run-time polymorphism is used; note that this latter methodology can also be referred to as <i>&#8220;not knowing what one does and/or not having really decided on what these thingies passed around are yet&#8221;</i> <img src='http://blog.davber.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Ok, I admit to enjoy the lenient nature of dynamic(ally typed) languages at times, so take my criticism above with a grain of salt.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: davber</title>
		<link>http://blog.davber.com/2007/12/10/web-server-performance-shoot-out-simple-pages/comment-page-1/#comment-289</link>
		<dc:creator>davber</dc:creator>
		<pubDate>Tue, 11 Dec 2007 01:54:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.davber.com/2007/12/10/web-server-performance-shoot-out-simple-pages/#comment-289</guid>
		<description>Curt:

I will try httperf out. Thanks for the pointer!


Tom:

Never say &quot;the last comment.&quot; You know there will be more ;-) Regarding using Mongrel for static content - yep, that is a bit crazy, and I would *not* do it myself - *but* I wanted to see how these frameworks served static pages as well. I welcome any suggestion of a complete and realistic combination. Thanks for the Nginx pointer!

But, the fact still holds that most Rails apps *do* use Mongrel for dynamic stuff, right? If so, that bar is still valid. And, honestly, most Rails apps do serve static stuff only in the beginning of sessions (images...) right, so that bar is not that important anyway, or?

Regarding the late binding. Well, the fact is that - in Erlang - the binding is not that late at all. It is all bound up with - a static check - at compile time. It is just that the &quot;static types&quot; available during compilation are more like &quot;kinds&quot; in Haskell, i.e., they represent meta types when viewed from a meta interpretation point of view. What I meant with those convoluted words was that &quot;no, you are not right, Erlang *does* indeed check for existence of functions, arities and stuff&quot; before runtime whereas Ruby does not.</description>
		<content:encoded><![CDATA[<p>Curt:</p>
<p>I will try httperf out. Thanks for the pointer!</p>
<p>Tom:</p>
<p>Never say &#8220;the last comment.&#8221; You know there will be more <img src='http://blog.davber.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  Regarding using Mongrel for static content &#8211; yep, that is a bit crazy, and I would *not* do it myself &#8211; *but* I wanted to see how these frameworks served static pages as well. I welcome any suggestion of a complete and realistic combination. Thanks for the Nginx pointer!</p>
<p>But, the fact still holds that most Rails apps *do* use Mongrel for dynamic stuff, right? If so, that bar is still valid. And, honestly, most Rails apps do serve static stuff only in the beginning of sessions (images&#8230;) right, so that bar is not that important anyway, or?</p>
<p>Regarding the late binding. Well, the fact is that &#8211; in Erlang &#8211; the binding is not that late at all. It is all bound up with &#8211; a static check &#8211; at compile time. It is just that the &#8220;static types&#8221; available during compilation are more like &#8220;kinds&#8221; in Haskell, i.e., they represent meta types when viewed from a meta interpretation point of view. What I meant with those convoluted words was that &#8220;no, you are not right, Erlang *does* indeed check for existence of functions, arities and stuff&#8221; before runtime whereas Ruby does not.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: davber</title>
		<link>http://blog.davber.com/2007/12/10/web-server-performance-shoot-out-simple-pages/comment-page-1/#comment-288</link>
		<dc:creator>davber</dc:creator>
		<pubDate>Tue, 11 Dec 2007 01:29:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.davber.com/2007/12/10/web-server-performance-shoot-out-simple-pages/#comment-288</guid>
		<description>Kevin:

I skipped using dynamic pages with lightttpd since I only threw it in there to compare the delivery of static content from these web frameworks to what I assumed - and rightly so - to be the fastest such server.

I could - and will for my next version, where I *will* include .NET and Tomcat and/or JBoss and/or something Springish - include FastCGI to PHP from lighttpd, since I know that is a reasonably common web server environment.

One interesting note, when we talk about static content, is that both ErlyWeb and HAppS is quite considerably faster in generating dynamic content than static one. If that comes as a surprise, it should not, since the static content means reading a text file from disk.</description>
		<content:encoded><![CDATA[<p>Kevin:</p>
<p>I skipped using dynamic pages with lightttpd since I only threw it in there to compare the delivery of static content from these web frameworks to what I assumed &#8211; and rightly so &#8211; to be the fastest such server.</p>
<p>I could &#8211; and will for my next version, where I *will* include .NET and Tomcat and/or JBoss and/or something Springish &#8211; include FastCGI to PHP from lighttpd, since I know that is a reasonably common web server environment.</p>
<p>One interesting note, when we talk about static content, is that both ErlyWeb and HAppS is quite considerably faster in generating dynamic content than static one. If that comes as a surprise, it should not, since the static content means reading a text file from disk.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tom</title>
		<link>http://blog.davber.com/2007/12/10/web-server-performance-shoot-out-simple-pages/comment-page-1/#comment-284</link>
		<dc:creator>tom</dc:creator>
		<pubDate>Tue, 11 Dec 2007 00:30:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.davber.com/2007/12/10/web-server-performance-shoot-out-simple-pages/#comment-284</guid>
		<description>Can&#039;t resist one last comment on this.  A well set up benchmarking test involving Ruby vs Merb (a closely related Ruby framework): http://www.webficient.com/2007/08/testing-various-configurations-of-rails.html

The discrepency between your R/sec numbers and theirs are quite large.  Also note the big changes in numbers depending on whether session are being used and what the session store is.  Do you have sessions turned off?

My final beef with this entire analysis, is that using mongrel to serve static pages is bizarre.  It is great when you are in development because you don&#039;t have to set anything else up, but in any real world situation, only your dynamic requests will go through mongrel.  No attempt has been made to optimize it as a dynamic web server.  

I take the same approach when building erlang web apps.  Nginx is vastly faster than Yaws for static content, so I&#039;m not really interested in using it as a general purpose web server.  Just serve static content from Nginx and proxy dynamic content to the erlang app, problem solved.  This is also how our Rails apps are configured.</description>
		<content:encoded><![CDATA[<p>Can&#8217;t resist one last comment on this.  A well set up benchmarking test involving Ruby vs Merb (a closely related Ruby framework): <a href="http://www.webficient.com/2007/08/testing-various-configurations-of-rails.html" rel="nofollow">http://www.webficient.com/2007/08/testing-various-configurations-of-rails.html</a></p>
<p>The discrepency between your R/sec numbers and theirs are quite large.  Also note the big changes in numbers depending on whether session are being used and what the session store is.  Do you have sessions turned off?</p>
<p>My final beef with this entire analysis, is that using mongrel to serve static pages is bizarre.  It is great when you are in development because you don&#8217;t have to set anything else up, but in any real world situation, only your dynamic requests will go through mongrel.  No attempt has been made to optimize it as a dynamic web server.  </p>
<p>I take the same approach when building erlang web apps.  Nginx is vastly faster than Yaws for static content, so I&#8217;m not really interested in using it as a general purpose web server.  Just serve static content from Nginx and proxy dynamic content to the erlang app, problem solved.  This is also how our Rails apps are configured.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tom</title>
		<link>http://blog.davber.com/2007/12/10/web-server-performance-shoot-out-simple-pages/comment-page-1/#comment-283</link>
		<dc:creator>tom</dc:creator>
		<pubDate>Mon, 10 Dec 2007 23:34:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.davber.com/2007/12/10/web-server-performance-shoot-out-simple-pages/#comment-283</guid>
		<description>Oh, and one more thing about the price of RAM.  The great thing about horizontal scalability is that you can just add more boxes.  Scaling up is expensive, scaling out is cheap.  Don&#039;t buy more expensive RAM to add to a monolithic server, add more cheap application servers. 

That is the point of the process oriented approach.  Since each Rails process has no expectation of being able to communicate with each other except via connection to the db, it doesn&#039;t matter what machine you run those processes on.

I think ErlyWeb being more amenable to casual web development than HAppS says more about HAppS than about RoR.  I really respect Yariv&#039;s work.  Though I don&#039;t actively use ErlyWeb, I have found his blog and code immensely helpful, but I do not find ErlyWeb even remotely comparable to what Rails makes available.  It is awesome that it makes things easier, but it&#039;s not the same, sorry.  Erlang has other strengths.

Also, if you dislike dynamic/late binding, why are you giving Erlang a pass?  Seeing as it is in the same position?  I personally like it, if you are getting good code coverage out of of your tests (and you are writing tests aren&#039;t you?), you shouldn&#039;t run into problems.

I should just be making my own blog post for as long these comments are :)</description>
		<content:encoded><![CDATA[<p>Oh, and one more thing about the price of RAM.  The great thing about horizontal scalability is that you can just add more boxes.  Scaling up is expensive, scaling out is cheap.  Don&#8217;t buy more expensive RAM to add to a monolithic server, add more cheap application servers. </p>
<p>That is the point of the process oriented approach.  Since each Rails process has no expectation of being able to communicate with each other except via connection to the db, it doesn&#8217;t matter what machine you run those processes on.</p>
<p>I think ErlyWeb being more amenable to casual web development than HAppS says more about HAppS than about RoR.  I really respect Yariv&#8217;s work.  Though I don&#8217;t actively use ErlyWeb, I have found his blog and code immensely helpful, but I do not find ErlyWeb even remotely comparable to what Rails makes available.  It is awesome that it makes things easier, but it&#8217;s not the same, sorry.  Erlang has other strengths.</p>
<p>Also, if you dislike dynamic/late binding, why are you giving Erlang a pass?  Seeing as it is in the same position?  I personally like it, if you are getting good code coverage out of of your tests (and you are writing tests aren&#8217;t you?), you shouldn&#8217;t run into problems.</p>
<p>I should just be making my own blog post for as long these comments are <img src='http://blog.davber.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Curt Sampson &#60;cjs@cynic.net&#62;</title>
		<link>http://blog.davber.com/2007/12/10/web-server-performance-shoot-out-simple-pages/comment-page-1/#comment-282</link>
		<dc:creator>Curt Sampson &#60;cjs@cynic.net&#62;</dc:creator>
		<pubDate>Mon, 10 Dec 2007 23:25:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.davber.com/2007/12/10/web-server-performance-shoot-out-simple-pages/#comment-282</guid>
		<description>I&#039;ve found that apbench, because it waits for a response to every request, has great difficulty pushing a web server to the point where it will fall over, which may come surprisingly early when the simultaneous requests keep coming in. I suggest having a look at httperf.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve found that apbench, because it waits for a response to every request, has great difficulty pushing a web server to the point where it will fall over, which may come surprisingly early when the simultaneous requests keep coming in. I suggest having a look at httperf.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

