art-daq / artdaq

Other
0 stars 3 forks source link

BoardReader memory usage increases with using circular_buffer_mode_example and nADCcounts of 200 #125

Closed eflumerf closed 2 years ago

eflumerf commented 2 years ago

This issue has been migrated from https://cdcvs.fnal.gov/redmine/issues/21738 (FNAL account required) Originally created by @bieryAtFnal on 2019-01-22 23:01:14


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:

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


Subtasks:


Subtasks:

eflumerf commented 2 years ago

Comment by @eflumerf on 2019-02-12 18:17:53


due to changes in a related task: #21889

eflumerf commented 2 years ago

Comment by @eflumerf on 2019-11-08 16:17:06


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 echodate;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.