zeromq / jzmq

Java binding for ZeroMQ
http://www.zeromq.org
GNU General Public License v3.0
590 stars 364 forks source link

Java process memory consumption. #488

Open golanha opened 4 years ago

golanha commented 4 years ago

I use REQ REP I am trying to send a very large message (- 1Gi) from the server as reply.

I print related memory information on the client side process: before getting a 2 Giga message:

VSZ 11231

before 0
tota lheap 504
free heap 497
used heap 6
VSZ 11231
RSS 54

After getting the message: VSZ 12965

after 0
tota lheap 1600
free heap 642
used heap 957
VSZ 12965
RSS 1991

When receiving 1Gi message,although the heap is increased in 1Gi as expected, the process memory consumption grows by 1.5-2 Gi more than before receiving the message (12965 - 11231=1734). Attached is the project I am running to print this information. playground.zip BTW when using jzmq implementation the process memory grows by 1Gi only