From c7ae77cdf4623c3eb07935081510478be9063024 Mon Sep 17 00:00:00 2001 From: eunhhu Date: Sat, 26 Sep 2026 05:48:40 +0100 Subject: Shard pure-serve across cores A burst now looks at the store once (pure_store_pin) instead of once per request; another shard's commit ends before its answer is sent, so a request made after that answer still reads it. With this alone one thread serves 125k small keep-alive reads per second, as many as axum on three cores, with a shorter p99. --threads N runs a shard per thread: its own SO_REUSEPORT listener, epoll set, runtime domain, app and store handle. Writer sessions of the tree store now take turns inside a process with a mutex (the file lock belongs to the process and does not keep threads apart), and revisions settle concurrent edits of a key. A module with states runs on one thread. Three shards serve 151k reads per second; they still commit one by one, so durable writes and 1 MiB reads are better on one thread for now, which stays the default. Note 075 records the numbers. --- benchmarks/http/run.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'benchmarks/http/run.py') diff --git a/benchmarks/http/run.py b/benchmarks/http/run.py index 96f4bc0..8ce1474 100644 --- a/benchmarks/http/run.py +++ b/benchmarks/http/run.py @@ -72,6 +72,8 @@ def main(): '--store', d, '--port', '0', '--budget', str(args.budget)], 'pure-serve': lambda d: [PURE / 'build/pure-serve', '--module', args.module, '--store', d, '--port', '0', '--budget', str(args.budget)], + 'pure-serve-3': lambda d: [PURE / 'build/pure-serve', '--module', args.module, '--store', d, '--port', '0', + '--budget', str(args.budget), '--threads', '3'], 'axum-memory': lambda d: [axum, '--port', '0'], 'axum-durable': lambda d: [axum, '--port', '0', '--durable', d], 'axum-atomic': lambda d: [axum, '--port', '0', '--atomic', d], -- cgit v1.2.3