Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Memory leak #64

Closed
jgupta opened this Issue · 2 comments

3 participants

@jgupta

I have created two scripts to test performance of PHP binding and found Memory leak.

pub https://gist.github.com/3308329
sub https://gist.github.com/3308327

sub eats memory very fast (over 2GB in 2-3 minutes). Pub looks stable at 10.1MB.

memory_get_usage() function shows stable memory usage of 327996.

On side note, node.js binding is showing msg rate of 60k/sec while PHP binding is showing rate of 400k/sec. I wounder if I am doing something wrong.

@cameronjacobson

Putting the following line after line 6 of your 'pub' script seems to fix the problem for me:

$responder->setSockOpt(ZMQ::SOCKOPT_HWM, 10);

Basically what I think this means is your subscriber is not consuming messages as fast as publisher is sending them out.

@mkoppanen
Owner

@cameronjacobson is most likely right here. You can easily generate tons of messages before you consume them and flood the publisher. I think the issue with node.js is how zeromq is integrated into the event loop.

@mkoppanen mkoppanen closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.