1. Field of the Invention
The present invention relates generally to computers, and more particularly, to read based temporal locality compression in a computing environment.
2. Description of the Related Art
In today's society, computer systems are commonplace. Computer systems may be found in the workplace, at home, or at school. Computer systems may include data storage systems, or disk storage systems, to process and store data. Data storage systems, or disk storage systems, are utilized to process and store data. A storage system may include one or more disk drives. These data processing systems typically require a large amount of data storage. Customer data, or data generated by users within the data processing system, occupies a great portion of this data storage. Many of these computer systems include virtual storage components. Data compression is widely used to reduce the amount of data required to process, transmit, or store a given quantity of information. Data compression is the coding of data to minimize its representation. Compression can be used, for example, to reduce the storage requirements for files, to increase the communication rate over a channel, or to reduce redundancy prior to encryption for greater security. However, data compression consumes a significant amount of computing (e.g. central processing unit “CPU”) resources. Also, data can be lost due to problems such as system crashes, hardware failures, and abnormal computing system halts. Journaled file systems can be used to maintain data integrity when these types of problems occur.
In one embodiment, a method is provided for read based temporal locality compression using at least one processor device in a computing environment. In one embodiment, by way of example only, read operations are monitored, traced, and/or analyzed to identify repetitions of read patterns of compressed data. The compressed data is rearranged based on the repetitions of the compressed data that are in a read order.
In another embodiment, a computer system is provided for read based temporal locality compression using at least one processor device in a computing environment. The computer system includes a computer-readable medium and at least one processor in operable communication with the computer-readable medium. In one embodiment, by way of example only, read operations, using at least one processor device, are monitored, traced, and/or analyzed to identify repetitions of read patterns of compressed data. The compressed data is rearranged based on the repetitions of the compressed data that are in a read order.
In a further embodiment, a computer program product is provided for read based temporal locality compression by at least one processor device in a computing environment. The computer-readable storage medium has computer-readable program code portions stored thereon. The computer-readable program code portions include a first executable portion that monitors, traces, and/or analyzes read operations are to identify repetitions of read patterns of compressed data. The compressed data is rearranged based on the repetitions of the compressed data that are in a read order.
In addition to the foregoing exemplary method embodiment, other exemplary system and computer product embodiments are provided and supply related advantages. The foregoing summary has been provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter. The claimed subject matter is not limited to implementations that solve any or all disadvantages noted in the background.
In order that the advantages of the invention will be readily understood, a more particular description of the invention briefly described above will be rendered by reference to specific embodiments that are illustrated in the appended drawings. Understanding that these drawings depict embodiments of the invention and are not therefore to be considered to be limiting of its scope, the invention will be described and explained with additional specificity and detail through the use of the accompanying drawings, in which:
In a data processing system or computing environment, a journaling (e.g., a block) storage system may be used to store write operations in a journal (e.g., in a block). In a compressed journal system, the journal (e.g., block) holds compressed data. In one embodiment, a journal system maintains file system integrity by recording information regarding updates to directories, bitmaps, and/or data, in a log, also called a journal, before the updates are written to a storage device such as a hard disk. In the event of a system crash or other problem, the information in the journal may be used to restore the file system to a consistent state. Full-journaling systems additionally perform data journaling, in which data updates are also stored in the journal, to ensure that no committed data is lost. In one embodiment, the ability to access the data randomly is accomplished by dividing the journal into blocks that use a separate dictionary.
Journal (e.g., block) storage may be characterized by the write pattern of the journal/block storage. In one embodiment, data chunks are stored in the order they were written, so a logical offset of the data chunk has little or no relation to the physical location of the data chunk on the storage backend. Each data chunk is stored following the previous data chunk and invalidates any earlier data chunks written to same logical area.
In one embodiment, data may be compressed in the order it is written by the user and/or application (e.g., time-based-compression and/or temporal locality compression). Temporal locality compression means compressing data sequentially in time as opposed to position based compression. The assumption is that data is accessed later on in the same way for both read and write operations. The benefits in using temporal locality compression on write operations are 1) temporal data is more relative from the user and/or application points of view, 2) temporal locality compression results in a much higher compression ratio because of data similarity, and/or 3) temporal locality compression enables advanced read ahead operations (e.g., improves read cache and read performance). However, situations may occur were the pattern of an initial write operation is different than the pattern of the read operation. For example, the following scenarios may experience different patterns in write and read patterns: (1) backup and restore operations (e.g., an application writes data randomly but the backup application and the restore operation of the data reads data sequentially where in this case it is possible to lose the entire temporal locality, with all the benefits mentioned above), (2) volume mirror and/or volume copy operations in both network attached storage (NAS) and storage area network (SAN) NAS/SAN environments will cause the same effect as in (1) (e.g., backup & restore), (3) applications such as image processing/viewing may store the image data sequentially, but when loading the image for viewing, the read pattern is different to enable smooth display, and (4) a database that writes data sequentially but read the data in a different way. Thus a need exists for achieving a better (e.g., increased) compression ratio in the situations of different read patterns and write patterns to improve read ahead operations.
In order to increase the efficiency and productivity achieving a more efficient data compression, the present invention provides a solution for read based temporal locality compression using at least one processor device in a computing environment. In storing and retrieving data compressed and written with temporal locality, the present invention reviews data retrieval patterns for inefficiencies, and then rearranges the compressed data for read temporal locality and rewrite temporal locality. In one embodiment, by way of example only, read operations are monitored, traced, and/or analyzed to identify repetitions of compressed data. It should be noted that throughout the description herein the repetitions may be referred to as “read pattern repetitions.” The compressed data is rearranged based on the repetitions of compressed data that are in a read order. The compressed data, which is rearranged, is rewritten with read based temporal locality compression. The benefits of read temporal locality are in situations where write patterns are irrelevant to the relationship of the data, while the read order is relevant to the relationship of the data. The present invention rearranges the compressed data based on repetitions in a read order. The present invention monitors, traces, and/or analyzes the read input/outputs (IOs) to find, locate, and/or identify significant repetitions. After finding the repetitions, the data is transformed on a disk from temporal locality based on write temporal locality to temporal locality based on read temporal locality. In this way, the compression ratio efficiency is increased (e.g., a better compression ratio is provided) and also significant improvement is read ahead operations produced. The newly compressed object (e.g., a file/logical unit number “LUN”) now contains temporal locality based on write and temporal locality based on read.
In one embodiment, the present invention provides a solution to transform the access to compressed data based on read temporal locality, which repeats itself, and rewrites the compressed data in a way as if it was originally written with temporal locality. In one embodiment, the present invention (1) gathers (e.g., collects and analyzes) information of the user's read pattern, (2) detects inefficiency in the read workload, and/or (3) rewrites the data based on read temporal locality.
In one embodiment, the present invention collects and analyzes the information relating to the compressed data. In order to collect and analyze the data, the present invention saves the read requests (e.g., an N number of last read requests) in a buffer (e.g., a limited, first-in-first-out (FIFO) queue based buffer). For example, to store the last 1000 read request there may be a need of 12 KB of memory. In one embodiment, present invention also saves an indication whether the reads requests were found in the read cache.
In one embodiment, the detection operation for identifying inefficiencies in the read workload takes the last X number of logs from the logs history sequence, scans the log sequence, and tries to find, identify, and locate matches in the log sequence. It should be noted that “X” is the number of logs that compresses into a data block and depends on an average log length and the compression ratio. A match may be one or more repetitions of that X number of logs in the sequence. If a match is found then those X number of logs will be the candidate for the next optimize rewrite operation, and all matches will be removed from the log sequence. If a match is not found, then those X number of logs will be removed from the log sequence.
In order to reduce central processing unit (CPU) consumption, the detection operation may be enabled and/or disabled on the fly (in real time and immediately) according to inefficiencies identified in the read operations (e.g., read cache misses), a system's load, and the like. The scan interval may also be dynamically adjusted. It should be noted that there is no persistent data that needs to be saved on a storage device (e.g., a disk) because all the relevant information will be collected in real time and saved in memory (e.g., in random access memory “RAM”), and in case of a system failure, the present invention will perform a rebuild operation upon restoration of the process. For example, in one embodiment, a rebuild operation means starting to gather the read pattern information (statistics) from scratch. Moreover, the read pattern statistics are an ongoing process that is continuously being updated.
In one embodiment, the rearrangement of the data may be on a variety of types of storage devices, including but not limited to at least a disk, on random access memory (RAM), and/or on a solid state disk (SSD) or any other types of media. In one embodiment, the read based temporal locality may be first held in RAM and then later on flushed to a disk since it is only read serving data. In one embodiment, the rearranging of the compressed data on a disk occurs once and then receives the benefit of that rearrangement repeatedly (e.g., time after time as opposed to applying the algorithm every time a user and/or an application accesses the data). In one embodiment, the present invention rearranges (e.g., rearranging the source data on a disk according to a user/application read pattern) the compressed data according to an application accessing the data based on processing and/or procedure logic.
In one embodiment, the user and/or application writes data. The data is compressed based on write temporal locality and written to a storage device (e.g., a disk). At this point, if a read pattern of the data is different as compared to a write pattern, the read pattern is determined to be inefficient in terms of prefetching read ahead data. It should be noted that in one embodiment, the inefficiency of the write pattern means that if the data is written in one pattern (e.g., temporal locality/time based compression) but the read operation is in a different pattern, then from the users point of view the read pattern is random. Because data is compressed as it is received (and not according the position) into fixed size blocks, when user/application sends a read request the whole compressed-block is decompressed into the read-cache. So if the user/application writes and reads the data in a similar patterns then the user will benefit from read-cache (read ahead) because of temporal locality.
After analyzing the data compression and/or the differences in read and write patterns, the present invention rewrites the data according to the read temporal locality and/or alternatively saves the reorganized data according to a read pattern in a RAM (read-cache) and later on will flush to a storage device (e.g., a disk) the reorganized data according to a read pattern. In one embodiment, the analyze process is to determine if the read pattern is different from the write pattern, and thus identifying inefficiencies (e.g., no read-cache hits). For example, if each compressed block holds 5 user's logs (writes), and it is observed that for each read, the entire/whole block is extracted into read-cache but only one log (write) is used and the rest of the 4 logs are not used. In this case there is 80% waste of CPU utilization. Thus, by rearranging the data according to a read pattern increased performance is achieved due to increased read-cache hits and less waste in CPU utilization. After the data is rewritten, the user and/application accessing the data will benefit from the read temporal locality. In one embodiment, the temporal locality means data related in time (for both read and write).
In one embodiment, for read based temporal locality compression by a processor device in a computing environment, read operations are monitored, traced, and/or analyzed to identify repetitions of read patterns of compressed data. The compressed data is rearranged based on the repetitions of read order of the compressed data that are in a read order. For example, if from an analysis it is concluded that a user and/or an application reading blocks b10, b20, b75, b92 are adjacent and each input/output (I/O) is compressed and written to a different compressed block, then the present invention will rewrite those I/Os together and put them in one compressed block. So the next time a user/application reads b10 the present invention will fetch b10 as well as b20, b75, and b92 to read cache. In one embodiment, when a compressed block is decompressed all the IOs go to read cache.
Turning to
To facilitate a clearer understanding of the methods described herein, storage controller 240 is shown in
In some embodiments, the devices included in storage 230 may be connected in a loop architecture. Storage controller 240 manages storage 230 and facilitates the processing of write and read requests intended for storage 230. The system memory 243 of storage controller 240 stores the operation software 250, program instructions and data, which the processor 242 may access for executing functions and method steps associated with managing storage 230, and executing the steps and methods of the present invention. As shown in
In some embodiments, cache 245 is implemented with a volatile memory and nonvolatile memory and coupled to microprocessor 242 via a local bus (not shown in
Storage 230 may be physically comprised of one or more storage devices, such as storage arrays. A storage array is a logical grouping of individual storage devices, such as a hard disk. In certain embodiments, storage 230 is comprised of a JBOD (Just a Bunch of Disks) array or a RAID (Redundant Array of Independent Disks) array. A collection of physical storage arrays may be further combined to form a rank, which dissociates the physical storage from the logical configuration. The storage space in a rank may be allocated into logical volumes, which define the storage location specified in a write/read request.
In one embodiment, the storage system as shown in
The storage controller 240 may include a detection module 255, a rearranging module 257, a read/write temporal locality compression module 258, and a log history module 259 to assist with garbage collection in a compressed journal file system. The detection module 255, the rearranging module 257, the read/write temporal locality compression module 258, and the log history module 259 may work in conjunction with each and every component of the storage controller 240, the hosts 210, 220, 225, and storage devices 230. Both the detection module 255, the rearranging module 257, the read/write temporal locality compression module 258, and the log history module 259 may be structurally one complete module or may be associated and/or included with other individual modules. The detection module 255, the rearranging module 257, the read/write temporal locality compression module 258, and the log history module 259 may also be located in the cache 245 or other components of the storage controller 240 to accomplish the purposes of the present invention.
The storage controller 240 includes a control switch 241 for controlling the fiber channel protocol to the host computers 210, 220, 225, a microprocessor 242 for controlling all the storage controller 240, a nonvolatile control memory 243 for storing a microprogram (operation software) 250 for controlling the operation of storage controller 240, data for control and each table described later, cache 245 for temporarily storing (buffering) data, and buffers 244 for assisting the cache 245 to read and write data, a control switch 241 for controlling a protocol to control data transfer to or from the storage devices 230, and detection module 255, the rearranging module 257, the read/write temporal locality compression module 258, and the log history module 259 in which information may be set. Multiple buffers 244 may be implemented with the present invention to assist with garbage collection in a compressed journal file system as described herein.
In one embodiment, the host computers or one or more physical or virtual devices, 210, 220, 225 and the storage controller 240 are connected through a network adaptor (this could be a fibre channel) 260 as an interface i.e., via a switch called “fabric.” In one embodiment, the operation of the system shown in
Turning now to
Thus, based upon the embodiments described herein, the present invention provides a solution for read based temporal locality compression by a processor device in a computing environment. In one embodiment, the present invention monitors, traces, and/or analyzes read operations to identify repetitions of compressed data. The compressed data is rearranged based on the repetitions of compressed data that are in a read order. The compressed data, which is rearranged, is rewritten as the read based temporal locality compression.
In one embodiment, the present invention gathers (e.g., collects and analyzes) information of the user's read patterns for the read operations, detects inefficiencies in a read workload for each of the read operations, and/or rewrites the compressed data, which is rearranged, as the read based temporal locality compression.
In one embodiment, the present invention performs a write operation of data, compresses the data based on write temporal locality, identifies that the read pattern of the data is different from the write pattern, rewrites the compressed data as the read based temporal locality compression, and thus a new compressed object contains the write temporal locality compression based on the write operation and the read based temporal locality compression based on a read operation, and flushes the compressed data rewritten as the read based temporal locality compression to a storage device.
In one embodiment, the present invention saves each of the read requests in a first-in-first-out (FIFO) queue based buffer of a number of N last read requests, and saves an indication that any of the read operations where located in a read cache.
In one embodiment, an X number of logs are taken from a log sequence of a log history, where X is a number of logs that are compressed into a data block depending on an average log length and/or a compression ratio, identifies matches in the log sequence, and a match is at least one repetition of logs of the X number of logs in the log sequence. If a match in the log sequence is identified, the match is determined, set, and/or positioned as a next candidate for the rewriting of the compressed data as the read based temporal locality compression, and removes the match from the log sequence. If a match in the log sequence is not identified, the X number of logs are removed from the log sequence of the log history.
In one embodiment, enabling and/or disabling the detecting inefficiencies in the read workload for each of the read operations is performed on the fly. The compressed data may also be rearranged on one of a variety of types of storage devices (e.g., a disk), a random access memory (RAM), and a solid-state drive (SSD).
In one embodiment, for read based temporal locality compression by a processor device in a computing environment, read operations are monitored, traced, and/or analyzed to identify repetitions of read patterns of compressed data. The compressed data is rearranged based on the repetitions of read order of the compressed data that are in a read order.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or computer program product. Accordingly, aspects of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, micro-code, etc.) or an embodiment combining software and hardware aspects that may all generally be referred to herein as a “circuit,” “module” or “system.” Furthermore, aspects of the present invention may take the form of a computer program product embodied in one or more computer readable medium(s) having computer readable program code embodied thereon.
Any combination of one or more computer readable medium(s) may be utilized. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that may contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical fiber cable, RF, etc., or any suitable combination of the foregoing. Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the “C” programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider).
Aspects of the present invention are described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, may be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer readable medium that may direct a computer, other programmable data processing apparatus, or other devices to function in a particular manner, such that the instructions stored in the computer readable medium produce an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks. The computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagram in the above figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block might occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, may be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
While one or more embodiments of the present invention have been illustrated in detail, one of ordinary skill in the art will appreciate that modifications and adaptations to those embodiments may be made without departing from the scope of the present invention as set forth in the following claims.
Number | Name | Date | Kind |
---|---|---|---|
6009432 | Tarin | Dec 1999 | A |
7103608 | Ozbutun et al. | Sep 2006 | B1 |
7238218 | Hepner et al. | Jul 2007 | B2 |
20040034616 | Witkowski et al. | Feb 2004 | A1 |
20120144098 | Yang et al. | Jun 2012 | A1 |
Entry |
---|
McKee, AS. e al.; “Dynamic access ordering for streamed computations”; IEEE Transactions on Computers, vol. 49, No. 11, pp. 1255-1271; Nov. 2000. |
Tate, J. et al.; “Real-time Compression in SAN Volume Controller and Storwize V7000”; IBM Corporation, www.ibm.com/redbooks/redp4859-00 . . . ; Oct. 2012. |
Anonymous; “Methods for compression/decompression of secondary storage content with dynamic dictionary”; http://priorartdatabase.com/IPCOM/000196357; Jun. 1, 2010. |
Number | Date | Country | |
---|---|---|---|
20150012693 A1 | Jan 2015 | US |