[erlang-questions] On selective receive (Re: eep: multiple patterns)
Sean Hinde
sean.hinde@REDACTED
Tue Jun 3 13:13:08 CEST 2008
On 3 Jun 2008, at 11:38, Christian S wrote:
> On Tue, Jun 3, 2008 at 12:11 PM, Sean Hinde <sean.hinde@REDACTED>
> wrote:
>> I respectfully disagree. It is nigh on impossible to predict where
>> there might be some error that leads to a large queue, and this would
>> lead to "defensive programming" where every process has a short max
>> length. This would result in random crashes and loss of data for
>> those
>> uncommon situations in an generally well designed system where there
>> might be a legitimate short term peak in queue lengths.
>>
>> We already have a mechanism to restart if a queue grows too large
>> (actually 2 - process_info monitoring, and out of memory !)
>
> Maybe more-queued-than-a-set-threshold could be made into a
> traceable event?
Could be nice yes.
I sill think it would also be much better if the system didn't slow to
a crawl if queues grow large - this is the effect that almost
guarantees the need for a restart. To quote Chandru "In real life
situations, when a process gets into this state, the only way to fix
it is to kill that process as it will *probably never catch
up*" (emphasis mine).
Both slowdown effects (GC copying and selective receive repeated
searching) seem quite amenable to smart optimisations.
> What happened to the thread about creating a dtrace provider for
> erlang?
I was left with the impression someone went away to start implementing
stuff ..
Cheers,
Sean
More information about the erlang-questions
mailing list