[zeromq-dev] Releasing RAM in Chunks

Paul Colomiets paul at colomiets.name
Tue Jul 3 10:25:26 CEST 2012


Hi Anatoly,

On Mon, Jul 2, 2012 at 9:48 PM, Anatoly <tolitius at gmail.com> wrote:
> ØMQ Crowd,
>
>     Reading messages from a socket, placing them on the zmq (PUSH). On the
> other side reading messages of off the queue (PULL) and persisting them in
> to DB.
>
>     If we get millions of messages, ØMQ takes X GB of RAM (since the pushing
> in this case is at much higher speed than pulling that waits for a DB for
> each pull), and does not release these Gigs until ALL of the messages are
> consumed (e.g. pulled).
>
>     Is there a way to configure it to release memory in chunks as the queue
> is being emptied?
>

Unless you do something wrong, as others described. The effect you see
may be because of memory fragmentation, so as last resort you can try
to link your app against jemalloc, as there is evidence that jemalloc
handles fragmentation better.

In any case please report what fixed the problem.

-- 
Paul



More information about the zeromq-dev mailing list