AuthenticationSoftware Engineering

How Far AuthOS Got on One CPU and 1 GB of RAM

I rebuilt the AuthOS SQLite benchmark, untangled two limits outside the database, and measured its useful operating point inside a budget-shaped VM.

Split image contrasting a low-cost Rust service with a hosted SSO contract represented by handcuffs
Lead image Split image contrasting a low-cost Rust service with a hosted SSO contract represented by handcuffs
On this page

Audio edition

0:00 / 11:26

Ready

I wanted a practical number: how much AuthOS could a server costing less than $10 a month carry before latency turned bad?

I started on four pinned efficiency cores. At 6,000 constant k6 users, AuthOS completed a median 5,005 operations per second with no failed operations and a 781 ms p99. Raising the load to 10,000 users made it do less work—4,617 operations per second—while p99 climbed to 3.14 seconds. The service still returned the right responses, but it had crossed its capacity knee.

Then I moved the same build and workload into a KVM guest with one vCPU, 1 GiB of RAM, and a 25 GiB disk. Those are the dimensions of DigitalOcean’s $6 Basic Droplet as listed on 17 July 2026. A five-minute run at 2,000 users completed 592,497 operations with no failures, a 154 ms p99, and about 68% average guest CPU. On this smaller machine, the knee appeared between 4,000 and 5,000 users.

The previous version of this article lacked the exact k6 script, ramp schedule, seeded database, AuthOS revision, and raw output. I rebuilt the benchmark and kept those artifacts this time.

What I Tested

The system under test was the SQLite build of AuthOS , a Rust and Axum authentication service. The boundary was one release-mode API process, one SQLite database on local NVMe storage, and a local Mailpit instance for setup. The Vue clients, reverse proxy, TLS, network transit, and production email delivery were outside the test.

I recorded the main inputs:

ComponentVersion or identity
AuthOScommit 79e5a9440846f94dd31221c17b9b64930ec489bc
AuthOS binarySHA-256 e3386a969271e4060f2ffdb2199e27b3276021b1cfa9be87f0787355c9ef884f
Rustrustc 1.93.1
k6v2.1.0
Mailpitv1.30.4
Operating systemUbuntu kernel 7.0.0-27-generic
ProcessorIntel Core i7-1265U
StorageToshiba KBG30ZMV512G NVMe, ext4

I built the server from the pinned commit with:

cargo build --release --locked --bin sso_sqlite

The machine has 10 physical cores and 12 logical CPUs. I pinned AuthOS to logical CPUs 4–7, four distinct efficiency cores according to lscpu, and k6 to the remaining CPUs. The CPU governor was performance; SQLite used at most 10 pooled connections. The API had no memory cap, so I sampled its resident memory.

Running the load generator and server on one host removed internet latency but allowed CPU, cache, power, thermal, and storage interference. The later VM run separated the load generator from the guest, though both still used the same physical machine.

Rebuilding the Workload

The only surviving workload description from the old test was a 70/20/10 mix. I reconstructed it as business operations:

  • 70% authenticated GET /api/subscription
  • 20% OAuth device operations, each consisting of POST /auth/device/code followed by POST /auth/token
  • 10% authenticated GET /api/user

A device operation creates a code and immediately polls it once. The correct poll result is HTTP 400 with DEVICE_CODE_PENDING, because nobody completes the browser authorization during the synthetic test. k6 treats that specific response as expected. Every other status or error code fails the operation.

Because a device operation makes two requests, the 70/20/10 ratio describes operations rather than HTTP requests. I report both rates in the results.

Each virtual user performs one operation, waits one second, and repeats. The random generator is seeded per VU. Every measured point uses constant-vus for 60 seconds with up to 30 seconds of graceful shutdown. The success thresholds are an operation failure rate below 1% and aggregate p99 below 30 seconds.

The database snapshot contains two users, one active organization, one service, and the session required for the scoped benchmark user. Before each trial I restored that same snapshot, started AuthOS, waited for /health/ready, then started k6. Device-code rows accumulated only within that trial.

Throughout this article, “10,000 users” means 10,000 k6 VUs running this loop—not 10,000 real people or 10,000 simultaneous HTTP requests.

The First Wall Was a Rate Limiter

My first unsharded 6,000-user run failed 11.69% of its operations. A repeat failed 11.71%. It looked like a clean breaking point until I classified the responses: every failure was an HTTP 429 from a device route.

At this AuthOS revision, DISABLE_RATE_LIMITING=true does not remove the Governor layer. It configures the device routes for 1,000 requests per second with a burst of 10,000 per client IP. k6 sent every request from 127.0.0.1, so the synthetic client topology exhausted that per-IP bucket.

SQLite had not failed; the shared per-IP bucket had. I kept the AuthOS binary unchanged, distributed the VUs across 127.0.0.2 through 127.0.0.254 with k6’s --local-ips option, and reran the test. The same 6,000-user workload completed with no failures. The two false starts remain in the raw archive.

Where Four Cores Bent

The 100-, 1,000-, and 3,000-user rows are one trial each. The 6,000- and 10,000-user rows are the median of three independent trials. Latencies are aggregate HTTP request latencies.

VUsOperations/sHTTP requests/sp50p95p99Operation failuresAverage API RSS
10099.5119.41.15 ms6.24 ms24.1 ms0%34 MiB
1,0009871,1851.05 ms31.8 ms101 ms0%103 MiB
3,0002,9223,5071.11 ms83.2 ms278 ms0%255 MiB
6,0005,0056,00482.6 ms583 ms781 ms0%491 MiB
10,0004,6175,540944 ms2.13 s3.14 s0%796 MiB

Across the repeated trials, the 6,000-user point remained faster and steadier:

VUsOperations/s rangep99 rangeAverage CPU rangePeak RSS range
6,0004,739–5,247686–964 ms2.94–3.16 cores503–506 MiB
10,0004,471–4,8242.89–3.15 s3.38–3.40 cores815–837 MiB

The throughput reversal marks saturation: 10,000 users completed less work than 6,000 while waiting much longer. The API used most, but not all, of its four pinned CPUs; NVMe writes were bursty around the WAL; and RSS remained below 1 GiB. Isolating the cause would require queue depth, SQLite busy time, checkpoint timing, request traces, scheduler data, and storage latency that I did not collect.

One CPU and 1 GiB

On 17 July 2026, DigitalOcean listed a Basic Droplet with one shared vCPU, 1 GiB RAM, and 25 GiB SSD storage at $6 per month. I reproduced that resource shape in a fresh Ubuntu 26.04 KVM guest:

ComponentBudget-VM configuration
AuthOSSame commit and binary used above
HypervisorQEMU 10.2.1 with KVM
Guest CPUOne vCPU exposing one i7-1265U hardware thread
Guest memory1,024 MiB assigned; 956 MiB visible to Linux
Guest disk25 GiB virtio qcow2, ext4
Guest operating systemUbuntu 26.04 LTS, kernel 7.0.0-27-generic
NetworkDirect virtio TAP; load generator remained outside the guest
Idle host-to-guest ping0.267 ms average
AuthOS file-descriptor limit65,535

The VM borrowed the plan’s dimensions, not its hardware. It still ran on my i7-1265U and local NVMe, without the provider’s shared-CPU scheduler, storage, network transit, regional latency, or noisy neighbours. I used the price only to choose a plausible sub-$10 resource envelope.

I used the same 70/20/10 operation mix, one-second think time, seeded database, and success checks as the four-core experiment. AuthOS was restarted from the same snapshot before every trial. The load generator used 91 local source addresses at the repeated high-load points so the device-flow governor saw independent clients instead of one synthetic NAT address.

The 3,000- and 4,000-user rows are medians of three 60-second trials. Other rows are one trial. Latencies remain aggregate HTTP latencies.

VUsOperations/sHTTP requests/sp50p95p99FailuresGuest CPUPeak AuthOS RSS
100991191.13 ms7.21 ms85.2 ms0%3%42 MiB
5004935921.21 ms40.2 ms131 ms0%16%68 MiB
1,0009771,1731.10 ms68.6 ms195 ms0%30%106 MiB
2,0001,9172,3022.34 ms192 ms350 ms0%60%184 MiB
3,0002,5883,10576.9 ms384 ms603 ms0%86%262 MiB
4,0002,7373,283326 ms781 ms1.09 s0%94%344 MiB
5,0002,7093,250621 ms1.45 s1.99 s0%94%428 MiB

The three 3,000-user trials ranged from 2,564 to 2,602 operations per second, with p99 between 573 and 606 ms. At 4,000 users, the range widened to 2,648–2,863 operations per second and 945–1,162 ms p99. At 5,000 users, throughput fell below the 4,000-user median while latency nearly doubled. That is the small VM’s capacity knee for this workload.

To see whether the short trials flattered the VM, I added five-minute runs at 2,000 and 3,000 users:

Soak pointCompleted operationsOperations/sHTTP requests/sp99FailuresGuest CPUPeak AuthOS RSS
2,000 VUs for 5 min592,4971,9682,361154 ms0%68%196 MiB
3,000 VUs for 5 min755,0172,5063,0071.06 s0%95%277 MiB

At 2,000 users, latency and CPU still had room: RSS reached roughly 180 MiB in the first minute and stayed near it. At 3,000, CPU averaged 95% and p99 crossed one second as the database grew to 150,511 device-code rows. I would treat 3,000 as a demonstrated burst, not a sustained target.

Two Limits Arrived Before CPU Saturation

The first 1,000-user attempt failed 7.09% of operations while the guest was only about 31% busy. AuthOS logged Too many open files: the interactive shell had given it a soft limit of 1,024 descriptors. With the limit raised to 65,535, the same case completed with no failures. A high-concurrency systemd deployment needs an explicit limit such as LimitNOFILE=65535.

At 4,000 users, an unsharded diagnostic failed 0.70% of operations. Every failure was an HTTP 429 from a device route. The single generator IP was making both device-code and token-poll requests, crossing that client’s governor budget. Distributing the synthetic users over the local address pool removed the 429s without changing the AuthOS binary. Both diagnostics remain in the evidence archive.

The Useful Number

The five-minute 2,000-user run is the useful operating reference for this VM: 1,968 operations per second, 2,361 HTTP requests per second, a 154 ms p99, no failures, and 68% average CPU. It leaves enough room for variation without pretending that the highest VU count is the best place to operate.

Before putting real users on this setup, I would repeat the run on the actual provider with TLS, a reverse proxy, internet latency, password-hash bursts, backups, key rotation, upgrades, and host-failure recovery in view. Within the workload I measured, SQLite gives me no performance reason to split the AuthOS monolith yet.

In the platform follow-up, I use the budget VM’s sustained operation rate to build a clearly labelled 500,000-MAU capacity model with explicit activity and peak-traffic assumptions.

Reproduce the Runs

The four-core benchmark directory contains its exact k6 script, build and run commands, pinned versions, checksums, selected-trial CSV, and raw archive. The budget-VM benchmark directory contains its cloud-init configuration, guest and host runners, aggregate CSV, diagnostics, telemetry, and raw result archive.

The public AuthOS repository also carries the budget-VM harness beside the code it measures.

Continue reading

Complete index →