Commit db73b467 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

ModuleManager: Reduce Buffer Per Worker to 256

parent f5c0e4db
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -327,7 +327,7 @@ Refer to Section~\ref{sec:detector_models} for more information.
\item \parameter{performance_plots}: Enable the creation of performance plots showing the processing time required per event both for individual modules and the full module stack. Defaults to \texttt{false}.
\item \parameter{multithreading}: Enable multithreading for the framework. More information about multithreading can be found in Section~\ref{sec:multithreading}. Defaults to \texttt{true}.
\item \parameter{workers}: Specify the number of workers to use in total, should be strictly larger than zero. Only used if \parameter{multithreading} is set to true. Defaults to the number of native threads available on the system minus one, if this can be determined, otherwise one thread is used.
\item \parameter{buffer_per_worker}: Specify the buffer depth available per worker for buffered modules to cache partially processed events until execution in the correct order can be guaranteed (see Section~\ref{sec:multithreading_approach}). Defaults to 512.
\item \parameter{buffer_per_worker}: Specify the buffer depth available per worker for buffered modules to cache partially processed events until execution in the correct order can be guaranteed (see Section~\ref{sec:multithreading_approach}). Defaults to 256.
\end{itemize}

\section{The \textit{allpix} Executable}
+1 −1
Original line number Diff line number Diff line
@@ -636,7 +636,7 @@ void ModuleManager::run(RandomNumberGenerator& seeder) {
        LOG(STATUS) << "Multithreading enabled, processing events in parallel on " << threads_num << " worker threads";

        // Adjust the modules buffer size according to the number of threads used
        max_buffer_size = global_config.get<size_t>("buffer_per_worker", 512) * threads_num;
        max_buffer_size = global_config.get<size_t>("buffer_per_worker", 256) * threads_num;
        if(max_buffer_size < threads_num) {
            throw InvalidValueError(global_config, "buffer_per_worker", "buffer per worker should be larger than one");
        }