Accelerating MS SQL Server 2012

Unleashing the Full Power of SQL Server 2012 in Virtualized Data Centers

By Allon Cohen, PhD
Scott Harlin

Introduction

SQL Server 2012, the latest release of Microsoft’s enterprise DBMS, includes new features and enhancements that improve database availability, simplify the moving of databases between instances, employ more productive management and development tools, and provide significant enhancements in performance, programmability and security.

Being data access intensive, the performance of this database application is dependent on storage performance. The speed of the storage implementation determines the time it will take to scan and analyze large portions of data, and dictates whether users receive the business insight they need, in the time frame they require.

To enable a large number of users to be serviced without contention, and to maximize the user experience of MS SQL Server applications, the underlying storage latency and transactional IOPS must deliver optimal performance. Providing immediate access to data becomes especially critical during peak usage so that productivity is not adversely affected. Transactional access rates and database read latencies can significantly impact the time it takes to complete data warehouse queries in enterprise and cloud environments.

This white paper presents a solution that dramatically increases MS SQL Server transactional IOPS performance, reduces database read latencies, dramatically improves query completion times, and is optimized for SQL Server 2012, enabling flash virtualization and data caching to increase application performance and data access. The OCZ solution includes host-based PCI Express (PCIe) Z-Drive R4 solid-state drives (SSDs) and VXL caching and virtualization software. By introducing this combined solution into an MS SQL Server 2012 analytical environment, improves query processing by factors up to 1700%, dramatically reducing processing window times while unleashing the full power of SQL Server 2012 in virtualized data centers.

Optimized Caching and Flash Virtualization for SQL Server 2012

The combination of Z-Drive R4 PCIe SSDs and VXL software enables the full potential of SQL Server 2012 in virtualized data centers through the following key capabilities:

  • Delivers live, on-demand business data exploration and analysis by combining SQL Server 2012 xVelocity column store indexes with OCZ host-based flash virtualization and caching.
  • Enables auto-detection, hot-zone caching that automatically identifies frequently accessed data pages within SQL Server 2012 to deliver on-host flash caching capabilities.
  • Divides database file groups between virtualized all-flash drives, storage area network (SAN) drives, and flash-cached drives to deliver optimal performance and a reduction in total cost of ownership (TCO).
  • Places performance critical files (such as SQL Server 2012 tempDBs) on host-based flash while retaining network accessibility.
  • Drives dynamic SQL Server 2012 VM migration from one server to another through VMware vMotion™ support, end-to-end mirroring, high availability (HA) and fault tolerance to server and flash failures.

The Z-Drive R4 PCIe cards with VXL software alleviate the storage bottlenecks associated with using database applications in virtualized environments, and enables MS SQL Server 2012 to be virtualized with confidence.

Addressing SQL Server 2012 Storage Access Requirements

SQL Server 2012 has been optimized to improve storage performance by including a host of storage access schemes that can benefit from flash virtualization and caching capabilities. The combined OCZ virtualization solution addresses these storage access schemes with key best practices that improve SQL Server 2012 performance and access to database indexes. The following details how OCZ’s virtualization solution addresses key SQL Server 2012 storage requirements:

Caching xVelocity Columnstore Indexes

SQL Server 2012 features a new column-oriented database index architecture that stores content by column rather than by row, making this approach ideal for data warehouse applications where aggregates are computed over large numbers of similar data items. The columnar database technology enables quick processing of highly complex queries over large datasets storing terabytes of information, as is typical for OnLine Analytical Processing (OLAP) workloads.

SQL Server 2012 uses xVelocity columnstore indexes (based on columnar database technology) to decrease the execution time of data warehouse queries. When xVelocity columnstore indexes are created, the SQL Server query optimizer accesses the columnar data to improve query performance, and will constantly attempt to load as much columnstore data as required, and as quickly as possible, to available client memory in response to requested queries. It is therefore highly beneficial to store the columnstore indexes on as fast a platform as possible. Being a frequently accessed dataset that is not altered very much, xVelocity indexes greatly benefits from the capabilities of PCIe-based flash.

How OCZ Addresses this Capability

VXL virtualization software efficiently loads a cached copy of xVelocity columnstore indexes to flash that dramatically improves access to them, while at the same time, retains a copy on the SAN. If users are frequently creating and constantly using xVelocity indexes, creating the indexes directly to flash, using VXL’s Flash Volume virtualization functionality, will accelerate index processing times and can negate the need for external SAN access altogether. IT managers can generate large TCO savings by deploying xVelocity columnstore indexes on OCZ host-based flash rather than with DRAM, attaining large performance increases without large expenditures for memory.

Caching tempDB on Flash

Data warehouse applications may request to consume large amounts of RAM for intermediate query results, and in many cases, when SQL Server does not have enough RAM available, the queries automatically spill into SQL Server’s tempDB (temporary database). When tempDB resides on a remote SAN, this redirection can create a drastic drop in database performance.

How OCZ Addresses this Capability

With OCZ’s combined virtualization solution, tempDB write operations may be directed to a virtualized flash volume residing on the host, dramatically reducing any performance impact of tempDB usage. VXL software virtualizes host-based flash and makes it available to the SQL Server VM wherever it resides in the virtualized environment. This unique capability utilizes the PCIe-based Z-Drive R4 SSD for tempDB usage while retaining all of the virtualization capabilities of the SQL Server VM, including the capability to perform vMotion while continually accessing the tempDB. This unique capability is in sharp contrast to other flash caching software products that place the tempDB on the local host which puts draconian limits on the connected SQL Server virtual machine, and causes important virtualization capabilities (such as vMotion, end-to-end mirroring, high availability and fault tolerance) to be negated.

Automatic Detection/Caching of Frequently Accessed DB Pages

Database files can reach terabytes in size while only the ‘hot data’ within them are frequently accessed. As the database changes, these ‘hot data’ zones may move to different locations within the file causing difficulty in detecting important data to cache and delays in both detecting and accessing the data.

How OCZ Addresses this Capability

VXL software features an advanced caching engine that dynamically detects ‘hot data’ within large database files and will cache the hottest and most relevant data effectively. Using the hot zone detection engine, OCZ VXL can efficiently cache large databases even with small amounts of flash. Available host cache resources can be shared with other VMs in the environment as the SQL Server 2012 VM no longer needs to cache the entire database.

Dividing DB Tables between Different File Groups

SQL Server 2012 allows database files to be grouped for administrative, data allocation, and placement purposes. Database tables can be placed in a separate file group with each file group having its own physical storage location. This feature is especially useful with large databases that may include multiple tables, with each table having its own requirements for access, allocation, and data replication.

How OCZ Addresses this Capability

As part of the SQL Server 2012 file group feature set, VXL software enables users with the flexibility to select between storing the data tables on SAN volumes, on virtualized ‘all flash’ volumes, or on flash-cached volumes. When flash-cached volumes are selected, VXL software automatically detects which database pages from the SAN need to be cached on flash, and will assign flash resources by demand to the SQL Server 2012 VM. Large TCO savings are enabled with the flexibility to pick and choose which DB tables can use commodity storage for capacity, and which tables can efficiently benefit from the performance enhancements of flash.

Retaining Log Files on Mirrored Flash Volumes

Log files are an essential component in making sure databases can be successfully recovered if needed. It is therefore critical to keep the logs stored in an environment that has no single point of failure. This has traditionally been a challenge for flash solutions that do not have storage virtualization capabilities.

How OCZ Addresses this Capability

VXL software has a unique storage virtualization feature-set that enables transparent mirroring of SQL Server logs between two flash cards, thereby assuring that the log files can be accessed with ultra high performance, while at the same time, are highly available for recovery if required.

Performance Testing with a Single SQL Server 2012 VM

The following sections present the accelerated performance achievable with VXL software in virtualized MS SQL Server 2012 environments, testing with a single VM, and with multiple concurrent VMs.

To simulate typical data warehouse applications, a 500GB database and a 1.7 TB database were used to run data warehouse queries based on the TPC-H query set (with columnar indexes added to the SF 300 and SF 1000 DBs). The tests compared a VM running a SQL Server 2012 database before and after VXL software and a Z-Drive R4 PCIe flash SSD were added to the host, testing for the completion time of data warehouse queries.

The baseline reference environment (before OCZ virtualization was added) featured a VM running SQL Server 2012 deployed on a Dell PowerEdge R710 host server (supporting six dual core Intel XEON X5690 processors). The host server was connected to a 4Gb Fibre Channel-based IBM DS3400 storage array system utilizing a RAID 5 SATA LUN for the database, and a RAID 5 SAS LUN for the VM OS drive. A VMware ESX 5.0 hypervisor was used to virtualize the host server as depicted in Figure 1.

Figure 1: SQL Server 2012 Baseline Without VXL
Figure 1: The baseline reference environment before VXL software and the Z-Drive R4 PCIe SSD were added

Figure 2: SQL Server 2012 Baseline With VXL
Figure 2: The baseline reference environment with the addition of VXL software as a virtual acceleration appliance and Z-Drive R4 PCIe cards

The flash accelerated environment, as depicted in Figure 2, utilizes the baseline reference host, VXL software (as a virtual acceleration appliance) and two Z-Drive R4 PCIe cards. In DB cache mode, flash caching was used to accelerate reads from the main database, while the tempDB and the VM OS pagefile were placed on a virtualized VXL flash volume. In full flash virtualization mode (also known as SAN-less Data Center mode), VXL virtualized the two Z-Drive SSDs, exposing them as accelerated storage for all VM storage requirements.

To simulate the sustained data warehouse loads in a production MS SQL Server 2012 environment, a set of 22 (TPC-H based) analysis queries were run and the time it took to complete the queries was recorded in each of the configurations that follow.

Testing Results with a Single SQL Server 2012 VM

The results of the acceleration tests indicate that deploying VXL software using a VMware ESX hypervisor system with Z-Drive R4 PCIe SSD-based flash provides a dramatic decrease in query completion times for MS SQL Server 2012 running as a single VM in the environment. For a single SQL Server 2012 VM, query execution times decreased by a factor of up to 1700%, and for those data warehouse queries that took hours to complete using the SAN (such as Query 9 in Graph 1), were completed within minutes using OCZ’s host-based flash virtualization solution.

Graph 1 summarizes the completion time for the 22 data warehouse queries tested before and after acceleration with VXL software and host based flash, with Graph 2 presenting the acceleration factor between the HDD-only configuration and the flash-accelerated configuration.

Graph 1: Average Data Warehouse Query Completion Times
Graph 1: Data warehouse query completion time with and w/o flash acceleration

Graph 2: VXL Flash Acceleration Factor Data Warehouse Queries
Graph 2: Data warehouse flash acceleration factor with and w/o flash acceleration

As is evident in Graph 2, over one-third of the queries where accelerated by a factor higher than 10x, dramatically reducing execution times. For IT professionals, the addition of VXL software and Z-Drive R4 PCIe SSD flash can mean the difference between meeting execution window times and not providing business users with the timely analysis they require, when they need it.

Performance Testing with Multiple, Concurrent SQL Server 2012 VMs

Virtualization environments can cause a particular challenge for HDD SANs when applications run concurrently in the same physical environment. When multiple VMs run together, their combined storage access requests are blended by the virtualization layer creating very random disk access or what is known as the ‘I/O blender effect.’ For this reason, server virtualization requires strong random access capabilities.

Figure 3: Multiple Concurrent VM Testing Environment
Figure 3: The multiple concurrent VM testing environment with VXL software and Z-Drive R4 PCIe cards

Unlike HDD storage, flash memory has no moving parts and handles random data access effortlessly, making it a superior enabler of virtualization. A PCIe flash-based SSD, connected via the PCIe bus, can deliver high I/O performance to VMs even for very random loads, easily satisfying requested data rates to unleash the full power of virtualization.

To simulate the sustained data warehouse loads of multiple, concurrent running VMs, a Dell PowerEdge R810 was used running three VMs in parallel, each utilizing 20 CPU cores and 32GB of RAM (for a total of 60 cores running together with 96 GB of RAM). SQL Server 2012 data warehouse queries were run on each VM using the xVelocity columnar indexes on a 500GB database.

VXL flash virtualization and acceleration was used to virtualize, allocate and divide two Z-Drive R4 PCIe cards between three VMs in the VMware environment. See Figure 3.

Testing Results with Multiple, Concurrent SQL Server 2012 VMs

The average completion time for the 22 data warehouse queries before and after acceleration with VXL software and host-based flash is summarized in Graph 3, while Graph 4 presents the acceleration factor between the HDD-only solution and the VXL SAN-less flash virtualization solution.

As evident by the test results, the combined Z-Drive R4 PCIe SSD and VXL software solution proved a perfect match for the concurrent demands of multiple SQL Server 2012 VMs. With three concurrent SQL Server 2012 VMs, query execution times decreased by a factor of up to 1600%. Query 19, which segments product data to be analyzed by supplier, country and year, took almost three hours to complete on the HDD-only SAN, as compared to less than 15 minutes with OCZ’s combined virtualization solution.

Graph 3: Average Data Warehouse Query Completion Times
Graph 3: Average data warehouse query completion time for three concurrent VMs with and w/o flash acceleration

Graph 4: VXL SAN-less Flash Acceleration Factor Data Warehouse Queries
Graph 4: Data warehouse flash acceleration factor when deploying VXL SAN-less Flash Volume Acceleration and Z-Drive R4 PCIe SSDs

Unleashing the Power of Virtualization

As CPU and DRAM computing power increases across data centers worldwide, IT professionals continue to use server virtualization as a means to increase efficiency and reduce costs. However, their efforts are usually hampered by the deficiencies that virtualization exposes on HDD storage. Up until recently, any virtualization that attempted to reduce server operating expenses (OPEX) and capital expenditure (CAPEX) were offset by the increased costs associated with HDD SANs. Unfortunately, HDD storage had become an inhibitor of virtualization, blocking enterprises and cloud providers from realizing its true benefits and associated cost savings.

In the VM tests presented in this white paper, CPU utilization was typically in the 3% to 10% range when running the standardized data warehouse query tests against HDD-only databases. During many of the processing cycles, the CPUs were simply waiting uselessly for data to process from the HDDs. In contrast, with Z-Drive R4 PCIe cards and VXL software deployed, the three VMs running in parallel (each utilizing 20 CPU cores) were fully occupied for large portions of time and maintained the server’s 60 CPU cores’ utilization in the 80% to 100% range. As a result, host-based flash with OCZ virtualization enables IT departments to fully benefit from the CPU and DRAM power available in today’s virtualized enterprise servers.

Conclusion

OCZ VXL software, when combined with an OCZ Z-Drive R4 PCIe SSD, provides an enterprise solution to flash-based virtualization and acceleration in the data center that dramatically increases SQL Server 2012 transactional IOPS performance, reduces database read latencies, dramatically improves query completion times, and is optimized for the SQL Server 2012 release. In the examples addressed in this white paper, introducing this combined virtualization solution into a SQL Server 2012 analytical environment improved query processing by factors up to 1700%.

Storage access times become especially critical for DB applications such as SQL Server 2012 that require the analysis of large amounts of data, as the time it takes to analyze data dictates whether users will receive the business insight they need, in the time they need it. In such cases, introducing OCZ virtualization into the SQL Server 2012 environment, can dramatically reduce processing window times.

The integrated OCZ hardware/software solution alleviates the storage issues that bog down virtualized server deployments. Enterprise IT departments and cloud providers can now virtualize even heavy application loads, such as SQL Server 2012, with confidence, even when running concurrently with additional loads. As a result, reduced CAPEX and OPEX efficiencies are realized that transform the data center into a dynamic, high-performance environment, capable of handling the ever-increasing storage loads and requirements typically associated with enterprise data centers and cloud environments.

DOWNLOAD PRINTABLE VERSION (PDF)