[zeromq-dev] Big memory occupation with zmq_msg_init_data and zmq_msg_send after large number of packets transmitted

Yan, Liming (Nokia - CN/Hangzhou) liming.yan at nokia.com
Wed May 3 11:56:22 CEST 2017


Hi,
   Anyone encountered this problem?  The process still occupies large physical memory when no any packets transmitting, after a turn of running of big traffic.  Seems some memory used by ZMQ not freed back to system. I'm wondering if this is normal or not?  Or anything wrong with me?  Thanks.

# ./zmq-mem-test -c -p 169.254.0.10 -l 512 -n 10000000
Client started on tcp://169.254.0.10:5999.
Actual sent msg count: 60000.

Total 9971945 freed in customized freer.

20012 root      20   0 1950.1m 214.7m   0.0  1.8   0:05.03 S              `- zmq-mem-test
20012 root      20   0 1950.1m 214.7m   0.0  1.8   0:05.03 S              `- zmq-mem-test

The attached file is the example code with zero copy method zmq_msg_init_data and zmq_msg_send.  I'm just testing if all malloced memory from heap can be freed by asynchronous ZMQ handler. HWM is set with 30000 with no blocking sending, so many sending failed because of queue full.

./zmq-mem-test -c -p 169.254.0.10 -l 512 -n 10000000
./zmq-mem-test -s -p 169.254.0.10

--------^_^--------
Best Regards
Yan Limin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20170503/c30c5f6c/attachment.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: zmq-mem-test.c
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20170503/c30c5f6c/attachment.c>


More information about the zeromq-dev mailing list