losfair / mvsqlite

Distributed, MVCC SQLite that runs on FoundationDB.
https://github.com/losfair/mvsqlite/wiki
Apache License 2.0
1.35k stars 38 forks source link

In-memory content cache (mvstore) #92

Closed losfair closed 1 year ago

losfair commented 1 year ago

Normally mvstore isn't designed to cache anything. Both FoundationDB and mvsqlite client cache data, so there doesn't need to be another layer.

However some client apps, like Fossil, work in a way that isn't compatible with client-side caching. They fork() on each HTTP request, so the cache cannot be reused.

Let's see whether we can improve performance for such apps by caching content pages in mvstore.

losfair commented 1 year ago

Okay this cuts FDB read rate for Fossil by half. Nice result. Merging.

Note that mvstore content cache is off by default - there is a command-line option to enable it.

losfair commented 1 year ago

It remains a question why Fossil is doing ~1600 TPS while RPS is only ~30 - though I guess that issue doesn't belong to this repo.