Performance of selective receive

Pascal Brisset pascal.brisset@REDACTED
Sun Nov 13 23:21:13 CET 2005


todd writes:
 > Having unconstrained senders turns out to be a gun that can fire at anytime.

Note that in my example, the sender *is* constrained: it has
bounded request rate and jitter.  It's just not flow-controlled.

This is very common: input traffic comes through a pipe that can't
physically carry more than X requests per second; or an SLA says
the system must be able to process X requests per second, but is
allowed to reject traffic beyond that.

In such situations the usual approach is to benchmark the system and
check that it needs e.g. less than 10 % CPU to process 2*X calls/s.
My point is: For a system which does selective receive on
uncontrolled message queues, 10 % might not be a safe level at all
- unless you have included in your benchmark all sorts of weird
behaviours covering not only the variability of the input traffic,
but also random delays and jitters in the runtime system, OS,
internal network, disk throughput, management operations, etc.

-- Pascal




More information about the erlang-questions mailing list