~/talk

How to Protect the SQL Engine From Running Out of Memory

Talkat Percona Live Online 2020 · 2020-10-20..10-21· [databases]
name:Huaiyu Xu
links:none on file
name:Song Gao
links:none on file
slides:none on file

Claim: TiDB prevents SQL engine OOMs by measuring and capping per-query memory with a mem tracker tree and a chain of OOM actions. Implemented actions include spill-to-disk for pipeline breakers (hash join, external sort) and an adaptive rate-limit that suspends or drops producers for scans. Measured results: a TPC-H-like run drops peak from ~8 GB to ~1 GB under quota, and a 200 GB dump finishes with memory ~500 MB. The components are built and shown to work.

AI-written summary · about

  1. 0:00Intro
  2. 1:09Agenda
  3. 2:15SQL engine runs out of memory
  4. 3:06Scenario summarizaion
  5. 4:12Solution
  6. 5:00Pipeline breaker
  7. 7:47Pipelining operators
  8. 12:02Interfaces
  9. 12:47DiskSpillAction
  10. 13:53Rate LimitAction
  11. 18:021. SQL engine builds a query plan tree. 2. Sort starts to work 3. HashJoin starts to work
  12. 19:13Future 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.