WRITE OPERATIONS IN A FLASH MEMORY-BASED OBJECT STORE
Approaches for improving writing to solid state devices. An object cache or store, maintained on one or more flash storage devices, comprises two or more slabs. A slab is an allocated amount of memory for storing objects of a particular size. A request to write requested data to a slab is received. The size of the requested data is less than the maximum capacity of objects stored in the slab. After writing the requested data to the slab, unrequested data is written up to the maximum capacity of an object in the slab in the same write operation. Writing the unrequested data to the particular slab is performed for purposes of reducing the time required to write the requested data to the SSD.
1 . A method for writing to a cache, comprising:
maintaining the cache on a solid state device, wherein the cache comprises two or more slabs, wherein each of the two or more slabs is an allocated amount of memory for storing objects of a particular range of sizes;
receiving a request to write requested data to a particular slab, wherein the size of the requested data is less than the maximum object size of the particular slab; and
after writing the requested data to the particular slab, writing, to the remainder of a slot containing the requested data in the slab, unrequested data to the particular slab in the same write operation in which the requested data was written,
wherein writing the unrequested data to the particular slab is performed for purposes of reducing the time required to write the requested data to the solid state device.
2 . A method for writing to a volatile cache, comprising:
maintaining the volatile cache in DRAM for one or more solid state devices; and
in response to receiving a request to write data to the volatile cache, reserving space, on the one or more solid state devices, to persistently store the data, wherein reserving space is performed prior to writing the data to the volatile cache.
3 . The method of claim 2 , wherein reserving space comprises:
reserving enough space on a particular solid state device to persistently store the entire contents of the volatile cache.
4 . The method of claim 2 , wherein reserving space comprises:
in response to being unable to reserve space on a particular solid state device to persistently store the data, sending a message indicating that the data is not guaranteed to be persistently stored on the one or more solid state devices.
5 . The method of claim 2 , wherein reserving space comprises:
in response to being unable to reserve space on a particular solid state device to persistently store the data, reserving space on a different solid state device, other than the particular solid state device, in which to persistently store the data.
6 . A method for maintaining a database residing on a plurality of solid state devices arranged in a redundant array of independent disks (RAID) configuration, comprising:
issuing, to each of the plurality of solid state devices arranged in the redundant array of independent disks (RAID) configuration, one or more requests to persistently store data blocks stored within a volatile cache maintained thereon; and
upon determining that a particular solid state device, of the plurality of solid state devices, is experiencing an operational problem, ceasing to issue requests, to the particular solid state device, to persistently store data blocks stored within the volatile cache maintained by the particular solid state device.
7 . The method of claim 6 , further comprising:
upon determining that the particular solid state device has overcome the operational problem, resuming the issuance of requests, to the particular solid state device, to persistently store data blocks stored within the volatile write cache maintained by the particular solid state device.
8 . The method of claim 6 , further comprising:
upon determining that a new solid state device has been added to the plurality of solid state devices arranged in the redundant array of independent disks (RAID) configuration, initiating the issuance of requests, to the new solid state device, to persistently store data blocks stored within the volatile write cache maintained by the new solid state device.
9 . A machine readable storage medium storing one or more sequences of instructions for writing to a cache, wherein execution of the one or more sequences of instructions by one or more processors cause:
maintaining the cache on a solid state device, wherein the cache comprises two or more slabs, wherein each of the two or more slabs is an allocated amount of memory for storing objects of a particular range of sizes;
receiving a request to write requested data to a particular slab, wherein the size of the requested data is less than the maximum object size of the particular slab; and
after writing the requested data to the particular slab, writing, to the remainder of a slot containing the requested data in the slab, unrequested data to the particular slab in the same write operation in which the requested data was written,
wherein writing the unrequested data to the particular slab is performed for purposes of reducing the time required to write the requested data to the solid state device.
10 . A machine readable storage medium storing one or more sequences of instructions for writing to a volatile cache, wherein execution of the one or more sequences of instructions by one or more processors cause:
maintaining the volatile cache in DRAM for one or more solid state devices; and
in response to receiving a request to write data to the volatile cache, reserving space, on the one or more solid state devices, to persistently store the data, wherein reserving space is performed prior to writing the data to the volatile cache.
11 . The machine readable storage medium of claim 10 , wherein reserving space comprises:
reserving enough space on a particular solid state device to persistently store the entire contents of the volatile cache.
12 . The machine readable storage medium of claim 10 , wherein reserving space comprises:
in response to being unable to reserve space on a particular solid state device to persistently store the data, sending a message indicating that the data is not guaranteed to be persistently stored on the one or more solid state devices.
13 . The machine readable storage medium of claim 10 , wherein reserving space comprises:
in response to being unable to reserve space on a particular solid state device to persistently store the data, reserving space on a different solid state device, other than the particular solid state device, in which to persistently store the data.