Arka benchmark — 30 October 2026
================================

The script and every result behind https://arka.vulntech.com/docs/performance/
Arka 0.1.12 against nginx, Apache and Caddy over HTTPS: static files, a reverse
proxy and PHP (php-fpm 8.3 with OPcache).


What is here
------------

setup.sh                  builds what compare.sh expects, on Ubuntu 24.04
bench-data/compare.sh     one comparison: Arka against one other server
bench-data/count-failures.py
                          failed answers, time-outs and bytes per answer,
                          from a run's <server>-raw.txt
results/at-their-best/    nginx-tuned and caddy-tuned (the main comparison)
results/as-shipped/       nginx, apache and caddy as Ubuntu sets them up

Each results folder holds, per server:
  <server>.tsv            one line per test: key, title, Arka req/s, other
                          req/s, speed ratio (median, lowest, highest), CPU per
                          request ratio (median, lowest, highest), cores used
                          (Arka, other), slowest 1% in ms (Arka, other)
  <server>-visitor.tsv    one visitor at a time: key, title, Arka p50 and p99,
                          other p50 and p99 (ms)
  <server>-check.txt      what each server answered before the run: status,
                          bytes, encoding, protocol
  <server>-raw.txt        the load generators' own output for every run,
                          for counting failed answers and time-outs


How to run it
-------------

1. On Ubuntu 24.04 with 16 CPUs, install: nginx apache2 wrk jq curl openssl
   zstd gzip python3-brotli, and oha (cargo install oha). Stop the system's
   nginx and Apache services; compare.sh starts its own copies.
2. ./setup.sh
3. bench-data/compare.sh /usr/bin/arka nginx-tuned 0     (check: what each answers)
   bench-data/compare.sh /usr/bin/arka nginx-tuned       (10 rounds, about 16 minutes)
   Servers: nginx, nginx-tuned, apache, caddy, caddy-tuned.
   Results go to bench-data/work/cmp/results (or RESULTS=<folder>).
4. python3 bench-data/count-failures.py bench-data/work/cmp/results/nginx-tuned-raw.txt

compare.sh pins the servers to CPUs 0,2,4,6, the load generator to 8-11 and
the backend and php-fpm to 12-15 (a laptop's 4 performance and 8 efficiency
cores). On another machine, change the taskset lines to match its cores.


How it measures
---------------

For each test, Arka and the other server run alternately for 3 seconds at a
time, 10 rounds, swapping which goes first; the figures are medians. CPU time
is read from /proc for each server's own processes. Running the two in
alternation cancels out a laptop's changing clock speed. Arka is the official
.deb's binary, built with profile-guided optimisation trained on static files,
compression, the proxy, PHP and HTTPS — close to its best case.
