IP Library Granted Patent US 10,649,910
Granted Patent B2
US 10,649,910 · App. 16/281,370 · Granted May 12, 2020

Persistent memory for key-value storage

Inventor: Ping Zhou (Folsom, CA)
Assignee: Alibaba Group Holding Limited
G06F12/1018G06F3/061G06F3/064G06F3/065G06F3/0608G06F3/0619G06F3/0659G06F3/0679G06F12/0246G06F12/0253G06F16/1847G06F16/20G06F12/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,649,910
App. No.
16/281,370
Granted
May 12, 2020
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 (81)

1. A method, comprising:

performing a put key operation, including:

obtaining a key and a corresponding value from the put key operation;

determining a physical address based at least in part on the key;

determining that a page associated with the physical address in a persistent memory media stores another key, wherein the persistent memory media supports memory persistence and in-place updating;

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

storing the key at the new page at the persistent memory media;

storing the corresponding value at a set of pages at the persistent memory media; and

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

2. The method of claim 1 , further comprising:

generating a page usage data structure at boot time; and

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

3. The method of claim 1 , wherein the physical address is determined without requiring a translation of a logical address associated with the key to the physical address.

4. The method of claim 1 , wherein determining the physical address based at least in part on the key comprises to hash at least a portion of the key to the physical address.

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

performing a second put key operation, including:

obtaining the key and a corresponding new value;

in response to a determination that the new 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 corresponding 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 corresponding value comprises a previous value, wherein the set of pages comprises a previous set of pages in the persistent memory media, and wherein the method further comprising:

performing a second put key operation, including:

obtaining the key and a corresponding new value;

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

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

storing associating data between the new 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 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;

determine a physical address based at least in part on the key;

determine that a page associated with the 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 stores the key; and

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

9. The system of claim 8 , wherein the processor is further configured to access the set of pages to retrieve the value corresponding to the key.

10. The system of claim 8 , 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.

11. 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;

determine a physical address based at least in part on the key;

determine that a page associated with the 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;

store the key at the new page at the persistent memory media;

store the corresponding value at a set of pages at the persistent memory media; and

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

12. The system of claim 11 , 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.

13. The system of claim 11 , wherein the physical address is determined without requiring a translation of a logical address associated with the key to the physical address.

14. The system of claim 11 , wherein to determine the physical address based at least in part on the key comprises to hash at least a portion of the key to the physical address.

15. The system of claim 11 , wherein the put key operation comprises a first put key operation, wherein the corresponding 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 new 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 corresponding new value, at least a portion of the set of pages in the persistent memory media associated with storing the previous value.

16. The system of claim 11 , wherein the put key operation comprises a first put key operation, wherein the corresponding 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 the new page associated with the physical address in the persistent memory media stores the key, determine to perform an out-of-place update;

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

store associating data between the new 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.

17. The system of claim 11 , 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.

18. The system of claim 11 , wherein the probe sequence indicates to check whether the new page that is a predetermined number of pages from the page associated with the physical address in the persistent memory media is used.

19. The system of claim 11 , wherein the processor is further configured to store metadata in the new page at the persistent memory media, wherein the metadata comprises one or more of the following: a key page type, a pointer to a page of the set of pages in the persistent memory media, a snapshot count corresponding to the key, a delete flag, and statistical information.

20. The system of claim 11 , wherein the processor is further configured to store metadata in a page of the set of pages in the persistent memory media, wherein the metadata comprises one or more of the following: a value page type, a version number corresponding to the corresponding value, a pointer to a next page of the set of pages in the persistent memory media, a pointer to a previous set of pages in the persistent memory media storing a previous value corresponding to the key, and a pointer to the new page in the persistent memory media.

Assignments (1)
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 →
Continuity (2)
Continuation 15492776 · Apr 20, 2017
Related Publication 20190258587A1 · Aug 22, 2019