IP Library Granted Patent US 10,261,913
Granted Patent B2
US 10,261,913 · App. 15/492,776 · Granted Apr 16, 2019

Persistent memory for key-value storage

Inventor: Ping Zhou (Folsom, CA)
Assignee: Alibaba Group Holding Limited
G06F12/1018G06F3/065G06F3/0619G06F3/0659G06F3/0679G06F12/0253G06F12/1466G06F2212/1052G06F2212/7201G06F2212/7205
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,261,913
App. No.
15/492,776
Granted
Apr 16, 2019
Kind
B2
Abstract

Using persistent memory for key-value storage is disclosed, including: receiving a put key operation including a key and a corresponding value; directly storing the key at a persistent memory media using a physical address that is determined based at least in part on the key, wherein the persistent memory media supports memory persistence and in-place updating; directly storing the value to the persistent memory media; receiving a get key operation including the key; and directly accessing the persistent memory media using the physical address that is determined based at least in part on the key to retrieve the value corresponding to the key.

Claims (107)

1. A method, comprising:

receiving, using a processor, a put key operation including a key and a corresponding value;

directly storing the key at a persistent memory media using a physical address that is determined based at least in part on the key, wherein the persistent memory media supports memory persistence and in-place updating; and

directly storing the value at the persistent memory media, wherein directly storing the key to the persistent memory media using the physical address that is determined based at least in part on the key comprises:

determining that a page associated with the physical address in the persistent memory media is unused;

storing the key at the page associated with the physical address in the persistent memory media; and

storing associating data between the page associated with the physical address in the persistent memory media associated with storing the key and a set of pages in the persistent memory media associated with storing the value.

2. The method of claim 1 , wherein directly storing the key to the persistent memory media comprises determining the physical address without requiring a translation of a logical address associated with the key to the physical address.

3. The method of claim 1 , wherein directly storing the key to the persistent memory media comprises determining the physical address based at least in part on hashing at least a portion of the key to the physical address.

4. The method of claim 1 , wherein the put key operation comprises a first put key operation, the key comprises a first key, the value comprises a first value, the physical address comprises a first physical address, and the method further comprising:

performing a second put key operation, including:

obtaining a second key and a corresponding second value;

directly storing the second key at the persistent memory media using a second physical address that is determined based at least in part on the second key; and

directly storing the value at the persistent memory media, wherein directly storing the second key to the persistent memory media using the second physical address that is determined based at least in part on the second key comprises:

determining that a page associated with the second physical address in the persistent memory media stores another key;

selecting a new page in the persistent memory media based at least in part on a probe sequence;

determining that the new page in the persistent memory media is unused;

storing the second key at the new page in the persistent memory media; and

storing associating data between the new page in the persistent memory media associated with storing the second key and a set of pages in the persistent memory media associated with storing the second value.

5. The method of claim 1 , wherein the put key operation comprises a first put key operation, wherein the value comprises a previous value, and further comprising:

performing a second put key operation, including:

obtaining the key and a corresponding new value;

in response to a determination that the page associated with the physical address in the persistent memory media stores the key, determining to perform an in-place update; and

overwriting, with the new value, at least a portion of the set of pages in the persistent memory media associated with storing the previous value.

6. The method of claim 1 , wherein the put key operation comprises a first put key operation, wherein the value comprises a previous value, wherein the set of pages comprises a previous set of pages in the persistent memory media, and further comprising:

performing a second put key operation, including:

obtaining the key and a corresponding new value;

in response to a determination that the page associated with the physical address in the persistent memory media stores the key, determining to perform an out-of-place update;

writing the new value in a new set of pages in the persistent memory media;

storing associating data between the page associated with the physical address in the persistent memory media and the new set of pages in the persistent memory media; and

storing associating data between the new set of pages in the persistent memory media and the previous set of pages in the persistent memory media.

7. The method of claim 1 , further comprising:

receiving a request to release an identified snapshot version for the key;

determining an immediately younger snapshot version for the key relative to the identified snapshot version;

determining an immediately older snapshot version for the key relative to the identified snapshot version;

storing data associating one or more pages in the persistent memory media associated with storing the immediately younger snapshot version with one or more pages in the persistent memory media associated with storing the immediately older snapshot version; and

updating a page usage data structure to indicate that one or more pages in the persistent memory media associated with storing the identified snapshot version are unused.

8. A method, comprising:

receiving, using a processor, a get key operation including a key; and

directly accessing a persistent memory media using a physical address that is determined based at least in part on the key to retrieve a stored value corresponding to the key, wherein the persistent memory media supports memory persistence and in-place updating, wherein directly accessing the persistent memory media using the physical address that is determined based at least in part on the key to retrieve the stored value that corresponds to the key comprises:

determining that a page associated with the physical address in the persistent memory media stores the key; and

using associating data stored in the page associated with the physical address in the persistent memory media that stores the key to determine a set of pages in the persistent memory media at which the value is stored.

9. A system, comprising:

a persistent memory media that supports memory persistence and in-place updating; and

a processor coupled to the persistent memory media, configured to:

perform a put key operation, including to:

obtain a key and a corresponding value;

directly store the key at the persistent memory media using a physical address that is determined based at least in part on the key; and

directly store the value at the persistent memory media, wherein to directly store the key to the persistent memory media using the physical address that is determined based at least in part on the key comprises to:

determine that a page associated with the physical address in the persistent memory media is unused;

store the key at the page associated with the physical address in the persistent memory media; and

store associating data between the page associated with the physical address in the persistent memory media associated with storing the key and a set of pages in the persistent memory media associated with storing the value.

10. The system of claim 1 , wherein the processor is further configured to:

generate a page usage data structure at boot time; and

dynamically update the page usage data structure in response to updates in page allocation in the persistent memory media during runtime.

11. The system of claim 1 , wherein to directly store the key to the persistent memory media comprises to determine the physical address without requiring a translation of a logical address associated with the key to the physical address.

12. The system of claim 1 , wherein to directly store the key to the persistent memory media comprises to determine the physical address based at least in part on hashing at least a portion of the key to the physical address.

13. The system of claim 1 , wherein the put key operation comprises a first put key operation, the key comprises a first key, the value comprises a first value, the physical address comprises a first physical address, and the processor is further configured to:

perform a second put key operation, including to:

obtain a second key and a corresponding second value;

directly store the second key at the persistent memory media using a second physical address that is determined based at least in part on the second key; and

directly store the value at the persistent memory media, wherein to directly store the second key to the persistent memory media using the second physical address that is determined based at least in part on the second key comprises to:

determine that a page associated with the second physical address in the persistent memory media stores another key;

select a new page in the persistent memory media based at least in part on a probe sequence;

determine that the new page in the persistent memory media is unused;

store the second key at the new page in the persistent memory media; and

store associating data between the new page in the persistent memory media associated with storing the second key and a set of pages in the persistent memory media associated with storing the second value.

14. The system of claim 1 , wherein the put key operation comprises a first put key operation, wherein the value comprises a previous value, and wherein the processor is further configured to:

perform a second put key operation, including to:

obtain the key and a corresponding new value;

in response to a determination that the page associated with the physical address in the persistent memory media stores the key, determine to perform an in-place update; and

overwrite, with the new value, at least a portion of the set of pages in the persistent memory media associated with storing the previous value.

15. The system of claim 1 , wherein the put key operation comprises a first put key operation, wherein the value comprises a previous value, wherein the set of pages comprises a previous set of pages in the persistent memory media, and wherein the processor is further configured to:

perform a second put key operation, including to:

obtain the key and a corresponding new value;

in response to a determination that a page associated with the physical address in the persistent memory media stores the key, determine to perform an out-of-place update;

write the new value in a new set of pages in the persistent memory media;

store associating data between the page associated with the physical address in the persistent memory media and the new set of pages in the persistent memory media; and

store associating data between the new set of pages in the persistent memory media and the previous set of pages in the persistent memory media.

16. The system of claim 1 , wherein the processor is further configured to:

receive a request to release an identified snapshot version for the key;

determine an immediately younger snapshot version for the key relative to the identified snapshot version;

determine an immediately older snapshot version for the key relative to the identified snapshot version;

store data associating one or more pages in the persistent memory media associated with storing the immediately younger snapshot version with one or more pages in the persistent memory media associated with storing the immediately older snapshot version; and

update a page usage data structure to indicate that one or more pages in the persistent memory media associated with storing the identified snapshot version are unused.

17. A system, comprising:

a persistent memory media that supports memory persistence and in-place updating; and

a processor coupled to the persistent memory media, configured to:

perform a get key operation, including to:

obtain a key; and

directly access the persistent memory media using a physical address that is determined based at least in part on the key to retrieve a stored value corresponding to the key, wherein to directly access the persistent memory media using the physical address that is determined based at least in part on the key to retrieve the stored value that corresponds to the key comprises to:

determine that a page associated with the physical address in the persistent memory media stores the key; and

use associating data stored in the page associated with the physical address in the persistent memory media that stores the key to determine a set of pages in the persistent memory media at which the value is stored.

18. The system of claim 17 , wherein to directly access the persistent memory media comprises to determine the physical address without requiring a translation of a logical address associated with the key to the physical address.

19. The system of claim 17 , wherein the processor is further configured to determine the physical address based at least in part on hashing at least a portion of the key to the physical address.

20. A computer program product, the computer program product being embodied in a non-transitory computer readable storage medium and comprising computer instructions for:

receiving a put key operation including a key and a corresponding value;

directly storing the key at a persistent memory media using a physical address that is determined based at least in part on the key, wherein the persistent memory media supports memory persistence and in-place updating; and

directly storing the value at the persistent memory media, wherein directly storing the key to the persistent memory media using the physical address that is determined based at least in part on the key comprises:

determining that a page associated with the physical address in the persistent memory media is unused;

storing the key at the page associated with the physical address in the persistent memory media; and

storing associating data between the page associated with the physical address in the persistent memory media associated with storing the key and a set of pages in the persistent memory media associated with storing the value.

21. A computer program product, the computer program product being embodied in a non-transitory computer readable storage medium and comprising computer instructions for:

receiving a get key operation including a key; and

directly accessing a persistent memory media using a physical address that is determined based at least in part on the key to retrieve a stored value corresponding to the key, wherein the persistent memory media supports memory persistence and in-place updating, wherein directly accessing the persistent memory media using the physical address that is determined based at least in part on the key to retrieve the stored value that corresponds to the key comprises:

determining that a page associated with the physical address in the persistent memory media stores the key; and

using associating data stored in the page associated with the physical address in the persistent memory media that stores the key to determine a set of pages in the persistent memory media at which the value is stored.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 21, 2026
From: ALIBABA GROUP HOLDING LIMITED
To: CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PRIVATE LIMITED
Reel/Frame 075478/0225 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 20, 2017
From: ZHOU, PING
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 042084/0477 →
Continuity (1)
Related Publication 20180307620A1 · Oct 25, 2018
Cited By (1)
US 12,355,876