Small Restaurant Site SQLite Benchmark
Local macOS production-methodology request-load comparison for a small restaurant WordPress site: 10 pages, 6 blog posts, comments, reservation-request writes, and wp-admin editor/admin paths. Negative latency deltas mean SQLite was faster; positive throughput deltas mean SQLite completed more work.
3repetitions per workload/concurrent-request cell
4, 16, 32, 64concurrent requests tested
0SQLite WAL PR #405 + LALR PR #429 failed benchmark flows
0SQLite WAL PR #405 + LALR PR #429 lock/busy log events
68,566SQLite PHP warning/database-error log events across measured rows
This is a local diagnostic, not the blocked dedicated-Linux full matrix. The measured window starts after fixture restore, server startup, login setup, and warm-up.
Headline Result
When the LALR parser is actually wired into the request-time SQLite driver path, SQLite WAL+LALR is slower than MySQL 8.4 InnoDB in every workload and concurrent-request cell in this small restaurant benchmark.
- SQLite had 0 failed flows, 0 write verification failures, and 0 SQLite lock/busy log events, but it did emit PHP warning/database-error log events in every measured SQLite row. The result should be read as an adapter/translation regression, not clean LALR parser performance.
- At write-heavy concurrency 4, SQLite completed 5.86 median flows/s with p95 1.98s; MySQL completed 106.20 median flows/s with p95 98ms.
- In the c4 read-heavy SQLite row, all measured HTTP responses were 200s, but the server logged 763 PHP warning/database-error events. Public page browsing stayed near 48ms p95 and REST/XHR near 164ms p95, while
admin_readjumped to about 2.01s p95. - The request log for that same row shows 1.87s wall-time p95 but only 10.6ms database-time p95. The extra time is PHP/driver/parser/translation/error-handling work around the query, not SQLite engine time.
- The PHP logs show malformed translation for WordPress
INSERT ... ON DUPLICATE KEY UPDATEoption/transient writes, includingwp_styles_for_blocks, plus an@@SESSION.sql_modecompatibility warning. - The measured SQLite PHP-FPM pools contained
env[WP_SQLITE_USE_LALR_PARSER] = 1. WAL setup returnedwalfromPRAGMA journal_mode=WAL. - The combined benchmark branch was
94b33a7cc426ce81ad573e561dedbf67d33a3def, including the local adapter fix forSELECT @@SESSION.sql_mode.
How The Test Was Conducted
- Create the same small restaurant WordPress fixture for MySQL 8.4 InnoDB and SQLite: homepage, menu, reservations, contact, about, event/catering/gallery/location/journal pages, six posts, seed comments, seed reservations, and benchmark users.
- Before every measured cell, restore that variant's clean database snapshot so previous writes do not affect the next run.
- Start local nginx and PHP-FPM for the case, log in worker admin sessions outside the measured timing window, and run a warm-up for 5.0 seconds.
- Measure for 20.0 seconds with the configured concurrent-request count.
- Read-heavy flow mix: public page/menu/search/REST reads plus a small amount of logged-in wp-admin reads.
- Balanced and write-heavy mixes add verified comment writes, public reservation-request writes, and authenticated editor-save simulations.
- Record full-flow latency, average request completion time, throughput, write throughput, failures, write verification, SQLite WAL size, and SQLite lock/busy logs.
SQLite WAL PR #405 + LALR PR #429 vs MySQL 8.4 InnoDB Delta Heatmaps
Throughput And Tail Latency
Aggregate Table
| Variant | Workload | Concurrent requests | Reps | Median flows/s | Avg request completion | p95 flow latency | Verified writes/s | Failed flows | Write verify failures | SQLite lock/busy | Max WAL bytes |
|---|---|---|---|---|---|---|---|---|---|---|---|
| mariadb-innodb-baseline | balanced | 4 | 3 | 102.55 | 25ms | 97ms | 20.91 | 0 | 0 | 0 | 0 |
| mariadb-innodb-baseline | balanced | 16 | 3 | 95.57 | 105ms | 523ms | 19.37 | 0 | 0 | 0 | 0 |
| mariadb-innodb-baseline | balanced | 32 | 3 | 95.26 | 202ms | 1.06s | 19.04 | 0 | 0 | 0 | 0 |
| mariadb-innodb-baseline | balanced | 64 | 3 | 100.03 | 397ms | 1.74s | 21.37 | 0 | 0 | 0 | 0 |
| mariadb-innodb-baseline | read-heavy | 4 | 3 | 97.42 | 26ms | 94ms | 0.00 | 0 | 0 | 0 | 0 |
| mariadb-innodb-baseline | read-heavy | 16 | 3 | 90.62 | 104ms | 516ms | 0.00 | 0 | 0 | 0 | 0 |
| mariadb-innodb-baseline | read-heavy | 32 | 3 | 98.09 | 205ms | 920ms | 0.00 | 0 | 0 | 0 | 0 |
| mariadb-innodb-baseline | read-heavy | 64 | 3 | 93.76 | 408ms | 1.93s | 0.00 | 0 | 0 | 0 | 0 |
| mariadb-innodb-baseline | write-heavy | 4 | 3 | 106.20 | 27ms | 98ms | 31.61 | 0 | 0 | 0 | 0 |
| mariadb-innodb-baseline | write-heavy | 16 | 3 | 101.01 | 114ms | 501ms | 29.61 | 0 | 0 | 0 | 0 |
| mariadb-innodb-baseline | write-heavy | 32 | 3 | 101.73 | 226ms | 998ms | 30.90 | 0 | 0 | 0 | 0 |
| mariadb-innodb-baseline | write-heavy | 64 | 3 | 98.61 | 475ms | 1.78s | 29.86 | 0 | 0 | 0 | 0 |
| sqlite-wal-pr405-lalr-wired | balanced | 4 | 3 | 11.00 | 222ms | 1.96s | 2.70 | 0 | 0 | 0 | 4152992 |
| sqlite-wal-pr405-lalr-wired | balanced | 16 | 3 | 35.68 | 259ms | 1.98s | 7.95 | 0 | 0 | 0 | 4148872 |
| sqlite-wal-pr405-lalr-wired | balanced | 32 | 3 | 59.47 | 309ms | 2.04s | 12.32 | 0 | 0 | 0 | 4255992 |
| sqlite-wal-pr405-lalr-wired | balanced | 64 | 3 | 66.71 | 549ms | 2.59s | 13.78 | 0 | 0 | 0 | 4602072 |
| sqlite-wal-pr405-lalr-wired | read-heavy | 4 | 3 | 16.32 | 144ms | 1.93s | 0.00 | 0 | 0 | 0 | 123632 |
| sqlite-wal-pr405-lalr-wired | read-heavy | 16 | 3 | 60.99 | 148ms | 1.94s | 0.00 | 0 | 0 | 0 | 70072 |
| sqlite-wal-pr405-lalr-wired | read-heavy | 32 | 3 | 70.94 | 268ms | 2.00s | 0.00 | 0 | 0 | 0 | 74192 |
| sqlite-wal-pr405-lalr-wired | read-heavy | 64 | 3 | 70.60 | 519ms | 2.40s | 0.00 | 0 | 0 | 0 | 65952 |
| sqlite-wal-pr405-lalr-wired | write-heavy | 4 | 3 | 5.86 | 474ms | 1.98s | 1.63 | 0 | 0 | 0 | 2426712 |
| sqlite-wal-pr405-lalr-wired | write-heavy | 16 | 3 | 25.47 | 432ms | 2.01s | 7.27 | 0 | 0 | 0 | 4173592 |
| sqlite-wal-pr405-lalr-wired | write-heavy | 32 | 3 | 50.63 | 422ms | 2.04s | 15.67 | 0 | 0 | 0 | 4293072 |
| sqlite-wal-pr405-lalr-wired | write-heavy | 64 | 3 | 58.30 | 680ms | 2.65s | 17.45 | 0 | 0 | 0 | 4523792 |