[zeromq-dev] Problem with high memory usage with NetMQ

Sascha Niedersteiner sascha.niedersteiner at st.oth-regensburg.de
Fri Jan 23 13:21:32 CET 2015

I'm currently trying to evaluate if ZMQ is the right tool for a project where I have to send data between different applications which may possibly also be on different machines. Until now everything looked pretty good but while applying a Pub-Sub pattern to bigger byte arrays I noticed a rather extreme usage of the systems memory (rising to about 3.8 GB for each publisher and subscriber). 
The code I used for the tests can be found here:
http://pastebin.com/EzD7kY5y the publisher I used
http://pastebin.com/YmHcjJLB the subscriber

Currently both publisher and subscriber run on the same machine. The array I send is 8.294.400 long. I used perfmon to watch the memory usage while trying high water marks of 1000, 1 or unlimited (which were set before the bind/connect) and was not able to see any difference. If I understand correctly both PUB and SUB should drop messages exceeding the HWM and therefore not clutter my systems RAM? Can anyone point me in the right direction regarding my problem?

Used versions:
NetMQ Version:
.NET 4.0
OS: Windows 7 64-bit

More information about the zeromq-dev mailing list