KR20220127080A - Cache management apparatus and method - Google Patents

Cache management apparatus and method Download PDF

Info

Publication number
KR20220127080A
KR20220127080A KR1020210031644A KR20210031644A KR20220127080A KR 20220127080 A KR20220127080 A KR 20220127080A KR 1020210031644 A KR1020210031644 A KR 1020210031644A KR 20210031644 A KR20210031644 A KR 20210031644A KR 20220127080 A KR20220127080 A KR 20220127080A
Authority
KR
South Korea
Prior art keywords
buffer
page
storage
additional
main
Prior art date
Application number
KR1020210031644A
Other languages
Korean (ko)
Other versions
KR102529333B1 (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 KR1020210031644A priority Critical patent/KR102529333B1/en
Priority to PCT/KR2022/003337 priority patent/WO2022191622A1/en
Publication of KR20220127080A publication Critical patent/KR20220127080A/en
Application granted granted Critical
Publication of KR102529333B1 publication Critical patent/KR102529333B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0806Multiuser, multiprocessor or multiprocessing cache systems
    • G06F12/0811Multiuser, multiprocessor or multiprocessing cache systems with multilevel cache hierarchies
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0866Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0877Cache access modes
    • G06F12/0882Page mode
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0893Caches characterised by their organisation or structure
    • G06F12/0897Caches characterised by their organisation or structure with two or more cache hierarchy levels
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation
    • G06F12/1027Address translation using associative or pseudo-associative address translation means, e.g. translation look-aside buffer [TLB]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/46Caching storage objects of specific type in disk cache
    • G06F2212/465Structured object, e.g. database record

Abstract

According to the present invention, a cache management device comprises: a main buffer using a volatile memory; an additional buffer using a non-volatile memory and having the same processing speed as the main buffer; a storage using a non-volatile memory having a storage capacity larger than a storage capacity of the main buffer; and a buffer controller which selectively stores, in the additional buffer or the storage on the basis of temporal locality, write asymmetry, and circular accessibility, a victim page that cannot be stored in the main buffer. Accordingly, the amount of writing to a storage device such as an SSD may be reduced.

Description

캐시 관리 장치 및 방법{CACHE MANAGEMENT APPARATUS AND METHOD}CACHE MANAGEMENT APPARATUS AND METHOD

본 발명은 비휘발성 양방향 인라인 메모리 모듈을 이용한 캐시 관리 장치 및 방법에 관한 것으로써, 더욱 상세하게는 RDBMS의 코드나 구현 체계를 유지하면서도 NVDIMM을 활용해 SSD와 같은 저장장치에 유발되는 쓰기 양을 줄여 전반적인 성능을 향상시키기 위한 캐싱 방법에 관한 것입니다. The present invention relates to a cache management apparatus and method using a non-volatile bidirectional inline memory module, and more particularly, by reducing the amount of write induced in a storage device such as an SSD by using NVDIMM while maintaining the code or implementation system of the RDBMS. It's all about caching methods to improve overall performance.

Intel 3D X-point 및 Optane 기술의 발표와 함께 데이터베이스 커뮤니티를 중심으로 비휘발성 메모리인 NVM(Non-Volatile Memory)을 활용하는 기술에 관한 연구들이 활발히 진행되고 있다. 그러나 NVM은 DRAM보다 느린 접근 속도를 가지며 SSD보다 단위 용량당 가격이 비싸다. 따라서, 지금과 같은 플래시 기반의 컴퓨팅 환경에서는 NVM이 DRAM 또는 SSD와 같은 플래시메모리 저장장치를 완전히 대체할 수 없다. With the announcement of Intel 3D X-point and Optane technologies, research on technologies utilizing NVM (Non-Volatile Memory), a non-volatile memory, is being actively conducted centering on the database community. However, NVM has slower access speed than DRAM and is more expensive per unit capacity than SSD. Therefore, in the current flash-based computing environment, NVM cannot completely replace flash memory storage devices such as DRAM or SSD.

한편, DRAM 모듈에 플래시 저장장치와 배터리백업(BBU) 기능을 갖춘 NVDIMM (Non-Volatile DIMM)이 등장했는데, NVDIMM은 DRAM과 같은 속도로 byte 단위 읽기 및 쓰기 연산이 가능하며 비휘발성이다. 하지만 경제적인 측면을 고려했을 때, NVDIMM은 DRAM을 대체할 수 없고 플래시메모리 기반의 저장장치 아키텍처에 NVDIMM이 추가되는 이종 시스템으로 동작하는 것이 가장 효율적이다.Meanwhile, NVDIMM (Non-Volatile DIMM) with flash storage device and battery backup (BBU) function has appeared in DRAM module. NVDIMM can read and write byte unit at the same speed as DRAM and is non-volatile. However, considering the economic aspect, NVDIMM cannot replace DRAM, and it is most efficient to operate as a heterogeneous system in which NVDIMM is added to a flash memory-based storage architecture.

대부분의 DBMS는 테이블 및 인덱스 데이터를 메모리상에 캐싱하기 위해 버퍼 풀이라 불리는 영역을 DRAM 메모리에 유지한다. 데이터 접근을 위한 디스크 I/O 작업은 메모리상의 작업과 비교했을 때 상당한 시간이 걸리기 때문에, 한 번 디스크에서 읽은 데이터를 버퍼 풀에 캐싱함으로써 추후 해당 데이터에 대한 접근을 빠르게 처리하고 DBMS의 전체적인 성능을 향상할 수 있다. 버퍼 풀이 가득 차 여유 공간이 없거나 트랜잭션 로그 영역이 부족할 때, 버퍼 관리자는 버퍼 교체 정책에 따라 쫓아낼 페이지를 선택하고 여유 공간을 만든다. 이때, 쫓겨난 페이지가 수정사항이 디스크에 반영되지 않은 dirty 페이지인 경우, 해당 페이지를 메모리에서 디스크로 써야 하는데 이는 DBMS의 트랜잭션 처리량에 상당한 악영향을 끼친다. 특히 TPC-C와 같은 OLTP 벤치마크 워크로드는 시간 지역성(Temporal Locality)이 존재하고, 전체 데이터의 20%가 전체 I/O의 80%에 해당하는 I/O를 요청한다. 즉, 특정 시간대에 active 한 write set의 크기는 한정되어 있으므로 이러한 페이지들을 별도의 버퍼에 캐싱하여, 많은 양의 쓰기 요청을 줄일 수 있는 방법이 요구된다. Most DBMSs maintain an area called a buffer pool in DRAM memory to cache table and index data in memory. Since disk I/O operations for data access take a considerable amount of time compared to operations on memory, caching the data once read from disk in the buffer pool allows for faster access to the data in the future and improves the overall performance of the DBMS. can be improved When the buffer pool is full and there is no free space or the transaction log area is insufficient, the buffer manager selects pages to be evicted according to the buffer replacement policy and makes free space. At this time, if the evicted page is a dirty page whose modifications are not reflected on disk, the page must be written from memory to disk, which has a significant adverse effect on the transaction throughput of the DBMS. In particular, OLTP benchmark workloads such as TPC-C have temporal locality, and 20% of the total data requests I/O equivalent to 80% of the total I/O. That is, since the size of the active write set at a specific time is limited, a method is required to reduce a large amount of write requests by caching these pages in a separate buffer.

상술한 문제점을 해결하기 위해, 본 발명의 일 실시예는 적은 양의 NVDIMM 버퍼를 사용해 많은 양의 쓰기 요청을 흡수하고 Flash SSD에 유발되는 쓰기 요청을 저감시켜 시스템의 성능을 향상시키는 방법을 제공하는데 그 목적이 있다. In order to solve the above-mentioned problems, an embodiment of the present invention provides a method for improving system performance by absorbing a large amount of write requests using a small amount of NVDIMM buffer and reducing the write requests caused to the Flash SSD. There is a purpose.

또한, 본 발명의 일 실시예는 주어진 워크로드에서 쓰기 관점에서 핫(hot)한 페이지를 구별하여 NVDIMM 버퍼에 캐싱하는 방법을 제공한다. In addition, an embodiment of the present invention provides a method of caching in an NVDIMM buffer by discriminating a page that is hot from a write point of view in a given workload.

상술한 목적을 달성하기 위한 본 발명의 일 실시예에 따른 캐시 관리 장치는, 휘발성 메모리를 이용하는 메인 버퍼; 비휘발성 메모리를 이용하며, 상기 메인 버퍼와 동일 처리 속도를 갖는 추가 버퍼; 상기 메인 버퍼보다 큰 저장 용량을 갖는 비휘발성 메모리를 이용하는 스토리지; 및 상기 메인 버퍼에 저장되지 못하는 희생 페이지를 시간 지역성, 쓰기 비대칭성, 순환 접근성에 기초하여 상기 추가 버퍼 또는 스토리지에 선택적으로 저장하는 버퍼 컨트롤러를 포함한다. A cache management apparatus according to an embodiment of the present invention for achieving the above object includes: a main buffer using a volatile memory; an additional buffer using a non-volatile memory and having the same processing speed as the main buffer; storage using a non-volatile memory having a larger storage capacity than the main buffer; and a buffer controller selectively storing a victim page that cannot be stored in the main buffer in the additional buffer or storage based on temporal locality, write asymmetry, and circular accessibility.

일 실시예에서, 상기 버퍼 컨트롤러는 미리 설정된 타임 윈도우 안의 페이지, 미리 설정된 기준 이상의 쓰기 비대칭성을 갖는 페이지, 순환 접근되는 페이지 중 어느 하나를 충족하는 경우 핫 페이지로 판단하여 상기 추가 버퍼에 저장하는 것을 특징으로 한다. In an embodiment, the buffer controller determines that a page within a preset time window, a page having a write asymmetry greater than a preset reference, and a page accessed cyclically, is determined as a hot page and storing in the additional buffer. characterized.

일 실시예에서, 상기 버퍼 컨트롤러는 데이터베이스 서버로부터 데이터 페이지를 요청받으면, 버퍼 리스트에 기초하여 요청된 페이지를 검색하며, 상기 버퍼 리스트는 상기 메인 버퍼 및 상기 추가 버퍼에 저장된 페이지의 관리 정보를 저장하는 것을 특징으로 한다. In one embodiment, when the buffer controller receives a data page request from the database server, it searches for a requested page based on a buffer list, and the buffer list stores management information of pages stored in the main buffer and the additional buffer. characterized in that

일 실시예에서, 상기 관리 정보는 테이블스페이스 식별자, 오프셋, 페이지가 속한 버퍼 풀의 번호를 포함하는 것을 특징으로 한다. In one embodiment, the management information is characterized in that it includes a tablespace identifier, an offset, and a buffer pool number to which the page belongs.

일 실시예에서, 상기 버퍼 컨트롤러는 상기 추가 버퍼의 캐시가 풀(full)인 경우, 가장 오랫동안 접근이 안된 페이지부터 스토리지로 플러시하는 것을 특징으로 한다. In an embodiment, when the cache of the additional buffer is full, the buffer controller flushes the page that has not been accessed for a long time to the storage.

일 실시예에서, 상기 버퍼 컨트롤러는 쓰기 비대칭성을 갖는 페이지의 용량이 미리 설정된 기준을 초과하는 경우, LSN(Log Sequence Number) 값에 기초하여 핫 페이지를 판단하는 것을 특징으로 한다. In an embodiment, when the capacity of a page having write asymmetry exceeds a preset criterion, the buffer controller determines a hot page based on a log sequence number (LSN) value.

일 실시예에서, 상기 메인 버퍼는 DRAM이고, 상기 추가 버퍼는 비휘발성 양방향 인라인 메모리 모듈(NVDIMMM)인 것을 특징으로 한다. In one embodiment, the main buffer is DRAM, and the additional buffer is a non-volatile bidirectional inline memory module (NVDIMMM).

본 발명의 다른 실시예에 따른 메인버퍼, 추가 버퍼, 스토리지를 포함하는 캐시 관리 장치의 캐시 관리 방법은, 상기 메인 버퍼에 저장되지 못하는 희생 페이지가 발생하면, 상기 희생 페이지가 시간 지역성, 쓰기 비대칭성, 순환 접근성에 기초하여 핫 페이지인지 판단하는 단계; 및 핫 페이지라고 판단되면 상기 추가 버퍼에 저장하고, 핫 페이지가 아니라고 판단되면 상기 스토리지에 저장하는 단계를 포함하고, 상기 메인 버퍼는 휘발성 메모리를 이용하고, 상기 추기 버퍼는 상기 메인 버퍼와 동일 처리 속도를 갖는 비휘발성 메모리를 이용하며, 상기 스토리지는 상기 메인 버퍼보다 더 큰 저장 용량을 갖는 비휘발성 메모리를 이용하는 것을 특징으로 한다. In a cache management method of a cache management apparatus including a main buffer, an additional buffer, and a storage according to another embodiment of the present invention, when a victim page that cannot be stored in the main buffer occurs, the victim page is temporally locality and write asymmetry , determining whether the page is a hot page based on circular accessibility; and storing in the additional buffer when it is determined that the page is a hot page, and storing in the storage when it is determined that the page is not a hot page, wherein the main buffer uses a volatile memory, and the write-once buffer has the same processing speed as the main buffer. A non-volatile memory having a

본 발명의 일 실시예에 따르면, 많은 양의 쓰기 요청을 발생시키는 핫(hot) 한 페이지를 구별하여 NVDIMM 영역에 캐싱함으로써, SSD와 같은 저장장치에 발생하는 쓰기 양을 줄일 수 있다. According to an embodiment of the present invention, by distinguishing one hot page that generates a large amount of write requests and caching it in the NVDIMM area, it is possible to reduce the amount of writes occurring in a storage device such as an SSD.

도 1은 본 발명의 실시 예에 따른 버퍼 관리 장치의 구성을 도시한 도면이다.
도 2는 본 발명의 일 실시예에 따른 캐싱 관리 장치의 캐싱 동작을 설명하는 구성도이다.
도 3은 본 발명의 일 실시예에서 설명하는 시간 지연성을 설명하기 위한 도면이다.
도 4는 본 발명의 일 실시예에 따른 TPC-C 워크로드의 Stock 테이블의 LSN 갭 계산 결과를 나타낸 그래프이다.
도 5 및 6은 본 발명의 일 실시예에 따른 캐싱 관리 장치의 성능을 나타내는 그래프이다.
1 is a diagram illustrating a configuration of a buffer management apparatus according to an embodiment of the present invention.
2 is a configuration diagram illustrating a caching operation of a caching management apparatus according to an embodiment of the present invention.
3 is a diagram for explaining time delay described in an embodiment of the present invention.
4 is a graph showing the LSN gap calculation result of the Stock table of the TPC-C workload according to an embodiment of the present invention.
5 and 6 are graphs showing the performance of the caching management apparatus according to an embodiment of the present invention.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다.Since the present invention can have various changes and can have various embodiments, specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present invention to specific embodiments, and should be understood to include all modifications, equivalents and substitutes included in the spirit and scope of the present invention. In describing each figure, like reference numerals have been used for like elements.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가지고 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥 상 가지는 의미와 일치하는 의미를 가지는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless defined otherwise, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Terms such as those defined in a commonly used dictionary should be interpreted as having a meaning consistent with the meaning in the context of the related art, and should not be interpreted in an ideal or excessively formal meaning unless explicitly defined in the present application. does not

이하, 첨부된 도면을 참조하여 본 발명의 실시예에 대해 설명한다. 도면에서 동일한 구성요소들에 대해서는 비록 다른 도면에 표시되더라도 가능한 한 동일한 참조번호 및 부호로 나타내고 있음에 유의해야 한다. 또한, 본 발명을 설명함에 있어서, 관련된 공지기능 혹은 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우 그 상세한 설명은 생략한다.Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. It should be noted that the same components in the drawings are denoted by the same reference numbers and reference numerals as much as possible even though they are indicated in different drawings. In addition, in describing the present invention, if it is determined that a detailed description of a related known function or configuration may unnecessarily obscure the gist of the present invention, the detailed description thereof will be omitted.

도 1은 본 발명의 실시 예에 따른 버퍼 관리 장치의 구성을 도시한 도면이다.1 is a diagram illustrating a configuration of a buffer management apparatus according to an embodiment of the present invention.

도 1을 참조하면, 본 실시 예에 따른 캐싱 관리 장치(100)는 메인 버퍼(110), 추가 버퍼(130), 버퍼 컨트롤러(150) 및 스토리지(170)를 포함할 수 있다. Referring to FIG. 1 , the caching management apparatus 100 according to the present embodiment may include a main buffer 110 , an additional buffer 130 , a buffer controller 150 , and a storage 170 .

본 실시 예에 따른 버퍼 관리 장치는 예컨대 메인 프레임 컴퓨터, 서버 컴퓨터, 퍼스널 컴퓨터, 모바일 기기, 및 프로그램 가능한 가전제품 등과 같은 범용 또는 특수 목적의 컴퓨터 시스템에 활용될 수 있다. The buffer management apparatus according to the present embodiment may be utilized in a general-purpose or special-purpose computer system, such as a main frame computer, a server computer, a personal computer, a mobile device, and a programmable home appliance.

메인 버퍼(110)는 휘발성 메모리로, 캐싱 데이터를 저장한다. 메인 버퍼(110)는 동적 랜덤 액세스 메모리(DRAM ; dynamic random access memory) 일 수 있다. The main buffer 110 is a volatile memory, and stores cached data. The main buffer 110 may be a dynamic random access memory (DRAM).

추가 버퍼(130)는 상기 메인 버퍼(110)와 다른 구조를 갖는 비휘발성 메모리로, 추가 버퍼(130)는 메인 버퍼(110)와 유사한 접근 속도를 가질 수 있다. 추가 버퍼(130)는 후술되는 버퍼 컨트롤러(150)의 지시에 따라 메인 버퍼(110)에서 쫓겨난 페이지 중 핫 페이지를 저장한다. 추가 버퍼(130)는 비휘발성 양방향 인라인 메모리 모듈(NVDIMM; Non-Volatile Double In-line Memory Module)일 수 있다. 추가 버퍼(130)가 비휘발성 양방향 인라인 메모리 모듈(NVDIMM; Non-Volatile Double In-line Memory Module)를 채택하여도, DRAM 버퍼와 같이 DBMS 의 버퍼로 활용되므로, 데이터를 페이지 단위로 저장한다. The additional buffer 130 is a nonvolatile memory having a structure different from that of the main buffer 110 , and the additional buffer 130 may have an access speed similar to that of the main buffer 110 . The additional buffer 130 stores hot pages among pages evicted from the main buffer 110 according to an instruction of the buffer controller 150 to be described later. The additional buffer 130 may be a non-volatile double in-line memory module (NVDIMM). Even if the additional buffer 130 adopts a non-volatile double in-line memory module (NVDIMM), it is used as a buffer of the DBMS like a DRAM buffer, and thus data is stored in page units.

버퍼 컨트롤러(150)는 메인 버퍼(110)와 추가 버퍼(130)에 데이터를 저장, 삭제, 이동 등의 관리를 행한다. 버퍼 컨트롤러(150)의 상기 메인 버퍼에 저장되지 못하는 희생 페이지를 시간 지역성, 쓰기 비대칭성, 순환 접근성에 기초하여 상기 추가 버퍼(130) 또는 스토리지(170)에 선택적으로 저장한다. 버퍼 컨트롤러(150)는 메인 버퍼(110)와 추가 버퍼(130) 사이의 데이터 이동(data migration)을 메인 버퍼(110)에 명령할 수 있다. 버퍼 컨트롤러(150)의 상세한 동작은 도 2를 참조하여 후술한다. The buffer controller 150 stores, deletes, and moves data in the main buffer 110 and the additional buffer 130 . A victim page that cannot be stored in the main buffer of the buffer controller 150 is selectively stored in the additional buffer 130 or the storage 170 based on temporal locality, write asymmetry, and circular accessibility. The buffer controller 150 may instruct the main buffer 110 to migrate data between the main buffer 110 and the additional buffer 130 . A detailed operation of the buffer controller 150 will be described later with reference to FIG. 2 .

스토리지(170)는 하드 디스크 드라이브(이하, HDD) 및 SSD(solid state drive) 중 적어도 하나를 포함할 수 있다. 스토리지(170)는 메인 버퍼(110) 및 추가 버퍼(130)와 비교할 때, 접근 속도 즉 쓰기 및 읽기 속도가 느린 반면, 저장 용량은 더 클 수 있다. The storage 170 may include at least one of a hard disk drive (hereinafter, HDD) and a solid state drive (SSD). Compared to the main buffer 110 and the additional buffer 130 , the storage 170 has a slow access speed, that is, a write and read speed, but a storage capacity may be larger.

이때, 스토리지는 장기적으로 저장하는 저장 매체이다. In this case, the storage is a storage medium for long-term storage.

스토리지(170)에는 컴퓨터 시스템의 운영 시스템(Operation System, OS), 응용 프로그램(application program), 프로그램 데이터(program data) 등이 저장될 수 있다.The storage 170 may store an operating system (OS) of a computer system, an application program, program data, and the like.

도 2는 본 발명의 일 실시예에 따른 캐싱 관리 장치의 캐싱 동작을 설명하는 구성도이다. 2 is a configuration diagram illustrating a caching operation of a caching management apparatus according to an embodiment of the present invention.

캐싱 관리 장치는 관계형 데이터베이스 관리 시스템(RDBMS; Relational DataBase Management System) 예를 들어, 오라클, MySQL, Access, MsSql 의 코드나 구현체제를 이용할 수 있다. The caching management device may use a code or implementation system of a relational database management system (RDBMS), for example, Oracle, MySQL, Access, or MsSql.

캐싱 관리 장치의 버퍼 컨트롤러는 스토리지에 유발되는 쓰기 양을 줄여 전반적인 성능을 향상시키기 위하여, 메인 버퍼에서 쫓겨나는 페이지 중에서 추가 버퍼에 캐싱해야 할 페이지를 선택한다. The buffer controller of the caching management device selects a page to be cached in an additional buffer among pages evicted from the main buffer in order to improve overall performance by reducing the amount of writes induced to storage.

이하, 버퍼 컨트롤러는 미시 설정된 타임 윈도우 안의 페이지, 미리 설정된 기준 이상의 쓰기 비대칭성을 갖는 페이지, 순환 접근되는 페이지 중 어느 하나를 충족하는 경우 핫 페이지로 간주하여 상기 추가 버퍼에 저장한다. Hereinafter, when any one of a page within a micro-set time window, a page having a write asymmetry greater than a preset reference, and a page accessed cyclically is satisfied, the buffer controller regards it as a hot page and stores it in the additional buffer.

일 실시예에서, 버퍼 컨트롤러는 미리 설정된 타임 윈도우 안의 페이지를 시간 지역성이 큰 핫 페이지라고 판단하고, 시간 지역성이 큰 페이지를 메인 버퍼에서 추가 버퍼에 캐싱함으로써 핫 페이지가 스토리지에 저장되지 않도록 한다. 시간 지역성이 높은 페이지는 특정 시간 범위 (Time Window) 안에서 여러 번 쓰기 요청이 발생하고, 해당 시점이 지난 후엔 다시 접근되지 않거나 한참 후에 접근되기 때문이다.In an embodiment, the buffer controller determines that the page within the preset time window is a hot page with high temporal locality, and caches the page with high temporal locality from the main buffer to an additional buffer so that the hot page is not stored in the storage. This is because a page with high temporal locality receives multiple write requests within a specific time window, and is not accessed again after that point has elapsed or is accessed after a long time.

도 3은 본 발명의 일 실시예에서 설명하는 시간 지연성을 설명하기 위한 도면이다. 3 is a diagram for explaining time delay described in an embodiment of the present invention.

도 3의 (a)와 (b)는 TPC-C 워크로드의 Order-Line과 Orders 테이블의 시간 지역성을 나타내는 그래프다. 도 3의 (c)와 (d)는 LinkBench 워크로드의 Counttable의 시간 지역성 및 Linktable의 시간 지역성을 나타내는 그래프다. X축은 각 페이지의 쓰기 요청 간의 시간 차를 의미하고, Y축은 전체 페이지 개수 대비 누적 페이지의 비율을 의미한다. 도 3의 (a)와 (b)의 그래프에서 알 수 있듯이, 80% 이상의 페이지가 매우 짧은 시간 차를 갖고 있다. 즉, 이러한 페이지는 쓰기 요청이 짧은 시간 안에 여러 번 요청되어 시간 지역성이 큰 페이지다.3 (a) and (b) are graphs showing the temporal locality of the Order-Line and Orders tables of the TPC-C workload. 3 (c) and (d) are graphs showing the temporal locality of the Counttable and the Linktable of the LinkBench workload. The X-axis means the time difference between write requests for each page, and the Y-axis means the ratio of the accumulated pages to the total number of pages. As can be seen from the graphs of (a) and (b) of FIG. 3 , more than 80% of pages have a very short time difference. That is, these pages are pages with high temporal locality because write requests are requested multiple times within a short period of time.

도 3의 (c)와 (d) 의 그래프에서 알 수 있듯이, 테이블 대부분이 시간 지역성이 높다. 따라서, 이러한 페이지를 NVDIMM 버퍼에 캐싱함으로써 여러 번의 쓰기 요청을 절반 또는 그 이하 수준의 쓰기 요청으로 줄일 수 있다.As can be seen from the graphs of FIG. 3 (c) and (d), most of the tables have high temporal locality. Thus, by caching these pages in NVDIMM buffers, multiple write requests can be reduced to half or less.

즉, 버퍼 컨트롤러는 TPC-C 워크로드 및 LinkBench 워크로드를 핫 페이지로 선정할 수 있다. That is, the buffer controller can select TPC-C workloads and LinkBench workloads as hot pages.

다음 버퍼 컨트롤러는, 미리 설정된 기준 이상의 쓰기 비대칭성을 갖는 페이지를 핫 페이지로 판단할 수 있다. The next buffer controller may determine a page having write asymmetry greater than or equal to a preset reference as a hot page.

TPC-C와 같은 OLTP 워크로드는 전체 쓰기 요청의 80%가 전체 페이지의 20%에서 발생한다. 이 페이지들은 시간 지역성보다는 꾸준하고 고르게 (uniform) 쓰기 요청이 발생한다. TPC-C의 Stock 테이블이 이러한 특성을 가지며, TPC-C 워크로드에서 발생하는 전체 쓰기 요청의 40%가 이 테이블에 속한다. 따라서 버퍼 컨트롤러는 이러한 OLTP 워크로드 및 Stock 테이블에 기초하여 핫 페이지를 판단하여 추가 버퍼에 캐싱함으로써 많은 양의 쓰기 요청을 줄일 수 있다.For OLTP workloads like TPC-C, 80% of all write requests come from 20% of all pages. These pages generate constant and uniform write requests rather than temporal locality. TPC-C's Stock table has this characteristic, and 40% of the total write requests generated by the TPC-C workload belong to this table. Therefore, the buffer controller can reduce large write requests by determining which hot pages are hot based on the OLTP workload and the Stock table and caching them in additional buffers.

다만, Stock 테이블의 용량이 상당히 크기 때문에 추가 버퍼의 용량을 생각했을 때 전체 테이블을 캐싱할 수 없어 쓰기 양 기준 상위 10%의 페이지만 캐싱하도록 기준을 설정할 수 있다. However, since the capacity of the Stock table is quite large, considering the capacity of the additional buffer, the entire table cannot be cached, so the criteria can be set to cache only the top 10% of pages based on the amount of writes.

이를 위해 각 페이지 프레임에 저장된 LSN(Log Sequence Number) 값을 기준으로, “LSN Gap = 페이지가 플러시 (Flush) 된 후 첫 번째로 업데이트 됐을 때의 LSN - 페이지가 이전에 플러시 될 때의 LSN”을 계산했다. LSN 갭(Gap)값이 작다는 의미는 마지막으로 저장장치에 플러시 될 때와 그 다음 다시 메인 버퍼에 페이지가 읽혀와서 업데이트될 때의 시간 차가 짧다는 것을 의미한다. 이러한 페이지는 곧 접근될 페이지임에도 불구하고 쓰기 요청이 발생하기 때문에 추가 버퍼에 캐싱하는 것이 좋다. 즉, 버퍼 컨트롤러는 LSN 갭이 미리 설정된 기준 보다 작은 경우, 쓰기 비대칭성을 갖는 핫 페이지로 판단할 수 있다. For this purpose, based on the Log Sequence Number (LSN) value stored in each page frame, “LSN Gap = LSN when the page was first updated after flushing - LSN when the page was previously flushed” Calculated. A small LSN gap value means that the time difference between the last flush to the storage device and the next time a page is read and updated into the main buffer is short. It's a good idea to cache these pages in an additional buffer because write requests occur even though they are pages that will be accessed soon. That is, when the LSN gap is smaller than a preset reference, the buffer controller may determine that it is a hot page having write asymmetry.

도 4는 본 발명의 일 실시예에 따른 TPC-C 워크로드의 Stock 테이블의 LSN 갭 계산 결과를 나타낸 그래프이다. 4 is a graph showing the LSN gap calculation result of the Stock table of the TPC-C workload according to an embodiment of the present invention.

도 4를 참조하면, X축은 페이지별 평균 LSN 갭 값을 의미하고, Y축은 쓰기 요청된 횟수를 의미한다. 도 4의 그래프에서 LSN 갭 이 짧은 페이지들은 Y값, 즉 쓰기 요청된 횟수의 값이 크다. 즉 LSN 갭 이 짧을수록 쓰기가 여러 번 요청되어 쓰기 관점에서 핫 하다고 볼 수 있다. 따라서 일 실시예에 따른 버퍼 컨트롤러는 Stock 테이블과 같이 쓰기 비대칭성이 높고 용량이 큰 테이블에 대해서 LSN 갭을 계산해 LSN 갭이 짧은 페이지만 추가 영역에 캐싱하였다.Referring to FIG. 4 , the X-axis means the average LSN gap value for each page, and the Y-axis means the number of write requests. In the graph of FIG. 4 , pages with a short LSN gap have a large Y value, that is, the number of write requests. In other words, the shorter the LSN gap, the more times the write is requested, which can be considered hot from the write point of view. Therefore, the buffer controller according to an embodiment calculates the LSN gap for a table with high write asymmetry and large capacity, such as the Stock table, and caches only pages with a short LSN gap in the additional area.

마지막으로 버퍼 컨트롤러는 순환 접근되는 페이지 중 어느 하나를 충족하는 경우 핫 페이지로 간주하여 상기 추가 버퍼에 저장한다. Finally, if the buffer controller satisfies any one of the circularly accessed pages, it is regarded as a hot page and stored in the additional buffer.

순환 접근되는 페이지는 트랜잭션을 수행하는 동안 주기적으로 접근된다. 따라서, 가능한 한 추가 버퍼 캐시에 유지하고 불필요한 Eviction을 막음으로써 SSD에 유발되는 쓰기 양을 줄일 수 있다. TPC-C 워크로드에서 New-Order 테이블이 이러한 특성을 가진다.Circularly accessed pages are accessed periodically during transaction execution. Therefore, it is possible to reduce the amount of writes caused to the SSD by keeping it in the additional buffer cache as much as possible and preventing unnecessary Eviction. In the TPC-C workload, the New-Order table has this characteristic.

다시 도 3으로 되돌아와서, 캐싱 관리 장치는 데이터베이스 서버에서 데이터 페이지를 요청받으면, 메인 버퍼 및 추가 버퍼에서 해당 페이지를 찾는다. 만약 페이지가 발견되면, 즉시 해당 페이지를 사용한다. 그렇지 않으면 해당 페이지를 저장장치인 스토리지에서 읽어온다. Returning to FIG. 3 again, when the caching management device receives a request for a data page from the database server, it searches for a corresponding page in the main buffer and the additional buffer. If a page is found, it is used immediately. Otherwise, the page is read from the storage device.

캐싱 관리 장치는 메인 버퍼에서 특정 페이지가 교체될 때, 미리 설정된 페이지 교체 알고리즘에 따라 희생 페이지를 선정한다. 여기서, 페이지 교체 알고리즘은 LRU 알고리즘일 수 있다. LRU 알고리즘은 페이징 기법으로 메모리를 관리하는 운영체제에서, 페이지 부재가 발생 하여 새로운 페이지를 할당하기 위해 현재 할당된 페이지 중 어느 것과 교체할지를 결정하는 방법으로, 프로세스가 주기억장치에 접근할 때마다 참조된 페이지에 대한 시간을 기록한다. When a specific page is replaced in the main buffer, the caching management device selects a victim page according to a preset page replacement algorithm. Here, the page replacement algorithm may be an LRU algorithm. The LRU algorithm is a method of determining which of the currently allocated pages to be replaced in order to allocate a new page when a page fault occurs in the operating system that manages memory using the paging technique. Whenever a process accesses the main memory, the referenced page record the time for

캐싱 관리 장치의 버퍼 컨트롤러는 희생 페이지가 dirty 페이지인 동시에 핫 한 페이지인 경우, SSD에 쓰거나 NVDIMM 버퍼 캐시에 써야 한다. 즉, 페이지를 어디에 저장할지 선택해야 하는데, 이는 전술한 핫 페이지에서 선정한 기준에 따른다. 즉, 버퍼 컨트롤러는 희생 페이지가 시간 지역성 또는 쓰기 비대칭성이 높거나 순환 접근되는 페이지라면 추가 버퍼 캐시에 저장한다. 그렇지 않으면, 해당 페이지를 스토리지에 저장한다. 캐싱 관리 장치의 버퍼 컨트롤러는 추가 버퍼의 캐시가 꽉 찼을 경우, LRU 교체 정책에 따라 가장 오랫동안 접근이 안 된 페이지부터 스토리지로 플러시 한다. 추가 버퍼에 다시 저장하는 등의 다른 옵션은 없으며, 이 경우엔 무조건 스토리지에 저장한다.The caching management unit's buffer controller must write to the SSD or write to the NVDIMM buffer cache when a victim page is both a dirty page and a hot page. That is, it is necessary to select where to store the page, which is based on the criteria selected in the above-mentioned hot page. That is, the buffer controller stores the victim page in an additional buffer cache if it is a page that has high temporal locality or write asymmetry or is accessed cyclically. Otherwise, save the page to storage. When the cache of the additional buffer is full, the buffer controller of the caching management device flushes the page that has not been accessed for a long time to the storage according to the LRU replacement policy. There is no other option, such as saving back to an additional buffer, in which case it will unconditionally save to storage.

전술한 바와 같이, 버퍼 컨트롤러는 메인 버퍼와 추가 버퍼를 둘 다 관리하며, 메인 버퍼와 추가 버퍼가 스토리지에 대한 선택적인 캐시 버퍼로 동작한다. 즉, 메인 버퍼에서 페이지가 쫓겨날 때, 해당 페이지가 쓰기 관점에서 얼마나 핫 한지를 판단하여 추가 버퍼에 저장되거나 스토리지에 저장된다. As described above, the buffer controller manages both the main buffer and the additional buffer, and the main buffer and the additional buffer act as an optional cache buffer for storage. That is, when a page is evicted from the main buffer, it is stored in an additional buffer or storage by determining how hot the page is from a write point of view.

버퍼 컨트롤러는 MySQL에 기반하여 메인 버퍼와 추가 버퍼를 관리한다. The buffer controller manages the main and additional buffers based on MySQL.

MySQL는 크게 2가지 리스트 (List)를 이용할 수 있다. 하나는 LRU 리스트로, 현재 버퍼 풀에서 사용되고 있는 페이지들을 관리하는 리스트다. 두 번째는 프리(Free) 리스트로, 현재 버퍼 풀이 사용하고 있지 않은 페이지들을 관리하는 리스트다. MySQL의 저장장치 엔진인 InnoDB의 경우, 사용할 수 있는 페이지를 찾기 위해 LRU 리스트를 탐색할 때 읽어 들일 새로운 페이지에 대한 정보를 이미 알고 있다. 즉, InnoDB는 테이블스페이스 (Tablespace) ID, 오프셋 (Offset), 페이지가 속한 버퍼 풀의 번호 등 읽을 페이지에 대한 정보를 이미 저장한 채로 LRU 리스트를 탐색한다. 본 발명의 발명자들은 이러한 버퍼관리 방식을 활용해 NVDIMM 캐싱 기법을 MySQL에 구현하였다.MySQL can use two types of lists. One is the LRU list, which manages pages currently being used in the buffer pool. The second is a free list, which manages pages that are not currently being used by the buffer pool. In the case of InnoDB, MySQL's storage engine, it already knows information about the new page to read when traversing the LRU list to find available pages. That is, InnoDB searches the LRU list while already storing information about the page to be read, such as tablespace ID, offset, and the number of the buffer pool to which the page belongs. The inventors of the present invention implemented the NVDIMM caching technique in MySQL using this buffer management method.

MySQL의 버퍼 캐시는 기본적으로 DRAM 영역에 할당되므로, 본 발명의 일 실시예에 따른 캐싱 관리 장치는 종래 버퍼 관리자 구조에 추가 버퍼 캐시 모듈을 추가 구현했다.Since the buffer cache of MySQL is basically allocated to the DRAM area, the caching management apparatus according to an embodiment of the present invention additionally implements an additional buffer cache module in the conventional buffer manager structure.

본 발명의 일 실시예에 따른 캐싱 관리 장치는 기존 버퍼 할당 코드를 응용해 NVDIMM 영역에 버퍼 캐시를 할당했다. 그리고 NVDIMM 버퍼 캐시에서 페이지에 대한 업데이트도 이루어지기 때문에 페이지 탐색에 사용되는 해시 테이블 (Hash Table), 페이지의 일관성을 위한 락 (Lock) 데이터, 메타데이터 등 버퍼관리에 필요한 자료구조도 함께 할당했다. NVDIMM 버퍼 캐시의 크기는 전체 데이터베이스 크기의 4%로 매우 작은 양에 해당한다.The caching management apparatus according to an embodiment of the present invention allocates the buffer cache to the NVDIMM area by applying the existing buffer allocation code. In addition, since pages are updated in the NVDIMM buffer cache, data structures necessary for buffer management such as a hash table used for page navigation, lock data for page consistency, and metadata are also allocated. The size of the NVDIMM buffer cache is 4% of the total database size, which is a very small amount.

기존 읽기 요청 처리 모듈은 읽기 요청의 대상이 되는 페이지가 DRAM 버퍼 풀에 존재하면 DRAM 버퍼 풀에서 해당 페이지를 읽어오고, 그렇지 않으면 저장장치에서 읽어온다. 기본적으로 해시 테이블 기반으로 페이지를 버퍼에서 탐색한다.The existing read request processing module reads the page from the DRAM buffer pool if the page that is the target of the read request exists in the DRAM buffer pool. Otherwise, it reads the page from the storage device. Basically, pages are searched in the buffer based on a hash table.

발명의 일 실시예에 따른 캐싱 관리 장치는 메인 버퍼인 DRAM 버퍼에서 쫓겨난 페이지들 일부는 스토리지에 쓰이지 않고 추가 버퍼인 NVDIMM 버퍼 캐시에 저장된다. 따라서 NVDIMM 버퍼에 캐싱된 페이지들에 대한 읽기 요청을 처리하는 모듈이 필요하다. 이러한 페이지들의 최신 버전은 NVDIMM 버퍼 안에 있으므로, 스토리지에서 해당 페이지를 읽어오면 예전 버전의 페이지를 읽는 것이 된다. 따라서 일실시예에서는 NVDIMM 버퍼 안의 페이지들에 대한 읽기 요청이 오면, NVDIMM 버퍼에서 해당 페이지를 읽어가도록 한다. NVDIMM 버퍼도 DRAM 버퍼처럼 데이터에 대한 업데이트가 가능하므로, 데이터를 찾아 읽어오는 위치만 다를 뿐 두 버퍼 모두 버퍼관리 관점에서 동일하게 동작한다. In the caching management apparatus according to an embodiment of the present invention, some of the pages expelled from the DRAM buffer, which is the main buffer, are not used in storage and are stored in the NVDIMM buffer cache, which is an additional buffer. Therefore, a module that handles read requests for pages cached in the NVDIMM buffer is required. The latest version of these pages is in the NVDIMM buffer, so reading the page from storage means reading an older version of the page. Therefore, in one embodiment, when a read request for pages in the NVDIMM buffer is received, the corresponding page is read from the NVDIMM buffer. Since NVDIMM buffers can update data like DRAM buffers, both buffers operate the same in terms of buffer management, except that the location to find and read data is different.

일 실시예에서 버퍼 컨트롤러는 DRAM 버퍼에서 페이지가 쫓겨날 때 해당 페이지를 NVDIMM 버퍼에 캐싱할지 저장장치에 쓸지 판단한다. NVDIMM 버퍼에 캐싱할 만큼 충분히 핫 하다고 판단되는 경우에만 페이지를 NVDIMM 버퍼로 옮긴다. In one embodiment, when a page is evicted from the DRAM buffer, the buffer controller determines whether to cache the page in the NVDIMM buffer or write it to storage. Pages are moved to the NVDIMM buffer only when it is determined to be hot enough to cache in the NVDIMM buffer.

이를 위해, 버퍼 컨트롤러는 먼저 DRAM 버퍼에서 페이지가 쫓겨날 때, 해당 페이지가 이전에 고안한 3가지 기준 중 하나라도 충족하는지 확인한다. 기준에 해당한다면, NVDIMM 버퍼 캐시의 프리(free) 리스트에서 사용 가능한 버퍼 프레임 하나를 가져온다. 그다음, 옮길 페이지의 내용을 가져온 버퍼 프레임에 복사한 후, NVDIMM 버퍼에 해당 버퍼 페이지를 삽입한다. 기존 DRAM 버퍼에서 해당 페이지 프레임 내용을 가지고 있던 페이지는 즉시 내용을 지우고, 빈 페이지는 DRAM 버퍼의 프리 리스트에 삽입한다. To do this, the buffer controller first checks that when a page is evicted from the DRAM buffer, it meets at least one of three previously devised criteria. If the criteria are met, one free buffer frame is taken from the free list of the NVDIMM buffer cache. Then, after copying the contents of the page to be moved to the imported buffer frame, insert the corresponding buffer page into the NVDIMM buffer. Pages that have the corresponding page frame contents in the existing DRAM buffer are immediately deleted, and empty pages are inserted into the free list of the DRAM buffer.

일 실시예에서 NVDIMM 버퍼를 추가 구현했기 때문에, NVDIMM 버퍼의 dirty 페이지를 저장장치로 플러시 하는 백그라운드 플러셔(Background Flusher)를 포함한다. 이로써, NVDIMM 버퍼의 페이지들을 백그라운드 작업으로 저장장치에 쓸 수 있도록 구현했다. In one embodiment, since the NVDIMM buffer is additionally implemented, it includes a background flusher that flushes dirty pages of the NVDIMM buffer to the storage device. In this way, the pages of the NVDIMM buffer can be written to the storage device as a background task.

이 백그라운드 플러셔는 1000ms마다 또는 플러시 하라는 이벤트를 받았을 때 플러시 작업을 수행한다. 즉, 주기적으로 플러시 작업을 수행하지만 NVDIMM 버퍼에 페이지를 삽입하려고 했을 때 프리 리스트가 비어 있으면, 포어그라운드 스레드 (Foreground Thread)가 백그라운드 플러셔에게 플러시 하라는 이벤트를 보낸다. 플러셔는 NVDIMM 버퍼를 탐색하면서 일정한 양 (기본적으로, 1024개)의 페이지를 프리 페이지로 만드는 작업을 수행한다. 클린(Clean) 페이지의 경우, 페이지 내용을 지우고 해당 페이지를 바로 프리 리스트에 삽입해 다른 스레드가 사용할 수 있도록 한다. Dirty 페이지의 경우, 먼저 저장장치에 해당 페이지를 플러시하고, 확실히 쓰인 후에 페이지 내용을 지우고 해당 페이지를 프리 리스트에 삽입한다.This background flusher flushes every 1000ms or when it receives an event to flush. That is, if a flush operation is performed periodically, but the free list is empty when a page is inserted into the NVDIMM buffer, the foreground thread sends an event to the background flusher to flush. As the flusher scans the NVDIMM buffer, it frees up a certain amount (by default, 1024) of pages. In the case of a clean page, the contents of the page are deleted and the page is directly inserted into the free list so that other threads can use it. In the case of dirty pages, the page is first flushed to the storage device, and after it has been written, the page contents are erased and the page is inserted into the free list.

도 5는 본 발명의 일 실시예에 따른 NVDIMM 캐싱 기준을 알고리즘을 나타낸 흐름도이다. 5 is a flowchart illustrating an algorithm for NVDIMM caching criteria according to an embodiment of the present invention.

도 5를 참조하면, 단계 S100에서 버퍼 컨트롤러는 DRAM 버퍼 캐시에서 쫓겨난 희생 페이지의 저장 위치 판단을 시작한다. Referring to FIG. 5 , in step S100 , the buffer controller starts determining the storage location of the victim page evicted from the DRAM buffer cache.

단계 S110에서, 희생 페이지의 시간 지역성이 높은지 확인하고, 시간 지역성이 높다고 판단되면 NVDIMM 버퍼에 저장하기로 결정하고 알고리즘을 종료한다. In step S110, it is checked whether the temporal locality of the victim page is high, and if it is determined that the temporal locality is high, it is determined to be stored in the NVDIMM buffer, and the algorithm is terminated.

단계 S110에서, 희생 페이지의 시간 지역성이 높지 않다고 판단되면 단계 S120으로 진행하여, 희생 페이지의 쓰기 비대칭성이 높은지 확인한다. 희생 페이지의 쓰기 비대칭성이 높다고 판단되면, NVDIMM 버퍼에 저장하기로 결정하고 알고리즘을 종료한다. If it is determined in step S110 that the temporal locality of the victim page is not high, the process proceeds to step S120 and it is checked whether the write asymmetry of the victim page is high. If it is determined that the write asymmetry of the victim page is high, it decides to store it in the NVDIMM buffer and terminates the algorithm.

단계 S120에서, 희생 페이지의 쓰기 비대칭성이 높지 않다고 판단되면 단계 S130으로 진행하여, 희생 페이지가 순환 접근 되는지 판단한다. 희생 페이지가 순환 접근된다고 판단되면 NVDIMM 버퍼에 저장하기로 결정하고 알고리즘을 종료한다. If it is determined in step S120 that the write asymmetry of the victim page is not high, the process proceeds to step S130 to determine whether the victim page is cyclically accessed. If it is determined that the victim page is being accessed circularly, it decides to store it in the NVDIMM buffer and terminates the algorithm.

단계 S130에서, 희생 페이지가 순환 접근 되지 않는다고 판단되면, SSD에 저장한다. In step S130, if it is determined that the victim page is not cyclically accessed, it is stored in the SSD.

이와 같이, 본 발명의 일 실시예에서는 NVDIMM에 캐싱할 페이지를 구분해 저장하므로 DRAM과 NVDIMM에 저장되는 데이터는 그 특징에 있어서 차이가 있다. DRAM 버퍼에는 페이지의 hot/cold 정도의 구분 없이 데이터베이스 서버에서 요청하는 데이터가 저장된다. 반면, NVDIMM 버퍼에는 현재 워크로드 상에서 쓰기 관점에서 핫 하다고 생각되는 데이터가 위의 3가지 기준(시간 지역성, 쓰기 비대칭성, 순환 접근성)을 기반으로 저장된다. 즉, 두 버퍼 캐시 모두 데이터베이스 서버에서 사용되는 버퍼 캐시지만, 데이터의 특성에 따라 해당 데이터가 최종적으로 저장되는 위치가 달라진다.As described above, in an embodiment of the present invention, since pages to be cached are stored separately in the NVDIMM, data stored in the DRAM and the NVDIMM are different in characteristics. The data requested by the database server is stored in the DRAM buffer regardless of whether the page is hot or cold. On the other hand, data that is considered hot from a write point of view on the current workload is stored in the NVDIMM buffer based on the above three criteria (time locality, write asymmetry, and circular accessibility). In other words, both buffer caches are buffer caches used in the database server, but the location where the data is finally stored varies depending on the characteristics of the data.

도 6은 본 발명의 일 실시예에 따른 캐싱 관리 장치의 성능을 나타내는 그래프이다. 도 6은 본 발명의 일 실시예에 따른 캐싱 관리 장치의 DRAM 및 NVDIMM의 크기를 변경해가면서 TPC-C 수행한 결과이다. 6 is a graph showing the performance of the caching management apparatus according to an embodiment of the present invention. 6 is a result of performing TPC-C while changing the size of DRAM and NVDIMM of the caching management device according to an embodiment of the present invention.

실험은 로그와 데이터를 분리해 진행되었다. 데이터 저장장치로 Samsung 970 PRO NVMe SSD를 사용했고, 로그 저장장치로 Samsung 850 PRO SSD를 사용했다. 자세한 실험 환경은 다음과 같다.The experiment was conducted by separating log and data. A Samsung 970 PRO NVMe SSD was used as a data storage device, and a Samsung 850 PRO SSD was used as a log storage device. The detailed experimental environment is as follows.

● OS: Ubuntu 16.04.5 LTS● OS: Ubuntu 16.04.5 LTS

● CPU: Intel Xeon(R) CPU E5-2640 v3 @ 2.60GHz, Total 32 cores● CPU: Intel Xeon(R) CPU E5-2640 v3 @ 2.60GHz, Total 32 cores

● Memory: 32GB● Memory: 32GB

● Netlist NVDIMM-N 16G● Netlist NVDIMM-N 16G

● MySQL 버전: 5.7.24● MySQL version: 5.7.24

● 로그용 디바이스: Samsung 850 PRO SSD 256GB● Logging device: Samsung 850 PRO SSD 256GB

● 데이터용 디바이스: Samsung 970 PRO NVMe SSD 512GB● Device for data: Samsung 970 PRO NVMe SSD 512GB

● 워크로드: TPC-C (tpcc-mysql), LinkBench● Workload: TPC-C (tpcc-mysql), LinkBench

NVDIMM 캐싱 기법의 효과를 확인하기 위해 TPC-C 워크로드와 LinkBench 워크로드를 사용하였다. TPC-C는 전통적인 OLTP 워크로드이고 LinkBench는 Facebook의 소셜 네트워크 그래프 데이터를 기반으로 한 워크로드이다. 각 워크로드의 자세한 실험 환경 설정 내용은 다음과 같다.To verify the effectiveness of the NVDIMM caching technique, TPC-C workload and LinkBench workload were used. TPC-C is a traditional OLTP workload and LinkBench is a workload based on Facebook's social network graph data. The detailed experimental environment settings for each workload are as follows.

● TPC-C● TPC-C

500개의 warehouse를 갖는 TPC-C 데이터베이스를 생성했으며, 크기는 약 50GB다. 동시에 동작하는 유저는 32개이며 벤치마크를 수행한 시간은 5,400초다.I created a TPC-C database with 500 warehouses, and the size is about 50 GB. There are 32 users running at the same time, and the time to run the benchmark is 5,400 seconds.

● LinkBench● LinkBench

5천만 노드를 갖는 LinkBench 데이터베이스를 생성했으며, 크기는 약 64GB다. 동시에 일을 하는 유저는 32개이며, 유저 당 500,000개의 요청을 처리하도록 설정했다.We have created a LinkBench database with 50 million nodes, which is about 64 GB in size. We have 32 concurrent users, and we set it to handle 500,000 requests per user.

성능평가 결과Performance evaluation result

성능평가 시, NVDIMM의 단위 용량당 가격은 DRAM의 약 3배이다. 따라서 NVDIMM 1GB 대신 DRAM 3GB를 추가했을 때의 성능이 얼마나 차이가 나는지 비교할 필요가 있다. 성능평가 주요항목은 트랜잭션 처리량과 쓰기 감소량이다. 트랜잭션 처리량의 지표로 TPC-C에서는 TpmC (Transactions per minute Count) 값을 활용하고, LinkBench에서는 TPS (Transactions Per Second) 값을 활용한다. 추가로, 시스템 전반적인 성능과 I/O 처리 성능을 확인하기 위해 리눅스의 iostat 툴로 CPU 사용률 및 읽기 및 쓰기 bandwidth, I/O 사용률 등을 측정하였다. 자세한 실험 결과는 다음과 같다.In performance evaluation, the price per unit capacity of NVDIMM is about three times that of DRAM. Therefore, it is necessary to compare the performance difference when adding 3GB of DRAM instead of 1GB of NVDIMM. The main items of performance evaluation are transaction throughput and write reduction. As an indicator of transaction throughput, TpmC (Transactions per minute Count) value is used in TPC-C, and TPS (Transactions Per Second) value is used in LinkBench. In addition, to check the overall system performance and I/O processing performance, the CPU usage rate, read and write bandwidth, and I/O usage rate were measured with the iostat tool of Linux. The detailed experimental results are as follows.

다음 표 1은 TPC-C 상에서 NVDIMM 캐싱 기법 성능평가 결과를 나타낸 표이다. Table 1 below shows the results of NVDIMM caching technique performance evaluation on TPC-C.

TypeType 11GB DRAM11GB DRAM 5GB DRAM
+ 2GB NVDIMM
5GB DRAM
+ 2GB NVDIMM
8GB DRAM
+ 1GB NVDIMM
8GB DRAM
+ 1GB NVDIMM
Final TPSFinal TPS 541541 1403 (2.59x) 1403 (2.59x) 2112 (3.90x) 2112 (3.90x) TpmCTpmC 3627836278 70330 (1.94x) 70330 (1.94x) 127053 (3.50x) 127053 (3.50x) Avg. rMB/sAvg. rMB/s 14.7714.77 46.0046.00 71.8071.80 Avg. rKB/s/TrxAvg. rKB/s/Trx 4.524.52 7.27 (+61%) 7.27 (+61%) 6.28 (+39%) 6.28 (+39%) Avg. wMB/sAvg. wMB/s 26.3626.36 43.2043.20 65.3065.30 Avg. wKB/s/TrxAvg. wKB/s/Trx 8.078.07 6.82 (-15%) 6.82 (-15%) 5.71 (-29%) 5.71 (-29%) Avg. I/O UtilizationAvg. I/O Utilization 57.7457.74 72.5472.54 70.2170.21 Avg. CPU UtilizationAvg. CPU Utilization 20.4720.47 49.8649.86 64.2964.29

TPC-C 워크로드를 사용해 NVDIMM 캐싱 기법의 성능평가를 수행한 결과는 도 5 및 표 1과 같다. 도 5에서 X축은 10초 단위의 시간을 의미하며 Y축은 10초 동안 처리한 트랜잭션의 양을 의미한다. 즉, Y축 값이 클수록 같은 시간 동안 더 많은 트랜잭션을 처리하여 성능이 좋다는 것을 의미한다. 전술한 바와 같이, NVDIMM의 단위 용량당 가격은 DRAM의 3배이다. 따라서 본 실험에서는 경제적 비용을 고려해 DRAM 5G + NVDIMM 2G, DRAM 8G + NVDIMM 1G, DRAM 11G 3가지 경우의 성능을 비교했다. DRAM 11G의 경우엔 NVDIMM 영역을 사용하지 않으므로, NVDIMM 캐싱 기술을 사용하지 않는 것과 같다.The results of performing the performance evaluation of the NVDIMM caching technique using the TPC-C workload are shown in FIG. 5 and Table 1. In FIG. 5 , the X-axis means time in units of 10 seconds, and the Y-axis means the amount of transactions processed for 10 seconds. In other words, the larger the Y-axis value, the better the performance by processing more transactions in the same time. As mentioned above, the price per unit capacity of NVDIMM is three times that of DRAM. Therefore, in this experiment, considering the economic cost, the performance of DRAM 5G + NVDIMM 2G, DRAM 8G + NVDIMM 1G, and DRAM 11G was compared. In the case of DRAM 11G, NVDIMM area is not used, so it is the same as not using NVDIMM caching technology.

실험 결과, DRAM만 사용한 경우는 NVDIMM 캐싱 기법을 사용한 나머지 두 경우보다 성능이 확연히 떨어졌다. DRAM 5G + NVDIMM 2G의 경우, DRAM 11G보다 최대 2.6배 성능이 향상되었고 트랜잭션 당 쓰기 양은 15% 감소했다. DRAM 8G + NVDIMM 1G의 경우, DRAM 11G보다 최대 3.9배 성능이 향상되었고 트랜잭션 당 쓰기 양은 29% 감소했다. 즉, 본 발명의 일 실시예에 따른 추가 버퍼를 사용한 NVDIMM 캐싱 기법을 적용했을 때 트랜잭션 당 쓰기 양이 감소해 SSD에 유발되는 쓰기 양이 감소했을 뿐만 아니라, 트랜잭션 처리량도 2.6~3.9배 증가하였다. 또한, 트랜잭션 처리량이 늘어 시스템의 I/O 활용률은 기존 58%에서 73%까지 증가하였고, CPU 활용률도 기존 21%에서 64%까지 향상되었음을 알 수 있다.As a result of the experiment, when only DRAM was used, the performance was significantly lower than the other two cases using the NVDIMM caching technique. In the case of DRAM 5G + NVDIMM 2G, performance is improved up to 2.6 times compared to DRAM 11G, and the amount of writes per transaction is reduced by 15%. For DRAM 8G + NVDIMM 1G, performance is improved up to 3.9 times compared to DRAM 11G, and the amount of writes per transaction is reduced by 29%. That is, when the NVDIMM caching technique using an additional buffer according to an embodiment of the present invention is applied, the amount of writes per transaction is reduced, so not only the amount of writes induced to the SSD is reduced, but also the transaction throughput is increased by 2.6 to 3.9 times. In addition, it can be seen that the I/O utilization rate of the system increased from 58% to 73% as the transaction throughput increased, and the CPU utilization rate also improved from 21% to 64%.

도 7은 본 발명의 일 실시예에 따른 캐싱 관리 장치의 성능을 나타내는 그래프이다. 도 7은 본 발명의 일 실시예에 따른 캐싱 관리 장치의 DRAM 및 NVDIMM의 크기를 변경해가면서 LinkBench 수행한 결과이다. 7 is a graph showing the performance of the caching management apparatus according to an embodiment of the present invention. 7 is a result of performing LinkBench while changing the size of DRAM and NVDIMM of the caching management device according to an embodiment of the present invention.

도 7의 X축은 1초 단위의 시간을 의미하며 Y축은 1초 동안 처리한 트랜잭션의 양을 의미한다. 즉, Y축 값이 클수록 같은 시간 동안 더 많은 트랜잭션을 처리하여 성능이 좋다는 것을 의미한다. TPC-C 실험과 마찬가지로 경제적 비용을 고려해 DRAM 5G + NVDIMM 2G, DRAM 8G + NVDIMM 1G, DRAM 11G 3가지 경우의 성능을 비교했다. DRAM 11G의 경우엔 NVDIMM 영역을 사용하지 않으므로, NVDIMM 캐싱 기술을 사용하지 않는 것과 같다.The X-axis of FIG. 7 means time in units of one second, and the Y-axis means the amount of transactions processed in one second. In other words, the larger the Y-axis value, the better the performance by processing more transactions in the same time. Similar to the TPC-C experiment, the performance of DRAM 5G + NVDIMM 2G, DRAM 8G + NVDIMM 1G, and DRAM 11G was compared in consideration of economic costs. In the case of DRAM 11G, NVDIMM area is not used, so it is the same as not using NVDIMM caching technology.

실험 결과, LinkBench 워크로드에서도 DRAM만 사용한 경우는 NVDIMM 캐싱 기법을 사용한 경우보다 성능이 떨어졌다. DRAM 5G + NVDIMM 2G의 경우, DRAM 11G보다 최대 2.8배 성능이 향상되었고 트랜잭션 당 쓰기 양은 51% 감소했다. DRAM 8G + NVDIMM 1G의 경우, DRAM 11G보다 최대 2.9배 성능이 향상되었고 트랜잭션 당 쓰기 양은 50% 감소했다. 즉, LinkBench 워크로드 상에서 NVDIMM 캐싱 기법을 적용해 SSD에 유발되는 쓰기 양을 줄였을 뿐만 아니라, 트랜잭션 처리량도 2.8~2.9배 향상했다. 시스템의 I/O 활용률은 기존 46%에서 78%까지 증가하였고, CPU 활용률도 기존 20%에서 47%까지 향상되었다.As a result of the experiment, even in the LinkBench workload, the DRAM-only performance was inferior to the NVDIMM caching technique. For DRAM 5G + NVDIMM 2G, performance is improved up to 2.8 times compared to DRAM 11G, and the amount of writes per transaction is reduced by 51%. In the case of DRAM 8G + NVDIMM 1G, performance is up to 2.9 times higher than that of DRAM 11G, and the amount of writes per transaction is reduced by 50%. In other words, by applying the NVDIMM caching technique on LinkBench workloads, not only the amount of writes induced to the SSD was reduced, but also the transaction throughput was improved by 2.8 to 2.9 times. The system's I/O utilization has increased from 46% to 78%, and the CPU utilization has also improved from 20% to 47%.

다음 표 2는 LinkBench 상에서 NVDIMM 캐싱 기법 성능평가 결과를 나타낸 표이다. Table 2 below shows the results of NVDIMM caching technique performance evaluation on LinkBench.

[표 2][Table 2]

Figure pat00001
Figure pat00001

표 2를 참조하면, 성능평가 결과, TPC-C와 LinkBench 워크로드 모두 NVDIMM 캐싱 기법을 적용한 경우가 그렇지 않은 경우 대비 최소 2.6배에서 최대 3.9배 성능을 개선했다. 트랜잭션 처리량뿐만 아니라, 시스템의 CPU 및 I/O 활용률도 개선해 NVDIMM 캐싱 기법이 전반적인 시스템 성능에 이점을 갖는다는 것을 증명했다. 그리고 SSD에 유발하는 쓰기 양도 트랜잭션 당 15%에서 최대 51%까지 줄여 성능 향상뿐만 아니라 궁극적인 목표를 달성한 것을 알 수 있다. Referring to Table 2, as a result of performance evaluation, both TPC-C and LinkBench workloads improved performance by at least 2.6 times and up to 3.9 times when NVDIMM caching was applied compared to the case where NVDIMM caching was not applied. In addition to improving transaction throughput, it also improved the system's CPU and I/O utilization, demonstrating that the NVDIMM caching technique has benefits for overall system performance. And it can be seen that the amount of writes caused to the SSD was reduced from 15% to a maximum of 51% per transaction, not only improving performance, but also achieving the ultimate goal.

이와 같이 본 발명의 일 실시예에 따른 캐싱 관리 장치 및 방법에 따르면, 많은 양의 쓰기 요청을 발생시키는 핫(hot) 한 페이지를 구별하여 NVDIMM 영역에 캐싱함으로써, SSD와 같은 저장장치에 발생하는 쓰기 양을 줄일 수 있다. 이러한 쓰기 양 감소로 SSD 상에서 데이터베이스를 구동할 때 발생하는 읽기 블락킹(Read Blocking) 문제가 해결돼 트랜잭션의 지연시간 (Latency)이 짧아진다. 궁극적으로 단위 시간당 처리하는 트랜잭션의 양이 증가해 전체적인 성능이 향상된다. 또한, 트랜잭션을 활발하게 처리하기 때문에 시스템의 I/O 및 CPU 활용률도 향상된다.As described above, according to the caching management apparatus and method according to an embodiment of the present invention, by discriminating a hot page that generates a large amount of write requests and caching it in the NVDIMM area, writes occurring in a storage device such as an SSD quantity can be reduced. By reducing the amount of writes, the read blocking problem that occurs when running the database on the SSD is solved, and the latency of the transaction is shortened. Ultimately, the amount of transactions processed per unit time increases, improving overall performance. In addition, the system's I/O and CPU utilization are improved because transactions are actively processed.

또한, DRAM과 SSD 사이에 비휘발성인 NVDIMM 영역을 버퍼 캐시로 활용함으로써 기존의 DRAM + SSD 기반 구조를 충분히 활용하면서도 많은 양의 업데이트를 흡수할 수 있다. 이를 통해, 본 발명의 기술 구현에 사용한 MySQL 외에 다른 데이터베이스 상에서도 같은 방식으로 NVDIMM을 활용할 수 있다.In addition, by utilizing the non-volatile NVDIMM area between DRAM and SSD as a buffer cache, it is possible to absorb a large amount of updates while fully utilizing the existing DRAM + SSD infrastructure. Through this, NVDIMM can be utilized in the same way on other databases other than MySQL used for implementing the technology of the present invention.

또한, NVDIMM 영역은 비휘발성이기 때문에 NVDIMM에 쓰인 페이지에 대해선 REDO 로그를 쓰지 않아도 되므로, 로깅에 대한 오버헤드가 줄어 이에 따른 성능 향상되며, 이로써, 로그 버퍼에 접근할 횟수도 줄어 로그 버퍼에 대한 병목 문제도 피할 수 있게 된다.In addition, since the NVDIMM area is non-volatile, it is not necessary to write the redo log for the pages written to the NVDIMM, so the overhead for logging is reduced and thus the performance is improved. problems can be avoided.

쓰기 관점에서 핫 한 페이지를 구별해내는 기준을 다른 계층에서도 적용할 수 있다. 예를 들어, 본 발명에서는 데이터베이스의 저장장치 엔진(Storage Engine) 레벨에서 NVDIMM 영역에 캐싱할 페이지를 판단하는 용도로 고안한 기준을 사용했지만, 하위 계층인 OS 레벨 또는 FTL 레벨에서도 본 발명의 기준을 활용해 핫한 페이지를 따로 캐싱하거나 특정 블록에 모아서 저장하도록 응용할 수 있다.The criteria for distinguishing hot pages from a write point of view can be applied to other layers as well. For example, in the present invention, the standard designed for determining the page to be cached in the NVDIMM area at the storage engine level of the database is used, but the standard of the present invention is also applied at the lower OS level or FTL level. It can be used to cache hot pages separately or to store them in a specific block.

이상의 설명은 본 발명의 기술 사상을 예시적으로 설명한 것에 불과한 것으로, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 사람이라면 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것이다. 따라서, 본 발명에 실행된 실시예들은 본 발명의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 의하여 본 발명의 기술 사상의 범위가 한정되는 것은 아니다. 본 발명의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 발명의 권리범위에 포함되는 것으로 해석되어야 할 것이다.The above description is merely illustrative of the technical idea of the present invention, and a person of ordinary skill in the art to which the present invention pertains may make various modifications and variations without departing from the essential characteristics of the present invention. Accordingly, the embodiments carried out in the present invention are not intended to limit the technical spirit of the present invention, but to explain, and the scope of the technical spirit of the present invention is not limited by these embodiments. The protection scope of the present invention should be construed by the following claims, and all technical ideas within the equivalent range should be construed as being included in the scope of the present invention.

Claims (13)

휘발성 메모리를 이용하는 메인 버퍼;
메인 버퍼와 동일 처리 속도를 갖는 비휘발성 메모리를 이용하는 추가 버퍼;
상기 메인 버퍼보다 큰 저장 용량을 갖는 비휘발성 메모리를 이용하는 스토리지; 및
상기 메인 버퍼에 저장되지 못하는 희생 페이지를 시간 지역성, 쓰기 비대칭성 및 순환 접근성에 기초하여 상기 추가 버퍼 또는 스토리지에 선택적으로 저장하는 버퍼 컨트롤러
를 포함하는 캐시 관리 장치.
a main buffer using volatile memory;
an additional buffer using a non-volatile memory having the same processing speed as the main buffer;
storage using a non-volatile memory having a larger storage capacity than the main buffer; and
A buffer controller that selectively stores a victim page that cannot be stored in the main buffer in the additional buffer or storage based on temporal locality, write asymmetry, and circular accessibility
A cache management device comprising a.
제1항에 있어서,
상기 버퍼 컨트롤러는 미리 설정된 타임 윈도우 안의 페이지, 미리 설정된 기준 이상의 쓰기 비대칭성을 갖는 페이지, 순환 접근되는 페이지 중 어느 하나를 충족하는 경우 핫 페이지로 판단하여 상기 추가 버퍼에 저장하는 것을 특징으로 하는 캐시 관리 장치.
The method of claim 1,
The buffer controller determines to be a hot page when any one of a page within a preset time window, a page having a write asymmetry greater than a preset reference, and a page accessed cyclically, is determined and stored in the additional buffer. Device.
제1항에 있어서,
상기 버퍼 컨트롤러는 데이터베이스 서버로부터 데이터 페이지를 요청받으면, 버퍼 리스트에 기초하여 요청된 페이지를 검색하며,
상기 버퍼 리스트는 상기 메인 버퍼 및 상기 추가 버퍼에 저장된 페이지의 관리 정보를 저장하는 것을 특징으로 하는 캐시 관리 장치.
According to claim 1,
When the buffer controller receives a data page request from the database server, it searches for the requested page based on the buffer list,
The buffer list stores management information of pages stored in the main buffer and the additional buffer.
제3항에 있어서,
상기 관리 정보는 테이블스페이스 식별자, 오프셋, 페이지가 속한 버퍼 풀의 번호를 포함하는 것을 특징으로 하는 캐시 관리 장치.
4. The method of claim 3,
wherein the management information includes a tablespace identifier, an offset, and a buffer pool number to which the page belongs.
제1항에 있어서,
상기 버퍼 컨트롤러는 상기 추가 버퍼의 캐시가 풀(full)인 경우, 가장 오랫동안 접근이 안된 페이지부터 스토리지로 플러시하는 것을 특징으로 하는 캐시 관리 장치.
According to claim 1,
and the buffer controller flushes the page that has not been accessed for a long time to the storage when the cache of the additional buffer is full.
제1항에 있어서,
상기 버퍼 컨트롤러는 쓰기 비대칭성을 갖는 페이지의 용량이 미리 설정된 기준을 초과하는 경우, LSN(Log Sequence Number) 값에 기초하여 핫 페이지를 판단하는 것을 특징으로 하는 캐시 관리 장치.
According to claim 1,
and the buffer controller determines a hot page based on a log sequence number (LSN) value when a capacity of a page having write asymmetry exceeds a preset criterion.
제1항에 있어서,
상기 메인 버퍼는 DRAM(dynamic random access memory)이고,
상기 추가 버퍼는 NVDIMMM(Non-Volatile Double In-line Memory Module)인 것을 특징으로 하는 캐시 관리 장치.
The method of claim 1,
The main buffer is a dynamic random access memory (DRAM),
The additional buffer is a cache management device, characterized in that NVDIMMM (Non-Volatile Double In-line Memory Module).
메인버퍼, 추가 버퍼, 스토리지를 포함하는 캐시 관리 장치의 캐시 관리 방법으로서,
상기 메인 버퍼에 저장되지 못하는 희생 페이지가 발생하면, 상기 희생 페이지가 시간 지역성, 쓰기 비대칭성, 순환 접근성에 기초하여 핫 페이지인지 판단하는 단계; 및
핫 페이지라고 판단되면 상기 추가 버퍼에 저장하고, 핫 페이지가 아니라고 판단되면 상기 스토리지에 저장하는 단계
를 포함하고,
상기 메인 버퍼는 휘발성 메모리를 이용하고, 상기 추기 버퍼는 상기 메인 버퍼와 동일 처리 속도를 갖는 비휘발성 메모리를 이용하며, 상기 스토리지는 상기 메인 버퍼보다 더 큰 저장 용량을 갖는 비휘발성 메모리를 이용하는 것을 특징으로 하는 캐시 관리 방법.
A cache management method of a cache management device including a main buffer, an additional buffer, and storage, the method comprising:
when a victim page that cannot be stored in the main buffer occurs, determining whether the victim page is a hot page based on temporal locality, write asymmetry, and circular accessibility; and
If it is determined that the page is a hot page, storing it in the additional buffer, and if it is determined that it is not a hot page, storing it in the storage.
including,
The main buffer uses a volatile memory, the write-once buffer uses a nonvolatile memory having the same processing speed as the main buffer, and the storage uses a nonvolatile memory having a larger storage capacity than the main buffer How to manage cache.
제8항에 있어서,
상기 핫 페이지인지 판단하는 단계는,
미리 설정된 타임 윈도우 안의 페이지, 미리 설정된 기준 이상의 쓰기 비대칭성을 갖는 페이지, 순환 접근되는 페이지 중 어느 하나를 충족하는 경우 핫 페이지로 판단하는 것을 특징으로 하는 캐시 관리 방법.
9. The method of claim 8,
The step of determining whether the page is a hot page,
A cache management method, characterized in that, when any one of a page within a preset time window, a page having write asymmetry greater than or equal to a preset criterion, and a page being cycledly accessed is satisfied, it is determined as a hot page.
제8항에 있어서,
데이터베이스 서버로부터 데이터 페이지를 요청받으면, 버퍼 리스트에 기초하여 요청된 페이지를 검색하는 단계
를 더 포함하며,
상기 버퍼 리스트는 상기 메인 버퍼 및 상기 추가 버퍼에 저장된 페이지의 관리 정보를 저장하는 것을 특징으로 하는 캐시 관리 방법.
9. The method of claim 8,
retrieving the requested page based on the buffer list when the data page is requested from the database server
further comprising,
The buffer list stores management information of pages stored in the main buffer and the additional buffer.
제8항에 있어서,
상기 저장하는 단계에서
상기 핫 페이지를 상기 추가 버퍼에 저장하려 할 때, 상기 추가 버퍼의 캐시가 풀(full)인 경우, 가장 오랫동안 접근이 안된 페이지를 스토리지로 플러시하는 것을 특징으로 하는 캐시 관리 방법.
9. The method of claim 8,
In the storing step
When the hot page is to be stored in the additional buffer, if the cache of the additional buffer is full, the page that has not been accessed for a long time is flushed to the storage.
제9항에 있어서,
상기 상기 핫 페이지인지 판단하는 단계는,
쓰기 비대칭성을 갖는 페이지의 용량이 미리 설정된 기준을 초과하는 경우, LSN(Log Sequence Number) 값에 기초하여 핫 페이지를 판단하는 것을 특징으로 하는 캐시 관리 방법.
10. The method of claim 9,
The step of determining whether the hot page is the
A cache management method, comprising: determining a hot page based on a log sequence number (LSN) value when a capacity of a page having write asymmetry exceeds a preset criterion.
제8항에 있어서,
상기 메인 버퍼는 DRAM(dynamic random access memory)이고,
상기 추가 버퍼는 NVDIMMM(Non-Volatile Double In-line Memory Module)인 것을 특징으로 하는 캐시 관리 방법.

9. The method of claim 8,
The main buffer is a dynamic random access memory (DRAM),
The additional buffer is a cache management method, characterized in that NVDIMMM (Non-Volatile Double In-line Memory Module).

KR1020210031644A 2021-03-10 2021-03-10 Cache management apparatus and method KR102529333B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020210031644A KR102529333B1 (en) 2021-03-10 2021-03-10 Cache management apparatus and method
PCT/KR2022/003337 WO2022191622A1 (en) 2021-03-10 2022-03-10 Cache management apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020210031644A KR102529333B1 (en) 2021-03-10 2021-03-10 Cache management apparatus and method

Publications (2)

Publication Number Publication Date
KR20220127080A true KR20220127080A (en) 2022-09-19
KR102529333B1 KR102529333B1 (en) 2023-05-04

Family

ID=83228122

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210031644A KR102529333B1 (en) 2021-03-10 2021-03-10 Cache management apparatus and method

Country Status (2)

Country Link
KR (1) KR102529333B1 (en)
WO (1) WO2022191622A1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120035070A (en) * 2010-10-04 2012-04-13 주식회사 알티베이스 Methods of managing buffer cache using solid state disk as an extended buffer and apparatuses for using solid state disk as an extended buffer
KR20140052278A (en) * 2012-10-24 2014-05-07 주식회사 리얼타임테크 Cost-based page replacement method in a flash memory

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101717081B1 (en) * 2011-03-23 2017-03-28 삼성전자주식회사 Storage device comprising a buffer memory by using a nonvolatile-ram and volatile-ram
KR102517129B1 (en) * 2015-11-19 2023-04-04 에스케이하이닉스 주식회사 Memory system and operation method for the same
KR101863206B1 (en) * 2017-05-16 2018-05-31 성균관대학교산학협력단 Buffer pool management device and buffer pool mananging method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120035070A (en) * 2010-10-04 2012-04-13 주식회사 알티베이스 Methods of managing buffer cache using solid state disk as an extended buffer and apparatuses for using solid state disk as an extended buffer
KR20140052278A (en) * 2012-10-24 2014-05-07 주식회사 리얼타임테크 Cost-based page replacement method in a flash memory

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Yongseok Son 외 3인, "A Log-structured Buffer for Database Systems Using Non-volatile Memory"(2017.4.3.) *

Also Published As

Publication number Publication date
KR102529333B1 (en) 2023-05-04
WO2022191622A1 (en) 2022-09-15

Similar Documents

Publication Publication Date Title
US9501420B2 (en) Cache optimization technique for large working data sets
US10482032B2 (en) Selective space reclamation of data storage memory employing heat and relocation metrics
US9582421B1 (en) Distributed multi-level caching for storage appliances
Debnath et al. FlashStore: High throughput persistent key-value store
US9235508B2 (en) Buffer management strategies for flash-based storage systems
KR102057543B1 (en) Hybrid buffer pool
US9779027B2 (en) Apparatus, system and method for managing a level-two cache of a storage appliance
Papagiannis et al. An efficient memory-mapped key-value store for flash storage
Liu et al. Hybrid storage management for database systems
Zhou et al. Spitfire: A three-tier buffer manager for volatile and non-volatile memory
US20110066808A1 (en) Apparatus, System, and Method for Caching Data on a Solid-State Storage Device
US20140208018A1 (en) Tiered caching and migration in differing granularities
KR101297442B1 (en) Nand flash memory including demand-based flash translation layer considering spatial locality
US9727247B2 (en) Storage device and method, and storage medium
Na et al. Dynamic In-Page Logging for B⁺-tree Index
CN109002400B (en) Content-aware computer cache management system and method
He et al. Improving update-intensive workloads on flash disks through exploiting multi-chip parallelism
Yang et al. Efficient buffer management for tree indexes on solid state drives
KR102529333B1 (en) Cache management apparatus and method
JP2014010604A (en) Storage device, program, and method
Park et al. A new file system I/O mode for efficient user-level caching
Jeong et al. Flash-Aware Buffering Scheme with the On-the-Fly Redo for Efficient Data Management in Flash Storage
US20210263648A1 (en) Method for managing performance of logical disk and storage array
Jeong et al. A flash-aware buffering scheme using on-the-fly redo
Zhang Workload-Aware Page Management

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant