百¦ˆ†¸ƒ¼•°®“ ˆ–Œ Sacc2010

  • View
    2.366

  • Download
    7

Embed Size (px)

DESCRIPTION

百度分布式数据库 刘斌 Sacc2010

Text of 百¦ˆ†¸ƒ¼•°®“...

  • 1.

2.

  • MySQL?
  • MySQL?

3.

    • Fulltext
    • Snapshot
    • Optimized alter

4.

    • QPS ( / )
    • ( / )
      • cache & cache
    • (LRU / checkpoint ...)
      • buffered write
      • orderedwrite
      • 1ms
  • IOPS !

5.

  • Vs(sas 10k)
    • QPS700%
  • Vs SSD (FTL Optimized)
    • QPS250% 95%
    • &
  • 2007 Flash 2008 Flash
  • 2008 MySQL Flash,2011 MySQL SSD

6. IO

  • IO( & SSD & )
  • Tape is dead, disk is tape, flash is disk, ram locality is king.
          • Jim Gray

7. SSD Vs SSD 16K 1860 SSD 16K 100 SSD 16K 50 SSD 16K 440 SSD 1M 64 16K 800 SSD 1M 64 16K 68 SSD 1M 1 16K 3700 8.

  • FTL
    • in-page logging
    • l2fs,btrfs, zfs ...
    • BFTL
  • Kernel
    • flashcache
    • append write
    • random read
    • merge

9. FTL

  • IO
  • In-page logging
    • 20% log
    • 75% raid5
    • 60%

10.

      • SSD/ SSD/ cache
      • SSD cache
    • SSD innodb buffer pool cache
      • memory innodb buffer pool cache
      • IO
    • // IO /

11. cache

  • IO
    • ( 800% )
  • Merge
  • Pages mapping
    • mem: ssd = 1 : 350
  • Multi-Write
    • 68%
    • iops ->
    • iops -> iops

12. cache & cache

  • IOPS Vs
  • Cache Vs Cache
  • &
  • &
  • Nand flash Vs Nor flash
    • 100ns
  • Snapshot (Redirect write)
  • Btree (log-based38x? ) / Btree patch compaction

13.

    • ECC
    • SLC
    • Raid / Rebuild
    • read cache / btree patch compaction
    • 500G ~ 1T
      • snapshot
      • online alter table

14.

    • / /

15. 16.

  • Scan & Search
  • Partition Key
  • Partition Key

17.

  • Binding

18. &

19.

  • dbproxy zookeeper
  • zookeeper
  • tablet ( / )
  • tablet

20. &

  • dbproxy
  • zookeeper
  • ts
    • slave ts down / master ts down / tablet down / all tablet down
    • auto-exchanger /
    • mq

21.

  • dbproxy
  • zookeeper
  • table
    • (QPS / Latency)

22. &

    • /
    • dbproxy

23.

          • Thanks!
          • Q & A