The invention relates generally to data storage systems and, more specifically, to data storage systems employing a Flash-memory based data cache.
With technology advancements provided by multi-core processors and input-output (I/O) interconnects the capability of today's servers to execute applications is growing at a rapid pace. However, the I/O speeds of traditional data storage devices, such as hard-disk drives, that support the server are not increasing at the same rate as the I/O interconnects and multi-core processors. Consequently, I/O operations to the traditional data storage devices have become a bottleneck that is limiting application performance. Stated another way, applications executing on a server are not able to fully use the computing speed and data transfer capabilities available.
Some conventional computing systems employ a non-volatile memory device as a block or file level storage alternative for slower data storage devices (e.g., a magnetic disk storage medium, an optical disk storage medium or one or more data storage devices accessible via a network), to improve performance of the computing system and/or applications executed by the computing system. In this respect, because input/output (I/O) operations can be performed significantly faster to some non-volatile memory devices (hereinafter a “cache device” for simplicity) than from or to a slower storage device, use of the cache device provides opportunities to significantly improve the rate of I/O operations.
Enterprise class solid state disks (SSDs) and peripheral component interconnect express (PCIe) based on board solid state storage have been deployed in an attempt to address the I/O bottleneck by providing far superior I/O data rate performance. However, SSDs are relatively expensive and the performance improvement does not always justify the investment of deploying SSDs for all long term storage. Accordingly, SSDs are deployed to boost the performance of a server by using the SSDs as a cache to store frequently used data.
Recent developments in virtualization solutions enable data centers to consolidate and share hardware resources across multiple emulated machines. That is, a single server can provide shared resources in what appears to the client users as a dedicated server platform. The popularity of these network enabled virtualization solutions have introduced additional strain on I/O performance. For example, it is easy to predict that some applications will be in use and will receive more I/O requests at particular times of the day. However, with many clients accessing a particular hardware platform it is sometimes impossible to predict application performance hits when multiple client I/O requests reach the server at a particular instant. Server side caching in virtualized environments can significantly accelerate application performance by moving the frequently accessed “hot” data from the long term storage devices to a SSD coupled to the server.
A challenge in implementing server-side caching in a virtualized environment is how to share the cache store available in a single SSD/PCIe based cache device across multiple client machines. Virtualization features that enable virtual machines to be migrated to a new hardware platform by moving a virtual machine's file system from one storage system to another (e.g., vMotion) and server virtualization that enables platform virtualization on machines that support the 64-bit extension to the x86 processor instruction set necessitate that server-side caching needs to be dynamic to accommodate the various virtual server machines that are migrating in or out of the physical machine.
Embodiments of a system and method for dynamically managing a cache store for improved responsiveness to changing demands of virtual machines provision a single cache device or a group of cache devices as multiple logical devices and expose the same to a virtual machine monitor. A core caching algorithm executes in the guest virtual machine. As new virtual machines are added under the management of the virtual machine monitor, existing virtual machines are prompted to relinquish a portion of the cache store allocated for use by the respective existing machines. The relinquished cache is allocated to the new machine. Similarly, if a virtual machine is shutdown or migrated to a new host system, the cache capacity allocated to the virtual machine is redistributed among the remaining virtual machines being managed by the virtual machine monitor.
In an exemplary embodiment, a cache resource management system suitable for dynamically managing a cache store supported by a group of one or more flash-based devices and a host computer system managing a set of virtual machines is disclosed. The system includes a cache resource manager, a virtual machine manager, a plugin, and a driver. The cache resource manager is an application executing on the host computer system. The cache resource manager is configured with one or more policies for distributing multiples of an identified portion of the available cache storage capacity (e.g., an extent) in accordance with the number of virtual machines supported by the host computing system. The virtual machine manager is integrated in the kernel of the O/S executing on the host computer system. The virtual machine manager is arranged with a cache resource allocator and a flash-based cache device driver. The cache resource allocator claims a group of flash-based cache devices, allocates a logical drive to each virtual machine, and identifies a portion of the available cache storage capacity provided by the group of flash-based devices. The plugin communicates with a virtual infrastructure client and provides context from the perspective of a virtual machine, virtual machine manager, and a guest virtual machine to at least one flash-based cache device. A driver, available to each virtual machine, enables communications with the group of flash-based cache devices as if the virtual machine were communicating with a dedicated storage device.
In another exemplary embodiment, a method for managing a cache store supported by a group of one or more flash-based devices and a host computer system managing a set of virtual machines is disclosed. The method includes the steps of providing a cache resource manager application to a virtual machine manager, the cache resource manager using one or more policies for distributing multiples of an identified portion of the available cache storage capacity in accordance with the number of virtual machines supported by the host computing system, providing a cache resource allocator and a flash-based cache device driver to a virtual machine manager, the cache resource allocator claiming a group of flash-based cache devices, allocating a logical drive to each virtual machine and identifying a portion of the available cache storage capacity provided by the group of flash-based devices, providing a plugin to a virtual infrastructure client, the plugin providing virtual machine, virtual machine manager, and guest context to at least one flash-based cache device and exposing a driver to each virtual machine to enable the virtual machine to communicate with the group of flash-based cache devices as if the virtual machine were communicating with a dedicated storage device.
In another exemplary embodiment, a computer-readable medium having executable instructions stored thereon in non-transitory form that, when executed on a processing system of a host computer, direct the processing system to coordinate the following tasks. A cache resource allocator module is directed to claim cache devices coupled to the host computer. A cache resource manager is started and communicates with the cache resource allocator to determine available cache devices and scans the host computer to determine a number of virtual machines supported by the host computer. Once the number of virtual machines and the available cache devices are identified, the cache resource manager directs the cache resource allocator to divide an available cache capacity into equal sized extents, create logical drives, and an extent map in accordance with a cache allocation policy. The processing system further directs the cache resource manager to map each logical drive to a respective virtual machine and associate an extent map with each logical drive. Thereafter, the processing system directs the virtual machine to add a cache device to a cache group.
A dynamic cache sharing system implemented in O/S kernel, driver and application levels within a guest virtual machine dynamically allocates a cache store to virtual machines for improved responsiveness to changing storage demands of virtual machines on a host computer as the virtual machines are added or removed from the control of a virtual machine manager. A single cache device or a group of cache devices are provisioned as multiple logical devices and exposed to a resource allocator. A core caching algorithm executes in the guest virtual machine. The core caching algorithm operates as an O/S agnostic portable library with defined interfaces. A filter driver in the O/S stack intercepts I/O requests and routes the same through a cache management library to implement caching functions. The cache management library communicates with the filter driver for O/S specific actions and I/O routing. As new virtual machines are added under the management of the virtual machine manager, existing virtual machines are prompted to relinquish a portion of the cache store allocated for use by the respective existing machines. The relinquished cache is allocated to the new machine. Similarly, if a virtual machine is shutdown or migrated to a new host system, the cache capacity allocated to the virtual machine is redistributed among the remaining virtual machines being managed by the virtual machine monitor.
As illustrated in
In addition, the host system 110 is coupled via a peripheral interconnect card 140 to a set of local storage devices 145 and via a peripheral interconnect card 150 to a corresponding set of remote data storage devices 155. The local storage devices 145 and the remote data storage devices 155 are implemented with respective sets of physical disk drives exposed to the virtual environment 100 as composite data stores. One or both of the peripheral interconnect card 140 and the peripheral interconnect card 150 may manage the storage provided by the respective sets of physical disk drives using a redundant array of independent disks management technique that combines physical disk drives into a single logical unit. Data is distributed across the physical drives in one of several ways commonly known as “RAID levels,” depending on the reliability and performance required by applications supported by the corresponding data store.
As indicated in
A host computer environment 100 in accordance with the invention is highly scalable and is not limited to a single processor 112 or a single memory 120. In alternative embodiments (not shown), the host system 110 may include multiple processors similar or dissimilar to the processor 112. In addition, the host system 110 may include additional memory elements similar or dissimilar to the memory 120. Similarly, additional storage devices may be integrated to the host system 110 by generating multiple instances cache device driver 121, the SAS/ACHI driver 122 and the SAN/NIC driver 123.
In operation, the dynamic cache sharing system 300 dynamically manages a cache store 200 supported by a group of one or more flash-based devices (e.g., cache group 130) and a host system 110 managing a set of virtual machines. The dynamic cache sharing system 300 is implemented at a shared device driver layer below the application layer 128 and file system 126. The dynamic cache sharing system 300 is a generic caching layer that integrates with flash-based cache devices (e.g., FB cache card 132 and FB cache card 134) and conventional data storage systems (e.g., data storage systems implemented with various interfaces such as internet small computer system interface (iSCSI), fibre channel over Ethernet (FCoE), fibre channel (FC), SAS, and serial advanced technology attachment (SATA). The dynamic cache sharing system 300 works at the block layer and is transparent to the file system 126 and applications in application layer 128. The dynamic cache sharing system 300 identifies and consumes storage resident in FB cache card 132 and FB cache card 134, which are integrated in the cache group 130. In addition, the dynamic cache sharing system 300 provides caching functions across conventional data storage systems such as local volume 145 and remote volume 155. Core caching functions are implemented as O/S agnostic portable libraries using well defined interfaces to the physical disks and the cache resource management applications.
Cache metadata management (like hash table, LRU, free list, cache allocation unit management data structure) is important to the design of a very large cache store. Since solid-state disk (SSD) cache can scale to terabytes and every I/O on the host system 110 involves looking up the hash table and a cache allocation unit data structure to decide a cache hit/miss, it is imperative that the cache metadata management should be optimized for performance and the metadata footprint should be small enough to be held in double data rate (DDR) random access memory (RAM) for quick look-ups.
The allocation unit and the cache block size for the cache store 200 is significantly large to reduce metadata memory requirements. In an example embodiment, the entire cache data storage portion 200 is divided into multiple large chunks of allocation units called cache windows of 1 MB each. The cache window size is a tunable parameter and can be adjusted based on host system configuration and I/O workload. The cache window 222 is the allocation/deallocation unit for cache management. Each cache window 222 consists of multiple cache blocks 225 of 64 KB each. The cache block size is a tunable parameter and can be adjusted based on host system configuration and I/O workload. The entire cache store 200 can be used to cache multiple block devices and each cache window 222 represents a contiguous region of space on a single block device.
A hash table, free cache list, least recently used (LRU) list and a cache replacement algorithm operate at the cache window level. This significantly reduces the amount of memory needed to represent cache metadata 210 as each cache window 222 is a significantly large allocation unit. The cache metadata 210 is held in-memory for read caching for quick look-ups. Cache replacement is based on demand, threshold, age and perhaps additional factors and uses multiple priority based LRU queues. The priority based LRU queues use the number of active cache lines and number of times a cache window 222 is accessed to determine the priority of the cache window 222. The cache windows 222 that are full and accessed most are given highest priority and are placed at the end of the highest priority LRU queue. Once the entire cache store 200 is full, the cache window 222 with the least priority will be replaced first, thereby retaining the most frequently requested data. An intelligent heat map generating algorithm caches regions that are repetitively accessed. Data regions in the local volume 145 or the remote volume 155 that are accessed infrequently are not placed in the cache store 200.
The virtual machine manager 320 is capable of supporting multiple O/Ss with each O/S having an application layer 128 interface to the virtual machine manager 320. In the illustrated embodiment, O/S A (e.g. Linux, Unix) is supported by an interface 350 which includes management APIs 354 in a user level and a filter driver and library 352 in a kernel level that communicates with the virtual machine manager 320 via a SCSI HBA emulator. Similary, O/S B (e.g., Windows Server 2008) is supported by an interface 360 which includes management APIs 364 and a filter driver and library 362.
The virtual machine manager 320 is arranged with a cache resource allocator 322, a cache device driver 324 and a CICOM provider 326 to manage and control cache store 200 and communicate with the cache resource manager 330. These and other component execute in the guest virtual machines on the host system 110 to provide I/O filtering, hot data classification, and caching functionality. The virtual machine manager 320 emulates the cache devices to the virtual machines using SCSI HBA emulators. Devices are exposed to the virtual machines in two ways. In a first way, the data storage devices are exposed as raw devices by a raw disk access module 328. The raw disk access module 328 device exposes SCSI block devices directly to the virtual machines. Otherwise, data stores are exposed to virtual machines via a virtual machine file system (VMFS) via a VMFS module integrated in the virtual machine manager 320. The VMFS module may store and manage maps that associate the virtual device logical block addresses to a physical disk or the cache store 200. The VMFS also creates thin provisioned logical stores to support data snapshots, backups, and other operations with the virtual disks. The physical device on which the VMFS provisioned disks reside is referred to as a data store. These virtual disks can be dynamically moved to different data stores (physical disks) in the dynamic cache sharing system 300 without any downtime to the virtual machine using the virtual infrastructure client (VIC) with management plugin 340.
The cache resource allocator 322 is responsible for identifying and claiming all cache devices in the dynamic cache sharing system 300 and allocates logical drives for each virtual machine on the system that is configured to communicate with the management components of the dynamic cache sharing system 300. The logical drives created by the cache resource allocator 322 are mapped as a RAW device to the guest virtual machine. The cache resource allocator 322 divides the entire cache capacity into multiple extents or blocks of equal size. The extent size is adjusted to be equal to the cache window size. The cache storage capacity is allocated to different virtual machines in extent boundary.
The cache resource allocator 322 provides a set well defined of APIs for creating and destroying logical drives for each virtual machine. Each logical drive created by the cache resource allocator is of the capacity of the maximum cache capacity supported by the dynamic cache sharing system 300, however only a few extents of the entire cache device are mapped to each virtual machine. The mapping information is provided by the cache resource manager 330. The mapping information can change dynamically during the life of the dynamic cache sharing system 300 based on the policies defined in the resource manager 330 and addition and removal of virtual machines over time.
The cache resource allocator 322 enforces the extent map defined by the cache resource manager by making sure that the I/Os corresponding to each logical drive are validated against the current active extent map. The cache resource allocator 322 redirects the I/O requests to the physical device via the cache device driver 324 or other drivers (not shown) based on the extent map.
The cache resource manager 330 is a relatively small and efficient software module that operates as a guest virtual machine on the host system 110. The cache resource manager 324 monitors and manages cache device utilization and distribution across all virtual machines under the control of the virtual machine manager 320. During initialization, the cache resource manager 324 connects to all virtual machines, allocates cache capacity and monitors cache utilization. The cache resource manager 324 further registers with the virtual server and waits for events such as virtual machine addition, removal, migration etc. via the virtualization services API of the virtual machine manager 320 and coordinates the redistribution of cache storage capacity across currently executing virtual machines.
In addition, the cache resource manager 324 executes a policy engine that is responsible for distributing the cache across the virtual machines in a controlled way. The policy engine may include policies that equally share cache capacity across all virtual machines, guarantee a minimum cache capacity to certain virtual machines and redistribute the remaining cache capacity across other virtual machines, maintain a heat map across all virtual machines and based on the I/O activity performed by each virtual machine, redistribute the cache depending on current workload.
When a new virtual machine is added or migrated to a physical machine, the cache resource manager 324 detects this event and tries to redistribute the cache across the available virtual machines by performing the following steps. First, the cache resource manager 324 requests the currently running guest virtual machines with allocated cache capacity to relinquish some amount of cache via the management APIs 354, 356 in the guest virtual machines. Since the extent size of the cache allocation is equal to the cache window size, the guest virtual machine can relinquish the least hot data from the top of its LRU queue thereby reducing the performance impact due to reduced cache allocation. Once all virtual machines on the host system 110 relinquish some amount of cache allocated to them, the freed cache extents are allocated to the new virtual machine that got added or migrated.
Plugin 340 is arranged to communicate with the virtual infrastructure client (VIC) to provide management capabilities to manage the dynamic cache sharing system solution in a virtual environment. The plugin 340 provides context to management actions in terms of datacenter cluster, host and guest. System administrators will be able to monitor and manage the dynamic cache sharing system solution using plugin 340. The plugin 340 interacts with virtual machines using the management APIs 354, 364 and the cache resource manager 330 to provide the above-described management functions.
Virtual machines will use the filter driver and libraries 352, 362 depending on the O/S being executed in the virtual machine. The filter driver and libraries 352, 362 enable the cache device to be configured with an extent map and ensure that the cache device only uses the extents that have been allocated to it. In addition, the filter driver and libraries 352, 362 enable the addition and removal of extents from the virtual machine during cache redistribution as a result of a new virtual machine being added, a virtual machine going offline, or migrated out of the host system 110. Furthermore, the filter driver and libraries 352, 362 ensure that raw devices exposed to the virtual machines are configured as cache devices.
In the illustrated embodiment, the flash-based cache store 200 includes thirty cache windows (represented by blocks 0-29) with cache windows 0-9 associated with and identified to virtual machine 1 as logical disk 1, cache windows 10-19 associated with and identified to virtual machine 2 as logical disk 2, and cache windows 20-29 associated with and identified to virtual machine 3 as logical disk 3. The raw disk access module 328 working together with the cache resource allocator 322 completes the above-described association or link between the logical drives and designated contiguous set of blocks in the cache store 200.
In the illustrated embodiment, the flash-based cache store 200 includes thirty cache windows (represented by blocks 0-29) with cache windows 3-9 associated with and identified to virtual machine 1 as logical disk 1, cache windows 13-19 associated with and identified to virtual machine 2 as logical disk 2, cache windows 23-29 associated with and identified to virtual machine 3 as logical disk 3. The released cache windows represented by labeled blocks 0-2, 10-12, and 20-22 are reallocated to virtual machine 4 as logical disk 4. After the reallocation, virtual machines 1-3 are each allocated 7 of the 30 total cache windows and virtual machine 4 is allocated the remaining 9 cache windows. The raw disk access module 328 working together with the cache resource allocator 322 completes the above-described association or link between the logical drives and the designated sets of blocks in the cache store 200.
When a virtual machine is being migrated away from the host system, processing continues with block 812, where the cache resource allocator determines an amount of cache capacity that will become available for reallocation to the remaining virtual machines after being released from the virtual machine leaving the host system. In block 814, the resource manager, in accordance with the allocation policy, determines the amount of the released storage capacity that should be made available to the remaining virtual machines. It should be noted that when the allocation policy so dictates, the amount of storage capacity reallocated to each virtual machine may not necessarily be equal. In block 816, the cache resource allocator is instructed to remove the logical drive associated with the old virtual machine and update the revised extent map and reconfigure the remaining virtual machines with respective portions of the available cache capacity.
It should be understood that the flow diagrams of
It should be noted that the invention has been described with reference to one or more exemplary embodiments for the purpose of demonstrating the principles and concepts of the invention. The invention is not limited to these embodiments. As will be understood by persons skilled in the art, in view of the description provided herein, many variations may be made to the embodiments described herein and all such variations are within the scope of the invention as defined in the claims.
Number | Date | Country | Kind |
---|---|---|---|
270/KOL/2013 | Mar 2013 | IN | national |