## 4 Evaluation
### Concurrency
#### 4.1.2 Serialisation  
The REIP SDK includes a few serialisation methods for the user to choose from to meet their bandwidth requirements. The first method is the most common and uses Pickle, a package in Python's standard library that is capable of serialising arbitrary Python objects. Looking at Figure 4c, we can see that Pickle offers the fastest speeds for small buffers (<0.3 MB, throughput = \"small\" when connecting blocks), but Apache's Plasma Store [48] (\"Plasma\" in plot) is fastest for larger buffers (throughput = \"large\"). The Plasma Store is a shared memory server that uses Apache Arrow to serialise and provide fast, copy-free memory views of the data that are much more efficient for large data arrays (approaching the memory speed limit).  
The final serialisation method, Pyarrow, uses the same serialisation method as Plasma Store, but it does not provide shared memory (throughput = \"medium\"). It has a slight performance increase over Pickle for buffers greater than 0.5 MB in size. See Table 2 for comparison of the impact of different serialisation strategies on the overall performance of the video processing pipeline (REIP Hybrid).  
\begin{table}
\begin{tabular}{c c c c c c c c c c c} \hline \hline \multicolumn{1}{c}{**Configuration**} & \multicolumn{3}{c}{**Camera 0**} & \multicolumn{3}{c}{**Camera 1**} & \multicolumn{3}{c}{**Object Detection**} & \multicolumn{3}{c}{**Motion Detection**} \\ \hline
**Name** & **Serialisation** & **Pulled** & **Lost** & **Pulled** & **Lost** & **Detected** & **Saved** & **Queued** & **Detected** & **Saved** & **Queued** \\ \hline REIP Hybrid & Pickle & 433 & 0 & - & - & 206 & 206 & 0 & 191 & 95 & 0 \\ REIP Hybrid & Pyarrow & 431 & 0 & - & - & 229 & 229 & 0 & 196 & 98 & 0 \\ REIP Hybrid & Plasma & 431 & 0 & - & - & 351 & 204 & 54 \({}^{\wedge}\) & 160 & 80 & 0 \\ REIP Multiprocessing & Pickle & 314 & 118 & - & - & 101 & 73 & 28 & 104 & 52 & 0 \\ REIP Multiprocessing & Plasma & 402 & 30 & - & - & 385 & 184 & 45 \({}^{\wedge}\) & 142 & 71 & 0 \\ REIP Multithreading & - & 432 & 0 & - & - & 388 & 293 & 56 \({}^{\wedge}\) & 193 & 96 & 1 \\ REIP Backend (Mono) & Plasma & 431 & 0 & - & - & 420 & 318 & 34 \({}^{\wedge}\) & 422 & 212 & 0 \\ Waggle Backend (Mono) & Pickle & 410 & 22 & - & - & 224 & 132 & 52 \({}^{\wedge}\) & 202 & 113 & \(-12\) \\ Ray Backend (Mono) & Plasma & 432 & 0 & - & - & - & - & - & 146 & 73 & 0 \\ \hline REIP Hybrid & Pickle & 343 & 89 & 346 & 86 & 126 & 133 & \(-7\) & 115 & 57 & 0 \\ REIP Hybrid & Pyarrow & 409 & 23 & 321 & 111 & 123 & 122 & 1 & 134 & 66 & 0 \\ REIP Hybrid & Plasma & 327 & 105 & 375 & 57 & 294 & 135 & 39 \({}^{\wedge}\) & 181 & 90 & 1 \\ REIP Multiprocessing & Pickle & 268 & 164 & 325 & 107 & 79 & 66 & 13 & 82 & 41 & 1 \\ REIP Multiprocessing & Plasma & 306 & 126 & 299 & 133 & 255 & 121 & 60 \({}^{\wedge}\) & 208 & 104 & 0 \\ REIP Multithreading & - & 432 & 0 & 432 & 0 & 401 & 263 & 50 \({}^{\wedge}\) & 346 & 173 & 0 \\ REIP Backend (Stree) & Plasma & 433 & 0 & 433 & 0 & 376 & 230 & 64 \({}^{\wedge}\) & 318 & 159 \({}^{\wedge}\) & 0 \\ Waggle Backend (Stree) & Pickle & 374 & 58 & 356 & 76 & 102 & 86 & 16 & 64 & 32 & 0 \\ Ray Backend (Stree) & Plasma & 432 & 0 & 432 & 0 & - & - & - & 149 & 75 & \(-2\) \\ \hline \hline \end{tabular}
\end{table}
Table 2: Performance of different framework configurations when running a video processing pipeline (Figure 4a) on Jetson Xavier NX. Values denote number of frames processed by different blocks in the pipeline during 30 s sampling period. Top half of the table corresponds to the mono and bottom half to the stereo camera configuration. The system was throttled to use 4 CPU cores only to be able to measure more subtle performance differences between different configurations. Negative queued values indicate extra frames processed that have already been in the queue prior to the sampling interval. Symbol \({}^{\wedge}\) indicates queue overflow (max queue size was set to 100 buffers).