Data Center Tech Blog
Dhananjoy (Joy) Das

Sr. Systems Architect, SanDisk Enterprise Storage Solutions

Database appliances, as well as servers configured for databases, need a smart and simplified combination of hardware and software that supports performance, scale and ease of management. And if your business is committed to building the fastest database appliances in the market, like Alex Alexander and SpringbokSQL, then you need to constantly be testing the various building blocks of the complete IO stack to ensure they are truly the fastest in the world. Recently, Alex decided to answer the question, “Which is the fastest PCIe flash card?” In order to do this he evaluated a majority of the cards on the market and came down to testing two: Virident’s (now HGST solutions) PCIe card and Fuison ioMemory PCIe flash from Fusion-io, now a SanDisk® company. You can see the full results of the test in this video:

In this battle of hardware, Alex was surprised to find that it was software innovation that enabled Fusion ioMemory to deliver a dramatic 35% performance advantage. Let’s look further into the role of software in delivering better hardware performance, and particularly share how Fusion ioMemory products create an advantage with a new file system, called a Non-Volatile Memory file system (NVMFS), designed specifically to optimize and increase database and application performance with enterprise flash.

What Is NVMFS?

NVMFS is a new POSIX (Portable Operating System Interface) compliant file system that has been designed and developed by Fusion-io from the ground up for the newest generation of flash and non-volatile memory devices to overcome many of the suboptimal features of traditional file systems that were not designed with flash in mind.

NVMFS leverages the underlying Flash Translation Layer (FTL) for the purpose of providing large virtualized address space, direct flash access and crash recovery mechanism. It also provides application optimized memory interfaces that allow for application integration with storage-class memory like flash. Furthermore, NVMFS provides namespace management and appears as a Linux file system that enables applications to gain performance benefits using the standard operating system file APIs.

NVMFS and Legacy File Systems

Legacy Linux file systems like Ext4 and XFS are stable and feature rich storage software, primarily intended to provide the function of namespace management. They also often provide block allocation management of underlying physical blocks (allocation, free), translation of block maps (logical to physical), and crash recovery by journaling of data and metadata operations. But many of these additional features are already provided by the underlying flash based FTL (Flash Translation Layer) as part of its basic functionality, so there can be some significant duplication of effort when running a legacy file system on a flash device. Because NVMFS leverages the functionality of the underlying FTL as part of its basic design, it simplifies the file system implementation and eliminates duplication of operation between the file system and FTL allowing for much more efficient namespace management.

Fusion ioMemory devices and its associated FTL, known as VSL (Virtual Storage Layer), export the above functions as NVM (Non Volatile Memory) low-level interfaces or “primitives”. As shown in the diagram below, VSL primitives can be invoked by other subsystems in the IO stack. NVM flash primitives also include things like the Atomic Writes API, the “sparse” and persistent TRIM/discard (PTRIM) interface. With Atomic Writes, NVMFS provides ACID (“Atomicity, Consistency, Isolation, Durability”) transactional guarantees for data and metadata updates, leveraging the underlying capabilities of the flash device to guarantee that an update is persistent even in the event of unclean shutdown. PTRIMs are also used by NVMFS to allow for efficient garbage collection on the unused blocks by the underlying flash device, in order to gain better performance and endurance.

NVMFS architecture

Why Databases Benefit from NVMFS

NVMFS provides low latency I/O and throughput on par with the underlying block device, making it an ideal match for the high performance database environment. Popular relational databases like Oracle MySQL, MariaDB and Percona Server can use the primitives exported by NVMFS (Atomic Writes, Sparse and PTRIMs) to bypass I/O inefficiencies in the database itself and achieve much greater throughput and much lower transaction latencies.

The Atomic Writes API provides an “all or nothing” capability for database updates that uses the intelligence in the flash device to guarantee complete ACID-compliant transactions in a single write operation. As shown the diagram below, MySQL usage of Atomic Writes primitives allows submission of I/O with transactional guarantees, eliminating the need to use double write data operations to provide atomicity of updates.

NVMFS Atomic Writes

 

Fewer writes delivers several advantages, the first being faster transactional throughput. Atomic Writes can improve transactional throughput by 20-70% and reduce transactional latency by as much as 4 times over what you can achieve with flash on its own. Also, since writing to a flash device degrades the underlying flash over time, fewer writes also means an increase in the expected product life for the flash storage device, also known as the device’s “endurance”. So using NVMFS in conjunction with a fast flash device like Fusion ioMemory means faster database transactions and more value for your money by making your flash devices last longer.

In addition to the advantages of Atomic Writes, the usage of PTRIMs within NVMFS allows MySQL to specify that certain data blocks on the device are no longer used, allowing for the FTL to manage data on the device (also known as “garbage collection”) more efficiently. Efficient garbage collection also further reduces the number of writes to the flash device, increasing performance and increasing overall endurance.

NVMFS is supported with SanDisk Fusion ioMemory products that are available with capacities up to 6.4TB, up to 2.7 GB/s of bandwidth, over 370,000 Input/Output Operations per Second (IOPS) and as low as 15 microseconds of data access latencies, which means that Fusion ioMemory with NVMFS is an ideal flash tier for database and application environments.

Conclusion: Better Hardware through Software Innovation

And, what about Alex’s bake-off test between the HGST PCIe card and Fusion ioMemory from SanDisk, with all things otherwise being equal? As demonstrated in the video, in a 7 hour test measuring MariaDB MySQL database writes, the SanDisk Fusion ioMemory card outpaced the HGST card, finishing more than 2.5 hours faster. This 35% performance advantage was also consistent with database reads and reflects a key difference between the two test cases: use of NVMFS with Fusion ioMemory. Note also that this was not device level performance testing but measurement of database application performance, an important distinction when it comes to real-world applications and database usage. Ultimately, this advantage translates into organization productivity boost, higher service levels and lower infrastructure costs using flash hardware and software technologies from SanDisk.

Remember that for most of its meteoric rise as the new way to do high performance storage in the datacenter, flash storage technologies have been promoted primarily as just another disk, albeit a very fast one. But SanDisk has always looked toward new, innovative ways to make flash faster and more efficient. By taking a software-centric approach to flash performance, SanDisk is leveraging the memory-like aspects of flash to innovate and develop new features that accelerate databases and other applications in ways not possible with a “flash as disk” approach. This is the approach that lead to the development of NVMFS and the ability to take already fast flash storage and significantly increase performance and endurance through software.

Learn More

Learn more about NVM compression and how SanDisk is optimizing flash for MySQL here. MySQL Atomics is now available commercially and is fully supported by SanDisk in NVMFS 1.0 and Oracle MySQL 5.7 DMR4, Percona 5.6 and MariaDB 10. If you have any questions don’t hesitate to reach out to at: Dhananjoy.Das@sandisk.com

SanDisk and Open Source?

ULLtraDIMM – The Editor’s Choice

bring your data to life

Today’s digital economy with mobile, IoT and cloud is based on the value of data. How do you unlock it? Download the infographic to learn more: