Skip to content

Commit be3c029

Browse files
committed
added consumer-FMQ threadsFifoSize
1 parent efde692 commit be3c029

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

doc/configurationParameters.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ The parameters related to 3rd-party libraries are described here for convenience
6969
| consumer-FairMQChannel-* | memoryPoolNumberOfPages | int | 100 | c.f. same parameter in bank-*. |
7070
| consumer-FairMQChannel-* | memoryPoolPageSize | bytes | 128k | c.f. same parameter in bank-*. |
7171
| consumer-FairMQChannel-* | sessionName | string | default | Name of the FMQ session. c.f. FairMQ::FairMQChannel.h |
72-
| consumer-FairMQChannel-* | threads | int | 0 | If set, a pool of thread is created for the data processing. |
72+
| consumer-FairMQChannel-* | threads | int | 0 | If set, a pool of threads is created for the data processing. |
73+
| consumer-FairMQChannel-* | threadsFifoSize | int | 0 | Incoming FIFO size for processing threads. By default, value is guessed. |
7374
| consumer-FairMQChannel-* | unmanagedMemorySize | bytes | | Size of the memory region to be created. c.f. FairMQ::FairMQUnmanagedRegion.h. If not set, no special FMQ memory region is created. |
7475
| consumer-fileRecorder-* | bytesMax | bytes | 0 | Maximum number of bytes to write to each file. Data pages are never truncated, so if writing the full page would exceed this limit, no data from that page is written at all and file is closed. If zero (default), no maximum size set.|
7576
| consumer-fileRecorder-* | dataBlockHeaderEnabled | int | 0 | Enable (1) or disable (0) the writing to file of the internal readout header (Readout DataBlock.h) between the data pages, to easily navigate through the file without RDH decoding. If disabled, the raw data pages received from CRU are written without further formatting. |

src/ConsumerFMQchannel.cxx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -423,13 +423,13 @@ class ConsumerFMQchannel : public Consumer
423423
cfg.getOptionalValue<int>(cfgEntryPoint + ".enablePackedCopy", enablePackedCopy);
424424
theLog.log(LogInfoDevel_(3008), "Packed copy enabled = %d", enablePackedCopy);
425425

426-
// configuration parameter: | consumer-FairMQChannel-* | threads | int | 0 | If set, a pool of thread is created for the data processing. |
426+
// configuration parameter: | consumer-FairMQChannel-* | threads | int | 0 | If set, a pool of threads is created for the data processing. |
427427
cfg.getOptionalValue<int>(cfgEntryPoint + ".threads", nwThreads);
428428
if (nwThreads) {
429-
theLog.log(LogInfoDevel_(3008), "Using %d threads for DD formatting", nwThreads);
430-
}
431-
if (nwThreads) {
432-
wThreadFifoSize = 88 / nwThreads; // 1s of buffer
429+
// configuration parameter: | consumer-FairMQChannel-* | threadsFifoSize | int | 0 | Incoming FIFO size for processing threads. By default, value is guessed. |
430+
wThreadFifoSize = memoryPoolNumberOfPages / nwThreads; // by default, enough slots to store all pages from this pool
431+
cfg.getOptionalValue<int>(cfgEntryPoint + ".threadsFifoSize", wThreadFifoSize);
432+
theLog.log(LogInfoDevel_(3008), "Using %d threads for DD formatting, FIFO size = %d", nwThreads, wThreadFifoSize);
433433
wThreads.resize(nwThreads);
434434
wThreadShutdown = 0;
435435
int isError = 0;

src/readoutConfigEditor.tcl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ set configurationParametersDescriptor {
4545
| consumer-FairMQChannel-* | memoryPoolNumberOfPages | int | 100 | c.f. same parameter in bank-*. |
4646
| consumer-FairMQChannel-* | memoryPoolPageSize | bytes | 128k | c.f. same parameter in bank-*. |
4747
| consumer-FairMQChannel-* | sessionName | string | default | Name of the FMQ session. c.f. FairMQ::FairMQChannel.h |
48-
| consumer-FairMQChannel-* | threads | int | 0 | If set, a pool of thread is created for the data processing. |
48+
| consumer-FairMQChannel-* | threads | int | 0 | If set, a pool of threads is created for the data processing. |
49+
| consumer-FairMQChannel-* | threadsFifoSize | int | 0 | Incoming FIFO size for processing threads. By default, value is guessed. |
4950
| consumer-FairMQChannel-* | unmanagedMemorySize | bytes | | Size of the memory region to be created. c.f. FairMQ::FairMQUnmanagedRegion.h. If not set, no special FMQ memory region is created. |
5051
| consumer-fileRecorder-* | bytesMax | bytes | 0 | Maximum number of bytes to write to each file. Data pages are never truncated, so if writing the full page would exceed this limit, no data from that page is written at all and file is closed. If zero (default), no maximum size set.|
5152
| consumer-fileRecorder-* | dataBlockHeaderEnabled | int | 0 | Enable (1) or disable (0) the writing to file of the internal readout header (Readout DataBlock.h) between the data pages, to easily navigate through the file without RDH decoding. If disabled, the raw data pages received from CRU are written without further formatting. |

0 commit comments

Comments
 (0)