Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method and system for realizing Redis memory database on nonvolatile memory

A non-volatile memory and database technology, applied in database indexing, database design/maintenance, structured data retrieval, etc., can solve problems such as increased memory usage, long recovery time, and increased memory database access delays

Pending Publication Date: 2020-10-27
ALIBABA GRP HLDG LTD
View PDF0 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

When the parent process calls fork, the access delay of the memory database will be greatly increased, and because of the Copy-On-Write (copy-on-write) feature, if the parent process frequently writes, the child process still maintains the original full amount of data. At this time The amount of memory used will increase exponentially
In addition, after the process is restarted, it is necessary to restore the data by loading the full amount of data and playback of the log file. If the full amount of data or the log file is large, the recovery time will be very long

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and system for realizing Redis memory database on nonvolatile memory
  • Method and system for realizing Redis memory database on nonvolatile memory
  • Method and system for realizing Redis memory database on nonvolatile memory

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0105] Such as figure 2 As shown, the system structure of the embodiment of the present invention, Redis is a kind of KV database, the present invention is compatible with the protocol of Redis but changes its storage mode. Based on the non-volatile memory also has the characteristic that the sequential write performance is better than the random write performance, and the LSM tree is used as the basic data structure. The SST data at different levels on the LSM tree are stored in non-volatile memory, and cold data can be stored on hard drives such as SSDs with slower speed but larger capacity based on the hot and cold characteristics of the data. The LSM tree provides GET and SET KV interfaces for reading and writing data respectively. The system supports running multiple redis instance databases at the same time, so it is necessary to divide and manage the non-volatile memory space.

[0106] The structure of this system is as figure 2 As shown, its main components are: L...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a method and a system for realizing a Redis memory database on a nonvolatile memory. The method comprises the following steps: allocating a unique index to each Redis instance;according to the index, allocating a storage space for the Redis instance in a nonvolatile memory based on the specification of the Redis instance, mapping the key value and data of the Redis instanceinto a storage structure of an LSM tree, and storing the storage structure into the allocated storage space; and feeding back the allocated index and storage space to the Redis instance. The Redis data is directly stored in the nonvolatile memory, and the access speed similar to that of the memory is kept.

Description

technical field [0001] The invention relates to the technical field of memory servers, in particular to a method and system for implementing a Redis memory database on a non-volatile memory. Background technique [0002] The existing Redis in-memory database mainly implements data persistence by appending and writing logs, and restores data through log playback after the process is restarted. [0003] At the same time, since the log is written into the file by appending, in order to avoid the unlimited growth of the file, it is necessary to create a new sub-process by fork (forking) after the log file grows to a certain threshold condition. The sub-process has The full data of the parent process, the full data is saved to the hard disk in the child process, and the parent process continues to write the incremental data to the log file. When the parent process calls fork, the access delay of the memory database will be greatly increased, and because of the Copy-On-Write (cop...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/50G06F16/21G06F16/22G06F16/2455G06F16/2457
CPCG06F9/5022G06F16/214G06F16/2246G06F16/24552G06F16/24578
Inventor 王蕾
Owner ALIBABA GRP HLDG LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products