[zeromq-dev] ZMQ_HWM doesn't work?

Pavel Gushcha pavimus at gmail.com
Mon Jan 17 12:49:03 CET 2011


2011/1/17 Martin Sustrik <sustrik at 250bpm.com>:
> Pavel,
>
>> But producer/consumer doesn't follow yet ZMQ_HWM limits. I specified
>> 10 as HWM for producer and consumer. So, after staring consumer
>> producer must sent totally about 20 messages (10 will be placed in
>> producer output buffer, 10 in consummer input buffer). Now, after
>> starting consumer, producer in one second sends about 37000-44000
>> messages.
>
> The rest of the messages are in the TCP buffers. You can limit TCP buffers
> using ZMQ_SNDBUF/ZMQ_RCVBUG options.
>
> Martin
>

Thanks Martin, now all is clear! In my live system i have 16 ST_PUSH
producers and 16 ST_PULL consumers, and each consumer is connected to
all producers. default size of RCVBUF on linux is 110kb, so in this
scenario may be 16*16*2*110=56320 kbytes of data, uncovered by HWM
limits. to decrease this problem, as i understand i must use forwarder
device between producers and consumers. this will decrease uncovered
data to 16*2*2*110=7040 kbytes and this value will be grow linearly
with growing number of producer/consumers.



More information about the zeromq-dev mailing list