Extra memcpy in NetMonWrapper and TransferWrapper
While reviewing code and thinking about solutions for #22154, I discovered that we are performing an extra copy of all data going into DataLoggers, Dispatchers, and online monitors. Data is copied from the shared memory into Fragments, and then again into a buffer to be used with TBufferFile. With some minor API changes in ArtdaqInput, it is possible to set up the TBufferFile from the Fragment directly, eliminating a malloc and memcpy.
#2 Updated by Kurt Biery 11 months ago
I did the simple validation tests of running an artdaq-demo system on mu2edaq13 with the request_based_dataflow_example sample config with the existing and new code.
With the existing code on the artdaq develop branch and the new code on the feature/23599_ArtdaqInput_EliminateExtraMemcpy branch, the data files from 90-seconds runs are similar in size, and the displays and printouts from the online monitoring look similar.
#3 Updated by Ron Rechenmacher 10 months ago
- Status changed from Resolved to Reviewed
I merged the branch into develop and ran slow rate to disk (with CheckIntegrity) and let daqinterface check the data file, then ran at fast rate (without CheckIntegrity) and saw the increase in max throughput -- before I could only get about 260 MB/s (compressionLevel:0) and after I could get more than 400 MB/s.
Note: Running with a Dispatcher seems to limit rate - the rates above are without a Dispatcher running.