Support #21738

BoardReader memory usage increases with using circular_buffer_mode_example and nADCcounts of 200

Added by Kurt Biery about 2 years ago. Updated 5 months ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
(Total: 0.00 h)


While validating Issue 21640, I noticed that the memory usage of the BoardReader that has a wide request window increases even when the memory leak mentioned in Issue 21640 has been fixed.

This issue can be reproduced using the code on the develop branches of artdaq, artdaq_core, and artdaq_utilities (as of 17:00 on 22-Jan-2019). The configuration that should be used is the circular_buffer_mode_example in the artdaq-utilities-daqinterface/simple_test_config area, on the feature/CircularBufferMode_NonUniqueTest branch.

The only changes that I made to that configuration are the following:

[biery@mu2edaq01 circular_buffer_mode_example]$ git diff .
diff --git a/simple_test_config/circular_buffer_mode_example/DataLogger1.fcl b/simple_test_config/circular_buffer_mode_example/DataLogger1.fcl
index 1bd7432..dad9ae2 100644
--- a/simple_test_config/circular_buffer_mode_example/DataLogger1.fcl
+++ b/simple_test_config/circular_buffer_mode_example/DataLogger1.fcl
@@ -52,7 +52,7 @@ outputs: {
     fileName: "/tmp/artdaqdemo_r%06r_sr%02s_%to_%#.root" 
     fileProperties: { maxSubRuns: 1 maxRuns: 1 maxSize: 8192000 }
     fastCloning: false
-    compressionLevel: 3
+    compressionLevel: 0

diff --git a/simple_test_config/circular_buffer_mode_example/component03_hw_cfg.fcl b/simple_test_config/circular_buffer_mode_example/component03_hw_cfg.fcl
index 7983abb..0342984 100644
--- a/simple_test_config/circular_buffer_mode_example/component03_hw_cfg.fcl
+++ b/simple_test_config/circular_buffer_mode_example/component03_hw_cfg.fcl
@@ -40,7 +40,7 @@ separate_data_thread: true # MUST be true for requests to be applied! If request
 separate_monitoring_thread: false # Whether a thread should be started which periodically calls checkHWStatus_, a user-defined function which should be used to check hardw
 hardware_poll_interval_us: 0 # How often, in microseconds, checkHWStatus_() should be called. 0 to disable.

-nADCcounts: 10
+nADCcounts: 200

 usecs_between_sends: 1000
 throttle_usecs: 0

With those changes and the following command:
  • sh ./ --config circular_buffer_mode_example --bootfile `pwd`/artdaq-utilities-daqinterface/simple_test_config/circular_buffer_mode_example/boot.txt --comps component01 component03 --runduration 900 --no_om --partition=4

the memory usage of the component_03 BoardReader increases to 4.4% after 5 minutes of running and 6.4% after 8 minutes.

circularbuffermodememoryusage.xlsx (27.9 KB) circularbuffermodememoryusage.xlsx Eric Flumerfelt, 11/08/2019 10:14 AM


Support #21889: Make sure that artdaq runs cleanly under ASANClosedEric Flumerfelt

Related issues

Related to artdaq - Bug #21640: Memory leak in ContainerFragmentLoaderClosed01/08/2019


#1 Updated by Kurt Biery about 2 years ago

  • Related to Bug #21640: Memory leak in ContainerFragmentLoader added

#2 Updated by Eric Flumerfelt about 2 years ago

  • Start date changed from 01/22/2019 to 02/12/2019
  • Due date set to 02/12/2019

due to changes in a related task: #21889

#3 Updated by Eric Flumerfelt over 1 year ago

I'm marking this issue as resolved. I performed long tests using the described configuration today (11/08/2019) with develop artdaq, and did not see significant increases in memory usage. I ran the following command in parallel with my artdaq session: while [ 1 ];do echo `date`;top -b -n 1|grep boardreader;sleep 10;done, and have uploaded the results in an Excel spreadsheet for a ~20 minute run. Peak memory usage for this boardreader was recorded at 0.9%, up from 0.6% when I started recording at the beginning of the run.

Also available in: Atom PDF