<div dir="ltr">Well, now I know that at least <i>one</i> person read my question :)<br><br>Aren't concerns about when SMP is and isn't beneficial at least thought-provoking? Or do I need to write and publish actual code showing the differences?<br>
<br><div class="gmail_quote">2008/9/3 Valentin Micic <span dir="ltr"><<a href="mailto:valentin@pixie.co.za">valentin@pixie.co.za</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff">
<div><font size="2" face="Arial">Is ETS utilizing the same locking policy for all
table types (namely: public, protected or private), and if so, would it be
possible to relax locking for protected and private access? </font></div>
<div><font size="2" face="Arial"></font><font size="2" face="Arial"></font> </div>
<div><font size="2" face="Arial">We've noticed that if more than one process
requires an access to the same ets table (in SMP environment), the system slows
down considerably due to the locking mechanism. It is quite possible to
optimize this by fronting such a table with a dedicated process for request
serialization -- works better as there is always only one proccess requesting a
lock. </font><font size="2" face="Arial"> Actually... as much as this works
well for one table, not so sure how would such an "optimization" work for a
large number of tables. By relaxing (or not having) a locking policy for (at
least) tables with a private access, there would be no questions about
it.</font></div>
<div><font size="2" face="Arial"></font><font size="2" face="Arial"></font> </div>
<div><font size="2" face="Arial">V.</font></div>
<div><font size="2" face="Arial"></font> </div>
<blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">----- Original Message ----- </div>
<div style="background: rgb(228, 228, 228) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
<b>From:</b>
<a title="erlang-questions_efine@usa.net" href="mailto:erlang-questions_efine@usa.net" target="_blank">Edwin Fine</a> </div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b> <a title="erlang-questions@erlang.org" href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a>
</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b> Tuesday, September 02, 2008 7:09
PM</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b> [erlang-questions] Parallelism,
SMP, and multicore question</div>
<div><br></div>
<div dir="ltr">Since the cognoscenti are talking about parallelism, maybe
someone can answer something that has been perplexing me.<br><br>Sometimes it
has been measurably faster on a multicore system to run one VM per core, each
with SMP disabled (or +S 1), than it is to run one or more SMP VMs. This is
true even when running code that is innately parallel. On the other hand, I
have seen benchmarks that show near-linear speedups using SMP. <br><br>I don't
have code to support this; it's just something I, along with a couple of other
people -- for whom I don't want to speak -- have noticed in
passing.<br><br>Does anyone have any insight into the internals of SMP who can
tell me when SMP might be an asset, and when a liability? I know this is a
"how long is a piece of string" question, but even though it's pretty general,
someone somewhere who really knows Erlang inside out (i.e. not me) must surely
have encountered this phenomenon.<br><br>Are there conditions where contention
between the threads of the SMP processes (e.g. mutexes) becomes significant
enough that multiple separate non-SMP VMs perform better? If so, what would
those conditions be?<br><br>Could it have anything to do with the mix of
CPU-bound processes and inter-process messaging or network I/O? If so, please
could someone explain the mechanism?<br><br>Anyone?<br><br></div>
<p>
</p><hr>
<p></p>_______________________________________________<br>erlang-questions
mailing
list<br><a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br><a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a></blockquote>
</div>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br></blockquote></div><br></div>