slonbase Docs v2.5.1
Compare

Benchmarks

How fast slonbase is, against PocketBase and PostgREST, on the same machine, the same data and the same HTTP workloads. Everything here is repeatable: the scripts, the raw runs and the full tables are in the repository's bench/.

#Results

slonbase 2.2.0, PocketBase 0.40.6 and PostgREST 16.5, each at its defaults (PostgREST with a pool of 16), PostgreSQL 16, on a 4-vCPU cloud VM: the server and PostgreSQL pinned to 3 CPUs, the load generator to the fourth. 32 clients, medians of three 10-second runs after a warm-up.

Scenarioslonbase 2.2 req/sPocketBase 0.40.6 req/sPostgREST 16.5 req/sp99 ms (slonbase / PocketBase / PostgREST)
Health check44,31632,27036,2672.1 / 6.4 / 2.2
View one record19,96511,4845,1973.7 / 23.4 / 14.4
List 30 records7,8141,6103,7337.8 / 67.1 / 13.7
List 30, filtered7,1001053,3158.2 / 439 / 15.4
List 30, expand a relation3,9061,065n/a12.6 / 93.3 / n/a
Create a record7,4244,0513,8288.4 / 45.5 / 16.2

slonbase was ahead in every scenario measured, from 1.2 times PocketBase's throughput on sign-in (which bcrypt bounds) to 68 times on filtered lists, where PostgreSQL uses the index on the filtered column.

#Footprint

slonbase 2.2.0PocketBase 0.40.6PostgREST 16.5
Binary on disk21.3 MB32.0 MB19.6 MB
Resident memory, idle40 MB41 MB15 MB

PostgREST is the leanest, and it does the least: no sign-in, files, realtime or dashboard. slonbase and PostgREST keep their data in a PostgreSQL server whose memory isn't counted; PocketBase's SQLite runs inside its process.

#How to read them

  • Durability: PostgreSQL waits for each commit to reach disk by default. PocketBase's SQLite in WAL mode does not, so with PostgreSQL's synchronous_commit = off (the same trade-off) slonbase creates 8,722 records a second.
  • Caveats: one machine, loopback networking, and the database on the same CPUs as the server. A production setup with PostgreSQL on its own machine adds a network round trip to each slonbase query but gives the database cores of its own. Results on other hardware will differ; compare within a table, and repeat the runs yourself.
  • Not measured: other platforms such as Supabase, Appwrite or Directus. No figures are given for anything that wasn't run.

The method, the per-release history and how to repeat the runs: bench/README.md. See also slonbase and PocketBase and slonbase vs PostgREST.