<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 6.00.6000.16705" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>> Long before threading models came into vogue, multiple processes
<DIV>> were taking advantage of multi-CPU systems simply by letting
</DIV>
<DIV>> the OS scheduler choose which CPU on which to run the next</DIV>
<DIV>> runnable process.</DIV>
<DIV> </DIV>
<DIV>Well... a single process would never exceed a capacity of a single
CPU. Therefore, if you had, say, 4 CPUs, one process shall never exceed more
than 25% of the overall system capacity. In a case of SOLARIS, this may be true
even if you create multiple threads (e.g. if thread were created as bound
threads, they will still be scheduled using the same light-weight process, but
that is another matter alltogether).</DIV>
<DIV> </DIV>
<DIV>> Since Erlang threads are "green" threads, they don't individually
use</DIV>
<DIV>> the threading model of the underlying operating system
anyway.</DIV>
<DIV>> Each VM, other than for I/O operations on files (controleld by
+A, I believe),</DIV>
<DIV>> uses AFAIK one O/S thread per scheduler. So +S 8 will use 8 O/S
threads.</DIV>
<DIV>> When you have 8 threads sharing something (which they will when
running SMP),</DIV>
<DIV>> there is a risk of contention slowing things down.</DIV>
<DIV><BR> </DIV>
<DIV>That is why I'm saying that one should look at the code, and ensure that
code is written to take advantage of SMP environment. If you going to use SMP
machine and then use it as a "normal" multi-CPU machine, you would be better off
staying with a multi-CPU machine which has a faster clock. </DIV>
<DIV>In my experience so far, one should stay clear from servers that are doing
a lot of processing per request -- clock is slower, clearly indicating that
server will be slower, and yet we have more schedulers resulting in more
requests being generated. One may experiment with different priorities and
change server to higher priority, which is, I suspect, what one should do for
the code that was written for non-SMP machines. My preference, however, would be
to write another kind of server, that would spawn a new process for each
request, which will in turn report back to the caller bypassing the
server.</DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>V.</FONT></DIV></DIV></BODY></HTML>