System and methods for multi-level key-value store
AssigneeSamsung Electronics Co., Ltd.
InventorsInseok Stephen Choi, Byoung Young Ahn, Yang Seok Ki
Life of this patent
Estimating the term…
Abstract
A multi-level cache system may include a server with a processor and memory. The memory may include a database cache system for use with a distributed database system. The server may also include a Solid State Drive that may include a key-value store and a second storage device that may store a backend database. The key-value store may act as a second level cache to the database cache system.
Claims18
A multi-level cache system, comprising:
- a server;
- a processor on the server;
- a memory on the server;
- a key-value cache system installed in the memory, the key-value cache system operative to store a first key-value pair, the key-value cache system used with a first namespace and a second namespace;
- a Solid State Drive (SSD), including a key-value store, the key-value store operative to store a second key-value pair;
- a multi-level cache manager to dynamically allocate and assign how much of the memory is to be used by the key-value cache system for the first namespace and for the second namespace;
- and
- a second storage device, including a backend database,
- wherein the key-value store operates as a second level cache for the key-value cache system in the memory, and the key-value cache system and the key-value store act as a multi-level cache for the backend database.
A method, comprising:
- selecting between an inclusive inclusion policy and an exclusive inclusion policy for a key-value cache and a key-value store, the key-value cache stored in a memory;
- establishing the selected policy for the key-value cache and the key-value store;
- determining a first set of requirements for a first namespace and a second set of requirements for a second namespace;
- calculating a first portion of the memory for the first namespace and a second portion of the memory for the second namespace;
- calculating a third portion of the key-value store for the first namespace and a fourth portion of the key-value store for the second namespace;
- allocating the first portion of the memory for the first namespace and the second portion of memory for the second namespace;
- allocating the third portion of the key-value store for the first namespace and the fourth portion of the key-value store for the second namespace;
- receiving a request to access a target value, the request including a target key;
- determining whether a key-value pair including the target key exists in a key-value cache;
- based at least in part on the target key not existing in the key-value cache, determining if the key-value pair including the target key exists in a key-value store;
- and
- based at least in part on the target key existing in the key-value store but not in the key-value cache, accessing the target value from the key-value pair from the key-value store using the target key,
- wherein the key-value store operates as a second level cache for the key-value cache system in the memory, and
- wherein the key-value cache and the key-value store operate as a multi-level cache for a backend database on a storage device that does not include the key-value cache or the key-value store.
A method according to statement 12, further comprising adding the target key and the target value as the key-value pair to the key-value cache.
A method, comprising:
- selecting between an inclusive inclusion policy and an exclusive inclusion policy for a key-value cache and a key-value store;
- establishing the selected policy for the key-value cache and the key-value store;
- determining a first capacity of the key-value cache in a memory in a multi-level cache system;
- determining a second capacity of the key-value store in the multi-level cache system;
- determining a first set of requirements for a first namespace and a second set of requirements for a second namespace;
- calculating a first portion of the memory for the first namespace and a second portion of the memory for the second namespace;
- calculating a third portion of the key-value store for the first namespace and a fourth portion of the key-value store for the second namespace;
- allocating the first portion of the memory for the first namespace and the second portion of memory for the second namespace;
- and
- allocating the third portion of the key-value store for the first namespace and the fourth portion of the key-value store for the second namespace.
Dependencies are inferred from the claim text.