From 508f7564ca3299a8ab98147028ca0418a44e8498 Mon Sep 17 00:00:00 2001 From: Jose Quintana Date: Sat, 22 Oct 2022 20:38:53 +0200 Subject: [PATCH] docs: improve benchmark descriptions [skip ci] --- benchmark/BENCHMARKS.md | 34 ++++++++++++++++++++++++++-------- docs/content/index.md | 6 ++++++ 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/benchmark/BENCHMARKS.md b/benchmark/BENCHMARKS.md index c6f2aa4..a276d3b 100644 --- a/benchmark/BENCHMARKS.md +++ b/benchmark/BENCHMARKS.md @@ -1,24 +1,42 @@ # SWS - Benchmarks 2022 -> A benchmark suite which measures the requests per second and latency in average for several web servers. +> A benchmark suite which measures the requests per second and latency on average for several web servers. -## How to use +## Motivation and context -Change `WRK_URL` env with the corresponding server URL to export the wrk metrics. +We wanted to prepare some benchmarks to have a general idea about the SWS performance path over time as well as an excuse to improve/optimize SWS in that regard. + +**Disclaimer:** Note that this is a rough reference about some particular performance aspects (requests per second and latency on average) so take them at your own risk. + +## Web servers setup + +- **lighttpd** `1.4.67` (default config) +- **nginx** `1.22.0` (default config + worker_processes=4, access_log=off) +- **sws** `2.13.1` (default config) +- **apache** `2.4.54` (default config) +- **caddy** `2.6.1` (default config) +- **binserve** `0.2.0` (default config + fast_mem_cache=false, enable_hot_reload=false, enable_logging=false, enable_directory_listing=false) + +## How to measure + +Change `WRK_URL` env with the corresponding server URL to export the [wrk](https://github.com/wg/wrk) metrics. ```sh WRK_URL="http://localhost" make wrk +# wrk -c 500 -t 12 -d 10s --latency http://localhost ``` -## System +After that, wrk will save two files (JSON/CSV) on disk with the resulting metrics. + +## Data used + +The data used can be found in [sws_benchmarks.csv](sws_benchmarks.csv). + +## System used - **OS:** Arch Linux - **Kernel:** 5.19.13-arch1-1 (64 bits) - **Processor:** 4 × Intel® Core™ i7-6500U - **RAM:** 8 GiB - -## Data - -For data used see [sws_benchmarks.csv](sws_benchmarks.csv) file. diff --git a/docs/content/index.md b/docs/content/index.md index ab2c3a8..d9ee6ce 100644 --- a/docs/content/index.md +++ b/docs/content/index.md @@ -67,3 +67,9 @@ It's cross-platform and available for Linux, macOS, Windows and FreeBSD (`x86`,` - First-class [Docker](https://docs.docker.com/get-started/overview/) support. [Scratch](https://hub.docker.com/_/scratch) and latest [Alpine Linux](https://hub.docker.com/_/alpine) Docker images. - Ability to accept a socket listener as a file descriptor for use in sandboxing and on-demand applications (E.g [systemd](http://0pointer.de/blog/projects/socket-activation.html)). - Cross-platform. Pre-compiled binaries for Linux, macOS, Windows and FreeBSD (`x86`,`x86_64`,`ARM`,`ARM64`). + +## Benchmarks + + + +For more details see [benchmark/BENCHMARKS.md](https://github.com/static-web-server/static-web-server/blob/master/benchmark/BENCHMARKS.md). -- libgit2 1.7.2