-
Notifications
You must be signed in to change notification settings - Fork 875
Description
Is there an already existing issue for this?
- I have searched the existing issues
Expected behavior
After running for a long time, FastDDS memory usage hasn't changed significantly.
Current behavior
After running for 12 hours, the memory usage of FastDDS increased by 11.8M.
Steps to reproduce
I modified example SecureHelloWorldExample.
Barry-Xu-2018@43e3d2d
The publisher will create 20 topics and 20 DataWriters. One of the DataWriters will send a message to the subscriber and then finish. The publisher program will be executed in a loop.
Under FastDDS v2.14.4, apply above change and build SecureHelloWorldExample
First terminal to run subscriber
# cd /Path/To/fastrtps/examples/cpp/dds/SecureHelloWorldExample/build
# ./DDSSecureHelloWorldExample subscriberSecond terminal to run publisher
I use a script to run publisher continuously
# cat loop.sh
#!/bin/bash
while true
do
./DDSSecureHelloWorldExample publisher
done# cd /Path/To/fastrtps/examples/cpp/dds/SecureHelloWorldExample/build
# ./loop.shThird terminal to record memory usage of ./DDSSecureHelloWorldExample subscriber
Use the following script to record memory usage every 5 seconds for a total of 12 hours.
# cat get_memory_usage.sh
#!/bin/bash
PID=`pgrep -f "./DDSSecureHelloWorldExample subscriber"`
for i in {1..8640}
do
ps -p ${PID} -o rss --no-headers
sleep 5
doneHere is an output of memory usage on my test environment
test_12_hours_0725.log
Fast DDS version/commit
v2.14.4
Platform/Architecture
Other. Please specify in Additional context section.
Transport layer
Default configuration, UDPv4 & SHM
Additional context
Platform/Architecture: Ubuntu 22.04/amd64
I also tested version v2.13.1 using the above steps. This issue is more severe in the older version. Testing for just 10 minutes showed a memory usage increase of 17MB.
I didn't find any memory leak issues in FastDDS when using Valgrind.
XML configuration file
Relevant log output
Network traffic capture
No response