Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
79fb71a
Update keynote benchmark to run for 60s by default
joshua-spacetime May 7, 2026
54d17a4
Updates
bradleyshep May 7, 2026
94023cb
Remove separate client in readme
bradleyshep May 7, 2026
283e812
Update README.md
bradleyshep May 7, 2026
ed552b1
Update README.md
bradleyshep May 7, 2026
07850c6
Update README.md
bradleyshep May 7, 2026
6758146
Update README.md
bradleyshep May 8, 2026
74fce15
Merge branch 'joshua/update-keynote-readme' into bradley/keynote-benc…
bradleyshep May 8, 2026
4b4e938
time series + scripts
bradleyshep May 8, 2026
29276e8
Update start-bench.sh
bradleyshep May 8, 2026
4a8e1a0
scripts
bradleyshep May 8, 2026
14189b8
Update plot-bench.py
bradleyshep May 8, 2026
18da1b3
Update plot-bench.py
bradleyshep May 8, 2026
b55f482
remove retry
bradleyshep May 8, 2026
5b9450e
stats / plotting
bradleyshep May 8, 2026
8f2b9e1
Update bench-stats.py
bradleyshep May 8, 2026
8c52939
default pool size
bradleyshep May 11, 2026
ec958a5
Merge branch 'master' into bradley/keynote-benchmark-updates
bradleyshep May 11, 2026
a32f72b
Update package.json
bradleyshep May 11, 2026
e0c99c6
Update start-bench.sh
bradleyshep May 11, 2026
646a3c2
Update README.md
bradleyshep May 11, 2026
330f78d
Clarify machine topology
joshua-spacetime May 11, 2026
340514e
fixes
bradleyshep May 11, 2026
1dd784e
Merge branch 'master' into bradley/keynote-benchmark-updates
bradleyshep May 11, 2026
f94fa48
Merge branch 'joshua/update-keynote-readme' into bradley/keynote-benc…
bradleyshep May 11, 2026
f01342f
remove unused compose
bradleyshep May 11, 2026
b80be5a
Clarify machine topology further
joshua-spacetime May 12, 2026
9860305
Update spacetimedb ts numbers
joshua-spacetime May 12, 2026
a93caa1
Update spacetimedb rust numbers
joshua-spacetime May 12, 2026
a000a76
Use spacetimedb standalone
joshua-spacetime May 12, 2026
7c03f57
update pnpm lock file
joshua-spacetime May 12, 2026
21f9fad
MAX_POOL -> 64 default
bradleyshep May 12, 2026
87255da
Update postgres-rpc-server.ts
bradleyshep May 12, 2026
5ba7c9b
Update postgres-rpc-server.ts
bradleyshep May 12, 2026
7ee5c8b
Update postgres-rpc-server.ts
bradleyshep May 12, 2026
bd628bc
debug logging pool max
bradleyshep May 12, 2026
750676b
Update bun-server.ts
bradleyshep May 13, 2026
9b55e2a
Update .env.example
bradleyshep May 13, 2026
1d606a1
Bun to use the getSharedRuntimeDefaults helper (for consistency)
bradleyshep May 13, 2026
0dc5261
with retry
bradleyshep May 14, 2026
03bd9fb
no wait test
bradleyshep May 14, 2026
5cafc9b
retries
bradleyshep May 14, 2026
bd432d9
Update cockroach-rpc-server.ts
bradleyshep May 14, 2026
5f9d459
Update bun-server.ts
bradleyshep May 14, 2026
fe313ee
remove nowait
bradleyshep May 14, 2026
ae312ed
Update postgres-rpc-server.ts
bradleyshep May 14, 2026
93367ae
Remove connector inflights for simplicity + README updates (#'s, defa…
bradleyshep May 14, 2026
a00d1a8
2x vCPUs instead of 64
bradleyshep May 14, 2026
fa3c51c
60s -> 300 by default
bradleyshep May 14, 2026
b4eb382
Remove confusing table wording
bradleyshep May 14, 2026
c011dd3
Polish from blog
bradleyshep May 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 26 additions & 25 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion templates/keynote-2/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,19 @@ SUPABASE_RPC_URL=http://127.0.0.1:4106

# ===== Seeding knobs =====
SEED_ACCOUNTS=100000
SEED_INITIAL_BALANCE=10000000
SEED_INITIAL_BALANCE=1000000000

# ===== Bench knobs =====
# Pool size for pg-based RPC servers (postgres, cockroach, supabase, planetscale). Default: 64.
# Read at RPC-server startup — restart the RPC if you change this.
MAX_POOL=64

# Pipelining for the bench client. Bench pipelining is global across connectors.
# Some connectors may still have their own internal transport details.
# Setting MAX_INFLIGHT_PER_WORKER alone does NOT enable pipelining for them.
# If BENCH_PIPELINED=1, you must set MAX_INFLIGHT_PER_WORKER explicitly.
#BENCH_PIPELINED=1
#MAX_INFLIGHT_PER_WORKER=40

VERIFY=0
ENABLE_RPC_SERVERS=0
67 changes: 48 additions & 19 deletions templates/keynote-2/DEVELOP.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ The script will:

**Options:**

- `--seconds N` - Benchmark duration (default: 10)
- `--concurrency N` - Concurrent connections (default: 50)
- `--seconds N` - Benchmark duration (default: 300)
- `--concurrency N` - Concurrent connections (default: 64)
- `--alpha N` - Contention level (default: 1.5)
- `--systems a,b,c` - Systems to compare (default: convex,spacetimedb)
- `--stdb-compression none|gzip` - SpacetimeDB client compression mode (default: none)
Expand Down Expand Up @@ -193,26 +193,33 @@ pnpm run bench test-1 --connectors spacetimedb --stdb-compression gzip

# Only run selected connectors
pnpm run bench test-1 --connectors spacetimedb,sqlite_rpc

# Sweep alpha values for a connector set
pnpm run bench test-1 --alpha 0,1.5 --connectors postgres_rpc,bun --seconds 300

# Sweep contention (alpha) for a single connector: start,end,step,concurrency
pnpm run bench test-1 --connectors cockroach_rpc --contention-tests 0,1.5,0.5,64

# Sweep concurrency for a single connector: start,end,factor,alpha
pnpm run bench test-1 --connectors cockroach_rpc --concurrency-tests 16,512,2,1.5
```

## CLI Arguments

From `src/cli.ts`:

- **`test-name`** (positional)
- Name of the test folder under `src/tests/`
- Default: `test-1`

- **`--seconds N`**
- Duration of the benchmark in seconds
- Default: `10`
- Default: `300`

- **`--concurrency N`**
- Number of workers / in-flight operations
- Default: `50`
- Default: `64`

- **`--alpha A`**
- Zipf α parameter for account selection (hot vs cold distribution)
- Zipf alpha parameter for account selection (hot vs cold distribution)
- Default: `1.5`

- **`--connectors list`**
Expand All @@ -227,15 +234,34 @@ From `src/cli.ts`:
- The valid names come from `tc.system` in the test modules and the keys in `CONNECTORS`
- Valid names: `convex`, `spacetimedb`, `bun`, `postgres_rpc`, `cockroach_rpc`, `sqlite_rpc`, `supabase_rpc`, `planetscale_pg_rpc`

- **`--contention-tests startAlpha endAlpha step concurrency`**
- Runs a sweep over Zipf α values for a single connector
- Uses `startAlpha`, `endAlpha`, and `step` to choose the α values
- Uses the provided `concurrency` for all runs
- **`--systems list`**
- Alias for `--connectors` in bench mode

- **`--runs N`**
- Repeat each `(connector, alpha)` combination `N` times
- Default: `1`

- **`--prep-between-alphas`**
- Run `pnpm run prep` before each `(connector, alpha)` combination

- **`--contention-tests start,end,step,concurrency`**
- Sweep Zipf alpha values for one connector

- **`--concurrency-tests startConc endConc step alpha`**
- Runs a sweep over concurrency levels for a single connector
- Uses `startConc`, `endConc`, and `step` to choose the concurrency values
- Uses the provided `alpha` for all runs
- **`--concurrency-tests start,end,factor,alpha`**
- Sweep concurrency values for one connector

- **`--bench-pipelined` / `--no-bench-pipelined`**
- Force pipelining on or off across connectors

- **`--max-inflight-per-worker N`**
- Max in-flight requests per worker when pipelining is enabled
- Required when `--bench-pipelined` is enabled

- **`--log-errors`**
- Log per-operation errors during runs

- **`--verify-transactions`**
- Run connector verification at end of run

---

Expand All @@ -244,7 +270,7 @@ From `src/cli.ts`:
You can also run the benchmark via Docker instead of Node directly:

```bash
docker compose run --rm bench -- --seconds 5 --concurrency 50 --alpha 1 --connectors convex
docker compose run --rm bench -- --seconds 5 --concurrency 64 --alpha 1 --connectors convex
```

If using Docker, make sure to set `USE_DOCKER=1` in `.env`, verify docker-compose env variables, verify you've run supabase init, and run `pnpm run prep` before running bench.
Expand All @@ -254,7 +280,10 @@ If using Docker, make sure to set `USE_DOCKER=1` in `.env`, verify docker-compos
Every run writes a JSON file into `./runs/`:

- Directory: `./runs/`
- Filename: `<test-name>-<timestamp>.json`
- Example: `test-1-2025-11-17T16-45-12-345Z.json`
- Filename: `<test-name>-<connector>-a<alpha>-<timestamp>.json`
- Example: `test-1-postgres_rpc-a1.5-2025-11-17T16-45-12-345Z.json`

For rollup tables, compute steady-state stats after a 30-second warmup window (`tSec >= 30`). The `scripts/bench-stats.py` default matches this (`--warmup-sec 30`).

Point your visualizations / CSV exports at `./runs/` and you're good.

Point your visualizations / CSV exports at `./runs/` and you’re good.
Loading
Loading