optimize mysql cluster environments with - hgst · pdf file1 optimize mysql cluster...

12
Optimize MySQL Cluster Environments with HGST Flash Pools Transform the way you operate, support and innovate MySQL Master/Slave clusters and significantly reduce TCO White Paper | October 2014

Upload: lamkiet

Post on 06-Mar-2018

233 views

Category:

Documents


5 download

TRANSCRIPT

Optimize MySQL Cluster Environments with HGST Flash Pools

Transform the way you operate, support and innovate MySQL Master/Slave clusters and significantly reduce TCO

White Paper | October 2014

Optimize MySQL Cluster Environments with HGST Flash Pools

Table of Contents

IntroductionPurpose of the MySQL Slave ....................................................................................................1Why Consider an Alternative Strategy ..............................................................................1

The Solution How it Works .................................................................................................................................2Snapshots, ETL, Backups, Analytics ..................................................................................... 3Flash Pools vs. MySQL Replication ......................................................................................4Device Affinity ..............................................................................................................................4

Performance MetricsHGST Flash Pools Compared to HDD Array .................................................................... 5HGST Flash Pools Replication Compared to Identical Master/Slave SSD Configuration ................................................................................................................................ 5

HGST FlashMAX SSD OptionsHGST FlashMAX II Model Options ......................................................................................6

Flash Pools TCOTraditional Approach vs. HGST Flash Pools - Capex and Opex Comparison . 7

Summary

1

Optimize MySQL Cluster Environments with HGST Flash Pools

IntroductionHGST Flash Pools for MySQL will transform the way you operate, support and innovate Master/Slave cluster environments by eliminating the barriers that substantially increase administrative complexity and operating costs associated with scaling MySQL applications.

Purpose of the MySQL Slave

1. Standby server – in case of a Master failure, the Slave preserves availability

2. Offload read queries from Master – often uses multiple Slaves to accelerate reads

3. ETL – load data into NoSQL, Hadoop without affecting Master server

4. Backup – does not slow down Master with backup jobs

5. Database development – changing schema, indexes, testing, etc.

6. Analytics – offloading work from primary application for analytical processing

Why Consider an Alternative Strategy

1. Waste – PCIe server Flash eliminates the need for Slaves to provide read acceleration. Reads and writes can be served from the same host at much higher levels of performance than HDD-based options.

2. Capex – Purchasing a server (or servers), to identically configure as a peer to your Master is a significant expense. These unsustainable expenses are compound exponentially in lock step with growth in business.

3. Opex – Management, power and cooling to keep the Slave servers running 24/7. The four-year cost of a server’s electricity is typically the same as the cost of the server itself. Many data centers are using less than 15% of supplied electricity to power their servers. Growth-to-power ratios are front and center in modern data center energy best practices. Customers need to ensure that power is directed to its most profitable business initiatives and limit idle or underutilized equipment.

4. Replica latency – Window of vulnerability, application delays (Master and Slave may never actually be in sync under high write loads).

5. Operational complexity – The administrative overhead associated with managing Slaves requires additional personnel to maintain, lowering the management ratio of terabytes-to-storage administrator.

2

The SolutionPCIe solid-state drives (SSDs) reduce shards and Slaves, but traditional architectures still require a 1:1 relationship between Masters and Slaves. Slaves are still needed for HA, ETL, analytics, testing and develop-ment access. With HGST Flash Pools, a new approach allows for software with “device affinity” to create a block-level mirrored pool of highly performant Flash capacity that allows you to consolidate operationally redundant Slaves in a group with a single server while still maintaining data replication capabilities, avail-ability and development access. With HGST Flash Pools, you may experience consolidation of 38% or more.

Optimize MySQL Cluster Environments with HGST Flash Pools

How it WorksHGST Virident Space is software that creates a shared Flash cluster from FlashMAX® SSDs. Simply install HGST FlashMAX SSDs on each Master server, then install HGST Virident Space software on each Master and the Multi-Function Server. HGST Virident Space software clusters all servers with Flash into a Flash Pool that is fully mirrored. This can be done through the familiar command line interface (CLI) or through the graphi-cal user interface (GUI).

A cluster-aware LVM (CLVM) volume is created on the Flash Pool. Each Master gets its own LVM volume to use as its EXT4 or XFS filesystem for all MySQL data (ibdata, iblog, etc.).

Before After

Multi-FunctionServer

- Dedicated replication pairs- Inefficient server utilization

- Shared, cluser multi-function server - 8 servers to 5, 38% consolidation- Fully mirrored Pool of Flash- Any server to any volume

HGSTFlash

HGSTFlash

HGSTFlash

HGSTFlash

MasterShard 1

MasterShard 2

Each Master has its own private CLVM volume on the space Redundant Server idle, running vgc_mysqlfailover daemon.

RedundantServer

MasterShard 3

MasterShard 4

/dev/master2 (ext4)

IBDATAIBLOG ...

/dev/master3 (ext4)

IBDATAIBLOG ...

/dev/master4 (ext4)

IBDATAIBLOG ...

/dev/master1 (ext4)

IBDATAIBLOG ...

3

Add the Redundant Server onto the network with Space software installed. The Redundant Server does not require a FlashMAX SSD. It can be on-line or even powered off saving operational expense. The Redundant Server runs a MySQL monitoring daemon, and when it detects a Master failure it takes over the shared volume and starts MySQL up exactly where the failed host left off.

Optimize MySQL Cluster Environments with HGST Flash Pools

HGSTFlash

HGSTFlash

HGSTFlash

HGSTFlash

MasterShard 1

MasterShard 2

MySQL starts up, replays log, and resumes service at the Redundant Server

RedundantServer

MasterShard 3

MasterShard 4

/dev/master2 (ext4)

IBDATAIBLOG ...

/dev/master3 (ext4)

IBDATAIBLOG ...

/dev/master4 (ext4)

IBDATAIBLOG ...

/dev/master1 (ext4)

IBDATAIBLOG ...

HGSTFlash

HGSTFlash

HGSTFlash

HGSTFlash

MasterShard 1

MasterShard 2

Multi-FunctionServer

Master continues operating during the snapshot process

RedundantServer

MasterShard 3

MasterShard 4

/dev/master1 (ext4)

IBDATAIBLOG ...

Master1_snap

IBDATAIBLOG ...

/dev/master2 (ext4)

(dev/test/analytics)

IBDATAIBLOG ...

/dev/master3 (ext4)

IBDATAIBLOG ...

/dev/master4 (ext4)

IBDATAIBLOG ...

snap

Snapshots, ETL, Backups, AnalyticsSnapshots can be taken of running Masters. HGST provides scripts to automate this task. Snapshots are available for use on the Redundant Server once completed. It is also possible to have more than one Redun-dant Server in the cluster to handle backup, ETL and development work without adding load to the Masters. For analytics, simply snap the Flash Pool volume and mount. Now you have a Flash Pool for mysqlslap and OLAP in a single instance.

(1) Snapshot initiated on a Master to a new VLVM volume

4

Optimize MySQL Cluster Environments with HGST Flash Pools

HGSTFlash

HGSTFlash

HGSTFlash

HGSTFlash

MasterShard 1

MasterShard 2

Multi-FunctionServer

Could also use Redundant Server if desired

RedundantServer

MasterShard 3

MasterShard 4

/dev/master1 (ext4)

IBDATAIBLOG ...

Master1_snap

IBDATAIBLOG ...

/dev/master2 (ext4)

(dev/test/analytics)

IBDATAIBLOG ...

/dev/master3 (ext4)

IBDATAIBLOG ...

/dev/master4 (ext4)

IBDATAIBLOG ...

Flash Pools vs. MySQL ReplicationIn addition to the consolidation benefits, Flash Pools provide other capabilities for MySQL that compare favorably to conventional MySQL Replication methods. HGST Flash Pools enable synchronous mirrors that ensure guaranteed replication. Since they are synchronous, they are also faster with virtually no replication delay at the application level. However, Flash Pools do not enable Master/Master replication or WAN replica-tion. The chart below highlights the primary differences between Flash Pools and MySQL Replication.

MySQL Replication HGST Flash Pool

Synchronous No Yes

Replication Guaranteed No Yes

Speed Slower Faster

Device Affinity No Yes

Servers Needed 2 * N N + 1

Replication Delay 10ms...1000ms+ 0

Master/Master Yes No

WAN Replication Yes No

Allowable Failures N masters 1 master

Device AffinityHGST optimizes Flash performance and endurance with its unique ‘device affinity’ technology. Through a deep understanding of NAND Flash and the die itself, we optimize our SSDs, drivers and software layers ‘up the stack’ as part of a vertically integrated strategy to ensure the best performance. The benefits of device affinity vary significantly from commercial software and other industry SSDs that are not optimized in this manner. Some of those benefits include:

(2) Snapshot mounted on Development or Redundant Server

5

Optimize MySQL Cluster Environments with HGST Flash Pools

1. Higher performance – the ability to cut-through many different layers of overhead, often resulting in 2x or greater performance

2. Greater endurance – fewer writes to the Flash for the same amount of work

3. Native DMA support – kernel-level interfacing with OFED/Infiniband stack. Note, while Flash Pools will work with either Infiniband or Ethernet, there is optimization for Infiniband.

Performance Metrics HGST Flash Pools Compared to HDD ArrayHGST Flash Pools deliver dramatically superior performance compared to an HDD-based array. In a mysqlslap-type workload, we are able to demonstrate 40x higher number of transactions per minute.

HGST Flash Pools Replication Compared to Identical Master/Slave SSD ConfigurationHGST Flash Pools achieve 62% higher performance with nearly half the number of servers when considering mysqlslap workloads using the same FlashMAX SSD. In addition, since the replication is synchronous and at the block-level, we can assure much more granular recovery in the event of a Master failure.

Transactions/Minute

40x

30x20x

10x0x

MySQL Master/Slave

HGST Flash PoolMaster/Slave

1x

40.5x

Transactions/Second

2.0x

1.5x1.0x

.5x.0x

MySQL Flash Master/SlaveReplication

HGST Flash PoolReplication

1x

1.6x

6

Optimize MySQL Cluster Environments with HGST Flash Pools

HGST FlashMAX SSD OptionsFlash Pools are delivered on HGST FlashMAX II PCIe SSDs today and FlashMAX III coming soon. The HGST architecture has been designed to tightly integrate different types of Flash media, hardware and software to deliver memory-class performance with storage-class capacity and persistence. HGST’s FlashMAX II SSDs and associated software deliver performance without compromise, along with HDD-like capacity in a very compact, universal form factor. Unlike competing solutions, 100% of the capacity available on a FlashMAX II card is available as a single host volume on the server without having to leverage 3rd party software RAID products to stripe across multiple drives. With FlashMAX II you can have a single volume presented to the operating system up to the formatted capacity, which can be as large as 4.8TB when using the FlashMAX II Capacity model.

HGST FlashMAX II Model Options

Performance1 STANDARD MODELS PERFORMANCE MODELS CAPACITY MODEL

Capacities (GB2) 550, 1100 1100, 2200 4800

Read throughput (max MB/s, sequential 64k) 1,600 2,700 2,600

Write throughput (max MB/s, sequential 64k) 550 1,000 900

Read IOPS (max IOPS, random 4k) 174,000 345,000 269,000

Write IOPS (max IOPS, random 4k) 27,000 57,000 51,000

Peak write IOPS (max IOPS, random 4k) 109,000 245,000 213,000

Mixed IOPS (70/30 R/W, random 4k) 72,000 138,000 128,000

Peak mixed IOPS (70/30 R/W, random 4k) 161,000 315,000 264,000

Read IOPS (max IOPS, random 8k) 125,000 250,000 214,000

Write IOPS (max IOPS, random 8k) 13,000 28,000 27,000

Latency 512B (μs) 21 22 191 All performance measurements are in full sustained mode except where noted as “Peak.”

2 One gigabyte (GB) is equal to one billion bytes, one terabyte (TB) is equal to 1,000GB (one trillion bytes), and one petabyte (PB) is equal to 1,000TB (one quadrillion bytes) when referring to solid-state drive or hard drive capacity. Accessible capacity will vary from the stated capacity due to formatting and partitioning of the drive, the computer’s operating system, and other factors.

For more information on FlashMAX II PCIe SSDs, go to http://www.hgst.com/solid-state-storage/enterprise-ssd/pcie-ssd/FlashMax-II

Flash Pools TCOHGST Flash Pools not only deliver a significant performance boost, but an extraordinary TCO as well. Based upon Dell’s MySQL Reference architecture for MySQL Server hardware http://en.community.dell.com/techcenter/os-applications/w/wiki/3752.mysql-reference-architectures-sample-data-on-dell-poweredge-systems we built our hardware reference architecture around the Dell PowerEdge R620.

HGST Virident Space Software runs on Linux today and Windows in the next release. So our reference architecture is slightly different than the Dell model as we substitute Red Hat Enterprise Linux for Microsoft Windows 2008 R2 Data Center edition.

7

Optimize MySQL Cluster Environments with HGST Flash Pools

Traditional Approach vs. HGST Flash Pools - Capex and Opex ComparisonWhile it is possible to do consolidations of 16 Master/Slaves to 8 Masters and 1 Multi-Function Server, we focus on a simpler design for this paper. Since our architecture assumes a consolidation from 8 MySQL Master/Slave pairs to a Flash Pool of 4 Masters and a Multi-Function Server, we highlight the capital expenses for the traditional approach as follows:

Dell PowerEdge R620 Configuration Summary

Module Description

PowerEdge R620 PowerEdge R620, Intel® Xeon® E-26XX Processors

Warranty & Service 3Yr Basic Hardware Warranty Repair: 5x10 HW-Only, 5x10 NBD Onsite

PCIe Riser Additional Riser with x16 PCIe Slot for x8, 2 PCIe Chassis with 2 Processors

Embedded Systems Management iDRAC7 Express

Select Network Adapter Broadcom 5720 QP 1Gb Network Daughter Card

Chassis Configuration Chassis with up to 8 Hard Drives and 2 PCIe Slots (Requires Additional Riser)

Power Management BIOS Settings Power Saving Dell Active Power Controller

RAID Controller PERC H310 Integrated RAID Controller

Processor Intel® Xeon® E5-2660 2.20GHz, 20M Cache, 8.0GT/s QPI, Turbo, 8C, 95W

Additional Processor Intel® Xeon® E5-2660 2.20GHz, 20M Cache, 8.0GT/s QPI, Turbo, 8C, 95W

Memory Capacity (2) 8GB RDIMM, 1600MT/s, Low Volt, Single Rank, x4 Data Width

Memory DIMM Type and Speed 1600MT/s RDIMMS

Memory Configuration Type Performance Optimized

System Documentation Electronic System Documentation and OpenManage DVD Kit

Power Supply Single, Hot-plug Power Supply (1+0), 495W

Power Cords NEMA 5-15P to C13 Wall Plug, 125 Volt, 15 AMP, 10 Feet (3m), Power Cord

Traditional Approach Unit Price Units Total Capex

Dell R620 Server $4,909.97 8 $39,279.76

MySQL Enterprise (5 yrs) @ 35% discount $16,250.00 8 $130,000.00

RHEL 5 yr License $4,276.61 8 $34,212.88

8 @ 128GB 15K RPM HDD (Dell.com) $1,866.64 8 $14,933.12

ProSupport Plus (5-year next business day) $1,399.26 8 $11,194.08

Capex Total $229,619.84

8

Optimize MySQL Cluster Environments with HGST Flash Pools

In the traditional approach, we use 8@128GB 15K HDDs 1 HDD for the OS, 2 HDDs for DBLog RAID-1, and 5 HDDs in RAID5 (=4*140=560GB) for DB files. Collectively, the 8 HDDs can deliver 1,600 IOPS.

In the HGST Flash Pools configuration, we substitute a 1.1TB FlashMAX II SSD with 174,000 IOPS for each server, which is more than enough performance to power Masters performing both read and write opera-tions. All of the logs and database files are stored on these SSDs directly, with no special segregation needed like in the hard drive case. The other cost in the Flash Pools model is HGST Virident Space software that is loaded on each machine to enable the Flash Pools capability.

Comparing the configurations on a Capex basis, Flash Pools delivers a $70,374 savings or 31% better TCO over 5 years than the traditional approach.

Considering 0peration expense, Flash Pools reduce server count and therefore clearly will reduce operational TCO. Highlighted below is a side-by-side comparison of the two approaches:

HGST Flash Pools Unit Price Units Total Capex

Dell R620 Server $4,909.97 5 $24,549.85

MySQL Enterprise (5 yrs) @ 35% discount $16,250.00 5 $81,250.00

RHEL 5 yr License $4,276.61 5 $21,383.05

HGST Virident Space Software @25% discount $3,562.50 5 $17,812.50

1 @ 1.1TB PCIe SSD @ 25% discount $5,000.00 4 $14,250.00

ProSupport Plus (5-year next business day) $1,399.26 5 $6,996.30

Capex Total $159,245.40

Traditional Approach

HGST Flash Pool

Server Watts 800 800

Storage Watts 72 25

Total Watts 872 825

Total Units 8 5

Total Platform Watts 6976 4125

Power Cost/kWH $0.10 $0.10

Hours/Year 8760 8760

Power Cost/Year $876 $876

Cooling Cost/Year $876 $876

Platform Cost/Year $12,222 $7,227

Platform Cost 5 Years $61,110 $36,135

Besides the number of servers, the most significant difference in the two approaches is the power consumed by the HDDs (72 watts/server) verses 25 watts for the FlashMAX SSD.

9

Optimize MySQL Cluster Environments with HGST Flash Pools

Overall, there is a 41% difference in Opex between HGST Flash Pools and the traditional approach, a savings of $24,975 over 5 years.

The chart below summarizes the 5-year TCO for both approaches.

Overall, total savings for HGST Flash Pools is $95,349 over 5 years or a 33% TCO compared to the traditional approach.

SummaryPutting PCIe Flash to work into your MySQL environment will yield immediate performance benefits, but there’s more. Since Flash is so much faster and lower latency, you can consolidate servers by up to 38%, shifting Capex and Opex expenses to profitable business initiatives. With HGST Flash Pools, you can eliminate the barriers that have persisted with conventional MySQL Master/Slave architecture with a multi-function server. As a result you’ll enhance data availability and achieve a significant reduction in capital expense for hardware, software and maintenance. The impact on data center energy costs will be enormous, setting the stage for future growth initiatives. Finally, because HGST Flash Pools use synchro-nous mirroring, you guarantee replication transactions integrity as soon as the Master COMMITs, resulting in a High Availability MySQL cluster with no replication lag.

We hope this white paper has provided a valuable education for you and provided insights into the trans-formative capabilities of HGST Flash Pools for MySQL. HGST provides our solutions through direct sales to enterprises, cloud service providers and through channel partners worldwide. We look forward to working with you.

$200,000

$250,000

$300,000

$350,000

$150,000

$100,000

$50,000

$-Capex Opex Total

Traditional Approach

HGST Flash Pools

Optimize MySQL Cluster Environments with HGST Flash Pools

© 2014 HGST, Inc., 3403 Yerba Buena Road, San Jose, CA 95135 USA, Produced in the United States 10/14, All rights reserved.

FlashMAX is a registered trademark of HGST, Inc. and its affiliates in the United States and/or other countries.

HGST trademarks are intended and authorized for use only in countries and jurisdictions in which HGST has obtained the rights to use,market and advertise the brand. Contact HGST for additional information. HGST shall not be liable to third parties for unauthorized use of this document or unauthorized use of its trademarks. References in this publication to HGST’s products, programs, or services do not imply that HGST intends to make these available in all countries in which it operates.

The information provided does not constitute a warranty. Information is true as of the date of publication and is subject to change. Actual specifications for unique part numbers may vary.

Please visit the Support section of our website, www.hgst.com/support, for additional information on product specifications. Photographs may show design models.

WP18-EN-US-1014-01