Method and apparatus for utilizing a semiconductor memory of a node as a disk cache

A method and apparatus for utilizing a semiconductor memory of a node as disk cache is described. In one embodiment, a method of utilizing a semiconductor memory of a second server for a first server, comprising generating a storage access request at a first server, routing the storage access request through a communication link to a second server and performing the storage access request using a semiconductor memory of the second server.

BACKGROUND

1. Technical Field

Embodiments of the present invention generally relate to memory management. More particularly, embodiments of the present invention relate to a method and apparatus for utilizing a semiconductor memory of a node as a disk cache.

2. Description of the Related Art

Typically, a node (e.g., a server) in a configuration (e.g., a high availability server cluster) hosts various resources (e.g., software applications, storage devices, networking components, etc.) in a computing environment. For example, nodes (e.g., servers) in a high availability server cluster generally operate as either a primary/active node or as a secondary/backup node forming a primary-secondary relationship where the secondary node supports the primary node. For example, if a failure at the primary node occurs, there is a seamless, transparent transition between the primary node and the secondary node where the secondary node hosts the various resources to the computing environment.

In this example, the various resources at the secondary node are only utilized during a failure. Hence, a semiconductor memory (e.g., a cache, a memory, a storage device) at the secondary node remains idle for most of the time until there is a failure of a primary node. As a result, during normal operation of the high availability cluster, the semiconductor memory at the secondary node is underutilized by the cluster. Consequently, in large organizations, underutilized resources may increase costs related to information technology.

Accordingly, there is a need in the art for a method and apparatus for utilizing the semiconductor memory of a secondary node as a disk cache for a primary node.

SUMMARY

Embodiments of the present invention comprise a method and apparatus of utilizing a semiconductor memory of a secondary node as a disk cache for a primary node. In one embodiment, a method of utilizing a semiconductor memory of a second server for a first server, comprising generating a storage access request at a first server, routing the storage access request through a communication link to a second server and performing the storage access request using a semiconductor memory of the second server.

DETAILED DESCRIPTION

FIG. 1is a block diagram of a system100to enable use of a semiconductor memory of a second server. The system100comprises a first server102, a second server104and a storage device, each coupled to one another through a network108. Furthermore, the system100comprises a connection110(e.g., a communication bus, link and the like) between the first server102and the second server104.

The first server102comprises a central processing unit (CPU)112, various support circuits114and a memory116. The CPU112may comprise one or more commercially available microprocessors or microcontrollers that facilitate data processing and storage. The various support circuits114facilitate the operation of the CPU112and comprise at least one of clock circuits, power supplies, cache, input/output circuits, and the like. The memory116comprises at least one of read only memory (ROM), random access memory (RAM), or any other commercially available semiconductor memory. The memory116includes various software packages such as an operating system118, a primary caching driver120, and a disk driver122, among others.

The second server104comprises a central processing unit (CPU)124, various support circuits126and a memory128. The CPU124may comprise one or more commercially available microprocessors or microcontrollers that facilitate data processing and storage. The various support circuits126facilitate the operation of the CPU124and comprise at least one of clock circuits, power supplies, cache, input/output circuits, and the like. The memory128comprises at least one of read only memory (ROM), random access memory (RAM), or any other commercially available semiconductor memory. The memory includes various data, such as a cached data134. The memory128includes various software packages, such as a disk driver130, a secondary caching driver132, among others.

The storage device106comprises at least one of random access memory (RAM), disk drive storage, optical storage, removable storage, or any other commercially available storage device. The storage device106facilitates the storage of bulk data.

The network108comprises a communication system that connects a computer system by wire, cable, fiber optic and/or wireless link facilitated by various types of well-known network elements, such as hubs, switches, routers, and the like. The network108may employ various well-known protocols to communicate information amongst the network resources. For example, the network108may be a part of the intranet using various communications infrastructure such as Ethernet, WiFi, WiMax, General Packet Radio Service (GPRS), and the like. As another example, the network108may form a portion of a Storage Network Area using various communications infrastructure such as Ethernet, Fibre Channel, InfiniBand, and the like.

The connection110comprises a communication system that connects a computer system by wire, cable, fiber optic and/or wireless link facilitated by various types of well-known network elements, such as hubs, switches, routers, and the like. The connection110may employ various well-known protocols to communicate information. For example, the connection110may comprise an INFINIBAND or Ethernet connection.

In one or more embodiments, the connection110is a point-to-point bidirectional serial link in accordance with any INFINIBAND technology. Generally, INFINIBAND is a switched fabric communications link associated with a Storage Area Network primarily used in high-performance computing. The INFINIBAND architecture is intended for the connection of nodes with high speed peripherals. The INFINIBAND architecture specification defines a connection between a processor node and a high performance I/O node such as a storage device or a secondary node (e.g., the second server104).

The disk driver122and the disk driver130are similar software packages that facilitate access to the storage device106for the first server102and the second server104, respectively. The disk driver122and/or the disk driver130support the communication of data blocks and/or data block requests/responses between the storage device106and the first server102and the second server104, respectively. In one or more embodiments, the disk driver122and the disk driver130may be software in accordance with any FIBRE CHANNEL-based technology. In one or more embodiments, a plurality of storage controllers and storage networking devices (e.g., switches, hubs and the like) facilitate the storage of data from the first server102(e.g., a primary node) and/or the second server104(e.g., a secondary node).

The cached data134is a portion of semiconductor memory (e.g., the memory128) reserved for use as a disk cache for the first server102, as explained further below. The term “disk cache” as used herein refers to semiconductor memory used as a temporary storage for another memory (e.g., a disk drive). Disk cache may be use to improve the performance of the disk drive by reducing a number of physical accesses to a disk for duplicative read requests. Various embodiments of the present invention use a write-through cache policy in which data blocks associated with a write request are always stored both in the semiconductor memory and the disk. The write-through cache policy prevents a loss of data if the disk cache in not accessible. For example, if the second server were to fail, the data written to the disk cache is not lost because it is stored on the disk.

The primary caching driver120and the secondary caching driver132may be software packages that cooperate with each other to enable the use of the memory128, as a disk cache, for the first server102. The primary caching driver120and the secondary caching driver132interact through the connection110. In one embodiment, the primary caching driver120and the secondary caching driver132may be built on an INFINIBAND networking architecture and form the connection110. For example, the primary caching driver120and the secondary caching driver132are each implemented on top of an Internet Protocol over INFINIBAND (IPOIB) protocol. In one embodiment, the primary caching driver120and the secondary caching driver132are network block device drivers that use mapping information to access data blocks from the memory128. Hence, the operating system118interacts with the primary caching driver120as a block device associated with the mapping information for locating various data blocks. The primary caching driver120and the secondary caching driver132should be stored on both the first server102and the second server104should the roles of the first server102and the second server104ever change (e.g., in case of a failure at the first server102or an administrative command). If a failure occurs at the first server102, then the second server104must operate as the primary node in a primary/secondary node relationship with another server.

In operation, the primary caching driver120is configured to process data block read requests from the operating system118. If the data block is cached within the cached data134in the memory128, the data block is communicated to the first server102through the connection110. Then, the data block is transmitted to the operating system118for further processing.

In one embodiment, the secondary caching driver132receives the data block read request from the primary caching driver120. Notably, not every data block read request is communicated to the secondary caching driver132. The secondary caching driver132reads the requested data block from the memory128(e.g., the cached data134). For example, the secondary caching driver132uses mapping information (e.g., a representation of the allocation of data blocks in the memory128) to retrieve the requested data block. Further, the secondary caching driver132communicates the requested data block to the first server102through the connection110.

In one or more embodiments, a data block write request communicated to the secondary server132is cached in the cached data134in addition to being communicated to the disk driver130for storage in the storage device106. In another embodiment, if the data block is determined not to be cached in the cached data134during the data block read request, the data block is cached in the cached data when it is retrieved from the storage device106.

In one embodiment, the primary caching driver120and the secondary caching driver132are network block device drivers (e.g., server and client network block device drivers, respectively). The secondary caching driver132presents the cached data134as a block device to the first server102. As such, the primary caching driver120interacts with the memory128using the network block device. Hence, block caching is enabled between the first server102and the second server104.

In another embodiment, the primary caching driver120employs a Remote Direct Memory Access (RDMA) mechanism (e.g., a RDMA driver built over a INFINIBAND connection, such as the connection110) to allow data blocks to be communicated directly between the memory116and the memory128without the operating system118. RDMA is an access method that supports zero-copy networking by enabling the primary caching driver120and/or the secondary caching driver132to communicate the data blocks directly between the memory116and the memory128, eliminating the need to copy data to data buffers associated with the operating system118. The data blocks to be communicated require no additional processing by the first server102or the second server. Moreover, the data block transfers continue in parallel with other system operations. When the primary caching driver120initiates a RDMA Read or a Write request, the data blocks are communicated directly to the connection110which reduces latency and enables fast data block transfer. In one embodiment, only the primary caching driver120accesses data blocks from the disk. In one embodiment, the cached data134is pre-registered for INFINIBAND RDMA data block transfers.

According to one or more embodiments, the performance of the system100may be improved upon by various methods of disk cache management. According to various embodiments, disk cache management decisions are determined by the primary caching driver120and/or the secondary caching driver132. In one embodiment, one or more algorithms that avoid duplicative caching may be employed. Such algorithms prevent caching of a data block if the data block already exists in another disk cache associated with the system100(e.g., operating system cache, application cache and the like). For example, an ORACLE database application may increase the size of an associated buffer cache through use of the memory128as additional cache. Accordingly, data blocks are not cached in the associated buffer cached by the ORACLE database application and in the cached data134.

In another embodiment, the primary caching driver120and/or the secondary caching driver132improve the performance of the system100by employing one or more cache replacement algorithms such as, not recently used (NRU), first-in first-out (FIFO), least recently used (LRU) and the like.

In one embodiment, the primary caching driver120and/or the secondary caching driver132implement one or more caching policies. For example, the cached data134may be used for selective caching of specific data files (e.g., database files). As another example, only data blocks written to the data storage106are cached. Alternatively, only data blocks that are read from the data storage106are cached.

In another embodiment, the primary caching driver120and/or the secondary caching driver132pre-fetches one or more data blocks for communication to the first server102. The primary caching driver120and/or the secondary caching driver132use mapping information to retrieve the one or more data blocks. As mentioned above, the mapping information represents the allocation of various data blocks in the cached data134. In accordance with instructions from the primary caching driver120and/or a pre-fetching algorithm, the one or more data blocks are accessed and communicated to the first server102.

It is appreciated that embodiments of the present invention are not limited in scope to the system100described above. For example, the system100may comprise a plurality of nodes instead of only two nodes as illustrated inFIG. 1. Embodiments of the present invention include the distribution of underutilized semiconductor memory resources within the plurality of nodes (e.g., a server cluster having a plurality of servers). In one embodiment, one or more underutilized semiconductor memories within one or more nodes of the plurality of nodes may be used as a disk cache for one or more primary nodes. Hence, each of the one or more primary nodes has an increased amount of available disk cache. Accordingly, load balancing of various operations conducted by the system100may be achieved through such a configuration.

FIG. 2is a flow diagram of a method200for enabling use of the memory128, of the second server104, as a disk cache for the first server102, according to one or more embodiments. The method200has been explained with reference to the system100ofFIG. 1, but may be embodied in any other system in accordance with one or more embodiments.

The method200starts at step202and proceeds to step204, at which the first server102is coupled with the second server104through the connection110. In one embodiment, the primary caching driver120and the secondary caching driver132are network block device drivers. At step206, the memory128of the second server104is accessed. In one embodiment, the primary caching driver120establishes control over the memory128of the second server104through the connection110. At step208, use of the memory128as a disk cache for the first server102is enabled. The method200ends at step210.

FIG. 3is a flow diagram of a method300for processing read requests from the first server102, in accordance with one or more embodiments.

The method300starts at step302and proceeds to step304, at which a request from the first server102for a data block is processed. In one embodiment, the primary caching driver120communicates the request for the data block to the secondary caching driver132through the connection110.

At step306, a determination is made as to whether a data block resides in the cached data134, of the memory128. If the data block resides in the cached data134(option “YES”), then the method300proceeds to step308. At step308, a requested data block, present in the cached data134, is communicated to the first server102through the connection110. If, at step306, it is determined that requested data block does not reside in the cached data134(option “NO”), then the method300proceeds to step310. At step310, the request is communicated to the storage device106. The requested data block is accessed and retrieved from the storage device106through the network108. The method300ends at step312.

Consequently, use of one or more embodiments of the present invention enables the memory resources of a secondary server within a cluster to be more fully utilized. Such use facilitates expanded disk cache of a primary server, thus enhancing the operation of the primary server.