vcon-server

Scale numbers

Measured ingest rates, read latencies and disk use, each with the machine, the commit and the vCon count, and how to run the harness that measures them.

The scale harness, vcon-scale, stores synthetic vCons in a running server over HTTPS, reads some of them back, follows list pages, and writes a result file. This page shows every result file in the repository. A test holds the table to the files, and CI runs the harness at 100,000 vCons on each change. The 1.0 checklist names what is left: 10 million and 100 million vCons.

Results

RunMachinevConsClientsStores a secondRead p50Read p99Read p99.9ErrorsBytes per vConPeak server memoryCommit
pilot-10k-jetson-agx-thor-tcp-nodelayNVIDIA Jetson AGX Thor Developer Kit, aarch64, 14 CPUs, 123 GiB, CT4000T710SSD8 nvme10,00081,0262.9 ms4.9 ms7.9 ms020,280106 MiBee35aeb
pilot-10k-jetson-agx-thorNVIDIA Jetson AGX Thor Developer Kit, aarch64, 14 CPUs, 123 GiB, CT4000T710SSD8 nvme10,00083834.0 ms50.4 ms53.2 ms020,281131 MiB42faa9d

The result files: pilot-10k-jetson-agx-thor-tcp-nodelay.json (2026-11-21, 10,000 reads, 1-minute load 6.4 at the start) and pilot-10k-jetson-agx-thor.json (2026-11-20, 10,000 reads, 1-minute load 20.1 at the start).

The server of the older row did not set TCP_NODELAY on its connections, so about one read in twenty waited about 40 ms for the client's delayed acknowledgement: its read p95 was 42.6 ms. The newer row's server sets it. The two rows ran at different loads, so they differ by more than that change. Back-to-back runs of the same build at a 1-minute load of about 10, with the option off and on, gave read p95 43.5 ms and 4.2 ms, and 463 and 947 stores a second.

Each row is one run of one server, built in release mode from the commit in the last column, on the machine the row names:

  • Stores a second: the vCons stored over the run's wall time, with that many clients sending at once over HTTPS.
  • Read p50, p99 and p99.9: the time from sending a GET /vcons/{uuid} to the last byte of its answer. Half of the reads name a vCon picked at random from all stored, half one of the newest hundredth.
  • Bytes per vCon: the server's data directory after the stores, over the vCons stored. It holds the sealed bodies and the catalogs.
  • Peak server memory: the server's peak resident memory (VmHWM).

The vCons follow a size mix of 70% at 2 KiB, 25% at 16 KiB and 5% at 256 KiB, each a text dialog between two parties with example.com addresses and 555-01xx numbers. The data directory is on local disk, with the catalogs in SQLite. The harness and the server share the machine.

The machine of both rows is a shared development host that runs other builds and tests at the same time, so its numbers vary from run to run. The harness refuses to start there while the 1-minute load is above 28.

Before you run the harness

  • A Linux machine with openssl, jq, lsblk and findmnt, and the toolchain of rust-toolchain.toml.
  • Free disk for the vCons: the count times the bytes per vCon of a row above, for the same mix. In the first row's run, 10,000 vCons at the default mix took 202,798,208 bytes.
  • A memory lock limit large enough for the server, which locks all of its memory and refuses to start if it cannot (ulimit -l; see getting started).

Run it

Build the server and the harness in release mode, and run the driver script with the two binaries, the vCon count and the result file:

cargo build --locked --release -p vcon-server -p vcon-scale
SCALE_LABEL=my-run scripts/scale-run.sh target/release/vcon-server \
  target/release/vcon-scale 10000 my-run.json

The script makes a data directory, a master key, a CA and a server certificate, a tenant and a key in a new directory under $TMPDIR (or under a fifth argument, the parent directory), starts vcon-server serve, and runs vcon-scale run. It deletes that directory, the stored vCons with it, when the run ends, whatever the outcome.

Flags after -- go to vcon-scale run:

FlagDefaultWhat it sets
--concurrency8the clients that send at once (1 to 256)
--reads1000the reads after the stores
--list-pages10the list pages of 100 to follow, from the newest page again after the last
--seed1the generator's seed: the same seed makes the same vCons
--mix70:2048,25:16384,5:262144the size mix, as weight:bytes parts
--max-load28the highest 1-minute load at which a run starts
--tls-profilehybridcnsa2 holds the run's connections to TLS 1.3, TLS_AES_256_GCM_SHA384, ML-KEM-1024 and ML-DSA-87, for a server with tls.profile = "cnsa2" and its ML-DSA-87 CA in --ca (CNSA 2.0 TLS profile); the script's own server is on hybrid

Reads while the tenant is written

To measure reads while other clients write to the same tenant, set SCALE_WRITERS to a number of writers:

SCALE_WRITERS=2 SCALE_LABEL=contended scripts/scale-run.sh target/release/vcon-server \
  target/release/vcon-scale 5000 contended.json -- --reads 10000

Each writer (scripts/contend_writes.py, which needs python3) stores a vCon of its own and replaces it, one replacement after another, until vcon-scale ends; the writers run through both the stores and the reads. Their summary goes beside the result file, in contended-writes.json: the writes, writes a second, and the write latency p50 and p99 in milliseconds. A writer that fails fails the run, and its error is printed.

A noisy neighbor

To measure one tenant's reads while another tenant writes, set SCALE_NEIGHBOR_WRITERS to a number of writers: the run makes a second tenant, neighbor, and its writers store and replace vCons there for the whole run. Set SCALE_NEIGHBOR_RATE to a number of requests a second to hold that tenant to its own rate (it is set with vcon-server tenant limits, see tenant limits), or leave it out for no limit of its own. The neighbor's writers wait a 429's Retry-After and send again, so a refusal does not end them. Their summary goes beside the result file with -neighbor.json in place of .json, and counts the refusals as refused. Compare the measured tenant's read p99 with the neighbor limited, with it not limited, and with no neighbor.

To run against another catalog, set SCALE_CATALOG to a file whose text is added to the end of the server's configuration, for example the [storage] and [catalog] tables of the PostgreSQL catalog. The script does not make or migrate that database: give each run an empty, migrated database and a bucket prefix nothing else uses.

To start the server through another program, set SCALE_SERVE_WRAP to an executable file: the script runs FILE SERVER serve --config ... in place of SERVER serve --config .... The performance gate sets it to scripts/perf-serve.sh, which runs the server under valgrind. A server run that way takes longer to start: SCALE_START_SECONDS is how long the script waits for it to say where it listens (600 unless set; see below for why).

Many tenants

To spread the stores over several tenants, set SCALE_TENANTS to the number of tenants (1 unless set). The script makes that many tenants, one API key each, and passes them to vcon-scale as --key-dir, a directory of key files read in file-name order: vCon i goes to tenant i mod the number of tenants, and its read is sent with the same tenant's key. The list pages, and the writers, use the first tenant. The result file states tenants, and server.locked_kib, the server's locked memory (VmLck) at the end of the run. To bound the open tenants, give SCALE_CATALOG a file with a [key_wrap] table, for example max_open_tenants = 64. The server opens every tenant's Store before it listens, so its start takes longer with more tenants; the script waits for it while it runs, up to SCALE_START_SECONDS (600 unless set). SCALE_ACTIVE (every tenant unless set, and at most SCALE_TENANTS) stores only into the first that many tenants; the others are made, and the server opens them at start, but no request names them.

Making 1,000 tenants and their keys takes several minutes of each run. To make them once, set SCALE_PREPARE to a new directory: the script makes the tenants, a key file for each and the master key there, leaves them read-only, and ends without serving; each run makes its own certificates, which last a day. Set SCALE_PREPARED to that directory in each run after: the run copies it, makes no tenant, and serves the copy, so the preparation stays as it was; its tenants are the preparation's, and SCALE_ACTIVE takes the first key files. A run from a preparation serves the same catalog as one that makes its own (tests/scale_prepared.rs). Runs compared against each other use the same preparation. Remove one with chmod -R u+w and then rm -r.

Measured on 2026-11-24 on the Jetson AGX Thor of the first row, 2,000 stores then 10,000 reads, 8 clients and 2 writers in one tenant, with release builds from just before and just after the change that stopped a read's first step from taking the tenant's lock ("before" and "after" below), their runs interleaved:

  • PostgreSQL 16 (a test server with fsync, full_page_writes and synchronous_commit off, which makes writes cheaper than in production; objects in RustFS), 7 runs each at 1-minute loads of 13.9 to 25.9: reads a second 289 before (248 to 334) and 502 after (371 to 617); read p99 55.4 ms before (37.2 to 85.9) and 33.1 ms after (19.9 to 57.9); 27 to 32 writes a second in both.
  • PostgreSQL 16 with those three settings on, 1 run each, at loads of 19.5 to 22.8: 132 reads a second before and 220 after; read p99 126.3 ms before and 76.4 ms after.
  • SQLite (the default catalog), 6 runs before and 4 after, at loads of 13.4 to 26.7: 195 and 198 reads a second, read p99 80.6 and 75.0 ms: no change, since the SQLite catalog serves each tenant on one connection and a read waits for that tenant's writes either way.

Measured again on 2026-11-24 on the same machine, SQLite only, with release builds of 09a93d0 ("before") and of the change that syncs a tenant's commits together, after its connection is let go ("after"; see durability): 1,000 stores then 2,000 reads, 8 clients, 4 interleaved runs each with 0, 1 and 2 writers, at 1-minute loads of 13.4 to 23.8; medians:

  • No writers: 406 reads a second before and 896 after; read p99 46.4 ms and 36.2 ms; 56.8 stores a second and 193.7.
  • 1 writer: 232 reads a second before and 562 after; read p99 77.5 ms and 28.2 ms; 10.4 writes a second and 31.7; write p50 65.0 ms and 27.6 ms, write p99 287.5 ms and 73.5 ms.
  • 2 writers: 170 reads a second before and 485 after; read p99 95.4 ms and 30.8 ms; 17.2 writes a second and 54.4; write p50 78.0 ms and 33.7 ms, write p99 325.2 ms and 71.8 ms.
  • Instructions: the server's user-space instructions for 1,000 stores and 5,000 reads with no writers, median of 3 runs each: 3.623 billion before and 3.615 billion after.

Threads and locked memory

serve runs at most limits.blocking_threads threads for catalog and file work (128 unless set) and limits glibc's malloc to two arenas. Up to release 0.4.19 the bound was tokio's own, 512 threads, and glibc's arena limit was eight for each CPU. Each thread's stack and each arena's 64 MiB reservation is locked memory. These runs used the harness with one tenant, on the Jetson AGX Thor of the first row, built in release mode; each cell is the median of 3 runs, interleaved, with the 1-minute load at each start between 13 and 57.

Bound sweep, 256 clients, 10,000 stores and 5,000 reads (2026-11-27, a build that read the bound from its environment):

Blocking threadsStores a secondThreadsLocked memory
32850483.2 GB
641,019805.4 GB
1281,1281447.6 GB
512, first run of each round1,189230-2497.8 GB
512, last run of each round1,066230-2497.8 GB

The sweep kept glibc's own arena limit, so its locked memory is mostly arena reservations. Two arenas against four, both at 128 threads: 1,621 and 1,578 stores a second at 256 clients, with 418 MB and 545 MB locked; 367 and 354 at 8 clients, with 170 MB and 297 MB locked.

The bounded build against 0.4.19's server (2026-11-30, two runs of 0.4.19 in each round):

Clients0.4.19, first run0.4.19, second runBoundedLocked memory, 0.4.19Locked memory, bounded
81,6141,5571,5342.0-2.3 GB166-175 MB
2562,1482,0871,9077.80-7.85 GB416-418 MB

To tell the two changes apart, a second session ran the bounded build with MALLOC_ARENA_MAX=112, glibc's own limit on 14 CPUs, which keeps the thread bound and lifts the arena limit (256 clients, 2026-11-30, two runs of 0.4.19 in each round):

BuildStores a secondThreadsLocked memory
0.4.19, first run1,781228-2647.8-7.9 GB
0.4.19, second run1,759228-2647.8-7.9 GB
Bounded, glibc's arena limit1,7541447.6 GB
Bounded, two arenas1,727144416-417 MB

Against the median of the six 0.4.19 runs, 1,770, the thread bound alone stored 0.9% fewer vCons a second and both changes 2.4% fewer; the two 0.4.19 runs differed by 1.2%. In the session above, both changes stored 9.9% fewer, and one of the three runs was 1,437.

Between 33 threads at 8 clients and 144 at 256, the bounded build's locked memory grew by 2,208 kB for each thread, which leaves 99,400 kB for the rest; between servers of 100 and 300 tenants it grew by 368 kB for each tenant. These are the numbers of the locked memory formula.

Check the result

The harness prints one line, the count, the rate, the read p99 and the result file:

vcon-scale: <count> stored at <rate> a second; reads p99 <microseconds> us; result in <file>

It exits 0 when no request failed. The result file holds each phase's requests, errors, wall time, rate and latency percentiles in microseconds, the data directory's bytes, the server's peak memory and CPU time, and the machine: its model, CPU architecture and count, memory, kernel and disk. To add a run to this page, copy the file to website/static/scale/<label>.json and paste the row that the test the_page_table_is_the_committed_results prints into the table above.

When a run fails

  • vcon-scale: the 1-minute load is <load>, above the cap of 28: not started: the machine is busy. Wait, or name a cap that suits the machine with --max-load.
  • vcon-scale: the size mix part "<part>" is not weight:bytes: each part of --mix is two whole numbers with a colon between them.
  • Exit 1 and vcon-scale: ingest: <errors> of <requests> failed: the server refused or dropped requests. A failed read or list phase is named the same way, reads: or lists:, after a ;. The line vcon-scale: first error: <reason> names the first one, and the script prints the server's last 20 log lines.
  • scale-run: the server stopped: the server did not start. The script prints its log, which names the reason, for example a memory lock limit too small for the server.

Source of this page: website/content/docs/scale.md