The present disclosure relates to storage environments and, more specifically, to improving access to the stored data.
In a large storage system, a central managing device manages multiple storage devices, stores received data therein, and provides the data to the clients upon their request. The storage devices are typically hard disk drives (HDDs), because of their cost efficiency and high reliability. However, the access to HDDs is relatively slow. In order to improve the performance, a storage systems may also include one or more cache memory devices, wherein data is stored temporarily, e.g. before it is written to an HDD or after it is read from an HDD to be sent to the client. The cache devices may store copies of data objects that are often requested by the clients, so that a client is provided with a cached copy of an object permanently stored in HDDs. Caching accelerates access to the previously cached data, though requires synchronization with the permanent storage.
The data is stored in an HDD in logical blocks. The size of a single block is defined by the size of a sector in an HDD. Older hard drives have 512-byte sectors, and recent hard drives—4096-byte sectors. When a cache device is used for moving data objects to and from an HDD, the data objects are stored in the same block format at both devices. However, the block format is inconvenient for operations on the data, for example deduplication and other forms of data management.
A method of managing data in a data structure store system will be disclosed herein. With reference to
The storage devices 130 are random access non-volatile memory devices. Suitable examples for the storage devices 130 include resistive switching memory cells (ReRAM) and NAND Flash. In the data structure store 10, at least some of conventional HDD storage is replaced with the non-volatile random access devices 130. The random access allows for more convenient and, in general, faster access to the stored data. For this reason, the method disclosed herein uses no HDD storage and relies on random access permanent storage. Of course, the data structure store 10 may include HDD storage; however, the method disclosed herein does not use HDDs. While HDDs are conventionally used for providing highly reliable permanent storage, the instant method stores data in the form of a data structure that helps preserving the integrity of the data when incidental memory faults occur or data is unreadable for other reasons.
The data structure store management system 100 may include a central processing unit (CPU) or processor 200, memory 210, and a communication interface 220, coupled together by a bus 230 or other link, although other configurations may be used. The system 100 may be a single device or a distributed system.
The processor 200 executes a program of stored instructions for one or more aspects of the present technology as described herein. The technology can be implemented, for example, in programmable circuitry 200 (e.g., one or more microprocessors) programmed with software and/or firmware, or entirely in special-purpose hardwired (non-programmable) circuitry, or in a combination of such forms. Special-purpose hardwired circuitry may be in the form of, for example, one or more ASICs, PLDs, FPGAs, etc.
The memory 210 in the data structure store management system 100 may store the instructions for one or more aspects of the present technology, although some or all of the instructions may be stored elsewhere. The memory 210 may be implemented in a random access memory (RAM), a read only memory (ROM), a floppy disk, hard disk, or other computer readable medium which may be read from by a magnetic, optical, or other reading system coupled to the processor 200 in the data structure store management system 100.
The communication interface (input/output system) 220 in the data structure store management system 100 operatively couples and enables communication with the client devices 110. By way of example only, the communications network 120 can use TCP/IP over Ethernet and industry-standard protocols, including NFS, CIFS, SOAP, XML, LDAP, and SNMP, although other types of communication protocols can be used. The connection to the storage devices 130 may be enabled by known techniques such as Peripheral Component Interconnect Express (PCI-E). In one embodiment, the storage devices 130 may be connected to the management system 100 via the bus 230.
The storage devices 130 are non-volatile random access devices (NV RAM), preferably storage class memory (SCM), which is a recent technology for persistent memory with DRAM like speeds. SCM storage does not use a battery or a super-capacitor as earlier techniques. The storage devices 130 are preferably byte-accessible devices capable of providing convenient access to elements of the data structures stored in the storage devices 130. Examples of SCM include resistive switching memory cells (ReRAM) and NAND Flash. Each of the storage devices 130 may have its own circuitry for reading and writing data on command from the management system 100.
A client device 110 may be a specialized or general purpose computer including a processor, memory, and input/output interface, coupled together by a bus or another link. A client 110 may be a mobile device, such a cell phone. The clients 110 (110a, 110b, . . . ) may run interface applications, such as Web browsers or specialized applications, to make requests for and/or send data to one or more application servers via the data structure store management computing system 100. Each of the plurality of client computing devices 110 may utilize the data structure store management system 100 to conduct one or more operations such as reading, writing, or editing data.
Then, in a storage step 270, the data structure store management system 100 creates a data structure wherein the received data is stored. The data may be encoded before storing. The data structure includes a plurality of data elements stored in the storage 130, each data element including a portion of the data, possibly encoded by an encoding algorithm.
In most cases, the data elements of a data structure are stored in a discontinuous memory space, in two or more separated memory regions, possibly on separate storage devices 130. In other words, at least two of data elements in a data structure are separated by physical memory or logical addresses not used for storing the particular data structure.
The data structure store management system 100 may create a meta data object for each data structure, possibly indicating locations of the data elements, their order in the data structure. The meta data object may include references from one data element to other data elements. The references may be pointers, offsets, etc. The meta data object is preferably stored within the management system 100, though it may be stored elsewhere, possibly in the storage 130. Thus, a data structure includes a plurality of data elements stored in the permanent storage 130 and a meta data object stored preferably at the data structure store management system 100.
In one embodiment, at least some of the data elements include one or more references to other data elements stored in the storage 130.
In one embodiment, the data structure store management system 100 creates multiple data structures of different types to store the received data.
In a data request step 280, the data structure store management system 100 receives a request to read at least a part of the data. The request is sent from one of the clients 110, not necessarily the same requestor that provided the data to the data structure store management system 100. Upon receiving the request, in a data providing step 290, the storage management system 100 reads the data portions from the data structure and provides at least a portion of the data to the recipient device 110 which may be identified in the request, explicitly or implicitly. Alternatively, the address or ID of the recipient device may be predefined at the data structure store management system 100. The references within the data structure or the meta data related to the data structure may be used for combining and ordering the data portions and/or for fault detection and repair as it will be discussed further, in order to maintain the integrity of the data provided to the recipient device.
The storage devices 130 are preferably non-volatile random access devices. In order to keep the convenient access to all data elements in the data structures at all times, no block-access storage devices are used for storing the data. In other words, during a time interval between receiving the data by the data structure store management computing system 100 (step 250) and providing the data by the data structure store management computing system 100 to the recipient device (step 290), the data structure store management computing system 100 provides no portion of the data for writing to a storage device that permits no random access, such as a hard drive. It should be noted that input-output buffers between the data structure store management system 100 and the persistent memory 130 are not storage devices.
Advantageously, using only random access persistent memory 130 and not using hard drives in the storage system 130 increases the performance of the data store 10, since there is no need for translating the data to and from the block format used in HDD storage. Additionally, storing data in the form of data structures increases the reliability of the storage devices 130 and helps maintaining the integrity of the data as discussed further in more detail.
Responsive to receiving the data 250, the data structure store management system 100 may select a data structure type to organize (order) the data when stored. By way of example, a stack, a queue, a linked list, a hash table, or a binary tree (B-Tree) may be selected. The selection of the data structure type may be performed by the data structure store management system 100 based on the reliability requirements, predefined at the system 100 or received from the client 110.
In one embodiment, the selecting of the data structure type includes providing a list of data structure types to the client 110, as illustrated in
In one embodiment illustrated in
By way of example, the selected EC group may contain all memory chunks within the storage devices 130 that satisfy the required level of reliability requested by the client 110.
Then, in a scheme detection step 420, the parameters for the “n+k” EC erasure coding scheme may be identified, in particularly based on the size of the selected EC group. Then, in a coding step 425, the data object is broken into fragments, and in a storing step 430 the data portions together with parity information are stored across a set of different storage devices 130 in accordance with the selected EC scheme.
The metadata object may store the storage information, including identities of the storage devices 130a, 130b, etc., that store each fragment of the encoded data. When a storage device in the distributed data storage system fails, all the objects that were stored in that storage device have to be discovered and repaired, so that the reliability is not compromised.
The data structure formed using EC coding as discussed above may have data elements organized in a stack or a queue. However, other data structure types may be used. By way of example, if the selected EC scheme requires N storage chunks and only N-1 chunks with the required reliability are available, the last element of the data structure may be written twice, to two chunks of lower reliability so that together they provide the required reliability and satisfy the client's request 410 (
In one embodiment illustrated in
After receiving a request for the data 280 (
In one embodiment, the method includes receiving, at the data structure store management system 100, a request for storing data from a client device, e.g. 110a, and receiving data from a plurality of client devices, possibly just from the client 110a (step 250). The method includes creating a data structure that includes a plurality of data elements in the persistent memory 130. Each of the data elements has a portion of the data (step 260). The data structure store management system 100 receives a request for reading at least part of the data, from a client device, possibly the client 110a or 110b (step 280). Responsive to receiving the request, the data structure store management system 100 obtains at least some of the portions of the data from the data structure and provides them to a recipient device (step 290). Notably, the persistent memory comprises one or more non-volatile random access devices and, during a time interval between receiving the data by the data structure store management computing system 100 and providing the at least part of the data by the data structure store management computing system 100 to the recipient device, the data structure store management computing system 100 provides no portion of the data for writing to a hard disk drive.
The data structure store management system 100 may provide the data to the recipient client 110 in the form of the data structure by sending a handle to the data structure data and thus providing access to the data within the data structure. The handle may be a name, a ID number, etc. Then, the client 110 can perform (i.e. requests the manager 100 to perform) a variety of functions. By way of example, when the selected data structure type is a stack, the data structure store may provide the handle to the stack to the client 110, either after the stack is filled with data, or of an empty stack before the data is stored within the data structure. Using the handle, the client computing device 110 can push data into the stack and pop data from the stack, in the sense that the client 110 sends a request for the operation to the data structure store management system 100, which then assists in performing the push, pop, etc. operations. If no stack exists for a handle specified in an operation request from the client 110, the data structure store management system 100 can return a failure notification or create a new data structure, e.g. a new stack and then push the data. The data structure store management system 100 can ensure that each push and pop follows the last in first out (LIFO) order. In other words, the data structure store management system 100 may store data in a data structure incrementally (e.g. by push or append operations) and provide the data to the client also incrementally (e.g. pop) and just part of the stored data (e.g. search).
In one embodiment, multiple types of data structures may be created and stored in a single data structure store by the data structure store management computing system 100, and each data structure may store different types of elements. By way of example, the data structure store management system 100 may create and store the received data in a stack and B-Tree for consumption by the requesting one of the plurality of client computing devices 110. Accordingly, multiple users of the plurality of client computing devices 110 can simultaneously store and retrieve their data into the data structure store based on the access control policies.
The data structure store management system 100 may allow more than one of the client computing devices 110 to use or edit the information stored in the data structure using a data structure aware application programming interfaces (API).
In one embodiment, the data structure store management computing system 100 also supports API for common data structure level operations in the created data structure. For example, reverse operation for a linked list data structure, traversal algorithms for B-Tree, graphs, etc., although other types or amounts of operations can be performed using the API. Additionally, API supports copying and moving the data between two similar or dissimilar data structures.
The data structure store management system 100 may support a minimal abstract
API for common operations that are valid across all data structures. For example, insert, remove, length operations may be applicable across different data structures, such as linked list or B-Tree, although other types of data structure can also be supported by the API. Additionally, the data structure store management system 100 may support API to plugin new user-defined structures and implementation for the abstract API operations and other user defined operations on them. Furthermore, the data structure store management system 100 may support API for querying and operating on the metadata for the data structure.
The metadata in the data structure store may be of different categories. Some metadata are generic across all types of data structures, such as the type of data structure, the data type of elements stored in the data structure, access count, list of API functions supported by the data structure, etc. Some metadata are specific and applicable only for particular data structures. By way of example, the “fanout” type of metadata is used for tree data structures, a “hash function”-for a hash-table, and so on. Internal metadata are specific to data management features, e.g. the “compression algorithm” used for on infrequently used “cold” data. The metadata API supports the ability to query, set and reset these metadata attributes for a data structure.
In addition to the metadata discussed above, the API implemented at the data structure store management system 100 may support the ability to associate and disassociate user defined attributes and tags to data structures. These user defined attributes and tags can be used to group related data together. Each data structure created by the data structure store management system 100 can qualify to be part of multiple groups based the associated attributes. Furthermore, the data structure API may support looking up and searching data structures based on a specific handle, metadata attributes previously illustrated, user defined attributes and associated tags.
The data structure store API may support the ability to associate and set and reset properties that can enforce constraints on the data structure; the properties and constraints may be implemented in the way the data is stored and also be written into the metadata, e.g. for further reference when a new fragment of data arrives. For example, a linked list can be associated with append-only property, to ensure that elements can only be added at the list's tail. The API may support operations to establish ownership on a data structure. It also may allow operations to define access control, permissions and visibility of the data structure and the data within across different users of the data structure store. For backward compatibility with legacy users that still use file API, the data structure store may also support wrapper API where the data within the data structure is exposed as a byte stream or file stream. The data store API enables sharing backed up data structures among several applications by providing a common API to read such data structures from the store as long as the other applications have the right permissions to do so. The metadata store manages data structures requested by each application, location of data elements in case multiple of them have been deduplicated, etc. and also maintains access control information to make sharing possible.
By using, creating and storing data of the data structure in a non-volatile memory, the technology disclosed herein provides the variety of operations expected of the data structure, while maintaining the consistency of the data. For example, user data stored in the data structure store is persistent across restarts. Using only random access persistent memory for storing the data structures enables the convenience and efficiency of operations on the data structures, such push, pop, search, etc.
Additionally, the method disclosed herein provides protection and resilience of the data against faults. The technology efficiently manages the storage space by identifying cold, infrequently used data and compressing the identified cold data. Conventionally, data structures stored in permanent memory are mapped to byte addressable RAM by compilers when a program is compiled. The method disclosed herein enables applications to utilize non-volatile memory to request persistence of their data structures during computation while still allowing byte addressable and fast access to these data structures. The method also provides reliability characteristics desired for these data structures so these can be copied/erasure coded on external stable storage outside the fault domain of the computer application.
With reference to
Next, the data structure store management computing system 100 assigns a unique identifier to the created data structure, step 530. The unique identifier may be a numeric value, alphabets or alpha numeric value. The unique identifier may be used as a handle for the client computing devices 110 to get access to the data stored in the created data structure. The data structure store management system 100 then stores the assigned unique identifier associated with the created data structure in a namespace that maintains indexes of data structure handles based popular metadata attributes and user defined attributes and tags, step 540. Additionally, the namespace efficiently maintains the various metadata attributes and user defined attributes and tags associated with a data structure. Next, the data structure store management system 100 receives a query to search for data within the data structure from one of the plurality of client computing devices, step 550. The data structure store management system 100 then identifies the unique identifier associated with the data structure, step 560, although the data structure store management computing system can perform other types of operations in response to receiving the search query. Next, the data structure store management system 100 obtains the data structure, in the sense obtaining a handle to the data structure, using the identified unique identifier of the data structure, step 570. Then, the data structure store management system 100 searches the information for the received query in the obtained data structure, step 580. Upon searching, the data structure store management system 100 provides the requested information back to the requesting one of the plurality of client computing devices 110, step 580, and the exemplary method ends. Instead of the search, any other operation on the data structure may be requested by the client and performed by the management system 100 using the unique identifier of the data structure as described herein. With reference to
By using the namespace to store the unique identifier, the technology provides fast access to popular groups of related data and also speeds up search for data based on the metadata attributes and user defined tags. Additionally, the overhead of maintaining the index and the cost of lookup is minimal, and does not interfere with the expected time complexity and efficiency of operations on the data structure.
An exemplary method of efficiently managing storage space will now be described with reference to
Next, the data structure store management system 100 classifies each of the scanned data structure into categories, e.g. as a hot data structure, a warm data structure or a cold, data structure, step 620. In this example, a hot data structure relates to a data structure that is frequently accessed by the plurality of client computing devices, while a cold data structure is infrequently accessed.
By way of example, the data structure store management system 100 can have predefined thresholds for the number of times when the data structure is accessed within a particular time range. Accordingly, if the number of actual accesses exceeds the upper threshold number, then the data structure store management computing system classifies the data structure as a hot data structure. Similarly, a warm data structure in this example can relate to a data structure which is accessed by the plurality of client computing devices at a number which is in the range between the upper threshold and the lower threshold. Lastly, a cold data structure in this example relates to a data structure which is accessed by the plurality of client computing devices at a number lower than the lower threshold.
In another example, hot, warm and cold data structure can relate to a type or the size of data stored in the data structure. The hot or cold category can be applied to an entire data structure or just some parts of it. By way of example, an entire stack data structure can be hot because it is often accessed; but it is also possible that another stack is only partially hot with respect to the top few elements which are more accessed than the rest of the stack.
Upon classifying, the data structure store management system 100 identifies all data structures classified in a particular predefined category, e.g. cold data structures, step 630. Next, the data structure store management system 100 compresses data stored within the identified (e.g. cold) data structures, step 640. The data structure store management system 100 may use one or more of the compression algorithms based on the type of data stored in the data structure to compress the data. By way of example, if the cold data structure is a linked list including elements of string data type, an encoding scheme or compression algorithm that works best with string, such as Huffman coding, can be used to compress the data. Alternatively, the user of client computing device 110 can select a compression algorithm to compress data in the cold data structure.
If the operations on the cold data structure are expected to be read-mostly, the data structure store management computing system 100 may convert the data within the cold data structure into a succinct version of the same data structure. By way of example, if a binary tree, or its sub-tree, has a low access count and marked read-only, then the data structure store management computing system 100 may convert the data into a succinct binary tree.
Next, the data structure store management computing system 100 continues to monitor the access rate on all the stored data structures, step 650. Accordingly, if the access rate on the data structure classified as a cold data structure is above a predefined threshold, the data structure store management system 100 decompresses the compressed data in the cold data structure, step 660. Additionally, the data structure store management system 100 may change the classification of the previously classified cold data structure, step 670. By compressing data in cold data structures, the technology disclosed herein provides advantages of efficiently managing storage space within a non-volatile memory.
In one embodiment, the data structure store management system 100 can perform deduplication of the data structures using chunk size and boundaries that are aware of hidden patterns. For example, if a linked list is to be de-duplicated, the chunking algorithm ignores the next pointers and only looks at the data.
An exemplary method for protecting data against memory faults will now be illustrated with reference to
Next, the data structure store management computing system 100 updates the mapped elements and the at least two additional pointers whenever the nodes are updated, step 730.
Additionally in this example, each data structure can be stored in a fault tolerant version or non-fault tolerant version, although the data structure can be stored in other types of fault tolerant versions. If stored in a fault tolerant version, the underlying storage layout may be different from the non-fault tolerant version, but all the operations on the data structure and its functionality remain similar to the non-fault tolerant version. So it is transparent to the user of the client computing device. The fault tolerant version storage layout depends on the type of data structure and the degree or level of fault tolerance needed.
Further embodiments illustrate the use of additional references for fault detection and recovery of data.
With reference to
In case of memory failure, when one of the data elements become unreadable, the additional pointers help to continue reading from the stack. By way of example illustrated in
In another method of protecting the data within the data structure, the data structure store management system 100 uses an additional data structure for every ‘k’ data structures of a same type.
With reference to
Next, the data structure store management system 100 calculates a checksum for each element within the data structure, step 820. The data structure store management system 100 may calculate the checksum using any conventional algorithm.
In storage step 830, the data structure store management system 100 saves the calculated checksum for each of the data elements. The checksums may be stored separately from the selected data structure, e.g. in the metadata associated with the data structure and stored at the data structure store management system 100. Alternatively, the data structure store management system 100 can embed a calculated checksum in another element within the same data structure. In the example illustrated in
When the data structure store management system 100 receives a request to read or edit data in the data structure, step 840 in
Next, the data structure store management system 100 compares the newly calculated checksum with the previously calculated checksum to determine if the data to be read may have been corrupted, step 860. Based on the comparison, if the data structure store management system 100 determines that the newly calculated checksum is equal to the previously calculated checksum, then the data structure store management computing system 100 provides access to the data stored in the data structure, e.g. for reading or editing, step 870, or returns the data. However, if the data structure store management system 100 determines that the newly calculated checksum is different from the previously calculated checksum, then the data structure store management system 100 identifies a fault in the data and may issue a notification, step 880.
When the corrupted data element is identified, the data structure store management system 100 may continue reading the data structure, e.g. using the techniques disclosed with reference to
Accordingly, the fault protection methods disclosed with reference to
Although examples of the data structure store management computing system 100 and the plurality of client computing devices are described herein, each of these systems can be implemented on any suitable computer system or computing device. It is to be understood that the devices and systems of the examples described herein are for exemplary purposes, as many variations of the specific hardware and software used to implement the examples are possible.
In addition to the embodiments described above, the features of the data structure store and the method disclosed in different embodiments may be combined unless two particular features are mutually exclusive. In one embodiment, the method described herein may include backup of a data structure to a block-access permanent storage, such as an HDD or a solid state drive (SSD).
The method presented in the instant disclosure may be embodied in a non-transitory machine readable medium having stored thereon instructions for performing one or more aspects of the present technology as described herein, wherein the instructions when executed by a processor, cause the processor to carry out the steps necessary to implement at least some of the aspects of the methods and the examples, as described and illustrated herein.
The present application claims priority from U.S. Provisional Application Ser. No. 62/136,919 filed on Mar. 23, 2015, which is incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
62136919 | Mar 2015 | US |