Operate
Performance
How fast each diff engine compares screenshots in our load tests, and what that means for sizing your server.
The pixel comparison runs in the worker, and it's the only CPU-heavy work. CirCI ships three engines.
CIRCI_DIFF_ENGINEWhich engine compares screenshots. native is a Rust addon the image ships: it runs in separate native threads, so it doesn't block the worker's other jobs, and uses several cores, and if it can't load the worker logs a warning and uses js. js-workers is the JavaScript comparison (pixelmatch) in a pool of worker threads, with no native module. js is the same comparison on the worker's single main thread, the simplest.
At a glance
Section titled “At a glance”The chart reads from the load tests below: builds per minute for 20 concurrent builds of 10 screenshots each, on a 12-core machine.
The numbers
Section titled “The numbers”From the load tests of 2026-11-11 (Apple M4 Pro, 12 cores, 24 GB, Node 26.13, the built server bundle, Postgres in Docker, local-disk storage). Each build has 10 screenshots at 1440x900 and 1440x4000, about 6 of them pixel-diffed.
| 20 concurrent builds | js |
js-workers |
native |
|---|---|---|---|
| Builds per minute | 118 | 251 | 261 |
| Time from finalize to done (median) | 9.9 s | 4.4 s | 4.5 s |
| Worker CPU (average) | 239 percent | 514 percent | 485 percent |
| Worker memory, peak | 696 MB | 1835 MB | 703 MB |
- The JavaScript engine's limit is the worker's one JavaScript thread, not the CPU: it levels off at about 2.4 cores whatever the load.
nativeis 2.2 times the throughput ofjsand halves the wait. Its peak memory is about the same (703 MB against 696 MB).js-workersrecovers almost all of that throughput without a native module, at about 2.6 times the memory (each thread is its own V8 isolate).- Per CPU the engines cost about the same (about 50 to 55 builds a minute per worker core). The win is using the machine's cores, so on a server short of cores the gain is smaller.
nativeis the clear winner on large changes (2.7 times faster per diff).- Builds of 120 screenshots: about 23 builds per minute with
nativeandjs-workers, against 10.5 withjs. - The dashboard's read API isn't affected: 95 percent of requests took 9 to 26 ms or less, for every endpoint, with 50 simulated users.
Cost levers
Section titled “Cost levers”In rough order of effect:
- Use object storage with free egress (R2, B2 behind Cloudflare, MinIO on the same disk).
- Shorten retention where history isn't needed.
- Screenshots are served with
private, max-age=31536000, immutable, so a second view costs nothing. - Keep the worker in the same process on a 1 to 2 vCPU box, and size diff concurrency to your cores.
- Thumbnails (WebP, at most 480x720) keep lists light.
Run the suite yourself
Section titled “Run the suite yourself”The repository has a k6 load-test suite in perf/ (pnpm perf, pnpm perf:down). See Local development.