KR20210058118A - Casedb: low-cost put-intensive key-value store for edge computing - Google Patents

Casedb: low-cost put-intensive key-value store for edge computing Download PDF

Info

Publication number
KR20210058118A
KR20210058118A KR1020190145169A KR20190145169A KR20210058118A KR 20210058118 A KR20210058118 A KR 20210058118A KR 1020190145169 A KR1020190145169 A KR 1020190145169A KR 20190145169 A KR20190145169 A KR 20190145169A KR 20210058118 A KR20210058118 A KR 20210058118A
Authority
KR
South Korea
Prior art keywords
key
metadata
data
value
storage device
Prior art date
Application number
KR1020190145169A
Other languages
Korean (ko)
Other versions
KR102264119B1 (en
Inventor
김덕환
키크마툴로
Original Assignee
인하대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 인하대학교 산학협력단 filed Critical 인하대학교 산학협력단
Priority to KR1020190145169A priority Critical patent/KR102264119B1/en
Publication of KR20210058118A publication Critical patent/KR20210058118A/en
Application granted granted Critical
Publication of KR102264119B1 publication Critical patent/KR102264119B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/113Details of archiving
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating

Abstract

Disclosed is a low-cost put-intensive key-value storage device for edge computing to increase write performance. According to one embodiment of the present invention, a method executed in the key-value storage device comprises the following steps: determining a memory component related to data information according to a size of data as a memory component and a disk component are configured, wherein the memory component includes a Memtable and a C buffer (CBuffer); separating data and metadata by flushing metadata including a key and a bloom filter to the disk component as the determined memory component processes the data information; and delaying compaction of a string sort table by merging the separated metadata to perform data management tasks.

Description

CaseDB: 엣지컴퓨팅을 위한 저비용 Put-Intensive 키-벨류 저장장치{CASEDB: LOW-COST PUT-INTENSIVE KEY-VALUE STORE FOR EDGE COMPUTING}CaseDB: Low-cost put-intensive key-value storage device for edge computing {CASEDB: LOW-COST PUT-INTENSIVE KEY-VALUE STORE FOR EDGE COMPUTING}

아래의 설명은 키-벨류(Key-Value) 저장 장치에 관한 것이다. The following description relates to a key-value storage device.

지금까지는 클라우드 스토리지를 사용자에게 제공하여 중앙 데이터 센터를 통해 데이터를 관리하고 공유해 왔다. 이러한 서버는 전송 속도와 데이터 일관성의 측면에서 현재 최종 사용자의 요구를 충족시킬 수 없기 때문에 이러한 종류의 중앙집중형 서버에 보관될 수 있는 데이터의 수가 기하급수적으로 증가하였다. 빅데이터의 새로운 시대에, 엣지 컴퓨팅이라고 하는 새로운 분산 컴퓨팅 패러다임이 데이터 관리와 통신 문제의 해결책으로 떠오르고 있다. 엣지 컴퓨팅은 응답 시간을 개선하고 대역폭을 절약하기 위해 필요한 위치에 데이터 계산과 스토리지를 더 가깝게 하는 분산형 솔루션을 제공한다. 데이터 전송 시간을 단축할 뿐만 아니라 데이터 저장 및 처리를 위한 저렴한 하드웨어 옵션도 제공한다. 로컬 엣지 서버는 빅데이터 서버만큼 CPU 파워와 하드웨어 자원을 많이 필요로 하지 않는 반면, 데이터 센터에 비해 송수신하는 데이터의 양은 상당히 적다. 엣지 서버의 주된 목적은 로컬로 연결된 IoT 장치에 대해 빠른 통신 속도를 가능하게 하고, 다른 모든 에지 서버에 브로드캐스트되는 클라우드 서버와 데이터를 교환하는 것이다.Until now, cloud storage has been provided to users to manage and share data through a central data center. Since these servers cannot meet the needs of current end users in terms of transmission speed and data consistency, the number of data that can be stored in this kind of centralized server has increased exponentially. In the new era of big data, a new distributed computing paradigm called edge computing is emerging as a solution to data management and communication problems. Edge computing provides a decentralized solution that brings data computation and storage closer to where it is needed to improve response time and save bandwidth. Not only does it shorten data transfer times, it also provides inexpensive hardware options for data storage and processing. Local edge servers don't require as much CPU power and hardware resources as big data servers, while the amount of data they send and receive is considerably less than in data centers. The main purpose of edge servers is to enable high communication speeds for locally connected IoT devices, and to exchange data with cloud servers that are broadcast to all other edge servers.

엣지 컴퓨팅은 중앙 집중식 네트워크를 넘어는 장점 외에 엣지 서버를 설계하는 동안 줄여야 하는 특정 취약성이 있다. 엣지 서버에 대해 고려해야 할 가장 중요한 요소 중 하나는 내부 데이터 관리이다. 지금까지 NoSQL 데이터베이스는 무거운 SQL 쿼리에 의존하지 않고 단순한 인터페이스를 가지므로 빅데이터 시스템에서 가장 유망하다. KV(키-벨류) 스토어는 NoSQL 데이터베이스를 가장 빠르고 간단하게 대표한다. KV 스토어는 키와 값만 데이터 표현으로 간주하고 데이터 관리를 위한 Put, Get, Delete 등의 공개적인 방법을 제공한다. 지금까지, KV 스토어의 읽기 또는 쓰기 처리량을 향상시키기 위한 몇 가지 노력이 이루어졌다. B+ 트리는 각 항목을 다중 항목 버킷으로 인덱싱하여 매우 우수한 읽기 성능을 제공하지만, 쓰기 및 업데이트에 어려움을 겪는다. 이와는 대조적으로, 로그 구조화된 파일 시스템은 데이터 쓰기의 큰 이점을 가지고 있지만, 그 데이터에 접근할 때 낮은 성능을 보여준다. 로그 구조화된 병합 트리(LSM-트리)는 KV 스토어를 구현하기 위해 가장 널리 사용되는 데이터 구조 중 하나가 되었다. LSM-트리는 다단계 구조를 사용하며, 데이터는 각 레벨에서 정렬된 순서로 작성된다. 이것은 읽기 성능을 상당히 향상시킨다. In addition to the advantages of edge computing over centralized networks, there are certain vulnerabilities that must be reduced while designing edge servers. One of the most important factors to consider for an edge server is internal data management. Until now, NoSQL databases are the most promising in big data systems because they do not rely on heavy SQL queries and have a simple interface. The KV (key-value) store is the fastest and simplest representation of a NoSQL database. KV Store considers only keys and values as data representations and provides public methods such as Put, Get, and Delete for data management. So far, several efforts have been made to improve the read or write throughput of the KV store. The B+ tree indexes each item into a multi-item bucket to provide very good read performance, but suffers from writing and updating difficulties. In contrast, log-structured file systems have the great advantage of writing data, but poor performance when accessing that data. The log structured merge tree (LSM-tree) has become one of the most widely used data structures for implementing KV stores. The LSM-tree uses a multi-level structure, and data is written in sorted order at each level. This significantly improves the read performance.

일례로, 구글 데이터 센터에서 사용되는 LevelDB는 주요 KV 스토어 및 명확한 설명서가 있는 오픈 소스로서 사용자 정의가 용이하다. LevelDB는 각 레벨에서 데이터를 정렬하고 LSM 트리를 사용하여 읽기 처리량을 향상시킨다. 그러나 상당한 양의 읽기 및 쓰기 I/O 작업을 수행하여 쓰기 증폭이라는 큰 단점을 초래한다. 쓰기 증폭은 단순히 하드 디스크 드라이브(HDD)에서 KV 항목을 찾는 동안 불일치를 의미한다. 데이터 크기가 증가하면서 안정된 물리적 주소에 머무르지 않기 때문에 반복적으로 데이터 항목을 다시 써야한다. 더욱이 엣지 서버는 제한된 하드웨어 소스만 사용한다. 엣지 컴퓨팅 서버는 작은 영역을 포함하는 여러 위치에 배치된 작은 하드웨어 장치들이기 때문에 컴퓨팅 서버의 크기는 임베디드 보드처럼 작을 것으로 예상된다. 그러나 가장 잘 설계된 임베디드 보드조차도 외부 하드웨어와의 연결에 어려움을 겪는다. 구체적으로는 임베디드 보드와 달리 서버에는 마더보드에 SSD나 HDD를 직접 부착하기 위한 PCI 확장 슬롯이 포함되어 있다. 이는 외부 HDD의 데이터 읽기 및 쓰기 지연 시간을 크게 증가시킨다 For example, LevelDB, used in Google's data center, is open source with major KV stores and clear documentation, and is easy to customize. LevelDB sorts data at each level and improves read throughput by using an LSM tree. However, it performs a significant amount of read and write I/O operations, resulting in a significant disadvantage of amplifying writes. Write amplification simply means inconsistency while looking for KV items on the hard disk drive (HDD). As data size increases, data items must be rewritten repeatedly because they do not stay at a stable physical address. Moreover, edge servers use only limited hardware sources. Because edge computing servers are small hardware devices placed in multiple locations including a small area, the size of the computing server is expected to be as small as an embedded board. However, even the most well-designed embedded boards have difficulty connecting to external hardware. Specifically, unlike an embedded board, the server includes a PCI expansion slot for directly attaching an SSD or HDD to the motherboard. This greatly increases the data read and write latency of the external HDD.

LevelDB에서 공통적으로 직면하고 있는 문제를 해결하기 위하여 컴팩션 I/O를 감소시키기 위하여 키와 필터를 서로 다른 파일의 벨류(데이터 값)와 분리하여 새로운 기능을 도입함으로써 LevelDB를 확장하는 키-벨류 저장 장치 및 방법을 제공할 수 있다.Key-value storage that expands LevelDB by introducing new functions by separating keys and filters from values (data values) of different files to reduce compaction I/O to solve common problems in LevelDB Apparatus and method can be provided.

키-벨류 저장 장치에 수행되는 방법은, 메모리 구성 요소 및 디스크 구성 요소를 구성함에 따라 데이터의 크기에 따라 데이터 정보와 관련된 메모리 구성 요소를 결정하는 단계-상기 메모리 구성 요소로 Memtable 및 C버퍼(CBuffer)를 포함함-; 상기 결정된 메모리 구성 요소에서 상기 데이터 정보를 처리함에 따라 키와 블룸 필터가 포함된 메타데이터를 디스크 구성 요소로 플러시(Flush)하여 데이터와 메타데이터를 분리하는 단계; 및 상기 분리된 메타데이터를 병합하여 문자열 정렬 테이블의 컴팩션을 지연시켜 데이터 관리 작업을 수행하는 단계를 포함할 수 있다. The method performed in the key-value storage device includes determining a memory component related to data information according to the size of data as a memory component and a disk component are configured-Memtable and C buffer (CBuffer) as the memory components. Including -; Separating data and metadata by flushing metadata including a key and a bloom filter to a disk component as the determined memory component processes the data information; And merging the separated metadata to delay compaction of the string sorting table to perform data management.

상기 메모리 구성 요소를 결정하는 단계는, 상기 데이터 크기를 확인하여 기 설정된 기준에 이하의 벨류를 분류하고, 상기 분류된 기 설정된 기준 이하의 벨류를 C버퍼에 삽입하고, 상기 기 설정된 기준 이하의 벨류로 분류되지 않은 나머지 벨류를 Memtable에 삽입하는 단계를 포함하고, 상기 분리하는 단계는, 상기 C버퍼에 삽입된 기 설정된 기준 이하의 작은 벨류를 임계값에 도달할 때까지 유지시키고 합병된 벨류들이 임계값이상이 되면 그룹키와 합친 벨류를 Memtable에 삽입하며, 상기 나머지 벨류를 Memtable에 삽입함에 따라 상기 Memtable이 풀(Full) 상태가 되면 읽기 전용 테이블(immutable Memtable)로 변환되어 일정시간 이후에 풀 상태의 데이터를 디스크 구성 요소로 플러시하고, 새로운 Memtable을 생성하여, 이후 들어오는 데이터를 삽입하는 단계를 포함하고, 상기 데이터 관리 작업을 수행하는 단계는, 상기 플러시함에 따라 메타데이터와 데이터를 분리하고, 키와 블룸 필터가 포함된 메타데이터를 레벨 0의 메타데이터 계층으로 저장하며 벨류데이타는 레벨0의 문자열 정렬테이블(String sorted table)에 따로 저장되며 메타데이타계층이 풀(full)상태가 되면 제1 컴팩션을 수행하며, 두 개의 인접 레벨의 메타데이터 파일이 기 설정된 기준의 키 범위에서 선택되어 메모리 구성 요소에서 읽히고, 상기 메모리 구성 요소에 존재하는 메타데이터를 병합하고 정렬하는 동안 업데이트되고 삭제된 데이터 항목이 delete-batch 로그에 기록됨에 따라 메타데이터에서 삭제되고, 상기 메타데이터를 병합한 후 새로운 메타데이터 파일을 하위 레벨로 작성하고 상기 메타데이터를 삭제하는 제1 컴팩션을 수행하는 단계를 포함할 수 있다. The determining of the memory component may include checking the data size to classify the following values according to a preset criterion, inserting a value less than the sorted preset criterion into the C buffer, and a value less than the preset criterion. Including the step of inserting the remaining values that are not classified as in the Memtable, and the separating step includes maintaining a small value less than a preset reference inserted in the C buffer until a threshold value is reached, and the merged values are critical. When the value exceeds the value, the value combined with the group key is inserted into the Memtable, and when the Memtable becomes full as the remaining values are inserted into the Memtable, it is converted into a read-only table (immutable Memtable) and the pool state after a certain period of time. Flushing the data of the disk to a disk component, creating a new Memtable, and inserting incoming data thereafter, and the performing of the data management operation includes: separating metadata and data by the flushing, and The metadata including the and bloom filter is stored as a level 0 metadata layer, and the value data is stored separately in a level 0 string sorted table. When the metadata layer becomes full, the first compact Data items that are updated and deleted while the metadata files of two adjacent levels are selected from the key range of the preset criteria and read from the memory component, and the metadata existing in the memory component are merged and sorted. It is deleted from the metadata as it is recorded in the delete-batch log, and after merging the metadata, a new metadata file is created at a lower level, and the first compaction is performed to delete the metadata. have.

상기 데이터 관리 작업을 수행하는 단계는, 상기 제1 컴팩션의 수행을 완료함에 따라 문자열 정렬 테이블의 레벨 0에 존재하는 데이터 정보가 상기 문자열 정렬 테이블의 목적지로 이동되는 제2 컴팩션을 수행하며, 상기 제2 컴팩션에서, 기 설정된 범위의 모든 레벨의 메타데이터 파일과 메타데이터를 참조하기 위한 문자열 정렬 테이블을 메모리 구성 요소로 읽고, 키가 상기 메타데이터 파일에 병합되고 정렬된 상태임에 따라 문자열 정렬 테이블을 읽은 후, 상기 메타데이터에 따라 데이터가 새로운 문자열 정렬 테이블로 이동하고, 메타데이터로부터의 참조가 새로운 문자열 정렬 테이블로 업데이트되는 단계를 포함할 수 있다. The performing of the data management operation may include performing a second compaction in which data information existing at level 0 of the string sorting table is moved to a destination of the string sorting table as the first compaction is completed, and In the second compaction, metadata files of all levels in a preset range and a string sorting table for referencing metadata are read as a memory component, and a string is merged into the metadata file and sorted. After reading the sort table, data is moved to a new string sort table according to the metadata, and a reference from the metadata is updated to a new string sort table.

상기 메모리 구성 요소를 결정하는 단계는, 애플리케이션으로부터 특정 키의 읽기 요청을 수신함에 따라, 상기 특정 키가 C 버퍼에 의해 병합된 항목에 포함되는지 또는 Memtable에 삽입되는지 결정하는 단계를 포함하고, 상기 분리하는 단계는, 메타데이터 파일로부터 상기 병합된 항목을 검색함에 따라 키-벨류 항목을 추출하고, 상기 메타데이터 파일에서 상기 병합된 키-벨류 항목을 검색하고, 상기 메타데이터 파일에 상기 병합된 키-벨류가 존재하지 않는 경우, 데이터베이스에서 스캔을 시작하고, Memtable에서 검색이 실행되면 읽기 전용 Memtable에 포함된 데이터 정보가 디스크 구성 요소로 이동되고, 레벨 별로 데이터 정보를 블룸 필터에 확인하는 단계를 포함하고, 상기 데이터 관리 작업을 수행하는 단계는, 상기 블룸 필터가 양의 피드백을 반환하면 메타데이터 파일이 스캔되고 문자열 정렬 테이블에 대한 참조가 획득되고, 상기 블룸 필터가 음의 피드백을 반환하는 경우 스캔 항목이 해당 레벨을 건너뛰고 상기 해당 레벨 다음의 레벨부터 검색을 계속하는 단계를 포함할 수 있다. The determining of the memory component includes, upon receiving a read request for a specific key from an application, determining whether the specific key is included in the merged item by the C buffer or inserted into the Memtable, and the separation The step of: extracting a key-value item by searching for the merged item from a metadata file, searching for the merged key-value item in the metadata file, and searching for the merged key-value item in the metadata file- If the value does not exist, a scan is started in the database, and when a search is executed in the Memtable, the data information contained in the read-only Memtable is moved to the disk component, and the data information for each level is checked with the Bloom filter. , The performing of the data management operation includes scanning the metadata file when the bloom filter returns positive feedback and obtaining a reference to the string sorting table, and when the bloom filter returns negative feedback, the scan item It may include the step of skipping the corresponding level and continuing the search from a level following the corresponding level.

상기 데이터 관리 작업을 수행하는 단계는, 키-벨류 항목을 업데이트하기 위하여 업데이트된 벨류를 가진 동일한 키를 삽입하는 단계를 포함할 수 있다. The performing of the data management operation may include inserting the same key with the updated value to update the key-value item.

상기 데이터 관리 작업을 수행하는 단계는, 상기 컴팩션이 시작되면 삭제된 키와 업데이트된 키를 메타데이터 파일에서 제거하는 단계를 포함할 수 있다. The performing of the data management operation may include removing the deleted key and the updated key from the metadata file when the compaction starts.

상기 키-벨류 저장 장치는, 고정된 크기의 메타데이터 파일을 사용하고, 상기 메타데이터 파일은, 크기가 일정하며 키-벨류 형식의 적어도 하나 이상의 오프셋 블록과 필터 블록으로 구성되고, 상기 메타데이터 파일의 블룸 필터에 블록을 할당하고, 상기 블룸 필터를 메타데이터로 하며, 상기 오프셋 블록에 키-벨류 형식의 데이터를 저장하고, 키는 데이터의 키이고, 벨류는 키를 보유하고 있는 문자열 정렬 테이블에 대한 참조일 수 있다. The key-value storage device uses a metadata file having a fixed size, and the metadata file has a constant size and is composed of at least one offset block and a filter block in a key-value format, and the metadata file Allocates a block to the bloom filter of, uses the bloom filter as metadata, stores data in a key-value format in the offset block, the key is the key of the data, and the value is in the string sorting table holding the key. May be a reference to.

키-벨류 저장 장치는, 메모리에 포함된 컴퓨터 판독 가능한 명령을 실행하도록 구현되는 적어도 하나의 프로세서를 포함하고, 상기 적어도 하나의 프로세서에 의해, 메모리 구성 요소 및 디스크 구성 요소를 구성함에 따라 데이터의 크기에 따라 데이터 정보와 관련된 메모리 구성 요소를 결정하고-상기 메모리 구성 요소로 Memtable 및 C버퍼(CBuffer)를 포함함-, 상기 결정된 메모리 구성 요소에서 상기 데이터 정보를 처리함에 따라 키와 블룸 필터가 포함된 메타데이터를 디스크 구성 요소로 플러시(Flush)하여 데이터와 메타데이터를 분리하고, 상기 분리된 메타데이터를 병합하여 문자열 정렬 테이블의 컴팩션을 지연시켜 데이터 관리 작업을 수행할 수 있다. The key-value storage device includes at least one processor embodied to execute computer-readable instructions contained in a memory, and the size of data according to the configuration of the memory component and the disk component by the at least one processor A memory component related to data information is determined according to the memory component-including a Memtable and a C buffer (CBuffer) as the memory component -, and a key and a bloom filter are included as the data information is processed by the determined memory component. Data management can be performed by flushing metadata to a disk component to separate data and metadata, and by merging the separated metadata to delay compaction of a string sorting table.

일 실시예에 따른 키-벨류 저장 장치는 메모리의 키-벨류 항목을 버퍼링/합병하여 작은 쓰기를 피하고, 메타데이터 컴팩션(compaction)을 위하여 벨류와 키를 분리하여, 입출력 비용을 절감하고 쓰기 성능을 향상시키는 방법 및 시스템을 제공할 수 있다. The key-value storage device according to the embodiment avoids small writes by buffering/merging key-value items in memory, and separating the value and the key for metadata compaction, thereby reducing I/O cost and writing performance. It is possible to provide a method and system to improve the.

일 실시예에 따른 키-벨류 저장 장치는 쓰기 처리량을 달성하고 읽기 성능을 저하시키지 않고 쓰기 증폭을 감소시킬 수 있다. The key-value storage device according to an embodiment may achieve write throughput and reduce write amplification without degrading read performance.

도 1은 일 실시예에 따른 키-벨류 저장 장치를 설명하기 위한 도면이다.
도 2는 일 실시예에 따른 키-벨류 저장 장치에서 문자열 정렬 테이블 파일 레이아웃을 설명하기 위한 도면이다.
도 3은 일 실시예에 따른 키-벨류 저장 장치에서 메타데이터 파일 레이아웃을 설명하기 위한 도면이다.
도 4 및 도 5는 일 실시예에 따른 키-벨류 저장 장치에서 컴팩션을 설명하기 위한 도면이다.
도 6은 일 실시예에 따른 키-벨류 저장 장치에서 데이터 관리 작업을 수행하는 방법을 설명하기 위한 흐름도이다.
1 is a diagram illustrating a key-value storage device according to an exemplary embodiment.
FIG. 2 is a diagram illustrating a layout of a string arrangement table file in a key-value storage device according to an exemplary embodiment.
3 is a diagram illustrating a metadata file layout in a key-value storage device according to an exemplary embodiment.
4 and 5 are diagrams for describing compaction in a key-value storage device according to an exemplary embodiment.
6 is a flowchart illustrating a method of performing a data management operation in a key-value storage device according to an exemplary embodiment.

이하, 실시예를 첨부한 도면을 참조하여 상세히 설명한다.Hereinafter, embodiments will be described in detail with reference to the accompanying drawings.

메타데이터 파일을 분리하여 블룸 필터를 메타데이터로 하고, 메타데이터를 병합하여 문자열 정렬 테이블의 컴팩션을 지연시키는 키-벨류 저장 장치 및 방법을 제공할 수 있다. A key-value storage device and method for delaying compaction of a string sort table by separating a metadata file and using a bloom filter as metadata and merging the metadata can be provided.

도 1은 일 실시예에 따른 키-벨류 저장 장치를 설명하기 위한 도면이다. 1 is a diagram illustrating a key-value storage device according to an exemplary embodiment.

실시예에서는 컴팩션(Compaction) I/O를 감소시키는 것을 목표로 키와 필터를 서로 다른 파일의 벨류와 분리하여 새로운 기능을 도입함으로써 레벨DB(LevelDB)를 확장하는 CaseDB(이하 '키-벨류(Key-Value) 저장 장치'라고 기재하기로 함)를 제공할 수 있다. 도 1을 참고하면, 레벨DB에서 문자열 정렬 테이블(SSTable: String Sorted Tables)은 메타데이터와 데이터를 모두 포함하며, 컴팩션을 위해 전체 파일을 메모리로 읽는다. 문자열 정렬 테이블이란 순차적으로 작성된 데이터를 정렬된 순서로 보관하는 데이터 저장 단위를 의미할 수 있다. 그러나 대부분의 논리 연산 및 산술 연산은 키와 벨류에서 실행되며 단순히 위치를 업데이트하기 위해 읽힐 수 있다. 이에, 키를 이용하여 문자열 정렬 테이블에서 메타데이터로 분리하고, 문자열 정렬 테이블의 병합을 지연시키기 위해 컴파일 프로세스를 재설계할 수 있다. 키-벨류 저장 장치는 SSD의 읽기 및 쓰기 횟수를 획기적으로 감소시킬 수 있다. In the embodiment, with the aim of reducing compaction I/O, CaseDB (hereinafter referred to as'key-value (hereinafter referred to as ``key-value'') expands LevelDB by introducing a new function by separating keys and filters from values of different files. Key-Value) storage device') can be provided. Referring to FIG. 1, a string sorted table (SSTable) in Level DB includes both metadata and data, and the entire file is read into memory for compaction. The string sorting table may mean a data storage unit that stores sequentially created data in a sorted order. However, most logical and arithmetic operations are performed on keys and values and can be read to simply update the position. Accordingly, the compilation process can be redesigned to separate the string sort table into metadata using the key and delay merging of the string sort table. The key-value storage device can drastically reduce the number of reads and writes of an SSD.

SSD의 인터페이스는 에지 서버의 내장 보드에 직접 연결되지 않으며, 읽기 처리량을 유지하기 위해 메타데이터 파일의 블룸 필터를 이동시킬 수 있다. 또한 메타데이터는 전체 데이터의 기 설정된 기준 이하의 작은 비율을 구성하며, 실시예에 따른 컴팩션은 상대적으로 적은 I/O를 허용할 수 있다. 예를 들면, 키-벨류 저장 장치는 LevelDB의 I/O보다 상대적으로 적은 I/O를 허용할 수 있다. 이하. 컴팩션 I/O를 감소시키고, LevelDB의 다단계 정렬된 구조를 유지하는 키-벨류 저장 장치를 제공할 수 있다. The SSD's interface is not directly connected to the edge server's built-in board, and the bloom filter of the metadata file can be moved to maintain read throughput. In addition, the metadata constitutes a small ratio of the total data less than or equal to a preset standard, and the compaction according to the embodiment may allow relatively small I/O. For example, a key-value storage device can allow relatively less I/O than that of LevelDB. Below. It is possible to provide a key-value storage device that reduces compaction I/O and maintains the multilevel ordered structure of LevelDB.

키-벨류 저장 장치는 메모리 구성 요소 및 디스크 구성 요소를 구성할 수 있다. 키-벨류 저장 장치는 메모리 구성 요소인 Memtable과 함께 새로운 메모리 구성 요소인 C버퍼를 포함할 수 있다. 또한, 키-벨류 저장 장치는 읽기 및 쓰기 I/O를 감소시키고, 처리량을 증가시키기 위한 아키텍쳐 및 데이터 단위를 채택할 수 있다. The key-value storage device can constitute a memory component and a disk component. The key-value storage device may include a new memory component, a C buffer, along with a memory component, Memtable. In addition, the key-value storage device may adopt an architecture and data unit to reduce read and write I/O and increase throughput.

C버퍼는 앞에서 작은 벨류를 병합하는 데 사용될 수 있다. 다시 말해서, C버퍼는 작은 키-벨류 항목을 병합하는데 사용될 수 있다. 키-벨류 저장 장치는 메타데이터 파일을 저장하는 디스크에 새로운 섹션을 생성할 수 있다. 키-벨류 저장 장치는 레벨DB의 문자열 정렬 테이블과 마찬가지로 메타데이터 파일에 복수 개의 레벨을 구성할 수 있다. 각 메타데이터 파일은 동일한 레벨의 여러 문자열 정렬 테이블에 해당할 수 있다. 도 2 및 도3을 참고하면, 메타데이터 파일에 문자열 정렬 테이블 및 블룸 필터에 대한 키와 참조가 포함될 수 있다. 또한 키-벨류 저장 장치는 deprecated(중요도가 떨어져 더 이상 사용되지 않고 사라지게 될) 데이터를 추적하는 컴팩션 프로세스를 수행하기 위한 임시 파일인 delete_batch라는 추가 로그 파일을 생성할 수 있다. 키-벨류 저장 장치는 버전이 서로 다른 수준에서 중복되는 것을 방지하고 데이터베이스에서 deprecated 데이터를 효율적으로 제거할 수 있다. 키-벨류 저장 장치 키와 벨류를 구분하지만 두 가지 모두에 대해 LSM-트리 구조를 유지한다.The C buffer can be used to merge small values from the front. In other words, the C buffer can be used to merge small key-value items. The key-value storage device can create a new section on the disk that stores the metadata file. The key-value storage device can configure a plurality of levels in the metadata file, similar to the string sorting table of the level DB. Each metadata file can correspond to multiple string sort tables at the same level. 2 and 3, a key and a reference for a string sort table and a bloom filter may be included in the metadata file. In addition, the key-value storage device may create an additional log file called delete_batch, which is a temporary file for performing a compaction process that tracks deprecated (deprecated) data. The key-value storage device prevents versions from being duplicated at different levels and can efficiently remove deprecated data from the database. Key-Value Storage Separates key and value, but maintains an LSM-tree structure for both.

도 2 및 도 3을 참고하면, 키-벨류 저장 장치는 벨류에 대한 키와 참조 및 블룸 필터를 포함하는 서로 다른 메타데이터 파일에 대해 다른 계층을 사용할 수 있다. 컴팩션을 위한 메타 정보로서 키와 참조가 필요하지만, 쓰기 과정을 실행하는 동안 스캐닝과 읽기를 수행하는 것을 고려할 수 있다. 키-벨류 장치는 검색 성능을 향상시키기 위해 메타데이터 파일에 블룸 필터를 포함시킬 수 있다. Referring to FIGS. 2 and 3, the key-value storage device may use different layers for different metadata files including a key for a value, a reference, and a bloom filter. Although a key and a reference are required as meta information for compaction, it is possible to consider performing scanning and reading while executing the writing process. The key-value device may include a bloom filter in the metadata file to improve search performance.

도 3에 도시된 바와 같이, 키-벨류 장치에서 메타데이터 파일은 크기가 일정하며 키-벨류(KV) 형식의 오프셋 블록과 필터 블록으로 구성될 수 있다. 오프셋 블록은 KV 형식의 데이터를 저장하며, 그 중 키는 데이터 키이고, 벨류는 키를 보유하고 있는 문자열 정렬 테이블에 대한 참조이다. 또한, 읽기 성능을 향상시키기 위하여 블룸 필터에 블록을 할당할 수 있다. 메타데이터 크기는 수학식 1과 같이 계산될 수 있다. As shown in FIG. 3, in the key-value device, the metadata file has a constant size and may be composed of an offset block and a filter block in a key-value (KV) format. The offset block stores data in KV format, of which the key is the data key, and the value is a reference to the string sorting table holding the key. In addition, blocks may be allocated to the bloom filter in order to improve read performance. The metadata size can be calculated as in Equation 1.

수학식 1:Equation 1:

Figure pat00001
Figure pat00001

여기서, M은 메타데이터 크기, B는 블룸 필터의 크기, K는 키의 크기, O는 오프셋의 크기, n은 메타데이터 파일의 항목 수를 의미한다.Here, M is the size of metadata, B is the size of the bloom filter, K is the size of the key, O is the size of the offset, and n is the number of items in the metadata file.

수학식 1에 대하여 예를 들어 설명하기로 한다. (K + O)는 항상 한 번 설정되며 전체 데이터베이스에 대해 일정하게 유지되고, B는 n에 따라 계산된다. 이에 따라 메타데이터 파일의 크기에 크게 영향을 미치는 변수는 파일의 항목 수이다. 예를 들면, 키-벨류 저장 장치는 각 키마다 16바이트, 오프셋에는 20바이트를 사용할 수 있다. 키-벨류 저장 장치는 벨류를 n에 할당하고 벨류의 크기를 변경하여 문자열 정렬 테이블의 비율을 확인함으로써 메타데이터 크기를 계산할 수 있다. 예를 들면, 벨류의 크기가 50바이트일 때 메타데이터 공유가 73%로 도출될 수 있다. 이러한 백분율은 벨류의 크기가 증가함에 따라 감소될 수 있다. 고정된 업무부하(workload)에서 단일 항목의 크기가 증가할수록 입력 횟수가 줄어들기 때문이다. 블룸 필터의 크기에 메타데이터 공유가 영향을 미친다는 것을 알 수 있다. 더욱이, 벨류의 크기가 증가하더라도 키의 크기는 일정하게 유지되므로 메타데이터 공유의 점유율은 감소할 수 있다. 이에, 키-벨류 저장 장치를 효율적으로 사용하기 위하여 데이터베이스에 작은 크기의 쓰기를 피해야 한다고 가정할 수 있다. 키-벨류 저장 장치는 C버퍼(CBuffer)를 사용하여 작은 벨류를 하나의 큰 항목으로 병합하고, 큰 항목을 Memtable에 삽입할 수 있다. 또한, 메타데이터 공유의 규모를 고려하여, 키-벨류 저장 장치는 고정 크기의 메타데이터 파일을 사용함으로써 각 레벨에서 데이터의 크기를 쉽게 관리하고 데이터를 찾을 수 있다. 키-벨류 저장 장치는 문자열 정렬 테이블처럼 다층 구조를 쉽게 관리할 수 있도록 한다.Equation 1 will be described as an example. (K + O) is always set once and remains constant for the entire database, and B is calculated according to n. Accordingly, the variable that greatly affects the size of the metadata file is the number of items in the file. For example, a key-value storage device may use 16 bytes for each key and 20 bytes for an offset. The key-value storage device may calculate the metadata size by assigning a value to n and changing the size of the value to check the ratio of the string sorting table. For example, when the value is 50 bytes, the share of metadata can be derived as 73%. This percentage can decrease as the size of the value increases. This is because the number of inputs decreases as the size of a single item increases in a fixed workload. You can see that metadata sharing affects the size of the bloom filter. Moreover, even if the size of the value increases, the size of the key remains constant, and thus the share of metadata sharing may decrease. Accordingly, it can be assumed that in order to efficiently use the key-value storage device, it is necessary to avoid writing a small size to the database. The key-value storage device may merge a small value into one large item by using a C buffer and insert a large item into the Memtable. In addition, in consideration of the scale of metadata sharing, the key-value storage device can easily manage the size of data at each level and find data by using a fixed-size metadata file. The key-value storage device makes it easy to manage a multi-layered structure like a string sorting table.

메타데이터의 공유는 삽입된 데이터의 크기가 감소할수록 증가할 수 있다. 키-벨류 저장 장치는 C버퍼를 메모리 구성 요소로 배치할 수 있다. C버퍼는 임의의 메모리 버퍼로 KV 항목을 로드하여 특정 크기로 병합할 수 있다. 이때, 병합된 모든 데이터는 병합된 데이터에서 읽기를 허용하기 위해 메타데이터 파일에 기록될 수 있다. 다시 말해서, C 버퍼는 모든 데이터가 적어도 특정 크기보다 크도록 보장한다. 메타데이터 분리 방법이 모든 경우에 완벽하게 작동한다는 것을 보증한다.The sharing of metadata may increase as the size of the inserted data decreases. The key-value storage device may arrange the C buffer as a memory component. The C buffer can load KV items into an arbitrary memory buffer and merge them into a specific size. At this time, all the merged data may be recorded in the metadata file to allow reading from the merged data. In other words, the C buffer ensures that all data is at least larger than a certain size. We ensure that the metadata separation method works perfectly in all cases.

실시예에서는 데이터를 삽입하기 전에 Put 방법을 재정의하면 체크포인트를 사용할 수 있기 때문에 C버퍼의 할당이 가능하다고 가정하기로 한다. 키-벨류 저장 장치는 임계값을 사용하여 데이터를 데이터베이스에 직접 병합할 것인지 또는 삽입할 것인지 여부를 확인할 수 있다. 키-벨류 저장 장치는 데이터의 크기가 임계값보다 크면 데이터를 메모리 구성 요소중 하나인 Memtable에 직접 삽입하고, C버퍼에 공간이 할당되지 않는다. 이때, 키-벨류 저장 장치는 데이터의 크기가 임계값보다 작으면 데이터를 C버퍼에 삽입하고 C버퍼에 저장된 벨류의 크기가 가능한 최소 크기에 도달할 때까지 지연시켜 합병된 벨류 그룹에 대한 단일 KV 항목을 하나 생성할 수 있다. KV 항목을 병합한 후 키-벨류 저장 장치는 그룹에 대한 고유한 키를 생성하고 메타데이터 파일에 로그를 저장한 후, Memtable에 삽입할 수 있다. 이때, Memtable에 삽입하기 전, 작은 KV 항목이 더 큰 항목으로 병합될 수 있다. In the embodiment, it is assumed that C buffer allocation is possible because checkpoints can be used if the Put method is redefined before inserting data. The key-value storage device may use the threshold value to check whether to directly merge or insert data into the database. In the key-value storage device, if the size of the data is larger than the threshold value, the data is directly inserted into the Memtable, one of the memory components, and no space is allocated to the C buffer. At this time, if the size of the data is smaller than the threshold, the key-value storage device inserts the data into the C buffer and delays the value of the value stored in the C buffer until the size of the value reaches the smallest possible size. You can create an item. After merging the KV items, the key-value storage device can generate a unique key for the group, store the log in the metadata file, and insert it into the Memtable. At this time, before inserting into the Memtable, a small KV item may be merged into a larger item.

C버퍼에 의한 병합된 항목의 수는 병합 크기와 데이터의 크기에 따라 달라질 수 있다. 예를 들면, 4KB를 임계값과 병합 크기로 사용한다면, 4KB보다 작은 모든 항목은 C버퍼를 사용하여 병합되고, 메타데이터 파일에 기록될 수 있다. 이때, 여기에는 데이터 및 데이터 그룹 키의 원래 키가 포함될 수 있다. 더욱이, 그룹의 데이터의 크기와 인덱스도 기록되므로, 이러한 정보들을 사용하면, 데이터를 병합된 그룹에서 쉽게 추출할 수 있다.The number of items merged by the C buffer may vary depending on the merge size and data size. For example, if 4KB is used as the threshold value and the merge size, all items smaller than 4KB are merged using the C buffer, and can be recorded in the metadata file. In this case, this may include the original key of the data and the data group key. Moreover, since the size and index of the group's data are also recorded, using this information, the data can be easily extracted from the merged group.

도 6은 일 실시예에 따른 키-벨류 저장 장치에서 데이터 관리 작업을 수행하는 방법을 설명하기 위한 흐름도이다. 6 is a flowchart illustrating a method of performing a data management operation in a key-value storage device according to an exemplary embodiment.

단계(610)에서 키-벨류 저장 장치는 메모리 구성 요소 및 디스크 구성 요소를 구성함에 따라 데이터의 크기에 따라 데이터 정보와 관련된 메모리 구성 요소를 결정할 수 있다. 키-벨류 저장 장치는 데이터 정보의 데이터 크기를 확인하여 데이터 크기에 따라 데이터 정보를 삽입할 메모리 구성 요소인 Memtable 또는 C버퍼를 결정할 수 있다. In step 610, the key-value storage device may determine a memory component related to data information according to the size of the data as the memory component and the disk component are configured. The key-value storage device may check the data size of the data information and determine a Memtable or C buffer, which is a memory component to which data information is to be inserted, according to the data size.

단계(620)에서 키-벨류 저장 장치는 결정된 메모리 구성 요소에서 데이터 정보를 처리함에 따라 키와 블룸 필터가 포함된 메타데이터를 디스크 구성 요소를 플러시하여 데이터와 메타데이터를 분리할 수 있다. 이때, 키와 블룸 필터가 포함된 메타데이터를 메타데이터 계층으로 플러싱 한 다음, 컴팩션이 수행될 수 있다. 디스크 구성 요소에 데이터를 플러시할 때 키와 벨류가 분리될 수 있으며, 키는 해당하는 벨류로 오프셋을 유지할 수 있고, 블룸 필터는 키가 존재하는 메타데이터 파일에서도 구현될 수 잇다. In step 620, as the key-value storage device processes data information in the determined memory component, the disk component may flush the metadata including the key and the bloom filter to separate the data and the metadata. In this case, after the metadata including the key and the bloom filter is flushed to the metadata layer, compaction may be performed. When data is flushed to a disk component, the key and value can be separated, the key can be offset to the corresponding value, and the bloom filter can be implemented in the metadata file where the key exists.

단계(630)에서 키-벨류 저장 장치는 분리된 메타데이터를 병합하여 문자열 정렬 테이블의 컴팩션을 지연시켜 데이터 관리 작업을 수행할 수 있다. 컴팩션은 키와 벨류 모두에서 실행될 수 있다. 메타데이터 파일을 먼저 컴팩션하면 벨류 컴팩션이 지연될 수 있다. 키-벨류 저장 장치는 제1 컴팩션 및 제2 컴팩션을 수행할 수 있다. 제1 컴팩션에서는 메타데이터만 압축되고 벨류에 대한 동일한 참조를 유지하면서 키의 위치가 업데이트될 수 있다. 제2 컴팩션에서는 키를 따라 벨류를 최종 레벨로 다시 작성할 수 있다. 키-벨류 저장 장치는 키와 벨류를 서로 다른 계층으로 분리하더라도 LSM-트리를 키와 벨류를 유지할 수 있다. 데이터 관리 작업은, 쓰기, 읽기, 업데이트 및 삭제 등을 포함할 수 있다. 도 4 및 도 5를 참고하면, 키-벨류 저장 장치에서 쓰기, 읽기, 업데이트 및 삭제를 포함하는 데이터 관리 작업을 설명하기로 한다.In step 630, the key-value storage device may perform data management by merging the separated metadata to delay compaction of the string sorting table. Compaction can be run on both keys and values. Compressing the metadata file first may delay value compaction. The key-value storage device may perform a first compaction and a second compaction. In the first compaction, only metadata is compressed and the position of the key can be updated while maintaining the same reference to the value. In the second compaction, you can rewrite the value to the final level along the key. The key-value storage device can maintain the key and value in the LSM-tree even if the key and value are separated into different layers. Data management operations may include writing, reading, updating, and deleting. Referring to FIGS. 4 and 5, data management operations including writing, reading, updating, and deleting in a key-value storage device will be described.

우선적으로, 쓰기에 대한 데이터 관리 작업을 설명하기로 한다. 키-벨류 저장 장치의 데이터 삽입 프로세스는 데이터 크기를 확인하고, 데이터 크기에 따라 작은 벨류를 분류할 수 있다. 키-벨류 저장 장치는 작은 벨류를 분류함에 따라 작은 벨류를 C버퍼에 삽입하고, 작은 벨류로 분류되지 않은 나머지 벨류(예를 들면, 보통 벨류)를 Memtable에 삽입할 수 있다. 이때, C버퍼에 삽입된 작은 벨류는 C 버퍼의 크기가 임계값에 도달할 때까지 유지될 수 있다. 키-벨류 저장 장치는 나머지 벨류의 KV 항목(item)이 Memtable에 직접 삽입됨에 따라 Memtable이 풀(Full) 상태가 되면 읽기 전용으로 변환되어 새로운 Memtable을 생성할 수 있다. 이때, 새로운 Memtable이란 불변성의 Memtable이 되는 것을 의미할 수 있다. 키-벨류 저장 장치는 불변성 Memtable의 데이터를 디스크 구성 요소로 플러시(Flush)할 수 있다. 불변성 Memtable는 데이터를 디스크 구성요소로 플러시하는 이동 대기열이다. 도 1과 같이 메타데이터를 플러싱할 때 원래 데이터와 메타데이터로 분리될 수 있다. 이때, 키-벨류 장치는 키와 블룸 필터가 포함된 메타데이터를 메타데이터 계층으로 플러싱한 다음 컴팩션을 수행할 수 있다. 키와 블룸 필터가 포함된 메타데이터를 레벨 0의 메타데이터 계층으로 저장하며, 벨류 데이터는 레벨 0의 문자열 정렬 테이블에 따로 저장되며, 메타데이터 계층이 풀 상태가 되면 컴팩션이 수행될 수 있다. 대조적으로, 문자열 정렬 테이블은 단지 레벨 0에 위치하며 메타데이터 컴팩션이 완료될 때까지 레벨 0에 유지될 수 있다. 키-벨류 장치의 아키텍처에서 고려해야 할 가장 중요한 요소는 컴팩션 프로세스가 도 4에 도시된 바와 같이, 복수 개(예를 들면, 두 개)의 주요 부분을 채택한다는 것이다. 복수 개의 인접 레벨의 메타데이터 파일은 기 설정된 키 범위 내에서 선택되어 메모리에 읽힐 수 있다. 메모리에 있는 메타데이터를 병합하고 정렬하는 동안 업데이트되고 삭제된 항목은 delete_batch 로그에 기록되고 메타데이터에서 삭제(논리적 삭제)될 수 있다. 이러한 데이터는 메타데이터를 통해 접속할 수 없기 때문에, KV 저장소에 원본 데이터가 존재하더라도 결코 읽히지 않을 것이다. 키-벨류 저장 장치는 메타데이터를 병합한 후, 새로운 파일을 하위 레벨로 작성하고 병합되기 이전 메타데이터 파일을 삭제할 수 있다. 이때, 하위 레벨은 현재 레벨을 기준으로 하위의 레벨을 의미할 수 있다. 실시예에서는 모든 메타데이터 레벨에 대해 컴팩션 프로세스가 수행될 수 있다. First of all, a data management task for writing will be described. The data insertion process of the key-value storage device can check the data size and classify a small value according to the data size. The key-value storage device may insert a small value into the C buffer according to classifying a small value, and insert the remaining values (eg, normal values) that are not classified as small values into the Memtable. At this time, the small value inserted into the C buffer may be maintained until the size of the C buffer reaches a threshold value. In the key-value storage device, as KV items of the remaining values are directly inserted into the memtable, when the memtable becomes full, it is converted to read-only and a new memtable can be created. In this case, the new Memtable may mean becoming an immutable Memtable. The key-value storage device can flush the data of the immutable Memtable to the disk component. Immutable Memtables are moving queues that flush data to disk components. As shown in FIG. 1, when the metadata is flushed, it can be separated into original data and metadata. In this case, the key-value device may flush the metadata including the key and the bloom filter to the metadata layer and then perform compaction. Metadata including keys and bloom filters is stored as a level 0 metadata layer, and value data is separately stored in a level 0 string sort table, and compaction can be performed when the metadata layer becomes full. In contrast, the string sorting table only sits at level 0 and can remain at level 0 until metadata compaction is complete. The most important factor to consider in the architecture of the key-value device is that the compaction process employs a plurality (eg, two) of the main parts, as shown in FIG. 4. Metadata files of a plurality of adjacent levels may be selected within a preset key range and read into a memory. During merging and sorting of metadata in memory, updated and deleted items are written to the delete_batch log and can be deleted (logically deleted) from the metadata. Since this data is not accessible via metadata, it will never be read even if the original data exists in the KV repository. After merging the metadata, the key-value storage device may create a new file at a lower level and delete the metadata file before merging. In this case, the lower level may mean a lower level based on the current level. In an embodiment, a compaction process may be performed for all metadata levels.

키-벨류 저장 장치의 제1 컴팩션은 메타데이터 파일을 포함하고 있어, 메타데이터에는 벨류가 포함되지 않는 반면, 정렬된 항목의 재작성은 문자열 정렬 테이블보다 키-벨류 저장 장치에서 빠르다는 것을 암시한다. 또한 메타데이터는 전체 데이터베이스의 작은 비율에 불과하므로, 키-벨류 저장 장치에서 하나의 메타데이터 파일을 읽고 컴팩션 후 다시 쓰는 것은 수백 개의 문자열 정렬 테이블에서 동일한 프로세스를 수행하는 것과 동일함을 의미한다.The first compaction of the key-value storage device contains the metadata file, implying that the metadata does not contain the value, whereas the rewrite of the sorted item is faster in the key-value storage device than in the string sort table. do. Also, since metadata is only a small percentage of the total database, reading one metadata file from a key-value storage device and rewriting it after compaction is the same as performing the same process on hundreds of string sorting tables.

키-벨류 저장 장치는 메타데이터 파일을 작성한 후, 문자열 정렬 테이블의 레벨 0에 있는 모든 데이터가 문자열 정렬 테이블의 최종 목적지로 이동되는 제2 컴팩션을 실행할 수 있다. 도 5를 참고하면, 제2 컴팩션을 설명하기 위한 것이다. 지금까지 메타데이터 파일은 컴팩션되어 특정 레벨에 위치하였다. 제2 컴팩션에서, 특정 범위의 모든 레벨의 모든 메타데이터 파일과 메타데이터에 대한 참조를 위한 문자열 정렬 테이블을 메모리로 읽을 수 있다. 키가 이미 메타데이터 파일에 병합되고 정렬되므로 제2 컴팩션 프로세스에서 CPU를 많이 로드할 필요가 없다. 문자열 정렬 테이블을 읽은 후 메타데이터에 따라 데이터를 새로운 문자열 정렬 테이블로 이동시킬 수 있다. 여기서 delete_batch 파일을 확인하고, 더 이상 사용되지 않는 데이터를 건너뛴다. 마지막으로, 메타데이터로부터의 참조는 새로운 문자열 정렬 테이블로 업데이트될 수 있다. 그런 다음, 모든 메타데이터 파일을 디스크에 다시 쓰고 이전 값을 삭제한다. 새로운 문자열 정렬 테이블을 다시 쓸 때 정렬된 메타데이터에 표시된 것과 같이 특정 레벨에 기록된다.After creating the metadata file, the key-value storage device may perform a second compaction in which all data in level 0 of the string sort table is moved to the final destination of the string sort table. Referring to FIG. 5, it is for explaining the second compaction. Until now, metadata files have been compacted and placed at a specific level. In the second compaction, all metadata files of all levels of a specific range and a string sorting table for referencing the metadata may be read into the memory. Since the keys are already merged and sorted into the metadata file, there is no need for a heavy CPU load in the second compaction process. After reading the string sort table, you can move the data to a new string sort table according to the metadata. Here, check the delete_batch file and skip data that is no longer used. Finally, references from metadata can be updated with a new string sorting table. Then, all metadata files are rewritten to disk and the old values are deleted. When a new string sort table is rewritten, it is recorded at a specific level as indicated in the sorted metadata.

수학식 2:Equation 2:

Figure pat00002
Figure pat00002

제1 컴팩션 및 제2 컴팩션을 실행함에 따라 키-벨류 저장 장치는 레벨DB의 구조와 유사한 구조를 포함할 수 있다. 키-벨류 저장 장치는 문자열 정렬 테이블의 다중 레벨 구조를 제공하며, 데이터는 레벨 기반으로 정렬될 수 있다. 또한 키-벨류 저장 장치는 delete_batch 로그 파일을 사용하여 더 이상 사용되지 않는 데이터를 추적하고 쓰기 프로세스가 끝나기 전에 삭제할 수 있다. 키-벨류 저장 장치는 원래 데이터에 대한 컴팩션을 지연시키고 데이터를 대상 문자열 정렬 테이블에 즉시 배치할 때 LevelDB보다 큰 이점을 가지고 있다. 이러한 이점은 수학식 2를 사용하여 WAR(쓰기증폭 비율; write amplification ratio)을 계산함으로써 수치로 증명할 수 있다. 수학식 2에서는 메타데이터 공유 인자를 나타내는 새로운 변수 P를 사용할 수 있다. P의 값은 1보다 작을 것으로 예상되며 대개 매우 작은 수이다. 예를 들면, 벨류 크기가 4KB이고 메타데이터 공유가 1%인 경우 P = 0.01이므로 등식의 오른쪽이 제거된다. 다시 말해서, WAR은 레벨 수와 인접 레벨 분할 인자에 따라 달라질 뿐만 아니라 메타데이터 공유 인자에 따라 크게 달라진다. 기본 구성(size(Li+1)/size(Li) = 10)에 따라 데이터베이스 크기에 따라 레벨 수가 증가하더라도, 매우 작은 P는 수학식 2의 두번째 항의 가중치를 감소시키고 쓰기 증폭은 2에서 3 사이로 예상된다. 수학식 2에서 2는 데이터베이스에 있는 문자열 정렬 테이블의 특정 쓰기 횟수를 나타낸다. 문자열 정렬 테이블은 쓰기 프로세스가 끝날 때 플러싱 후 다시 쓸 때 한 번 작성될 수 있다. 이것은 각 데이텀[datum]이 적어도 두 번 다루어진다는 것을 의미한다. 또한, P가 증가하면 그 케이스를 고려해야 한다. 이 상황은 KV 항목 크기가 정말 작고 메타데이터가 더 큰 공유를 획득할 때 발생한다. As the first compaction and the second compaction are executed, the key-value storage device may have a structure similar to that of the level DB. The key-value storage device provides a multi-level structure of a string sorting table, and data can be sorted on a level basis. In addition, key-value storage devices can use the delete_batch log file to track data that is no longer in use and delete it before the write process is complete. The key-value storage device has a great advantage over LevelDB when it delays the compaction of the original data and places the data into the target string sorting table immediately. This advantage can be proved numerically by calculating a WAR (write amplification ratio) using Equation 2. In Equation 2, a new variable P representing a metadata sharing factor may be used. The value of P is expected to be less than 1 and is usually a very small number. For example, if the value size is 4 KB and the metadata sharing is 1%, then P = 0.01, so the right side of the equation is removed. In other words, WAR depends not only on the number of levels and the adjacent level splitting factor, but also on the metadata sharing factor. Even if the number of levels increases according to the database size according to the basic configuration (size(Li+1)/size(Li) = 10), a very small P decreases the weight of the second term in Equation 2 and writes amplification is expected to be between 2 and 3. do. In Equation 2, 2 represents a specific number of writes of the string sorting table in the database. The string sort table can be created once when flushed and then rewritten at the end of the write process. This means that each datum is handled at least twice. Also, if P increases, the case should be considered. This situation occurs when the KV item size is really small and the metadata acquires a larger share.

또한, 읽기에 대한 데이터 관리 작업을 설명하기로 한다. 읽기 처리량은 실제 상황에서 읽기 비율이 쓰기 비율보다 결코 작지 않기 때문에 매우 중요한 요소이다. 레벨DB는 레벨 기반의 정렬 데이터를 보장함으로써 높은 읽기 처리량을 달성한다. 키-벨류 저장 장치는 레벨DB로부터 일반 데이터 구조를 상속받으므로 호환되는 읽기 성능도 제공할 수 있다. 키-벨류 저장 장치 성능을 향상시키는 다중 계층 읽기 계층을 사용할 수 있다. 키-벨류 저장 장치는 특정 키의 읽기 요청을 애플리케이션으로부터 수신함에 따라, 먼저 키가 C 버퍼에 의해 병합된 항목에 속하는지, Memtable에 직접 삽입되는지를 결정할 수 있다. 실시예에서 제안된 KV 스토어가 커넥티드 카용 엣지 서버에 의해 이용되는 것을 목표로 하고 있다는 것을 고려하면, 데이터 소스를 통해 판단할 수 있다. 일반적으로, 키는 어떤 센서가 데이터를 전송하는지 정보를 포함하고 있다. 키-벨류 저장 장치는 이러한 정보를 추출하여 벨류의 크기를 추측할 수 있다. 병합된 항목은 메타데이터 파일에서 검색하여 병합된 KV 항목을 검색하고 필요한 값을 추출할 수 있다. 메타데이터 파일에서 병합된 KV 항목을 검색한 후 또는 키가 메타데이터 파일에 없는 경우 데이터베이스에서 스캔을 시작할 수 있다. Memtable에서 검색이 실행되고 읽기 전용 Memtable이 먼저 디스크 구성 요소(component)로 이동된다. 최고 수준에서 시작하여 데이터를 블룸 필터에 확인할 수 있다. 블룸 필터가 양의 피드백을 반환하면 메타데이터 파일이 스캔되고 특정 문자열 정렬 테이블에 대한 참조가 획득될 수 있다. 블룸 필터가 음의 피드백을 반환하는 경우 스캔 항목은 해당 레벨(음의 피드백을 반환한 것에 대응하는 레벨)에 있지 않으므로 해당 레벨은 건너뛸 수 있고 다음 레벨부터 검색을 계속할 수 있다. 업데이트된 데이터의 경우, 이전 벨류는 컴팩션이 해당 베류에 도달할 때까지 일정 수준으로 유지된다. 상위 레벨에서 데이터가 발견되면 이전 벨류가 제거될 때까지 절대 검색되지 않는다는 의미이다. 키-벨류 저장 장치는 버전 제약 조건 규칙을 충족한다.In addition, data management tasks for reading will be described. Read throughput is a very important factor because in real life the read rate is never less than the write rate. Level DB achieves high read throughput by ensuring level-based sorting data. Since the key-value storage device inherits the general data structure from the level DB, it can also provide compatible read performance. A multi-layer read layer can be used to improve the performance of the key-value storage device. As the key-value storage device receives a read request for a specific key from an application, it may first determine whether the key belongs to the item merged by the C buffer or directly inserted into the Memtable. Considering that the KV store proposed in the embodiment aims to be used by an edge server for a connected car, it can be determined through a data source. Typically, the key contains information about which sensor is transmitting data. The key-value storage device can extract this information and infer the size of the value. The merged item can be searched for the merged KV item by searching in the metadata file, and the necessary value can be extracted. After retrieving the merged KV item in the metadata file, or if the key is not in the metadata file, you can start a scan in the database. The search is run on the memtable and the read-only memtable is first moved to the disk component. You can start at the highest level and check the data into the bloom filter. If the bloom filter returns positive feedback, the metadata file can be scanned and a reference to a specific string sorting table can be obtained. If the bloom filter returns negative feedback, the scan item is not at that level (the level corresponding to the negative feedback returned), so the level can be skipped and the search can continue from the next level. In the case of updated data, the previous value will remain at a certain level until the compaction reaches the corresponding one. If data is found at a higher level, it means that it will never be retrieved until the previous value is removed. The key-value storage device satisfies the version constraint rule.

또한, 업데이트 및 삭제에 대한 데이터 관리 작업을 설명하기로 한다. KV 스토어를 사용한 또 다른 중요한 데이터 작업은 업데이트와 삭제를 수행하는 것이다. 키-벨류 저장 장치는 삭제 방법을 제공하지만 업데이트 방법은 필요하지 않다. 키-벨류 저장 장치는 로그 구조화된 파일 시스템이기 때문에 데이터 업데이트는 오래된 데이터의 삭제와 새로운 데이터의 삽입을 의미한다. 이에 따라 기존 KV 항목을 업데이트하려면 업데이트된 값을 가진 동일한 키를 삽입해야 한다. KV 스토어 자체는 동일한 두 개의 키를 인식하고 마지막 삽입된 키를 보관한다.In addition, data management tasks for update and deletion will be described. Another important data operation using the KV store is performing updates and deletions. The key-value storage device provides an erasing method, but no update method is required. Since the key-value storage device is a log structured file system, updating data means deleting old data and inserting new data. Accordingly, to update an existing KV entry, you must insert the same key with the updated value. The KV store itself recognizes the same two keys and holds the last inserted key.

쓰기 작업 외에도 삭제 작업은 즉시 수행될 메모리에 배치된다. 컴팩션이 시작되면 삭제된 키와 업데이트된 키는 메타데이터 파일에서 제거되며, 이 파일은 논리적으로 삭제를 수행한다. 그러나 원본 데이터는 영구적으로 제거되어야 하는 deprecated 데이터로서 문자열 정렬 테이블에 보관된다. 이러한 데이터를 추적하기 위해 키-벨류 저장 장치는 해당 항목의 메타데이터를 보관하는 delete_batch 파일을 사용하며, 제1 컴팩션 및 제2 컴팩션에서 각각 초기화 및 실행을 수행할 수 있다. 제2 컴팩션에서 문자열 정렬 테이블을 메모리로 읽을 때 delete_batch 로그를 사용하여 데이터가 deprecated되는지 여부를 확인할 수 있다.In addition to write operations, erase operations are placed in memory to be performed immediately. When compaction starts, the deleted and updated keys are removed from the metadata file, and this file is logically deleted. However, the original data is stored in the string sorting table as deprecated data that must be permanently removed. To track such data, the key-value storage device uses a delete_batch file that stores metadata of a corresponding item, and may perform initialization and execution in the first compaction and the second compaction, respectively. When reading the string sort table into memory in the second compaction, it is possible to check whether data is deprecated using the delete_batch log.

이상에서 설명된 장치는 하드웨어 구성요소, 소프트웨어 구성요소, 및/또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, ALU(arithmetic logic unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPGA(field programmable gate array), PLU(programmable logic unit), 마이크로프로세서, 또는 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 하나 이상의 범용 컴퓨터 또는 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(OS) 및 상기 운영 체제 상에서 수행되는 하나 이상의 소프트웨어 애플리케이션을 수행할 수 있다. 또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다. 이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 해당 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소(processing element) 및/또는 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다. 예를 들어, 처리 장치는 복수 개의 프로세서 또는 하나의 프로세서 및 하나의 콘트롤러를 포함할 수 있다. 또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다.The apparatus described above may be implemented as a hardware component, a software component, and/or a combination of a hardware component and a software component. For example, the devices and components described in the embodiments are, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA). , A programmable logic unit (PLU), a microprocessor, or any other device capable of executing and responding to instructions, such as one or more general purpose computers or special purpose computers. The processing device may execute an operating system (OS) and one or more software applications executed on the operating system. Further, the processing device may access, store, manipulate, process, and generate data in response to the execution of software. For the convenience of understanding, although it is sometimes described that one processing device is used, one of ordinary skill in the art, the processing device is a plurality of processing elements and/or a plurality of types of processing elements. It can be seen that it may include. For example, the processing device may include a plurality of processors or one processor and one controller. In addition, other processing configurations are possible, such as a parallel processor.

소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치에 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록 매체에 저장될 수 있다.The software may include a computer program, code, instructions, or a combination of one or more of these, configuring the processing unit to behave as desired or processed independently or collectively. You can command the device. Software and/or data may be interpreted by a processing device or, to provide instructions or data to a processing device, of any type of machine, component, physical device, virtual equipment, computer storage medium or device. Can be embodyed. The software may be distributed over networked computer systems and stored or executed in a distributed manner. Software and data may be stored on one or more computer-readable recording media.

실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. The method according to the embodiment may be implemented in the form of program instructions that can be executed through various computer means and recorded in a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, and the like alone or in combination. The program instructions recorded on the medium may be specially designed and configured for the embodiment, or may be known and usable to those skilled in computer software. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical media such as CD-ROMs and DVDs, and magnetic media such as floptical disks. -A hardware device specially configured to store and execute program instructions such as magneto-optical media, and ROM, RAM, flash memory, and the like. Examples of program instructions include not only machine language codes such as those produced by a compiler, but also high-level language codes that can be executed by a computer using an interpreter or the like.

이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.Although the embodiments have been described by the limited embodiments and drawings as described above, various modifications and variations can be made from the above description to those of ordinary skill in the art. For example, the described techniques are performed in a different order from the described method, and/or components such as systems, structures, devices, circuits, etc. described are combined or combined in a form different from the described method, or other components Alternatively, even if substituted or substituted by an equivalent, an appropriate result can be achieved.

그러므로, 다른 구현들, 다른 실시예들 및 특허청구범위와 균등한 것들도 후술하는 특허청구범위의 범위에 속한다.Therefore, other implementations, other embodiments, and those equivalent to the claims also fall within the scope of the claims to be described later.

Claims (8)

키-벨류 저장 장치에 수행되는 방법에 있어서,
메모리 구성 요소 및 디스크 구성 요소를 구성함에 따라 데이터의 크기에 따라 데이터 정보와 관련된 메모리 구성 요소를 결정하는 단계-상기 메모리 구성 요소로 Memtable 및 C버퍼(CBuffer)를 포함함-;
상기 결정된 메모리 구성 요소에서 상기 데이터 정보를 처리함에 따라 키와 블룸 필터가 포함된 메타데이터를 디스크 구성 요소로 플러시(Flush)하여 데이터와 메타데이터를 분리하는 단계; 및
상기 분리된 메타데이터를 병합하여 문자열 정렬 테이블의 컴팩션을 지연시켜 데이터 관리 작업을 수행하는 단계
를 포함하는 키-벨류 장치에서 저장 수행되는 방법.
In the method performed in the key-value storage device,
Determining a memory component related to data information according to the size of data as the memory component and the disk component are configured-including a Memtable and a C buffer (CBuffer) as the memory component;
Separating data and metadata by flushing metadata including a key and a bloom filter to a disk component as the determined memory component processes the data information; And
Merging the separated metadata to delay compaction of the string sorting table to perform data management
A method that is stored in a key-value device comprising a.
제1항에 있어서,
상기 메모리 구성 요소를 결정하는 단계는,
상기 데이터 크기를 확인하여 기 설정된 기준에 이하의 벨류를 분류하고, 상기 분류된 기 설정된 기준 이하의 벨류를 C버퍼에 삽입하고, 상기 기 설정된 기준 이하의 벨류로 분류되지 않은 나머지 벨류를 Memtable에 삽입하는 단계
를 포함하고,
상기 분리하는 단계는,
상기 C버퍼에 삽입된 기 설정된 기준 이하의 벨류를 임계값에 도달할 때까지 유지시키고 합병된 벨류들이 임계값 이상이 되면 그룹키와 합친 벨류를 Memtable에 삽입하며, 상기 나머지 벨류를 Memtable에 삽입함에 따라 상기 Memtable이 풀(Full) 상태가 되면 읽기 전용 테이블(immutable Memtable)로 변환되어, 일정 시간 이후에 풀(Full)상태의 데이터를 디스크 구성 요소로 플러시하고, 키벨류 데이터를 저장하기 위하여 새로운 Memtable을 생성하여, 이후에 들어오는 데이터를 삽입하는 단계
를 포함하고,
상기 데이터 관리 작업을 수행하는 단계는,
상기 플러시함에 따라 메타데이터와 데이터를 분리하고, 키와 블룸 필터가 포함된 메타데이터를 메타데이터 계층으로 플러싱하여 메타데이타를 벨류와 별도로 저장하며, 메타데이타가 풀(Full)이 되면 1차 컴팩션을 수행하며, 두 개의 인접 레벨의 메타데이터 파일이 기 설정된 기준의 키 범위에서 선택되어 메모리 구성 요소에서 읽히고, 상기 메모리 구성 요소에 존재하는 메타데이터를 병합하고 정렬하는 동안 업데이트되고 삭제된 데이터 항목이 delete-batch 로그에 기록됨에 따라 메타데이터에서 삭제되고, 상기 메타데이터를 병합한 후 새로운 메타데이터 파일을 하위 레벨로 작성하고 상기 메타데이터를 삭제하는 단계
를 포함하는 키-벨류 저장 장치에서 수행되는 방법.
The method of claim 1,
Determining the memory component comprises:
Check the data size and classify the following values according to the preset criteria, insert the values below the classified criteria into the C buffer, and insert the remaining values not classified as values below the preset criteria into the Memtable. Steps to do
Including,
The separating step,
The values below the preset standard inserted in the C buffer are maintained until the threshold value is reached, and when the merged values exceed the threshold value, the value combined with the group key is inserted into the memtable, and the remaining values are inserted into the memtable. Accordingly, when the memtable becomes full, it is converted into an immutable memtable, and after a certain period of time, the full data is flushed to the disk component, and a new memtable is used to store key value data. To insert the incoming data after creating
Including,
The step of performing the data management operation,
Metadata and data are separated by the flushing, and metadata including keys and bloom filters are flushed to the metadata layer to store metadata separately from value, and when metadata becomes full, primary compaction The two adjacent level metadata files are selected from the key range of the preset criteria and read from the memory component, and the data items that are updated and deleted while merging and sorting the metadata existing in the memory component are delete-batch is deleted from the metadata as it is recorded in the log, and after merging the metadata, creating a new metadata file at a lower level and deleting the metadata
A method performed in a key-value storage device comprising a.
제1항에 있어서,
상기 데이터 관리 작업을 수행하는 단계는,
상기 제1 컴팩션의 수행을 완료함에 따라 문자열 정렬 테이블의 레벨 0에 존재하는 데이터 정보가 상기 문자열 정렬 테이블의 목적지로 이동되는 제2 컴팩션을 수행하며, 상기 제2 컴팩션에서, 기 설정된 범위의 모든 레벨의 메타데이터 파일과 메타데이터를 참조하기 위한 문자열 정렬 테이블을 메모리 구성 요소로 읽고, 키가 상기 메타데이터 파일에 병합되고 정렬된 상태임에 따라 문자열 정렬 테이블을 읽은 후, 상기 메타데이터에 따라 데이터가 새로운 문자열 정렬 테이블로 이동하고, 메타데이터로부터의 참조가 새로운 문자열 정렬 테이블로 업데이트되는 단계
를 포함하는 키-벨류 저장 장치에서 수행되는 방법.
The method of claim 1,
The step of performing the data management operation,
As the execution of the first compaction is completed, a second compaction is performed in which data information present in level 0 of the string sorting table is moved to the destination of the string sorting table, and in the second compaction, a preset range Read the string sorting table for referencing metadata files and metadata of all levels of the memory component as a memory component, read the string sorting table as the key is merged and sorted into the metadata file, and then read the string sorting table into the metadata. Data is moved to the new string sort table accordingly, and the reference from the metadata is updated to the new string sort table.
A method performed in a key-value storage device comprising a.
제1항에 있어서,
상기 메모리 구성 요소를 결정하는 단계는,
애플리케이션으로부터 특정 키의 읽기 요청을 수신함에 따라, 상기 특정 키가 C 버퍼에 의해 병합된 항목에 포함되는지 또는 Memtable에 삽입되는지 결정하는 단계
를 포함하고,
상기 분리하는 단계는,
메타데이터 파일로부터 상기 병합된 항목을 검색함에 따라 키-벨류 항목을 추출하고, 상기 메타데이터 파일에서 상기 병합된 키-벨류 항목을 검색하고, 상기 메타데이터 파일에 상기 병합된 키-벨류가 존재하지 않는 경우, 데이터베이스에서 스캔을 시작하고, Memtable에서 검색이 실행되면 읽기 전용 Memtable에 포함된 데이터 정보가 디스크 구성 요소로 이동되고, 레벨 별로 데이터 정보를 블룸 필터에 확인하는 단계
를 포함하고
상기 데이터 관리 작업을 수행하는 단계는,
상기 블룸 필터가 양의 피드백을 반환하면 메타데이터 파일이 스캔되고 문자열 정렬 테이블에 대한 참조가 획득되고, 상기 블룸 필터가 음의 피드백을 반환하는 경우 스캔 항목이 해당 레벨을 건너뛰고 상기 해당 레벨 다음의 레벨부터 검색을 계속하는 단계
를 포함하는 키-벨류 저장 장치에서 수행되는 방법.
The method of claim 1,
Determining the memory component comprises:
Upon receiving a read request for a specific key from an application, determining whether the specific key is included in the merged item by the C buffer or inserted into the Memtable
Including,
The separating step,
A key-value item is extracted by searching for the merged item from a metadata file, and the merged key-value item is searched for in the metadata file, and the merged key-value does not exist in the metadata file. If not, start a scan in the database, and when a search is executed in the Memtable, the data information contained in the read-only Memtable is moved to the disk component, and the data information for each level is checked with the Bloom filter.
Including
The step of performing the data management operation,
If the bloom filter returns positive feedback, the metadata file is scanned and a reference to the string sorting table is obtained. If the bloom filter returns negative feedback, the scan item skips the corresponding level and follows the corresponding level. Steps to continue the search from the level
A method performed in a key-value storage device comprising a.
제1항에 있어서,
상기 데이터 관리 작업을 수행하는 단계는,
키-벨류 항목을 업데이트하기 위하여 업데이트된 벨류를 가진 동일한 키를 삽입하는 단계
를 포함하는 키-벨류 저장 장치에서 수행되는 방법.
The method of claim 1,
The step of performing the data management operation,
Inserting the same key with the updated value to update the key-value item
A method performed in a key-value storage device comprising a.
제1항에 있어서,
상기 데이터 관리 작업을 수행하는 단계는,
상기 컴팩션이 시작되면 삭제된 키와 업데이트된 키를 메타데이터 파일에서 제거하는 단계
를 포함하는 키-벨류 저장 장치에서 수행되는 방법.
The method of claim 1,
The step of performing the data management operation,
When the compaction starts, removing the deleted key and the updated key from the metadata file
A method performed in a key-value storage device comprising a.
제1항에 있어서,
상기 키-벨류 저장 장치는, 고정된 크기의 메타데이터 파일을 사용하고,
상기 메타데이터 파일은, 크기가 일정하며 키-벨류 형식의 적어도 하나 이상의 오프셋 블록과 필터 블록으로 구성되고, 상기 메타데이터 파일의 블룸 필터에 블록을 할당하고, 상기 블룸 필터를 메타데이터로 하며,
상기 오프셋 블록에 키-벨류 형식의 데이터를 저장하고, 키는 데이터의 키이고, 벨류는 키를 보유하고 있는 문자열 정렬 테이블에 대한 참조인
것을 특징으로 하는 키-벨류 저장 장치에서 수행되는 방법.
The method of claim 1,
The key-value storage device uses a metadata file of a fixed size,
The metadata file has a constant size and is composed of at least one offset block and a filter block in a key-value format, allocates a block to a bloom filter of the metadata file, and uses the bloom filter as metadata,
The offset block stores data in a key-value format, where the key is the key of the data, and the value is a reference to the string sorting table holding the key.
Method performed in a key-value storage device, characterized in that.
키-벨류 저장 장치에 있어서,
메모리에 포함된 컴퓨터 판독 가능한 명령을 실행하도록 구현되는 적어도 하나의 프로세서
를 포함하고,
상기 적어도 하나의 프로세서에 의해,
메모리 구성 요소 및 디스크 구성 요소를 구성함에 따라 데이터의 크기에 따라 데이터 정보와 관련된 메모리 구성 요소를 결정하고-상기 메모리 구성 요소로 Memtable 및 C버퍼(CBuffer)를 포함함-,
상기 결정된 메모리 구성 요소에서 상기 데이터 정보를 처리함에 따라 키와 블룸 필터가 포함된 메타데이터를 디스크 구성 요소로 플러시(Flush)하여 데이터와 메타데이터를 분리하고,
상기 분리된 메타데이터를 병합하여 문자열 정렬 테이블의 컴팩션을 지연시켜 데이터 관리 작업을 수행하는
키-벨류 저장 장치.
In the key-value storage device,
At least one processor implemented to execute computer readable instructions contained in memory
Including,
By the at least one processor,
As a memory component and a disk component are configured, a memory component related to data information is determined according to the size of the data-and the memory components include Memtable and C buffer (CBuffer),
As the determined memory component processes the data information, the metadata including the key and the bloom filter are flushed to the disk component to separate data and metadata,
Merging the separated metadata to delay the compaction of the string sorting table to perform data management
Key-value storage device.
KR1020190145169A 2019-11-13 2019-11-13 Casedb: low-cost put-intensive key-value store for edge computing KR102264119B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190145169A KR102264119B1 (en) 2019-11-13 2019-11-13 Casedb: low-cost put-intensive key-value store for edge computing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190145169A KR102264119B1 (en) 2019-11-13 2019-11-13 Casedb: low-cost put-intensive key-value store for edge computing

Publications (2)

Publication Number Publication Date
KR20210058118A true KR20210058118A (en) 2021-05-24
KR102264119B1 KR102264119B1 (en) 2021-06-11

Family

ID=76152715

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190145169A KR102264119B1 (en) 2019-11-13 2019-11-13 Casedb: low-cost put-intensive key-value store for edge computing

Country Status (1)

Country Link
KR (1) KR102264119B1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113626431A (en) * 2021-07-28 2021-11-09 浪潮云信息技术股份公司 LSM tree-based key value separation storage method and system for delaying garbage recovery
CN115422142A (en) * 2022-08-22 2022-12-02 北京羽乐创新科技有限公司 Data compression method and device
KR102512571B1 (en) * 2021-12-06 2023-03-22 성균관대학교산학협력단 Memory sytem and operating method thereof
CN117311645A (en) * 2023-11-24 2023-12-29 武汉纺织大学 LSM storage metadata read amplification optimization method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140112717A (en) * 2013-03-14 2014-09-24 삼성전자주식회사 Data Storage System based on a key-value and Operating Method thereof
KR20170008152A (en) * 2015-07-13 2017-01-23 삼성전자주식회사 Data property-based data placement in nonvolatile memory device
KR20190100537A (en) * 2018-02-09 2019-08-29 연세대학교 산학협력단 Apparatus for Accessing Data Using Internal Parallelism of Flash Storage based on Key-Value and Method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140112717A (en) * 2013-03-14 2014-09-24 삼성전자주식회사 Data Storage System based on a key-value and Operating Method thereof
KR20170008152A (en) * 2015-07-13 2017-01-23 삼성전자주식회사 Data property-based data placement in nonvolatile memory device
KR20190100537A (en) * 2018-02-09 2019-08-29 연세대학교 산학협력단 Apparatus for Accessing Data Using Internal Parallelism of Flash Storage based on Key-Value and Method thereof

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113626431A (en) * 2021-07-28 2021-11-09 浪潮云信息技术股份公司 LSM tree-based key value separation storage method and system for delaying garbage recovery
KR102512571B1 (en) * 2021-12-06 2023-03-22 성균관대학교산학협력단 Memory sytem and operating method thereof
WO2023106635A1 (en) * 2021-12-06 2023-06-15 성균관대학교산학협력단 Memory system, operating method of memory system, and computer-readable recording medium performing same
CN115422142A (en) * 2022-08-22 2022-12-02 北京羽乐创新科技有限公司 Data compression method and device
CN117311645A (en) * 2023-11-24 2023-12-29 武汉纺织大学 LSM storage metadata read amplification optimization method
CN117311645B (en) * 2023-11-24 2024-02-06 武汉纺织大学 LSM storage metadata read amplification optimization method

Also Published As

Publication number Publication date
KR102264119B1 (en) 2021-06-11

Similar Documents

Publication Publication Date Title
KR102264119B1 (en) Casedb: low-cost put-intensive key-value store for edge computing
US10754835B2 (en) High-efficiency deduplication module of a database-management system
CN110799960B (en) System and method for database tenant migration
US11099771B2 (en) System and method for early removal of tombstone records in database
US10552378B2 (en) Dividing a dataset into sub-datasets having a subset of values of an attribute of the dataset
JP6598996B2 (en) Signature-based cache optimization for data preparation
EP3814930B1 (en) System and method for bulk removal of records in a database
US10248656B2 (en) Removal of reference information for storage blocks in a deduplication system
US11494334B2 (en) Embedded reference counts for file clones
US9298733B1 (en) Storing files in a parallel computing system based on user or application specification
JP6598997B2 (en) Cache optimization for data preparation
KR102345517B1 (en) Deduplication adapted casedb for edge computing
US20180011897A1 (en) Data processing method having structure of cache index specified to transaction in mobile environment dbms
KR100907477B1 (en) Apparatus and method for managing index of data stored in flash memory
US11379408B2 (en) Pointer-based dynamic data structures in key-value stores
WO2016117007A1 (en) Database system and database management method
US9965488B2 (en) Back referencing of deduplicated data
TWI475419B (en) Method and system for accessing files on a storage system
KR20090003093A (en) Method and apparatus for management unstructured data using object-based file system
CN116226497A (en) Retrieval method, medium, device and computing equipment

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant