Event Buffer: Difference between revisions

From MidasWiki
Jump to navigation Jump to search
No edit summary
(The midas documentation has moved to https://midas.triumf.ca/docs/)
Tag: Replaced
 
(6 intermediate revisions by one other user not shown)
Line 1: Line 1:
By default the event buffer (used to contain the data from the event) is named SYSTEM. Its default size is 8MB.  
The midas documentation has moved. See [https://midas.triumf.ca/docs/develop/features/acquiring_data/event_buffers/configuring/#event-and-buffer-sizes Event and buffer sizes] on the Event buffers: configuring page for the new documentation about increasing event and buffer sizes.
 
== Increase size of event buffer ==
In some experiments, this may not be large enough.
 
To increase the size, one must increase:
* the value of ODB [[/Experiment ODB tree #/Experiment/MAX_EVENT_SIZE |/Experiment/MAX_EVENT_SIZE]]
* the size of the SYSTEM shared memory event buffer (and any buffers used by the event builder,
etc)
* max_event_size & co in the [[frontend]].
 
Actual limits on the bank size and event size are [[#Limits on the bank and event sizes|described below]].
 
 
Ultimately, the maximum event size is limited by the size of the SYSTEM buffer which is
limited by the physical memory of your computer. No recompilation of MIDAS necessary.
 
 
== Limits on the bank and event sizes ==
 
Limitations in order:
 
 
# bank32 size is limited to a 32 bit integer size (about 4000 Gbytes)
# bank size is limited by event size
# event size in a frontend based on MIDAS [[mfe.c]] is limited to the value of max_event_size set by the user
# maximum event size that can go through the MIDAS event buffer system is limited to ODB value [[/Experiment/MAX_EVENT_SIZE (MAX_EVENT_SIZE in midas.h does not do anything now)
# maximum event size is limited to '''half''' the size of the SYSTEM shared memory event buffer (or any other buffers that the event has to go through)
# default size of the SYSTEM buffer is 8 Mbytes set by ODB /Experiment/Buffer sizes/SYSTEM. This limits maximum event size to about 4 Mbytes.
# size of SYSTEM buffer can be increased to arbitrary size, but in practice no bigger than the amount of computer physical memory minus space needed for running the [[frontend]] program and [[mlogger]], which also allocate buffer space to hold 1 event of maximum size.
 
 
So for a computer with 8 Gbytes of RAM, you can make the SYSTEM buffer size 4
GBytes, set ODB MAX_EVENT_SIZE to 1 Gbyte, and in theory, you should be able to
write 1 Gbyte events from your frontend to disk.
 
In practice, some of the biggest events to go through a MIDAS system are
non-compressed waveforms in the T2K/ND280 FGD and TPC detectors, about 4 Mbytes of
data per event.
 
Other considerations (rules of thumb):
 
# the SYSTEM event buffer should be big enough to hold 10-100 events.
# the SYSTEM event buffer should be big enough to hold about 5-10 seconds of data
:: i.e. if the event size is 1 Mbyte and data rate is 1 Hz, 10 seconds of data will be 1Mbyte*1Hz*10sec = 10 Mbytes.
 
This is because the SYSTEM buffer decouples the real-time activity of the [[frontend]]
program from non-real-time activity of writing data to storage devices.

Latest revision as of 22:00, 30 October 2026

The midas documentation has moved. See Event and buffer sizes on the Event buffers: configuring page for the new documentation about increasing event and buffer sizes.