]> jspc29.x-matter.uni-frankfurt.de Git - daqdocu.git/commitdiff
added description for kernel and eb tuning paramenters, mt
authorMichael Traxler <M.Traxler@gsi.de>
Thu, 10 Sep 2020 21:19:02 +0000 (23:19 +0200)
committerMichael Traxler <M.Traxler@gsi.de>
Thu, 10 Sep 2020 21:19:02 +0000 (23:19 +0200)
trb3/trb3qs_performance.tex [new file with mode: 0644]

diff --git a/trb3/trb3qs_performance.tex b/trb3/trb3qs_performance.tex
new file mode 100644 (file)
index 0000000..0093354
--- /dev/null
@@ -0,0 +1,45 @@
+\section{Performance and Kernel and Eventbuilder Tweaks}
+
+When a lot of data is sent to the eventbuilder it can happen that data is lost
+in the kernel-network-buffers and in the eventbuilder.
+
+To avoid that, there are some simple kernel and eventbuilder tweaks.
+
+First, the kernel should use larger IP receive queues (e.g. 10 times larger
+than the default)..
+Second, when many sources are used and multieventqueues are used to transport the data
+from the FEE to the eventbuilder, the memory which is used to reassemble the
+UDP packets from the IP-fragments has to be increased (e.g. 10 times more than
+default, which is 212992), also 100 times larger is sometimes used.
+Third, when (depending on the machine) the data rates are > 400 MBytes/s the
+kernel has to be instructed that UDP packets have to reassembled, even if the
+distance of the arrival of the packets is quite large (e.g. 1024).
+
+This can be enabled via to following commands:
+
+\begin{lstlisting}[label=,caption=Larger Receive Queues]
+sysctl -w net.core.rmem_max=2129920
+sysctl -w net.core.rmem_default=2129920
+
+sysctl -w net.ipv4.ipfrag_high_thresh=41943040
+sysctl -w net.ipv4.ipfrag_max_dist=1024
+
+\end{lstlisting}
+
+When dealing with extreme data rates differences from different data sources
+to the eventbuilder, also the memory for the input buffers of the eventbuilder
+has to be increased to avoid loss of packets.
+Also the flush time of the buffers mustn't be to large, 0.2s is a often used value 
+(the combination of the pool-size and the flush time needs to fit to factor of
+the data rate discrepancy of the various inputs).
+If still data is discarded go up with the pool size by some factors.
+
+So, the following has to be increased in the .xml file for the eventbuilder
+
+\begin{lstlisting}[label=,caption=Event Builder Input Buffers]
+  <BufferSize value=''2000000''/>
+
+  <InputPort name=''Input*'' queue=''30'' urlopt=''udpbuf=200000&mtu=64512&flush=0.2&observer=false&debug''/>
+    
+  
+\end{lstlisting}