[erlang-questions] trying to understand i/o threading (erl +A)

Bengt Kleberg bengt.kleberg@REDACTED
Mon Nov 13 09:20:51 CET 2006


On 2006-11-10 18:40, Count László de Almásy wrote:
> Greetings,
> 
> I'm attempting to understand the i/o threading option to erl better
> (i.e, erl +A):
> 
> +A size
>     Sets the number of threads in async thread pool, valid range is
>     0-1024. Default is 0.
> 
> Is there a metric one can use to gage how many threads I should start
> for an application such as the Yaws webserver?  My system has 1GB of

...deleted

the ''Efficiency Guide'' says:
''If you have time critical code that is running too slow. Do not waste 
your time trying to guess what might be slowing it down. The best 
approach is to profile your code to find the bottlenecks and concentrate 
your efforts on optimizing them.''

in your case i would suggest measuring the performance of your 
application(s?) with increasing values for size, until the performance 
stops increasing.


that might sound like hard work. as an alternative, i think i saw 
somewhere that _if_ your platform uses the async thread pool you could 
try setting size to one more than the number of processors on your 
system. in this day and age i could furthermore guess that processors 
could be replaced with number of cores.


bengt
-- 
    EPO guidelines 1978: "If the contribution to the known art resides
    solely in a computer program then the subject matter is not
    patentable in whatever manner it may be presented in the claims."




More information about the erlang-questions mailing list