<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">
<channel>
	<title>Comments for ostinelli|net</title>
	
	<link>http://www.ostinelli.net</link>
	<description>From onions to space neons.</description>
	<pubDate>Thu, 18 Jun 2009 22:37:07 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/ostinelli-comments" type="application/rss+xml" /><item>
		<title>Comment on Boost message passing between Erlang nodes by Roberto Ostinelli</title>
		<link>http://www.ostinelli.net/boost-message-passing-between-erlang-nodes/comment-page-1/#comment-2163</link>
		<dc:creator>Roberto Ostinelli</dc:creator>
		<pubDate>Fri, 12 Jun 2009 08:14:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.ostinelli.net/?p=273#comment-2163</guid>
		<description>i completely agree. this benchmark test is very specific.

i will need to reperform the local benchmark, as i prefer not bugging the otp team without being 100% sure of the results i'm experimenting. asa i get to have some time, i will. i'll get back to you then to know who to contact :)</description>
		<content:encoded><![CDATA[<p>i completely agree. this benchmark test is very specific.</p>
<p>i will need to reperform the local benchmark, as i prefer not bugging the otp team without being 100% sure of the results i&#8217;m experimenting. asa i get to have some time, i will. i&#8217;ll get back to you then to know who to contact :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Boost message passing between Erlang nodes by Ulf Wiger</title>
		<link>http://www.ostinelli.net/boost-message-passing-between-erlang-nodes/comment-page-1/#comment-2146</link>
		<dc:creator>Ulf Wiger</dc:creator>
		<pubDate>Thu, 11 Jun 2009 11:45:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.ostinelli.net/?p=273#comment-2146</guid>
		<description>@Roberto: Those were interesting numbers. One perpetual problem with benchmarking is that you have to gauge how close to reality your test comes. In your test, you begin by spawning 200,000 processes that all get into line to send a distributed message. This will probably result in an unusually great propability for lock contention, at least compared to most 'normal' erlang applications.

The local case is interesting. You should probably let the OTP team know. My guess is that they have verified with their own benchmarks that local message passing does *not* deteriorate with each new release, but you may have hit some corner case that their benchmarks don't cover.</description>
		<content:encoded><![CDATA[<p>@Roberto: Those were interesting numbers. One perpetual problem with benchmarking is that you have to gauge how close to reality your test comes. In your test, you begin by spawning 200,000 processes that all get into line to send a distributed message. This will probably result in an unusually great propability for lock contention, at least compared to most &#8216;normal&#8217; erlang applications.</p>
<p>The local case is interesting. You should probably let the OTP team know. My guess is that they have verified with their own benchmarks that local message passing does *not* deteriorate with each new release, but you may have hit some corner case that their benchmarks don&#8217;t cover.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Boost message passing between Erlang nodes by Roberto Ostinelli</title>
		<link>http://www.ostinelli.net/boost-message-passing-between-erlang-nodes/comment-page-1/#comment-2126</link>
		<dc:creator>Roberto Ostinelli</dc:creator>
		<pubDate>Wed, 10 Jun 2009 18:16:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.ostinelli.net/?p=273#comment-2126</guid>
		<description>ok. still it beats me why qr is actually performing so well.

i would just like to understand where i should/should not use the qr mechanism, since as i already said - it is, after all, quite weird to implement a queue mechanism at a higher level than tcp.

i am far from having the insights and experience you have in erlang; thus again, thank you for your feedback, it is warmly welcomed.</description>
		<content:encoded><![CDATA[<p>ok. still it beats me why qr is actually performing so well.</p>
<p>i would just like to understand where i should/should not use the qr mechanism, since as i already said - it is, after all, quite weird to implement a queue mechanism at a higher level than tcp.</p>
<p>i am far from having the insights and experience you have in erlang; thus again, thank you for your feedback, it is warmly welcomed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Boost message passing between Erlang nodes by Roberto Ostinelli</title>
		<link>http://www.ostinelli.net/boost-message-passing-between-erlang-nodes/comment-page-1/#comment-2125</link>
		<dc:creator>Roberto Ostinelli</dc:creator>
		<pubDate>Wed, 10 Jun 2009 18:10:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.ostinelli.net/?p=273#comment-2125</guid>
		<description>hi ulf, i had seen the readme of the release, and i said to myself this was perfect timing. when you wrote i just had erlang R13B01 installed and was starting to perform the test :)

here are the results. again, on my macbook with leopard.

1. to my surprise, sending speed of messages within the same node has consistently decreased. it is now 3.6 million/min instead of 5.3.

2. speed between two erlang nodes are similar, however setting the dist_nodelay option to false now produces far better results, bringing message passing between erlang nodes up to 1 million [instead of ~810K].

3. qr still beats everything: 2.3 million/min between different erlang nodes.

r.</description>
		<content:encoded><![CDATA[<p>hi ulf, i had seen the readme of the release, and i said to myself this was perfect timing. when you wrote i just had erlang R13B01 installed and was starting to perform the test :)</p>
<p>here are the results. again, on my macbook with leopard.</p>
<p>1. to my surprise, sending speed of messages within the same node has consistently decreased. it is now 3.6 million/min instead of 5.3.</p>
<p>2. speed between two erlang nodes are similar, however setting the dist_nodelay option to false now produces far better results, bringing message passing between erlang nodes up to 1 million [instead of ~810K].</p>
<p>3. qr still beats everything: 2.3 million/min between different erlang nodes.</p>
<p>r.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Boost message passing between Erlang nodes by Ulf Wiger</title>
		<link>http://www.ostinelli.net/boost-message-passing-between-erlang-nodes/comment-page-1/#comment-2124</link>
		<dc:creator>Ulf Wiger</dc:creator>
		<pubDate>Wed, 10 Jun 2009 18:02:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.ostinelli.net/?p=273#comment-2124</guid>
		<description>@Roberto: I'm not at all sure that qr is worse on multicore. All messages are going out on the same port eventually anyway, and sending to the same process gives little lock contention as appending to the message queue is one of the operations most optimized in the Erlang VM - and a very small critical section. Sending to the port (until R13B01), the critical section actually includes the term_to_binary and updating of the atom cache, as well as the actual send to the port. This means that the risk of lock contention is much higher. It's the contention that's costly, not the actual locking.</description>
		<content:encoded><![CDATA[<p>@Roberto: I&#8217;m not at all sure that qr is worse on multicore. All messages are going out on the same port eventually anyway, and sending to the same process gives little lock contention as appending to the message queue is one of the operations most optimized in the Erlang VM - and a very small critical section. Sending to the port (until R13B01), the critical section actually includes the term_to_binary and updating of the atom cache, as well as the actual send to the port. This means that the risk of lock contention is much higher. It&#8217;s the contention that&#8217;s costly, not the actual locking.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Boost message passing between Erlang nodes by Ulf Wiger</title>
		<link>http://www.ostinelli.net/boost-message-passing-between-erlang-nodes/comment-page-1/#comment-2123</link>
		<dc:creator>Ulf Wiger</dc:creator>
		<pubDate>Wed, 10 Jun 2009 17:57:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.ostinelli.net/?p=273#comment-2123</guid>
		<description>In an unusually timely fashion, OTP has just released R13B01, which, among other things, delivers significant speedups on port communication, e.g. Distributed Erlang. Specifically, it dramatically reduces the lock contention on the port.

It would be interesting to see how R13B01 affects this benchmark.</description>
		<content:encoded><![CDATA[<p>In an unusually timely fashion, OTP has just released R13B01, which, among other things, delivers significant speedups on port communication, e.g. Distributed Erlang. Specifically, it dramatically reduces the lock contention on the port.</p>
<p>It would be interesting to see how R13B01 affects this benchmark.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Boost message passing between Erlang nodes by Roberto Ostinelli</title>
		<link>http://www.ostinelli.net/boost-message-passing-between-erlang-nodes/comment-page-1/#comment-2118</link>
		<dc:creator>Roberto Ostinelli</dc:creator>
		<pubDate>Wed, 10 Jun 2009 13:39:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.ostinelli.net/?p=273#comment-2118</guid>
		<description>thank you ulf and richard for these precious insights. ulf, unfortunately i believe that it's already too late for me, as my brains seems to be thinking in slices too :)

still, i still haven't had a grab on:

1. why qr is actually working [or if it's working only with such a benchmark];
2. what should i beware of when using qr.

to my understanding up until now, qr could be particularly costly on multi-core machines. is this correct? this alone could give me enough reasons to think again before using qr.

fact is, i've designed a multi-node architecture from the start [i.e. not based on clusters] and i would really like to find a "best practice" way to get the speed between nodes as fast as it can be.

i'm even considering developing an alternative carrier, but this seems to be a really complex and  overwhelming task.

again, thank you for any insights you feel like sharing.

cheers,

r.</description>
		<content:encoded><![CDATA[<p>thank you ulf and richard for these precious insights. ulf, unfortunately i believe that it&#8217;s already too late for me, as my brains seems to be thinking in slices too :)</p>
<p>still, i still haven&#8217;t had a grab on:</p>
<p>1. why qr is actually working [or if it's working only with such a benchmark];<br />
2. what should i beware of when using qr.</p>
<p>to my understanding up until now, qr could be particularly costly on multi-core machines. is this correct? this alone could give me enough reasons to think again before using qr.</p>
<p>fact is, i&#8217;ve designed a multi-node architecture from the start [i.e. not based on clusters] and i would really like to find a &#8220;best practice&#8221; way to get the speed between nodes as fast as it can be.</p>
<p>i&#8217;m even considering developing an alternative carrier, but this seems to be a really complex and  overwhelming task.</p>
<p>again, thank you for any insights you feel like sharing.</p>
<p>cheers,</p>
<p>r.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Boost message passing between Erlang nodes by Ulf Wiger</title>
		<link>http://www.ostinelli.net/boost-message-passing-between-erlang-nodes/comment-page-1/#comment-2117</link>
		<dc:creator>Ulf Wiger</dc:creator>
		<pubDate>Wed, 10 Jun 2009 13:23:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.ostinelli.net/?p=273#comment-2117</guid>
		<description>...what's more (my brain seems to schedule in slices, just like Erlang does - beware: this may happen to you too, in time!)

There are good reasons to make ! fully asynchronous in SMP, while it isn't in non-SMP. There's a tiny backoff control that checks the length of the receiver's inbox, and punishes the sender if it's too long. This is *very* costly on many-core. Similarly, sending to a port is a blocking operation, which favors solutions where only one process sends to the port. Perhaps this too should be made fully asynchronous...? This is easier to accomplish for Distributed Erlang than e.g. for gen_tcp, since it would break the gen_tcp API unless it is extended.</description>
		<content:encoded><![CDATA[<p>&#8230;what&#8217;s more (my brain seems to schedule in slices, just like Erlang does - beware: this may happen to you too, in time!)</p>
<p>There are good reasons to make ! fully asynchronous in SMP, while it isn&#8217;t in non-SMP. There&#8217;s a tiny backoff control that checks the length of the receiver&#8217;s inbox, and punishes the sender if it&#8217;s too long. This is *very* costly on many-core. Similarly, sending to a port is a blocking operation, which favors solutions where only one process sends to the port. Perhaps this too should be made fully asynchronous&#8230;? This is easier to accomplish for Distributed Erlang than e.g. for gen_tcp, since it would break the gen_tcp API unless it is extended.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Boost message passing between Erlang nodes by Ulf Wiger</title>
		<link>http://www.ostinelli.net/boost-message-passing-between-erlang-nodes/comment-page-1/#comment-2116</link>
		<dc:creator>Ulf Wiger</dc:creator>
		<pubDate>Wed, 10 Jun 2009 13:15:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.ostinelli.net/?p=273#comment-2116</guid>
		<description>...commenting on my own comment above, of course in a multicore world, it is by no means certain that this invalidates the benchmark, or the utility of qr, much like ets has been a popular optimization on single-core, but is much less attractive on SMP due to the low-level locking.</description>
		<content:encoded><![CDATA[<p>&#8230;commenting on my own comment above, of course in a multicore world, it is by no means certain that this invalidates the benchmark, or the utility of qr, much like ets has been a popular optimization on single-core, but is much less attractive on SMP due to the low-level locking.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Boost message passing between Erlang nodes by Ulf Wiger</title>
		<link>http://www.ostinelli.net/boost-message-passing-between-erlang-nodes/comment-page-1/#comment-2115</link>
		<dc:creator>Ulf Wiger</dc:creator>
		<pubDate>Wed, 10 Jun 2009 13:12:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.ostinelli.net/?p=273#comment-2115</guid>
		<description>@Richard: Actually, since the send() function spawns processes in a tight loop, one could imagine that there will indeed be lock contention on the distributed send. Spawn is non-blocking, and returns as soon as it has inserted the other process in the ready queue. It's therefore likely to spawn a great number of processes before it yields, e.g. due to context reductions.</description>
		<content:encoded><![CDATA[<p>@Richard: Actually, since the send() function spawns processes in a tight loop, one could imagine that there will indeed be lock contention on the distributed send. Spawn is non-blocking, and returns as soon as it has inserted the other process in the ready queue. It&#8217;s therefore likely to spawn a great number of processes before it yields, e.g. due to context reductions.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
