~/talk

Designing a Query Queue for ScyllaDB

Talkat P99 CONF 2024 · 2024-10-23..10-24· [databases, distributed-systems]
github:avikivity
slides:none on file

ScyllaDB uses a custom query queue that handles variable-size items from hundreds of bytes to many megabytes and runs at about 10,000 ops/sec per vCPU (not millions). It replaces blind concurrency with a semaphore (e.g. 100 concurrent slots), per-query memory accounting and a two-level OOM killer that first stops new queries then kills all but one running query. It caches 1 MB pages (cache ≈ 2% node memory), tracks a subtask graph to admit queries only when workloads are I/O-bound, and exposes per-queue CPU/IO priorities.

AI-written summary · about

  1. 0:00Introduction and background
  2. 2:35ScyllaDB architecture overview
  3. 7:14Why a query queue is needed
  4. 9:21Simple queue limitations
  5. 11:09Semaphore-based concurrency
  6. 12:13Memory accounting in the queue
  7. 13:17Paging queries and query cache
  8. 15:30Out-of-memory killer
  9. 17:19CPU vs disk concurrency
  10. 19:31Detecting CPU-bound queries
  11. 20:37CPU-bound workload handling
  12. 21:47I/O scheduling overview
  13. 22:08Query importance and multiple queues
  14. 23:36Field problems and fixes
  15. 24:39CPU concurrency override
  16. 25:02Conclusion and future work
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.