Apparatus and methods for caching objects using main memory and persistent memory
First Claim
1. A method of caching an object in a computer system having:
- persistent memory comprising multiple disks;
main memory containing a set of buffers associated with each of the multiple disks, each set of buffers comprising;
a cyclic object buffer configured to store and retrieve objects by logical block number;
a cyclic index buffer configured to store index entries corresponding to objects stored in the cyclic object buffer;
a metadata buffer configured to store information facilitating access to the cyclic object buffer and the cyclic index buffer;
wherein one of the multiple disks is a current disk and the set of buffers associated with the current disk is a current set of buffers;
the method comprising;
receiving an object from an origin server;
writing the object to the current cyclic object buffer if the current cyclic object buffer is not full;
if the current cyclic object buffer is full;
adopting a longest waiting disk as a new current disk;
adopting the set of buffers associated with the new current disk as a new current set of buffers;
storing the object in the new current cyclic object buffer;
writing an index entry regarding the object to the new current cyclic index buffer; and
updating the new current metadata buffer.
2 Assignments
0 Petitions
Accused Products
Abstract
An object cache stores objects in a cyclic buffer to provide highly efficient creation of cache entries. The cache efficiently manages storage of a large number of small objects because the cache does not write objects into a file system as individual files, rather the cache utilizes cyclical buffers in which to store objects as they are added to the cache. Because of the use of a cyclic buffer, the high-overhead process of purging cache entries never needs to be performed. Cache entries are automatically purged as they are overwritten when the cyclic buffer becomes full and the input pointer wraps around from the end of a cyclic buffer to the beginning of a cyclic buffer. Additionally, in the event of a system crash or disk subsystem malfunction, inspect and repair time is independent of the size of the cache, as opposed to conventional file systems in which the time is proportional to the size of the file system.
-
Citations
29 Claims
-
1. A method of caching an object in a computer system having:
-
persistent memory comprising multiple disks; main memory containing a set of buffers associated with each of the multiple disks, each set of buffers comprising; a cyclic object buffer configured to store and retrieve objects by logical block number; a cyclic index buffer configured to store index entries corresponding to objects stored in the cyclic object buffer; a metadata buffer configured to store information facilitating access to the cyclic object buffer and the cyclic index buffer; wherein one of the multiple disks is a current disk and the set of buffers associated with the current disk is a current set of buffers;
the method comprising;receiving an object from an origin server; writing the object to the current cyclic object buffer if the current cyclic object buffer is not full; if the current cyclic object buffer is full; adopting a longest waiting disk as a new current disk; adopting the set of buffers associated with the new current disk as a new current set of buffers; storing the object in the new current cyclic object buffer; writing an index entry regarding the object to the new current cyclic index buffer; and
updating the new current metadata buffer. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. In a computer system having main memory and persistent memory, the main memory containing at least one data buffer, the method comprising steps of:
-
receiving a request for an object, the request comprising an identifier of the object; and accessing a hash index table containing an index of information stored in the main memory and the persistent memory to determine, from the identifier, whether a cached copy of the object is stored in a plurality of data structures, the data structures comprising; a cyclic index memory capable of storing index entries comprising an index, the index having a beginning; a cyclic object memory capable of storing and retrieving objects by logical block number, the object memory having a beginning; and a metadata memory capable of storing information about the index memory and the object memory, the information including; a timestamp capable of storing a time associated with information stored in the metadata memory; a start of index indicator capable on indicating a location of the beginning of the index within the index memory; an index memory size capable of specifying a size of the index memory; an index pointer capable of pointing to a current position within the index memory; a start of data pointer capable of indicating a location of the beginning of the data within the object memory;
a data memory size capable of specifying a size of the object memory;a data pointer capable of pointing to a current position within the object memory, wherein determining whether a cached copy of the object is stored in a plurality of data structures further comprises the steps of; computing a hash value of the identifier; and accessing the hash index table using the hash value. - View Dependent Claims (9, 10, 11)
-
-
12. An apparatus comprising:
-
an execution unit capable of executing program code; persistent memory comprising multiple disks and; main memory containing a plurality of data structures associated with each of the multiple disks, including; a cyclic index memory capable of storing index entries comprising an index, the index having a beginning; a cyclic object memory capable of storing and retrieving objects by logical block number, the object memory having a beginning; a metadata memory capable of storing information about the index memory and the object memory; a receiver for receiving a first object from an origin server; determining whether current data structures are full, wherein the current data structures are associated with a current disk among the multiple disks; and adopting a longest waiting disk as a new current disk if the current data structures are full; and an object writer for; storing the first object in the current data structures if the current data structures are not full; and storing the first object in new current data structures associated with the new current disk if the current data structures are full. - View Dependent Claims (13, 14, 15, 16, 17, 18)
-
-
19. A computer system comprising:
-
an execution unit capable of executing program code; persistent memory; and main memory containing a plurality of data structures, including; a cyclic index memory capable of storing index entries comprising an index, the index having a beginning; a cyclic object memory capable of storing and retrieving objects by logical block number, the object memory having a beginning; and a metadata memory capable of storing information about the index memory and the object memory, the information including; a timestamp capable of storing a time associated with information stored in the metadata memory; a start of index indicator capable on indicating a location of the beginning of the index within the index memory; an index memory size capable of specifying a size of the index memory; an index pointer capable of pointing to a current position within the index memory; a start of data pointer capable of indicating a location of the beginning of the data within the object memory; a data memory size capable of specifying a size of the object memory; a data pointer capable of pointing to a current position within the object memory; a receiver for receiving a request for an object, the request comprising an identifier Of the object; program code for accessing a hash index table containing an index of information stored in the main memory and the persistent memory to determine, from the identifier, whether a cached copy of the object is stored in the plurality of data structures, wherein determining whether a cached copy of the object is stored in a plurality of data structures further comprises the steps of; computing a hash value of the identifier; and accessing the hash index a—
hash table using the hash value. - View Dependent Claims (20)
-
-
21. A computer readable storage medium causing a computer system to perform a method, the computer system having persistent memory comprising multiple disks;
- and
main memory containing a set of buffers associated with each of the multiple disks, each set of buffers comprising; a cyclic object buffer configured to store and retrieve objects by logical block number; a cyclic index buffer configured to store index entries corresponding to objects stored in the cyclic object buffer; and a metadata buffer configured to store information facilitating access to the cyclic object buffer and the cyclic index buffer;
wherein one of the multiple disks is a current disk and the set of buffers associated with the current disk is a current set of buffers, and the method comprising;receiving an object from an origin server; writing the object to the current cyclic object buffer if the current cyclic object buffer is not full; if the current cyclic object buffer is full; adopting a longest waiting disk as a new current disk; adopting the set of buffers associated with the new current disk as a new current set of buffers; storing the object in the new current cyclic object buffer; writing an index entry regarding the object to the new current cyclic index buffer; and updating the new current metadata buffer. - View Dependent Claims (22, 23, 24, 25, 26)
- and
-
27. A computer-readable storage medium capable of causing a computer system to perform a method, the computer system having main memory and persistent memory, the main memory containing at least one data buffer, and the method comprising the steps of:
-
receiving a request for an object, the request comprising an identifier of the object; and accessing a hash index table containing an index of information stored in the main memory and the persistent memory to determine, from the identifier whether a cached copy of the object is stored in a plurality of data structures, the data structures comprising; a cyclic index memory capable, of storing index entries comprising an—
index, the index having a beginning;a cyclic object memory capable of storing and retrieving objects by logical block number, the object memory having a beginning; and a metadata memory capable of storing information about the index memory and the object memory, including; a timestamp capable of storing a time associated with information stored in the metadata memory; a start of index indicator capable on indicating a location of the beginning of the index within the index memory; an index memory size capable of specifying a size of the index memory;
an index pointer capable of pointing to a current position within the index memory;a start of data pointer capable of indicating a location of the beginning of the data within the object memory; a data memory size capable of specifying a size of the object memory; and a data pointer capable of pointing to a current position within the object memory, wherein determining whether a cached copy of the object is stored in a plurality of data structures further comprises the steps of; computing a hash value of the identifier; and accessing the hash index a—
hash table using the hash value. - View Dependent Claims (28, 29)
-
Specification