mysql zfs快照_ZFS for MySQL

展开查看详情

1.ZFS for MySQL

March 28th, 2018

Yves Trudeau

2. Who I am?

• Principal architect at Percona since 2009

2

3. Who I am?

• Principal architect at Percona since 2009

• With Sun and MySQL before

2

4. Who I am?

• Principal architect at Percona since 2009

• With Sun and MySQL before

• 10+y in the MySQL field

2

5. Who I am?

• Principal architect at Percona since 2009

• With Sun and MySQL before

• 10+y in the MySQL field

• Focus on HA, distributed systems, storage

2

6. Plan

• An introduction to ZFS

3

7. Plan

• An introduction to ZFS

• InnoDB file access patterns

3

8. Plan

• An introduction to ZFS

• InnoDB file access patterns

• ZFS configuration for MySQL

3

9. Plan

• An introduction to ZFS

• InnoDB file access patterns

• ZFS configuration for MySQL

• MySQL configuration for ZFS

3

10. Plan

• An introduction to ZFS

• InnoDB file access patterns

• ZFS configuration for MySQL

• MySQL configuration for ZFS

• Host configuration

3

11. Plan

• An introduction to ZFS

• InnoDB file access patterns

• ZFS configuration for MySQL

• MySQL configuration for ZFS

• Host configuration

• Basic operations

3

12. An introduction to ZFS

• Developed by Sun Micro, released in 2005

4

13. An introduction to ZFS

• Developed by Sun Micro, released in 2005

• Very advanced filesystem

4

14. An introduction to ZFS

• Developed by Sun Micro, released in 2005

• Very advanced filesystem

• Many interesting features for databases

4

15. An introduction to ZFS

• Developed by Sun Micro, released in 2005

• Very advanced filesystem

• Many interesting features for databases

• Mix of a regular filesystem, LVM, md

4

16. An introduction to ZFS

• Developed by Sun Micro, released in 2005

• Very advanced filesystem

• Many interesting features for databases

• Mix of a regular filesystem, LVM, md

• On Linux since 2012 (first beta)

4

17. ZFS features: records

• ZFS process data by records

5

18. ZFS features: records

• ZFS process data by records

• Records are up to a given size

5

19. ZFS features: records

• ZFS process data by records

• Records are up to a given size

• Record sizes may vary between filesystems

5

20. ZFS features: records

• ZFS process data by records

• Records are up to a given size

• Record sizes may vary between filesystems

• Operations on records are transactional

5

21. ZFS features: records

• ZFS process data by records

• Records are up to a given size

• Record sizes may vary between filesystems

• Operations on records are transactional

• Records have meta-data like: trx #,

checksum, compressed, etc.

• Records are in a btree (fanout of 3!)

5

22. ZFS features: CoW

• CoW = Copy-on-Write

6

23. ZFS features: CoW

• CoW = Copy-on-Write

• When a record is updated, it is not

overwritten

6

24. ZFS features: CoW

• CoW = Copy-on-Write

• When a record is updated, it is not

overwritten

• A new record is written, then pointers

adjusted

6

25. ZFS features: CoW

• CoW = Copy-on-Write

• When a record is updated, it is not

overwritten

• A new record is written, then pointers

adjusted

• View depends the version you are looking

for

6

26. ZFS features: CoW

• CoW = Copy-on-Write

• When a record is updated, it is not

overwritten

• A new record is written, then pointers

adjusted

• View depends the version you are looking

for

• Very similar to InnoDB MVCC with the undo

entries

6

27. ZFS features: CoW(2)

A file consisting of 3 records is written at transaction #1

Rec #1 Rec #2 Rec #3

trx #1 trx #1 trx #1

7

28. ZFS features: CoW(3)

Record #2 is updated at transaction #2, a new copy is created

Rec #1 Rec #2 Rec #3

trx #1 trx #1 trx #1

Rec #2

trx > 1 trx #2

8

29. ZFS features: CoW(4)

Garbage collector removed the old record

Rec #1 Rec #3

trx #1 trx #1

Rec #2

trx #2

9

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值