[zeromq-dev] HWM default
sustrik at 250bpm.com
Mon May 9 07:40:35 CEST 2011
On 05/09/2011 03:49 AM, Paul Colomiets wrote:
> I should second Andrew Hume. The HWM is really easy way to get deadlock
> for novice. And if you are proficient with zeromq, you know when to set
> HWM and which value suites your usage.
> Also should remind that deadlock probability was the reason why my
> "shutdown" proposal was rejected.
We should distinguish deadlocks inside 0MQ (such as one introduced by
the shutdown functionality) which should be considered 0MQ bugs and
deadlocks in applications on top of 0MQ (the ones we are discussing now)
which should be considered application bugs.
The question here is: The defaults are aimed primarily on newbies. Which
behaviour is it easier for newbie to encounter? Deadlock or OOM?
I would guess that it's OOM. Shove the messages to the peer in a busy
loop and here you go: kaboom!
It should be acknowledged though that OOMs are easier to debug than
deadlocks. However, debugging is not exactly newbie activity. It's
likely to be performed by more experienced users which should be aware
of an option of setting HWM to infinity to induce OOMs.
More information about the zeromq-dev