[ros-users] [Discourse.ros.org] [Next Generation ROS] Increasing memory usage for publishing nodes with enabled intra-process communication

Eirik Hexeberg Henriksen ros.discourse at gmail.com
Mon Dec 4 09:13:08 UTC 2017

I also did a small test with a basic talker/listener. I used the "two_node_pipeline" from the intra process demo code:

> ros2/demos/intra_process_demo/include/two_node_pipeline/two_node_pipeline.cpp

The only change I made was to change the time interval in the timer on line 49. from 1s to 10ms to get results faster. I got the following results:
Starting memory                  21 420
after 80 000 publications:    28 100
after 100 000 publications:  29 948
after 175 000 publications:  37 724
after 200 000 publications:  39 308
And continues to rise.

I then changed both nodes by turning off intra-process communication, to verify that it in fact was something with the intra process communication causing the increased memory usage:
Starting memory:                  18036
after 200 000 publications:   18036

My original program sending a jpeg image over ros2 15 times per second has now been running for 6 days. It had a starting reserved memory of 33M, and has monotonically increased its reserved memory to 981M. I did the same test on the program with intra-process communication turned off and the memory did not increase.

[Visit Topic](https://discourse.ros.org/t/increasing-memory-usage-for-publishing-nodes-with-enabled-intra-process-communication/3261/5) or reply to this email to respond.

More information about the ros-users mailing list