Files
papers/lux-zap-benchmarks/sections/09-batch-mode-performance.tex
zeekay abf99d05fc papers: reorganize into per-paper dirs, add Antje Worring as co-author
Restructured from flat .tex/.pdf files into per-paper subdirectories.
Added Antje Worring as co-author on all papers.
Synced PDFs to pdfs/ for download site.
2026-04-18 21:50:07 -07:00

41 lines
1.8 KiB
TeX

\section{Batch Mode Performance}
%% ============================================================================
\subsection{Scatter-Gather I/O}
ZAP's batch mode uses the \texttt{writev} syscall to send multiple frames in a single kernel transition:
\begin{table}[h]
\centering
\caption{Batch mode throughput (50 connections)}
\label{tab:batch}
\begin{tabular}{lrrr}
\toprule
\textbf{Batch size} & \textbf{ZAP (M ops/s)} & \textbf{gRPC (M ops/s)} & \textbf{Ratio} \\
\midrule
1 & 0.376 & 0.045 & 8.4$\times$ \\
10 & 2.84 & 0.38 & 7.5$\times$ \\
100 & 12.1 & 2.8 & 4.3$\times$ \\
1,000 & 20.26 & 8.4 & 2.4$\times$ \\
10,000 & 22.8 & 12.1 & 1.9$\times$ \\
\bottomrule
\end{tabular}
\end{table}
At batch size 1,000, ZAP achieves 20.26M ops/sec across 50 connections, consistent with the results reported in the ZAP wire protocol paper \cite{zapwire}. The syscall amortization reduces per-message overhead from $\sim$1$\mu$s (single send) to $\sim$1 ns (batched). gRPC's HTTP/2 framing prevents equivalent batching: each message requires its own DATA frame with length prefix and potential WINDOW\_UPDATE.
\subsection{Consensus-Relevant Batch Sizes}
In production Quasar consensus, the typical batch consists of 20--100 votes per round for a committee of 21 validators. At batch size 50:
\begin{itemize}
\item ZAP: 8.2M ops/sec, 0 allocations, 6.1$\mu$s per batch
\item gRPC: 1.8M ops/sec, 400 allocations/batch, 27.8$\mu$s per batch
\item Protobuf-mux: 0.72M ops/sec, 650 allocations/batch, 69.4$\mu$s per batch
\end{itemize}
The 4.6$\times$ latency reduction from ZAP to gRPC translates directly to faster finality: Quasar's 3-phase commit completes in 18.3$\mu$s (3 $\times$ 6.1$\mu$s) vs.\ 83.4$\mu$s with gRPC.
%% ============================================================================