[zeromq-dev] HWM default

Blair Bethwaite blair.bethwaite at monash.edu
Thu May 12 09:17:22 CEST 2011


On 12 May 2011 16:56, Martin Sustrik <sustrik at 250bpm.com> wrote:
> On 05/09/2011 02:41 PM, Paul Colomiets wrote:
>
>> Well, I have no practical experience, but a lot of alloc_assert's in the
>> code says that it will be aborted. BTW, it will be so not only if
>> overcommit_memory is set right, but also if ulimit is set for the
>> application's memory. Which is awfully bad IMO.

Ok good, thanks for testing. I more-or-less assumed this would be the
case, but was lazy.

> What else would you do if you run out of memory? Any recovery mechanism
> in user space is likely to fail because there's no memory available :)
> Killing (and possibly restarting) the app seems like a reasonable option
> to me.

AFAICT 0MQ would have to do some kind of pooled allocation, where it
allocates large chunks upfront and then sub-allocates for message
buffers and such within the lib. In this scenario, when a system level
allocation fails 0MQ could make an attempt to continue with what
memory it already owns (e.g., by dynamically lowering HWM). But(!),
this would be awfully complex, unpredictable, and IMO undesirable.
Better to have a clear error and a doc somewhere describing potential
out-of-memory scenarios and possible remedies.

Cheers,
~Blair

-- 
Blair Bethwaite
Researcher, Developer, SysAdmin, Nimrod and Grid support specialist
Monash eScience and Grid Engineering Lab (http://www.messagelab.monash.edu.au/)
+61 3-9903-2800



More information about the zeromq-dev mailing list