Top Banner
PRESENTATION TITLE GOES HERE Databases Acceleration with Non Volatile Memory File System (NVMFS) Saeed Raja SanDisk Inc.
15

Databases Acceleration with Non Volatile Memory File ... · InnoDB storage engine Percona Server (Pleasanton, California, USA) Developer of XtraDB storage engine ... compression libraries

Aug 17, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Databases Acceleration with Non Volatile Memory File ... · InnoDB storage engine Percona Server (Pleasanton, California, USA) Developer of XtraDB storage engine ... compression libraries

PRESENTATION TITLE GOES HERE

Databases Acceleration with Non Volatile Memory File System (NVMFS)

Saeed Raja SanDisk Inc.

Page 2: Databases Acceleration with Non Volatile Memory File ... · InnoDB storage engine Percona Server (Pleasanton, California, USA) Developer of XtraDB storage engine ... compression libraries

2 2015 Data Storage Innovation Conference. © Insert Your Company Name. All Rights Reserved.

MySQL?

• Widely used Open Source Relational Database Management System (RDBMS)

• Popular choice of database for use in web applications, OLTP, embedded database

Oracle MySQL (Stockholm, Sweden)

All other MySQL forks are based of Oracles MySQL releases InnoDB storage engine

Percona Server (Pleasanton, California, USA) Developer of XtraDB storage engine

MariaDB (Helsinki, Finland) Founded by Monty, MySQL original author, MariaDB foundation Uses XtraDB, joint development with Percona

©2015 SanDisk Corporation. All rights reserved.

Page 3: Databases Acceleration with Non Volatile Memory File ... · InnoDB storage engine Percona Server (Pleasanton, California, USA) Developer of XtraDB storage engine ... compression libraries

3 2015 Data Storage Innovation Conference. © Insert Your Company Name. All Rights Reserved.

MySQL Has Strong Momentum!!!

Leading open source database for Web applications #1 Open Source Database in the Cloud1

dbPaaS market is gaining momentum2

Amazon RDS offer Oracle MySQL RDBMS engine2 Rackspace Cloud Databases offer fully managed instances of MariaDB, MySQL and Percona, with container-based virtualization2

Integrated with Hadoop in big data platforms

1Oracle: "State of the Dolphin" Keynote - MySQL Central @ OpenWorld 2014 2Gartner: Market Guide for Database Platform as a Service

©2015 SanDisk Corporation. All rights reserved.

Page 4: Databases Acceleration with Non Volatile Memory File ... · InnoDB storage engine Percona Server (Pleasanton, California, USA) Developer of XtraDB storage engine ... compression libraries

4 2015 Data Storage Innovation Conference. © Insert Your Company Name. All Rights Reserved.

Legacy MySQL Challenges

Page C Page

B

Page A

Buffer

DRAM Buffer

SSD (or HDD) Database

Database Server

Page C

Page B

Page A

Page C

Page B

Page A

Page C

Page B

Page A

Application initiates updates

to pages A, B, and C.

1

MySQL copies updated pages to

memory buffer.

2

MySQL writes to double-write buffer on the

media.

3

Once step 3 is acknowledged,

MySQL writes the updates to the

actual tablespace.

4

Every MySQL write translates to 2 writes to SSD

80% Performance penalty with legacy MySQL compression on

2 Writes

80%

redu

ctio

n in

Tra

ns/S

ec

2 1

Transaction Rate

©2015 SanDisk Corporation. All rights reserved.

Page 5: Databases Acceleration with Non Volatile Memory File ... · InnoDB storage engine Percona Server (Pleasanton, California, USA) Developer of XtraDB storage engine ... compression libraries

5 2015 Data Storage Innovation Conference. © Insert Your Company Name. All Rights Reserved.

Legacy MySQL Compression

MySQL stores uncompressed data in 16K pages

16K pages are compressed into a fixed compressed page size of 1K, 2K, 4K, 8K

Compressed page size is chosen at table creation

Compression is performed using regular software

compression libraries (zlib)

Table updates appended to Page Modification Log (mlog) at the end of the compressed (8K) page

When mlog gets full, page is recompressed

Uncompressed Data 16K

Compressed Data 8K mlog

Compressed Data 8K

Upd

ate

Inse

rt

Inse

rt

Compressed Data mlog 8K

Inse

rt

©2015 SanDisk Corporation. All rights reserved.

Page 6: Databases Acceleration with Non Volatile Memory File ... · InnoDB storage engine Percona Server (Pleasanton, California, USA) Developer of XtraDB storage engine ... compression libraries

6 2015 Data Storage Innovation Conference. © Insert Your Company Name. All Rights Reserved.

Fail – Split – Rebalance – Recompress

If recompress operation fails to fit within compressed block size, page is split into 2 pages which triggers an attempt to rebalance the tree This is the cause of most of the performance penalty of MySQL compression

Compressed Data 8K

Upd

ate

Inse

rt

Inse

rt

Inse

rt

Compressed Data >8K

Compressed Data mlog 8K

Uncompressed Data

Uncompressed Data

Compressed Data mlog 8K

©2015 SanDisk Corporation. All rights reserved.

Page 7: Databases Acceleration with Non Volatile Memory File ... · InnoDB storage engine Percona Server (Pleasanton, California, USA) Developer of XtraDB storage engine ... compression libraries

7 2015 Data Storage Innovation Conference. © Insert Your Company Name. All Rights Reserved.

New Primitives for a New Type of Media Application and File Systems Lagging Behind

Tape

Disk

Fusion ioMemory

NVM

SSD

Open, read, write, rewind, close.

Open, read, write, seek, close.

Open, read, write, seek, close.

Open, read, write, seek, close. Plus, new primitives to exploit characteristics of non-volatile memory Basic write + atomic write, Transactional write. Persistent Trim

©2015 SanDisk Corporation. All rights reserved.

Page 8: Databases Acceleration with Non Volatile Memory File ... · InnoDB storage engine Percona Server (Pleasanton, California, USA) Developer of XtraDB storage engine ... compression libraries

8 2015 Data Storage Innovation Conference. © Insert Your Company Name. All Rights Reserved.

SanDisk NVMFS

Value Increase life expectancy of flash devices

Consistent low latency

Consistent high performance

How?

Reducing Writes to flash

Optimize IO Write path for flash Applications leverage enhanced I/O interface

Eliminating Duplicate Logic & Leverage New Primitives for Optimal Flash Performance & Efficiency

Native Flash Translation Layer block allocation, mapping, recycling

ACID updates, logging/journaling, crash-recovery

NVMFS file metadata mgmt

Kernel block layer

kernel-space

user-space

Ext3 file metadata mgmt,

block allocation, mapping, recycling,

ACID updates, logging/journaling, crash-recovery

Primitive Interfaces

Application

Linux VFS (virtual file system) abstraction layer

New File system

©2015 SanDisk Corporation. All rights reserved.

Page 9: Databases Acceleration with Non Volatile Memory File ... · InnoDB storage engine Percona Server (Pleasanton, California, USA) Developer of XtraDB storage engine ... compression libraries

9 2015 Data Storage Innovation Conference. © Insert Your Company Name. All Rights Reserved.

SanDisk NVMFS – Solve Double Write Problem with Atomic Write Feature

9

▸ MySQL with Atomic Write

ioMemory Database

Page C

Page B

Page A

DRAM Buffer

Page C

Page B

Page A

Application initiates updates

to pages A, B, and C.

1

MySQL copies updated pages

to memory buffer.

2

MySQL writes to actual tablespace,

bypassing the double-write

buffer step due to inherent atomicity guaranteed by the intelligent device.

3

Database Server

Page C Page

B

Page A

Enhanced Life Expectancy of Flash

Devices

− Reduce Writes to flash by half at similar throughput

Consistent low latency

Higher performance especially for workloads with datasets that are bigger than DRAM

1 Atomic Write

A perfect fit for ACID compliant MySQL

1

©2015 SanDisk Corporation. All rights reserved.

Page 10: Databases Acceleration with Non Volatile Memory File ... · InnoDB storage engine Percona Server (Pleasanton, California, USA) Developer of XtraDB storage engine ... compression libraries

10 2015 Data Storage Innovation Conference. © Insert Your Company Name. All Rights Reserved.

Consistent Low Latency

Significantly Lower Latency with SanDisk NVMFS Atomic Write (compared to traditional double-write)

Sysbench - MariaDB 10.0.15, 4000 OLTP TXN injection/second, 99% latency, 220GB data - 10GB buffer pool

©2015 SanDisk Corporation. All rights reserved.

Page 11: Databases Acceleration with Non Volatile Memory File ... · InnoDB storage engine Percona Server (Pleasanton, California, USA) Developer of XtraDB storage engine ... compression libraries

11 2015 Data Storage Innovation Conference. © Insert Your Company Name. All Rights Reserved.

SanDisk Accelerated Compression: − Within 10% of uncompressed performance − 50% improvement in capacity1

− Enhanced life expectancy of flash devices2

Up to 4x fewer writes to storage With compression and Atomic Write

Compression with almost no performance hit 1For workloads that compress well. Improvement will vary 2At Similar Throughput (assuming same load)

Transaction Rate

SanDisk NVMFS – Significantly Improved Compression 2

©2015 SanDisk Corporation. All rights reserved.

Page 12: Databases Acceleration with Non Volatile Memory File ... · InnoDB storage engine Percona Server (Pleasanton, California, USA) Developer of XtraDB storage engine ... compression libraries

12 2015 Data Storage Innovation Conference. © Insert Your Company Name. All Rights Reserved.

SanDisk Acceleration

Move compression to the lowest layer Only store uncompressed 16KB pages in memory. Keep code ‘as is’ Tables recompressed with each update Use TRIM to free unused space NVMFS file system reports that less space is used on media No limitations due to pre-selected fixed compressed page size Very simple

Compressed Data 16K UNALLOCATED

16K = (32) 512B Sectors

8K = (16) 512B Sectors on Flash

512B

512B

512B

512B

512B

512B

512B

512B

512B

512B

512B

512B

512B

512B

512B

512B

512B

512B

512B

512B

512B

512B

512B

Uncompressed Data 16K

©2015 SanDisk Corporation. All rights reserved.

Page 13: Databases Acceleration with Non Volatile Memory File ... · InnoDB storage engine Percona Server (Pleasanton, California, USA) Developer of XtraDB storage engine ... compression libraries

13 2015 Data Storage Innovation Conference. © Insert Your Company Name. All Rights Reserved.

Compression With Almost No Performance Hit Write-Heavy Applications

0

5000

10000

15000

20000

25000

30000

Tim

e 80 160

240

320

400

480

560

640

720

800

880

960

1040

1120

1200

1280

1360

1440

1520

1600

1680

1760

1840

1920

2000

2080

2160

2240

2320

2400

2480

2560

2640

2720

2800

2880

2960

3040

3120

3200

3280

3360

3440

3520

# of

Tra

nsac

tions

Time (Seconds)

Legacy MySQL with Compression ON

MySQL /NVMFS with Compression ON

Legacy MySQL with Compression OFF

Enabling NVM compression has little impact on the MySQL transaction rate Enabling legacy MySQL compression has 80% penalty

TPC-C like benchmark, 1000 warehouses - 75GB Buffer pool, MariaDB 10.0.15

5x improvements

©2015 SanDisk Corporation. All rights reserved.

Page 14: Databases Acceleration with Non Volatile Memory File ... · InnoDB storage engine Percona Server (Pleasanton, California, USA) Developer of XtraDB storage engine ... compression libraries

14 2015 Data Storage Innovation Conference. © Insert Your Company Name. All Rights Reserved.

Combining Atomic Write with NVM Compression

0

5E+11

1E+12

1.5E+12

2E+12

2.5E+12

EXT4 uncompressed NVMFS atomics NVMFS atomics+compression

Byte

s

Reduces MySQL Write Operations to Flash by 70%

©2015 SanDisk Corporation. All rights reserved.

Page 15: Databases Acceleration with Non Volatile Memory File ... · InnoDB storage engine Percona Server (Pleasanton, California, USA) Developer of XtraDB storage engine ... compression libraries

15 2015 Data Storage Innovation Conference. © Insert Your Company Name. All Rights Reserved.

Summary

NVMFS is designed from grounds up for flash storage

Achieve optimum flash performance and efficiency

Customers will benefit:

− Increase life expectancy of flash devices

− Consistent low latency

− Consistent high performance

SanDisk is a trademark of SanDisk Corporation, registered in the United States and other countries. Fusion ioMemory is a trademark of SanDisk Enterprise IP, LLC. Other brand names mentioned herein are for identification purposes only and may be the trademarks of their holder(s).

©2015 SanDisk Corporation. All rights reserved.