~/talk

Lessons Learned from Our Main Database Migrations

Talkat SREcon18 Americas · 2018-03-27..03-29· [databases]
links:none on file
slides:none on file

Facebook migrates UDB from compressed InnoDB to MyRocks and cuts storage and server count roughly in half after a nearly yearlong rollout. Migration uses a first-data-load path to bulk-load sorted SSTs, an online copy tool myrocks-hotbackup, and a shadow testing replay of captured writes to validate behavior. Surprises include compaction bugs that leave secondary-index mismatches, tombstones retained after heavy deletes, commit stalls fixed by upgrading Linux to 4.6, and core dump problems resolved by disabling core dumps.

AI-written summary · about

  1. 0:00Intro
  2. 0:53Agenda Introduction to Facebook's MySQL and User Database
  3. 2:45User Database (UDB) at Facebook Storing Social Graph - Massively Sharded
  4. 10:02MyRocks features Clustered index same as InnoDB Bloom Fiter and Column Family Transactions, including consistency between binlog and Rockste - Faster data loading, deletes and replication Dynamic Options
  5. 16:12Creating first MyRocks instance without downtime Picking one of the innostave instances, then starting logical dump and restore
  6. 19:28Shadow traffic tests We have a shadow test framework
  7. 23:49Stalls on COMMIT Every few minutes, on busy servers, we started observing COMMIT taking 100m a few seconds
  8. 26:27A few deleted rows re appeared Some of our secondary indexes had extra rows Tumed out to be a bug in RocksDe compactions that in rare cases, on heavy deletions tombstones might not have been handled correctly
  9. 27:25Debugging root causes How did we find the root cause? Drained the affected MySQL instance for investigation Found last updated timestamps of the extra rows Searched SST files that contained the keys
  10. 29:35Reproducing Did not reproduce with INSERT Did not reproduce when selecting rows with primary key lookups Sometimes reproduced on range scan
  11. 30:32Fixing RocksDB and MyRocks Debugged with the reproducible test cases Concluded there were four different bugs
  12. 31:26Writing core files crashed servers After enabling core files for mysqld process, we started observing more host reboots (unplanned kemel crashes) than before
  13. 32:46Large virtual memory MyRocks/Rockson built with jemalloc takes very large virtual
~/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.