MyRocks Troubleshooting

请于2017年3月30日上午11:00加入Percona的首席技术服务工程师、高级软件工程师Sveta Smirnova、George Lorch、Mariadb的查询优化器开发人员Sergei Petrunia和Facebook的数据库工程师Yoshinori Matsunobu,他们将展示“Myrocks故障排除”。太平洋夏令时/美国东部夏令时下午2:00(UTC-7)。
Myrocks是一个为闪存设计的替代存储引擎。它提供了很好的写工作负载性能和空间效率。与其他任何强大的引擎一样,它有自己的特定配置场景,需要特殊的故障排除解决方案。
我们将讨论如何处理:
-数据损坏问题
-数据不一致
-锁
-性能缓慢
我们将使用著名的仪器和工具,以及myrocks特定的工具,并展示它们如何与myrocks存储引擎一起工作。

展开查看详情

1.MyRocks Troubleshooting March, 30, 2017 Sveta Smirnova, Sergei Petrunia, Yoshinori Matsunobu, George O. Lorch III

2.Table of Contents •What you Need to Know About MyRocks? •Data Corruption •Inconsistent Data •Locks •Slow Performance •Instruments 2

3.What you Need to Know About MyRocks?

4.Main Engine Characteristics • Transactional • Row-level locks • LSM Tree 4

5.How Writes to LSM Performed • Change request 5

6.How Writes to LSM Performed • Change request • MemTable 5

7.How Writes to LSM Performed • Change request • MemTable • WAL 5

8.How Writes to LSM Performed • Change request • MemTable • WAL • Compaction 5

9.How Writes to LSM Performed • Change request • MemTable • WAL • Compaction • SST • Immutable 5

10.Column Families • Each index belongs to one column family 6

11.Column Families • Each index belongs to one column family • Column family can contain many indexes 6

12.Column Families • Each index belongs to one column family • Column family can contain many indexes • Custom optimizations 6

13.Column Families • Each index belongs to one column family • Column family can contain many indexes • Custom optimizations • You can specify custom options for each family • rev:index for order by desc 6

14.Column Families • Each index belongs to one column family • Column family can contain many indexes • Custom optimizations • You can specify custom options for each family • rev:index for order by desc • Do not create many column families • 20 is usually enough 6

15.Compaction Levels • Level 0: up to 256MB 7

16.Compaction Levels • Level 0: up to 256MB • Level 1: up to 1G 7

17.Compaction Levels • Level 0: up to 256MB • Level 1: up to 1G • Level 2: up to 10G 7

18.Compaction Levels • Level 0: up to 256MB • Level 1: up to 1G • Level 2: up to 10G • Level 3: up to 100G 7

19.Compaction Levels • Level 0: up to 256MB • Level 1: up to 1G • Level 2: up to 10G • Level 3: up to 100G • Level 4: up to 1000G 7

20.Limitations • Index-only access supported only for • BINARY • Collation latin1 bin • Collation utf8 bin 8

21.Limitations • Index-only access supported only for • No support for • Foreign Keys • Full Text Keys • Spatial Keys 8

22.Limitations • Index-only access supported only for • No support for • Not recommended to use together with InnoDB • Mixing two transactional engines is dangerous! 8

23.How to Get MyRocks • Percona • To build add Cmake option -DWITH ROCKSDB=1 • Binaries planned • MariaDB • Facebook MySQL Branch 9

24.How to Get MyRocks • Percona • MariaDB • Build instructions • Binaries planned • Facebook MySQL Branch 9

25.How to Get MyRocks • Percona • MariaDB • Facebook MySQL Branch • Facebook MySQL-5.6 branch • No binaries • You have to compile from sources 9

26.Data Corruption

27.Two Kinds of Corruptions • Corrupted immutable files • Bad disk blocks • FS disaster • Not recoverable 11

28.Two Kinds of Corruptions • Corrupted immutable files • WAL file damaged • mysqld killed • OS restarted • Recoverable 11

29.Two Kinds of Corruptions • Corrupted immutable files • WAL file damaged • In all cases • MySQL error log file • $datadir/.rocksdb/LOG • Enable core file • Send bug report 11