KR101375794B1 - Method and device for improving performance of database - Google Patents

Method and device for improving performance of database Download PDF

Info

Publication number
KR101375794B1
KR101375794B1 KR1020120008441A KR20120008441A KR101375794B1 KR 101375794 B1 KR101375794 B1 KR 101375794B1 KR 1020120008441 A KR1020120008441 A KR 1020120008441A KR 20120008441 A KR20120008441 A KR 20120008441A KR 101375794 B1 KR101375794 B1 KR 101375794B1
Authority
KR
South Korea
Prior art keywords
data
original data
buffer
database
cache
Prior art date
Application number
KR1020120008441A
Other languages
Korean (ko)
Other versions
KR20130087250A (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 KR1020120008441A priority Critical patent/KR101375794B1/en
Publication of KR20130087250A publication Critical patent/KR20130087250A/en
Application granted granted Critical
Publication of KR101375794B1 publication Critical patent/KR101375794B1/en

Links

Images

Landscapes

  • Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)

Abstract

본 발명은 데이터베이스의 성능을 향상하기 위한 방법 및 장치에 대한 것으로서, 데이터베이스에 저장된 데이터 페이지의 적어도 일부를 저장하고 있는 버퍼 캐시, 상기 버퍼 캐시에 저장된 데이터 페이지의 적어도 일부를 저장하기 위한 로컬 버퍼, 상기 버퍼 캐시 내의 원본 데이터를 상기 로컬 버퍼에 복사하는 버퍼 복사부 및 상기 로컬 버퍼에 복사된 데이터를 상기 데이터베이스에 플러시하는 플러시부를 포함하고, 상기 플러시가 수행되는 동안 상기 원본 데이터는 다른 스레드들이 쓰기 모드(WRITE mode)로 접근 가능한 것을 특징으로 한다. The present invention relates to a method and apparatus for improving the performance of a database, comprising: a buffer cache for storing at least a portion of a data page stored in a database, a local buffer for storing at least a portion of the data page stored in the buffer cache; A buffer copy unit for copying the original data in the buffer cache to the local buffer and a flush unit for flushing the data copied to the local buffer to the database, wherein the original data is written in a write mode by other threads while the flush is performed. WRITE mode).

Description

데이터베이스의 성능을 향상하기 위한 방법 및 장치{METHOD AND DEVICE FOR IMPROVING PERFORMANCE OF DATABASE}METHOD AND DEVICE FOR IMPROVING PERFORMANCE OF DATABASE}

본 발명은 데이터베이스의 성능을 향상하기 위한 방법 및 그 장치에 관한 것으로, 보다 상세하게는 데이터베이스의 버퍼 캐시에 대한 플러시(flush)가 발생하는 경우에도 다른 스레드에서 해당 페이지를 쓰기 모드(WRITE mode)로도 접근 가능하도록 하는 데이터베이스의 성능 향상 방법 및 장치에 관한 것이다.The present invention relates to a method and apparatus for improving the performance of a database. More specifically, even if a flush occurs to a buffer cache of a database, another thread may write the page in a write mode. A method and apparatus for improving the performance of a database to make it accessible.

컴퓨터 기술의 발전을 통해 다양한 산업 분야에서 컴퓨터를 이용한 여러가지 작업이 증가하고 있고, 이 또한 단일 컴퓨터 시스템이 아닌 네트워크를 통해 묶여진 복수의 컴퓨터들이 서로 간의 커뮤니케이션을 통해 사용자의 특정 지시를 수행하는 방식으로 진행하고 있다. 한편, 이러한 시스템들이 보다 복잡해지면서, 대용량 네트워크 로드들 및 관련 어플리케이션, 인터넷 시스템 디멘드를 서비스하는 것에 대한 요구가 증가해왔다. Through the development of computer technology, various tasks using computers are increasing in various industries, and also in a manner in which a plurality of computers tied through a network perform a specific instruction of a user through communication with each other, not a single computer system. Doing. On the other hand, as these systems become more complex, the demand for serving large network loads and related applications, Internet system demands, has increased.

전형적으로, 컴퓨터 시스템들의 문제점은 사용 가능한 정보 또는 데이터 양이 증가하는 것 및 복수의 사용자들이 입력한 갱신들을 끊임없이 모니터링하는 것을 처리하는 것이다. 디스크들 또는 데이터베이스를 위한 다른 매체 상에 소정의 형태로 저장된 정보의 절대적인 양은 빠르게 증가해왔다. Typically, the problem with computer systems is dealing with the increasing amount of information or data available and the constant monitoring of updates entered by multiple users. The absolute amount of information stored in some form on disks or other media for databases has grown rapidly.

한편, 데이터베이스 관리 시스템(DataBase Management System, DBMS)은 다수의 사용자들이 데이터베이스 내의 데이터를 접근할 수 있도록 하는 소프트웨어 도구의 집합이다. 보다 구체적으로, DBMS는 데이터베이스 서버에 구현되어 다수의 사용자들 또는 프로그램들의 요구를 체계적으로 처리하고 적절히 응답하여 데이터를 사용할 수 있도록 해준다. On the other hand, Database Management System (DBMS) is a set of software tools that allow a large number of users to access data in the database. More specifically, a DBMS can be implemented in a database server to systematically handle the needs of multiple users or programs and to use the data in an appropriate response.

쿼리(Query)의 형태로 수행될 수 있는 데이터베이스에 대한 수많은 삽입, 변경, 조회, 삭제 요청들의 처리에 대해 갖는 DBMS의 중요한 특성인 원자성(Atomic), 일관성(Consistency), 고립성(Isolated) 및 영속성(Durability)를 유지하기 위해 DBMS는 데이터베이스에 대한 로깅(logging)을 수행한다. 로깅은 쿼리 요청에 대한 처리 중 발생하는 데이터베이스의 상태 변화에 대한 내용을 담고 있으므로, 사용자의 요청 또는 시스템의 장애 등으로 인해 데이터베이스의 이전 상태로 복구하고자 할 때 사용될 수 있다. Atomic, consistency, isolated and persistence are important characteristics of a DBMS for handling a large number of insert, change, query, and delete requests to a database that can be performed in the form of a query. To maintain durability, the DBMS performs logging to the database. Logging contains information on the state of database changes that occur during the processing of query requests. Therefore, logging can be used to recover the previous state of the database due to user requests or system failures.

한편, 실제 데이터가 저장되어 있는 디스크에 접근하기 위해서는 가장 소요 시간이 큰 디스크 입출력(input and output: I/O)이 발생하게 되므로, 대부분의 DBMS에서는 데이터를 데이터베이스 서버 내부의 캐시(Cache)에 저장한 후, 캐시에 저장된 데이터에 대해 쿼리 요청을 처리하며, 캐시에 저장된 데이터는 주기적으로 디스크에 기록된다. On the other hand, the most time-consuming disk input and output (I / O) occurs to access the disk where the actual data is stored, so most DBMS stores the data in the cache inside the database server. After that, the query request is processed for the data stored in the cache, and the data stored in the cache is periodically written to the disk.

도 1은 종래의 DBMS에서 쿼리 요청 처리 및 로깅 프로세스를 도시한 도면이다. 도 1을 참조하여 보다 상세히 설명하면, 쿼리 요청 처리시 해당되는 데이터를 디스크로부터 읽어온다. 여기서 데이터를 읽어오는 단위가 적을 경우 빈번한 디스크 입출력이 발생할 소지가 있으므로 해당 데이터를 포함하는 특정 사이즈의 데이터 블럭을 읽어오는 것이 바람직하며, 이를 페이지 단위라고 호칭한다. 한편, 읽어온 페이지 단위 데이터는 데이터베이스 서버 내부의 버퍼 캐시에 저장되어 유지되며, 쿼리 요청 처리에 따른 데이터 변경은 디스크에서 직접 이루어지는 것이 아니라 버퍼 캐시에 저장된 데이터의 복사본에서 이루어진다. 이처럼 버퍼 캐시에 저장된 데이터의 복사본과 디스크의 데이터 상의 값이 상이하게 된 경우 이러한 데이터를 포함하는 페이지의 복사본을 더티 페이지(Dirty Page)라고 부른다. 이때 데이터 변경과 관련된 로그 데이터 역시 로그 캐시에 로깅된다. 1 is a diagram illustrating a query request processing and logging process in a conventional DBMS. Referring to FIG. 1, the corresponding data is read from the disk during query request processing. If the unit of reading data is small, frequent disk I / O may occur. Therefore, it is preferable to read a data block of a specific size including the corresponding data, which is called a page unit. Meanwhile, the read page unit data is stored and maintained in the buffer cache of the database server, and the data change according to the processing of the query request is made in the copy of the data stored in the buffer cache, not directly on the disk. When the copy of the data stored in the buffer cache and the value on the data of the disk is different in this way, the copy of the page containing such data is called a dirty page. At this time, log data related to data change is also logged in the log cache.

이후 커밋(Commit)되는 경우 로그 캐시에 저장된 로그 데이터가 디스크에 기록(이처럼 캐시의 데이터를 디스크에 기록하여 데이터간의 동기화를 수행하는 것을 플러시(Flush)라고 한다)되는 것이 일반적인 쿼리 요청 처리 및 로깅 프로세스에 해당된다. When it is later committed, the log data stored in the log cache is written to disk (this means that the data in the cache is written to disk and synchronized between the data is called flush). Corresponds to

한편, 로그 캐시만이 아닌 버퍼 캐시에 대해서도 플러시가 발생하는 경우가 있다. 그 일 예로서 검사점(Checkpoint) 스레드(Thread)가 수행되어 디스크 및 캐시 간의 동기화를 수행하는 경우 또는 버퍼 캐시의 여유 공간 확보를 위해 지연 기록기(Lazy Writer) 스레드가 수행되어 버퍼 내의 일부 데이터를 동기화 처리 후 삭제하는 경우가 해당된다. On the other hand, there is a case where the flush occurs not only in the log cache but also in the buffer cache. For example, when a checkpoint thread is performed to perform synchronization between a disk and a cache, or a lazy writer thread is performed to free some space in a buffer cache to synchronize some data in a buffer. This is the case after deletion.

이와 같이 로그 캐시 및 버퍼 캐시 모두에 대해 플러시가 발생하는 경우 버퍼 캐시에 저장된 데이터 페이지가 디스크에 기록되기 전에 이와 대응되는 로그 데이터가 존재한다면, 버퍼 캐시에 우선하여 로그 캐시부터 디스크에 기록하는데 이를 WAL(Write Ahead Log)라 한다. 만일 그 순서가 뒤바뀌어서 버퍼 캐시에 저장된 데이터들이 로그 데이터보다 우선하여 디스크에 기록되고 로그 데이터가 기록되기 이전에 데이터베이스 서버에 장애가 발생하여 로그 데이터를 기록하지 못하게 되면, 디스크의 데이터 페이지에는 이전의 상태로 복구할 수 없는 데이터가 기록되기 때문이며, 또한 저장된 데이터는 임시적인 데이터일 경우도 존재하므로 데이터베이스의 무결성이 유지되지 못하는 큰 문제가 발생할 수 있다. As such, if a flush occurs for both the log cache and the buffer cache, if there is corresponding log data before the data pages stored in the buffer cache are written to disk, the log cache is written to disk first, and then WAL. It is called (Write Ahead Log). If the order is reversed and the data stored in the buffer cache is written to disk in preference to log data, and the database server fails before log data is written, the log data cannot be written. This is because non-recoverable data is recorded, and the stored data may be temporary data, which may cause a big problem in that the integrity of the database may not be maintained.

하지만 플러시 처리가 이루어지는 동안 다른 스레드들이 해당 데이터에 접근을 시도할 수 있는데 이 중 읽기인 경우에는 데이터 변경의 문제점이 없어 관계 없지만, 다른 쿼리 요청의 처리를 통해 실제로 기록하고자 하는 데이터가 변경될 수 있다면, 실제로 디스크에 기록되는 데이터는 의도한 데이터와 상이할 수 있다. 따라서, 이를 방지하고자 플러시 처리가 이루어지는 동안에는 버퍼 캐시 내의 해당 페이지의 접근 권한을 제한하여 플러시가 완료될 때까지는 쓰기 모드(WRITE mode)로는 접근할 수 없고, 단지 읽기 모드(READ mode)로만 접근할 수 있도록 한다. However, other threads may try to access the data during the flush process, but if it is a read, there is no problem of data change, but if the data that you want to write can be changed through the processing of another query request, Indeed, the data actually recorded on the disc may differ from the intended data. Therefore, to prevent this, during the flush processing, the access rights of the corresponding page in the buffer cache are restricted so that the write mode cannot be accessed until the flush is completed, but only in the READ mode. Make sure

따라서, 로그 캐시 및 버퍼 캐시 모두에 대한 플러시의 경우 로그 데이터의 기록 및 그 이후 버퍼 캐시에 저장된 데이터의 기록이 수반되어 보다 많은 디스크 입출력 시간이 소요되며, 이 시간 동안 해당 페이지에 접근하여 데이터를 변경하려는 모든 다른 스레드들이 접근할 수 없어 DBMS의 성능 저하까지 발생할 수 있다. 특히, 플러시가 이루어지는 데이터 페이지가 Btree의 루트 페이지, 또는 힙(Heap)에서 인서트(insert)가 몰리는 데이터 페이지 같이 접근이 빈번한 데이터 페이지인 경우 그 성능 저하는 더욱 심각해지는 문제점이 발생한다. Therefore, flushing both the log cache and the buffer cache requires more disk I / O time due to the recording of the log data and subsequent recording of the data stored in the buffer cache. During this time, the page is accessed to change the data. All other threads will not be able to access it, which can lead to performance degradation of the DBMS. In particular, if the data page to be flushed is a frequently accessed data page such as a root page of a Btree or a data page with an insert in the heap, the performance degradation becomes more serious.

이러한 결과로 DBMS의 성능 지표 중 한가지인 TPS(Transaction Per Second)가 균일하지 않는 결과를 초래하는데, 종래의 DBMS에서 측정된 TPS 수치를 도시한 도 2를 참조하면 종래의 DBMS의 경우 앞서 설명한 이유로 인해 플러시가 이루어지는 데이터 페이지의 특성에 따라 그 편차가 매우 심한 것을 알 수 있다. As a result, TPS (Transaction Per Second), which is one of the performance indicators of the DBMS, results in non-uniformity. Referring to FIG. It can be seen that the deviation is very severe depending on the characteristics of the data page to be flushed.

한편, 데이터베이스의 성능을 향상시키기 위한 기술로서 대한민국공개특허공보 제10-2008-0044480 지연된 로깅 방법 및 그 장치(주식회사 삼성전자)(문헌 1)에는 데이터베이스의 갱신 작업에 의한 로그 레코드를 생성함에 있어서 로그 엔트리를 이용하여 로그 사이즈를 감소시키며 이에 따른 디스크 입출력 시간 단축에 기인한 데이터베이스의 성능을 향상시키는 방법이 개시된다. 그러나, 문헌 1은 WAL에 따라 먼저 기록하게 될 로그 데이터의 사이즈를 감소시킬 뿐 플러시가 이루어지는 동안 버퍼 캐시에 저장된 해당 데이터 페이지에 대해 발생할 수 있는 다른 쿼리 요청 처리의 수행을 막는다는 단점은 여전히 존재한다. On the other hand, as a technique for improving the performance of the database, Korean Laid-Open Patent Publication No. 10-2008-0044480 Delayed logging method and the device (Samsung Electronics Co., Ltd.) (Document 1) log in generating a log record by updating the database Disclosed is a method for reducing a log size by using an entry and thus improving the performance of a database due to a short disk I / O time. However, there is still a disadvantage that Document 1 reduces the size of log data to be written first according to the WAL, and prevents the processing of other query requests that may occur for the corresponding data page stored in the buffer cache during the flush. .

따라서, 디스크로 기록될 데이터의 사이즈를 줄이는 방식이 아닌, 캐시 페이지에 대한 플러시가 발생하는 경우에도 다른 스레드 등에서 해당 페이지를 쓰기 모드로 접근 가능하도록 하여 데이터베이스의 성능을 향상시킬 수 있는 보다 근본적인 방법이 요구되고 있다.Therefore, rather than reducing the size of data to be written to disk, a more fundamental way to improve the performance of the database is to make the page accessible in write mode even if a flush occurs on a cache page. It is required.

[문헌 1] 대한민국공개특허공보 제10-2008-0044480 지연된 로깅 방법 및 그 장치(주식회사 삼성전자) 2008.05.21.[Patent 1] Republic of Korea Patent Publication No. 10-2008-0044480 Delayed logging method and its device (Samsung Electronics Co., Ltd.) 2008.05.21.

본 발명의 목적은 버퍼 캐시에 대한 플러시 처리시 디스크로 기록될 데이터에 다른 스레드들이 쓰기 모드로도 접근 가능하게 하여 시스템 성능을 향상시킬 수 있는 데이터베이스의 성능을 향상하기 위한 방법 및 장치를 제공함에 있다. An object of the present invention is to provide a method and apparatus for improving the performance of a database that can improve the system performance by allowing other threads to access the data to be written to disk in the flushing process for the buffer cache to improve the system performance. .

또한, 본 발명의 다른 목적은 버퍼 캐시에 대한 플러시 처리시 디스크로 기록될 데이터를 다른 저장 공간 내에 복사하고, 복사된 데이터를 디스크에 기록하여 시스템 성능을 향상시킬 수 있는 데이터베이스의 성능을 향상하기 위한 방법 및 장치를 제공함에 있다. In addition, another object of the present invention is to copy the data to be written to the disk in the other storage space during the flush processing for the buffer cache, and to improve the performance of the database that can improve the system performance by writing the copied data to the disk A method and apparatus are provided.

또한, 본 발명의 또 다른 목적은 버퍼 캐시에 대한 플러시가 처리되는 동안 디스크로 기록될 데이터가 지연 기록기 스레드에 의한 플러시 대상이 되지 않도록 설정하여, 여러개의 복사된 데이터가 존재하지 않도록 하는 데이터베이스의 성능을 향상하기 위한 방법 및 장치를 제공함에 있다.In addition, another object of the present invention is to set the data to be written to disk during the flush to the buffer cache is not subject to the flush by the lazy writer thread, so that the number of copied data does not exist To provide a method and apparatus for improving the.

상기한 바와 같은 본 발명의 목적을 달성하고, 후술하는 본 발명의 특유의 효과를 달성하기 위한, 본 발명의 특징적인 구성은 하기와 같다.In order to achieve the above-described object of the present invention and to achieve the specific effects of the present invention described below, the characteristic structure of the present invention is as follows.

본 발명의 일 태양에 따르면, 데이터베이스의 성능을 향상하기 위한 장치는, 데이터베이스에 저장된 데이터 페이지의 적어도 일부를 저장하고 있는 버퍼 캐시, 상기 버퍼 캐시에 저장된 데이터 페이지의 적어도 일부를 저장하기 위한 로컬 버퍼, 상기 버퍼 캐시 내의 원본 데이터를 상기 로컬 버퍼에 복사하는 버퍼 복사부 및 상기 로컬 버퍼에 복사된 데이터를 상기 데이터베이스에 플러시하는 플러시부를 포함하고, 상기 플러시가 수행되는 동안 상기 원본 데이터는 다른 스레드들이 쓰기 모드(WRITE mode)로도 접근 가능한 것을 특징으로 한다.According to one aspect of the invention, an apparatus for improving the performance of a database includes a buffer cache for storing at least a portion of data pages stored in a database, a local buffer for storing at least a portion of the data pages stored in the buffer cache; A buffer copying unit for copying original data in the buffer cache to the local buffer and a flushing unit for flushing the data copied to the local buffer to the database, wherein the original data is written by other threads while the flushing is performed. It is also characterized by being accessible in (WRITE mode).

바람직하게는, 상기 장치는 상기 버퍼 캐시에 저장된 상기 원본 데이터의 변경과 관련된 로그 데이터가 저장되는 로그 캐시를 더 포함하고, 상기 버퍼 복사부는 상기 원본 데이터의 변경과 관련하여 상기 로그 캐시에 저장된 로그 데이터를 상기 로컬 버퍼에 더 복사한다. Preferably, the apparatus further comprises a log cache for storing the log data associated with the change of the original data stored in the buffer cache, the buffer copy unit log data stored in the log cache in association with the change of the original data Further copies to the local buffer.

바람직하게는, 상기 장치는 상기 버퍼 캐시 내의 원본 데이터에 대한 플러시 요청에 의해 그 동작이 개시된다. Advantageously, said device is initiated by a flush request for original data in said buffer cache.

바람직하게는, 상기 장치는 상기 버퍼 복사부의 복사가 수행되기 전에 다른 스레드들이 상기 원본 데이터를 쓰기 모드로 접근하지 못하도록 설정하는 제1기능 및 상기 버퍼 복사부의 복사가 완료된 이후 다른 스레드들이 상기 원본 데이터를 쓰기 모드로 접근할 수 있도록 설정하는 제2기능을 더 갖는다. Preferably, the apparatus is configured to prevent other threads from accessing the original data in a write mode before copying of the buffer copy unit and other threads after the copy of the buffer copy unit is completed. It further has a second function of setting access to the write mode.

바람직하게는, 상기 관리 설정부는 상기 원본 데이터가 플러시 대상으로 선정되지 않도록 설정하는 제3기능을 더 갖는다. Preferably, the management setting unit further has a third function of setting the original data such that the original data is not selected as a flush object.

바람직하게는, 상기 관리 설정부는 상기 원본 데이터가 상기 데이터베이스와 동기화되었음을 설정하는 제4기능을 더 갖는다. Preferably, the management setting unit further has a fourth function of setting that the original data is synchronized with the database.

바람직하게는, 상기 관리 설정부는 상기 플러시부의 플러시가 완료된 이후 상기 원본 데이터가 플러시 대상으로 선정될 수도 있도록 설정하는 제5기능을 더 갖는다. Preferably, the management setting unit further has a fifth function of setting the original data to be selected as a flushing object after the flushing of the flushing unit is completed.

바람직하게는, 상기 제5기능은 상기 원본 데이터를 다른 스레드들이 쓰기 모드로 접근하지 못하도록 설정된 이후에 수행되고, 상기 제5기능이 수행된 이후 상기 원본 데이터는 다른 스레드들이 쓰기 모드로 접근할 수 있도록 설정된다. Preferably, the fifth function is performed after the original data is set to prevent other threads from accessing the write mode, and after the fifth function is performed, the original data can be accessed by other threads in the write mode. Is set.

바람직하게는, 상기 제1기능 내지 제5기능 중 적어도 어느 한 기능은 상기 버퍼 캐시 내에 저장된 원본 데이터의 데이터 구조에 저장된 값 중 적어도 하나 이상을 변경함으로써 수행된다. Preferably, at least one of the first to fifth functions is performed by changing at least one or more of the values stored in the data structure of the original data stored in the buffer cache.

본 발명의 다른 태양에 따르면, 데이터베이스의 성능을 향상하기 위한 방법에 있어서, 데이터베이스의 성능을 향상하기 위한 장치에서 수행되는 각 단계가, 버퍼 캐시 내의 원본 데이터를 로컬 버퍼에 복사하는 단계 및 상기 로컬 버퍼에 복사된 데이터를 데이터베이스로 플러시하는 단계를 포함하고, 여기서 상기 버퍼 캐시는 상기 데이터베이스에 저장된 데이터 페이지의 적어도 일부를 저장하고 있으며, 상기 플러시가 수행되는 동안 상기 원본 데이터에는 다른 스레드들이 쓰기 모드로 접근 가능한 것을 특징으로 한다. According to another aspect of the present invention, in a method for improving the performance of a database, each step performed in an apparatus for improving the performance of a database comprises: copying original data in a buffer cache to a local buffer and the local buffer; Flushing the data copied to the database, wherein the buffer cache stores at least a portion of the data pages stored in the database, while other threads access the original data in write mode while the flush is performed. It is characterized by possible.

한편, 데이터베이스의 성능을 향상하기 위한 방법은 서버 컴퓨터로 읽을 수 있는 기록 매체에 저장될 수 있다. 이러한 기록 매체는 컴퓨터 시스템에 의하여 읽혀질 수 있도록 프로그램 및 데이터가 저장되는 모든 종류의 기록매체를 포함한다. 그 예로는, 롬(Read Only Memory), 램(Random Access Memory), CD(Compact Disk), DVD(Digital Video Disk)-ROM, 자기 테이프, 플로피 디스크, 광데이터 저장장치 등이 있으며, 또한 케리어 웨이브(예를 들면, 인터넷을 통한 전송)의 형태로 구현되는 것도 포함된다. 또한, 이러한 기록매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어, 분산 방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다.On the other hand, the method for improving the performance of the database may be stored in a recording medium readable by the server computer. Such a recording medium includes all kinds of recording media in which programs and data are stored so that they can be read by a computer system. Examples include ROMs (Read Only Memory), Random Access Memory, CD (Compact Disk), DVD (Digital Video Disk) -ROM, magnetic tape, floppy disk, optical data storage device, (For example, transmission over the Internet). Such a recording medium may also be distributed over a networked computer system so that computer readable code in a distributed manner can be stored and executed.

상술한 바와 같이, 본 발명에 따르면 버퍼 캐시에 대한 플러시 처리시 디스크로 기록될 데이터에 다른 스레드들이 쓰기 모드로도 접근 가능하게 하여 시스템 성능을 향상시킬 수 있다. As described above, according to the present invention, other threads may access the data to be written to the disk even in the write mode when flushing the buffer cache, thereby improving system performance.

또한, 본 발명에 따르면 버퍼 캐시에 대한 플러시 처리시 디스크로 기록될 데이터를 다른 저장 공간 내에 복사하고, 복사된 데이터를 디스크에 기록하여 시스템 성능을 향상시킬 수 있다. In addition, according to the present invention, when flushing the buffer cache, data to be written to the disk may be copied into another storage space, and the copied data may be written to the disk to improve system performance.

또한, 버퍼 캐시에 대한 플러시가 처리되는 동안 디스크로 기록될 데이터가 지연 기록기 스레드에 의한 플러시 대상이 되지 않도록 설정하여, 여러개의 복사된 데이터가 존재하지 않도록 할 수 있다. In addition, the data to be written to the disk while the flush to the buffer cache is being processed can be set so that it is not the target of the flush by the lazy writer thread, so that multiple copied data does not exist.

도 1은 종래의 DBMS에서의 쿼리 요청 처리 및 로깅 프로세스를 도시한 도면이다.
도 2는 종래의 DBMS에서 측정된 TPS 수치를 도시한 그래프이다.
도 3은 본 발명의 일실시예에 따라 향상된 데이터베이스 성능을 갖는 데이터베이스 서버를 포함하는 전체 시스템을 나타내는 도면이다.
도 4는 본 발명의 일 실시예에 따라 향상된 데이터베이스 성능을 갖는 데이터베이스 서버의 세부 구성을 나타내는 도면이다.
도 5는 본 발명의 일 실시예에 따라 향상된 데이터베이스 성능을 갖는 데이터베이스 서버의 플러시 처리 흐름을 나타내는 흐름도이다.
도 6은 본 발명의 일 실시예에 따라 향상된 데이터베이스 성능을 갖는 데이터베이스 서버에서 사용되는 버퍼 캐시에 저장된 데이터 페이지의 속성을 나타내기 위한 데이터 구조 일부분을 나타내는 도면이다.
도 7은 본 발명의 일 실시예에 따라 향상된 데이터베이스 성능을 갖는 데이터베이스 서버에서 측정된 TPS 수치를 도시한 그래프이다.
도 8은 본 발명의 일 실시예에 따라 향상된 데이터베이스 성능을 갖는 데이터베이스 서버에서 수행되는 플러시 처리 방식을 설명하기 위한 도면이다.
1 is a diagram illustrating a query request processing and logging process in a conventional DBMS.
Figure 2 is a graph showing the TPS value measured in a conventional DBMS.
3 is a diagram illustrating an entire system including a database server having improved database performance according to an embodiment of the present invention.
4 is a diagram illustrating a detailed configuration of a database server having improved database performance according to an embodiment of the present invention.
5 is a flowchart illustrating a flush processing flow of a database server with improved database performance according to an embodiment of the present invention.
FIG. 6 is a diagram illustrating a portion of a data structure for indicating an attribute of a data page stored in a buffer cache used in a database server having improved database performance according to an embodiment of the present invention.
7 is a graph illustrating TPS values measured in a database server with improved database performance according to an embodiment of the present invention.
8 is a diagram illustrating a flush processing method performed in a database server having improved database performance according to an embodiment of the present invention.

후술하는 본 발명에 대한 상세한 설명은, 본 발명이 실시될 수 있는 특정 실시예를 예시로서 도시하는 첨부 도면을 참조한다. 이들 실시예는 당업자가 본 발명을 실시할 수 있기에 충분하도록 상세히 설명된다. 본 발명의 다양한 실시예는 서로 다르지만 상호 배타적일 필요는 없음이 이해되어야 한다. 예를 들어, 여기에 기재되어 있는 특정 형상, 구조 및 특성은 일 실시예에 관련하여 본 발명의 정신 및 범위를 벗어나지 않으면서 다른 실시예로 구현될 수 있다. 또한, 각각의 개시된 실시예 내의 개별 구성요소의 위치 또는 배치는 본 발명의 정신 및 범위를 벗어나지 않으면서 변경될 수 있음이 이해되어야 한다. 따라서, 후술하는 상세한 설명은 한정적인 의미로서 취하려는 것이 아니며, 본 발명의 범위는 적절하게 설명된다면 그 청구항들이 주장하는 것과 균등한 모든 범위와 더불어 첨부된 청구항에 의해서만 한정된다. 도면에서 유사한 참조부호는 여러 측면에 걸쳐서 동일하거나 유사한 기능을 지칭한다.DETAILED DESCRIPTION OF THE INVENTION The following detailed description of the invention refers to the accompanying drawings that show, by way of illustration, specific embodiments in which the invention may be practiced. These embodiments are described in sufficient detail to enable those skilled in the art to practice the invention. It should be understood that the various embodiments of the present invention are different, but need not be mutually exclusive. For example, certain features, structures, and characteristics described herein may be implemented in other embodiments without departing from the spirit and scope of the invention in connection with an embodiment. It is also to be understood that the position or arrangement of the individual components within each disclosed embodiment may be varied without departing from the spirit and scope of the invention. The following detailed description is, therefore, not to be taken in a limiting sense, and the scope of the present invention is to be limited only by the appended claims, along with the full scope of equivalents to which the claims are entitled, if properly explained. In the drawings, like reference numerals refer to the same or similar functions throughout the several views.

본 발명의 실시예에서, 스레드(Thread)란 특정 목적을 갖는 컴퓨터 프로그램을 수행하기 위한 일련의 수행을 가리키는 광의의 의미이다. 일반적으로 DBMS에서 발생하는 쿼리 요청 처리는 특정 스레드의 수행에 따라 이루어질 수 있으며, 전술한 바와 같이 버퍼 캐시에 대한 플러시를 유발하는 검사점 및 지연 기록기 역시 하나의 스레드의 실행으로 볼 수 있다. 따라서, 본 발명의 명세서에서 쿼리 요청의 처리 및 스레드의 실행은 별도의 반대되는 설명이 없는 이상 동일 또는 유사한 의미로 해석될 수 있다. In an embodiment of the present invention, a thread is a broad term referring to a series of executions for carrying out a computer program having a specific purpose. In general, query request processing occurring in a DBMS may be performed according to execution of a specific thread. As described above, a checkpoint and a lazy writer causing a flush to the buffer cache may also be regarded as execution of one thread. Therefore, in the specification of the present invention, the processing of the query request and the execution of the thread may be interpreted in the same or similar sense unless otherwise stated.

한편, 본 발명의 실시예에서, DBMS는 데이터베이스 서버 내에 설치되어 이와 연결된 데이터베이스를 관리하기 위한 시스템을 통칭하는 광의의 의미이므로, 본 발명의 명세서에서 별도의 반대되는 설명이 없는 이상 DBMS 및 데이터베이스 서버는 동일 또는 유사한 의미로 해석될 수 있다. On the other hand, in the embodiment of the present invention, since the DBMS is a broad meaning collectively installed in the database server for managing the database connected thereto, unless otherwise stated in the specification of the present invention DBMS and database server is It may be interpreted in the same or similar sense.

이하, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 본 발명을 용이하게 실시할 수 있도록 하기 위하여, 본 발명의 바람직한 실시예들에 관하여 첨부된 도면을 참조하여 상세히 설명하기로 한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings, so that those skilled in the art can easily carry out the present invention.

전체 시스템 구성Complete system configuration

도 3은 본 발명의 일 실시예에 따라 향상된 데이터베이스 성능을 갖는 데이터베이스 서버를 포함하는 전체 시스템을 개략적으로 도시한 도면이다. 3 is a schematic diagram of an entire system including a database server with improved database performance in accordance with one embodiment of the present invention.

도 3에 도시되어 있는 바와 같이, 본 발명의 일 실시예에 따른 전체 시스템은, 향상된 데이터베이스 성능을 갖는 데이터베이스 서버(100)가 데이터베이스(200)와 연결되어 있으며, 또한 통신 네트워크(400)를 통하여 단말 장치(300)와 연결될 수 있다. As shown in FIG. 3, in the entire system according to the exemplary embodiment of the present invention, a database server 100 having improved database performance is connected to a database 200, and also a terminal through a communication network 400. It may be connected to the device 300.

먼저, 본 발명의 일 실시예에 따르면, 향상된 데이터베이스 성능을 갖는 데이터베이스 서버(100)는 단말 장치(300)의 요청에 의해 연결된 데이터베이스(200)의 특정 데이터에 대해 쿼리 요청 처리를 수행하는 일반적인 DBMS의 기능을 포함하는 한편, 이 과정에서 버퍼 캐시에 대한 플러시, 예를 들면, 검사점 스레드 또는 지연 기록기 스레드에 의한 플러시 발생시 버퍼 캐시 내의 해당하는 데이터 페이지를 로컬 버퍼로 복사하고, 로컬 버퍼에 복사된 데이터 페이지를 데이터베이스(200)로 플러시 처리함으로써 플러시 처리 도중에도 버퍼 캐시 내의 데이터 페이지는 다른 스레드 등에 의한 쓰기 모드로의 접근을 가능하게 한다. 데이터베이스 서버(100)의 상세한 구성요소 및 기능에 대해서는 후술하도록 한다. First, according to an embodiment of the present invention, the database server 100 having an improved database performance of the general DBMS that performs a query request processing for the specific data of the database 200 connected by the request of the terminal device 300 In the process, a flush to the buffer cache, for example, a flush by the checkpoint thread or lazy writer thread, copies the corresponding data page in the buffer cache to the local buffer and copies the data to the local buffer. By flushing the page to the database 200, the data page in the buffer cache allows access to the write mode by another thread or the like even during the flush processing. Detailed components and functions of the database server 100 will be described later.

본 발명의 일 실시예에 따른 데이터베이스(200)는 데이터베이스 서버(100)로부터의 접근에 의해 변경, 복제 등이 이루어질 수 있는 데이터를 저장하고 있는 저장 공간을 의미하는 광의의 개념이다. 다만, 데이터베이스 서버(100) 내의 캐시 또는 버퍼 공간과 대비하기 위해 데이터베이스(200)는 디스크 입출력(I/O)이 필요한 하드 디스크 드라이브, SSD(Solid State Drive) 등의 영구 저장 매체로 이루어진 것이 일반적이다. 또한, 데이터베이스(200)에 저장된 데이터의 변경 또는 복제는 페이지 단위로 수행될 수 있다. Database 200 according to an embodiment of the present invention is a broad concept of a storage space for storing data that can be changed, duplicated, etc. by access from the database server 100. However, in order to prepare for cache or buffer space in the database server 100, the database 200 generally includes a persistent storage medium such as a hard disk drive or a solid state drive (SSD) requiring disk input / output (I / O). . In addition, the change or duplication of data stored in the database 200 may be performed in units of pages.

한편, 본 발명의 일 실시예에 따른 단말장치(300)는 통신 네트워크(400)를 통하여 데이터베이스 서버(100)와 연결하고, 데이터베이스 서버(100)를 통해 연결된 데이터베이스(200) 내의 특정 데이터에 대한 변경을 포함하는 쿼리 요청 처리를 요청하기 위한 기능을 포함하는 입출력 장치를 의미하며, 데스크톱 컴퓨터뿐만 아니라 노트북 컴퓨터, 워크스테이션, 팜톱(palmtop) 컴퓨터, 개인 휴대 정보 단말기(personal digital assistant: PDA), 웹 패드, 스마트 폰을 포함하는 이동 통신 단말기 등과 같이 메모리 수단을 구비하고 마이크로 프로세서를 탑재하여 연산 능력을 갖춘 디지털 기기라면 얼마든지 본 발명에 따른 단말장치(300)로서 채택될 수 있다. 또한, 본 발명의 일 실시예에 따르면, 통신 네트워크(400)는 유선 및 무선 등과 같은 그 통신 양태를 가리지 않고 구성될 수 있으며, 단거리 통신망(PAN; Personal Area Network), 근거리 통신망(LAN; Local Area Network), 도시권 통신망(MAN; Metropolitan Area Network), 광역 통신망(WAN; Wide Area Network) 등 다양한 통신망으로 구성될 수 있다. 또한, 상기 통신 네트워크(400)는 공지의 월드와이드웹(WWW; World Wide Web)일 수 있으며, 적외선(Infrared Data Assosiation; IrDA) 또는 블루투스(Bluetooth)와 같이 단거리 통신에 이용되는 무선전송기술을 이용할 수도 있다.On the other hand, the terminal device 300 according to an embodiment of the present invention connects to the database server 100 through the communication network 400 and changes to specific data in the database 200 connected through the database server 100. An input / output device including a function for requesting the processing of a query request, including a notebook computer, a notebook computer, a workstation, a palmtop computer, a personal digital assistant (PDA), a web pad, as well as a desktop computer. As long as a digital device having a memory means and a microprocessor equipped with a computing capability such as a mobile communication terminal including a smart phone can be adopted as the terminal device 300 according to the present invention. In addition, according to an embodiment of the present invention, the communication network 400 may be configured without regard to communication modes such as wired and wireless, and may include a personal area network (PAN) and a local area network (LAN). Network, a metropolitan area network (MAN), and a wide area network (WAN). In addition, the communication network 400 may be a well-known World Wide Web (WWW), and may use a wireless transmission technology used for short-range communication such as infrared (Infrared Data Assosiation) or Bluetooth (Bluetooth). It may be.

도 3에는 데이터베이스 서버(100), 데이터베이스(200), 단말장치(300) 및 통신 네트워크(400)를 각각 단수의 독립된 블록으로 도시하였으나, 이들은 물리적으로 하나의 기계 내에 구현될 수도 있고 일부 또는 그 각각이 물리적으로 다른 기계에 구현될 수도 있거나, 동일한 기능을 하는 물리적으로 복수 개 존재하는 기계가 병렬적으로 존재할 수도 있다. 이렇듯 본 발명은 각 기능이 구현된 기계 또는 데이터베이스의 물리적인 개수 및 위치에 한정되지 않고 다양한 방식으로 설계 변경될 수 있음은 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 있어 자명하다.  In FIG. 3, the database server 100, the database 200, the terminal device 300, and the communication network 400 are respectively shown in a single, independent block, but they may be physically implemented in one machine and some or each of them. It may be implemented in this physically different machine, or there may be a plurality of physically existing machines having the same function in parallel. As such, the present invention is not limited to the physical number and location of the machine or database on which each function is implemented, and can be changed in various ways. It is apparent to those skilled in the art to which the present invention pertains.

플러시 처리 방식Flush processing

도 8을 참조하여, 본 발명의 일 실시예에 따라 향상된 데이터베이스 성능을 갖는 데이터베이스 서버(100)에서 버퍼 캐시에 대한 플러시, 예를 들면, 검사점 스레드 또는 지연 기록기 스레드에 의한 플러시를 처리하는 방식을 설명한다. 도 8은 각 상황에서 데이터베이스 서버(100) 내의 3개의 페이지 단위 데이터가 저장될 수 있는 버퍼 캐시 및 로컬 버퍼에 저장된 데이터를 예시한 도면이다. Referring to FIG. 8, a method of processing a flush to a buffer cache, for example, a flush by a checkpoint thread or a lazy writer thread, in a database server 100 having improved database performance according to an embodiment of the present invention. Explain. FIG. 8 is a diagram illustrating data stored in a buffer cache and a local buffer in which three page unit data in the database server 100 may be stored in each situation.

이하에서는, 페이지 단위 데이터를 “데이터 페이지”라고 한다. 또한 특별히 반대되는 기재가 없는 한도내에서, 버퍼 캐시의 데이터 페이지는 데이터베이스(200)내의 특정 위치에 저장될 페이지 단위 데이터를 저장하는 공간으로써의 의미를 포함한다. Hereinafter, the page unit data is referred to as a "data page". Also, unless specifically stated otherwise, the data page of the buffer cache includes meaning as a space for storing page-by-page data to be stored at a specific location in the database 200.

먼저, 도 8(a)에서 버퍼 캐시 내에는 데이터 페이지 A, B, C 가 기록되어 있다. 여기서 데이터 페이지 A, B, C는 데이터베이스(200) 내의 특정 위치에 저장된 페이지 단위 데이터로 명명된 A, B, C로부터 읽어들인 것으로 가정한다. 한편, 버퍼 캐시 내의 데이터들은 쿼리 요청 처리에 따라 변경될 수 있는데, 이 중 데이터 페이지 B에 포함된 데이터 중 적어도 일부가 쿼리 요청 처리에 의해 변경된다고 가정하면, 변경된 데이터 페이지는 데이터 페이지 B와 구별하기 위해 데이터 페이지 B'로 명명할 수 있으며 이 단계를 나타낸 것이 도 8(b)이다. 여기서 데이터 페이지 B'는 데이터 페이지 B에 포함된 데이터 중 적어도 일부가 쿼리 요청 처리에 의해 변경된 데이터를 포함하는 페이지 단위 데이터를 의미한다. 한편, 데이터 페이지 B'에 대해 플러시가 발생하는 경우, 데이터베이스 서버(100)는 먼저 버퍼 캐시 내의 데이터 페이지 B'(이하, 플러시 대상이 된 데이터 페이지를 '원본 데이터'라 한다)를 로컬 버퍼로 복사하며 이 단계를 나타낸 것이 도 8(c)이다. 이 때 원본 데이터가 플러시 처리를 위해 복사되어 로컬 버퍼에 저장된 데이터 페이지를 '복사 데이터'라고 한다. 이후, 데이터베이스 서버(100)는 버퍼 캐시 내의 원본 데이터를 플러시하는 것이 아닌, 원본 데이터인 데이터 페이지 B'에 대한 복사 데이터를 갖는 로컬 버퍼로부터 데이터베이스(200)로 플러시를 수행하므로 플러시 수행 동안에도 다른 스레드들은 쓰기 모드로 버퍼 캐시의 원본 데이터를 접근하는 것이 가능하다. 도 8은 예시적으로 버퍼 캐시 및 이에 해당하는 로컬 버퍼만을 도시하였으나 본 발명의 실시예에 따라 플러시 처리시 로컬 버퍼는 버퍼 캐시의 해당 데이터 페이지에 대응되는 로그 캐시에 저장된 로그 데이터를 포함하여 저장하고 플러시를 통해 로그 데이터를 포함하는 전체 데이터를 데이터베이스(200)에 기록할 수도 있음은 이해될 수 있다. 또한, 도 8에서 도시된 버퍼 캐시는 3개의 데이터 페이지를 갖도록 예시되어 있으나 반드시 이에 한정되지 않는다. First, in Fig. 8A, data pages A, B, and C are recorded in the buffer cache. Here, it is assumed that data pages A, B, and C are read from A, B, and C named page unit data stored at a specific location in the database 200. On the other hand, the data in the buffer cache can be changed according to the processing of the query request, assuming that at least some of the data included in the data page B is changed by the processing of the query request, the changed data page to distinguish from the data page B The data page B 'may be named as shown in FIG. 8 (b). Here, the data page B 'refers to page unit data including data in which at least a part of data included in the data page B is changed by the query request processing. On the other hand, if a flush occurs for data page B ', the database server 100 first copies data page B' (hereinafter, referred to as 'source data') of data in the buffer cache to the local buffer. This step is shown in Figure 8 (c). At this time, the original data is copied for flush processing and the data page stored in the local buffer is called 'copy data'. Thereafter, the database server 100 flushes the database 200 from the local buffer having the copy data for the data page B ', which is the original data, rather than flushing the original data in the buffer cache. They can access the original data in the buffer cache in write mode. 8 exemplarily illustrates a buffer cache and a local buffer corresponding thereto. However, in the flushing process, the local buffer includes log data stored in a log cache corresponding to a corresponding data page of the buffer cache. It can be appreciated that flushing may also write the entire data, including log data, to the database 200. In addition, the buffer cache illustrated in FIG. 8 is illustrated to have three data pages, but is not necessarily limited thereto.

도 8을 통해 주목할 점은, 로컬 버퍼에 저장된 복사 데이터가 플러시되는 동안 버퍼 캐시의 원본 데이터에는 쓰기 모드로 접근이 가능하므로, 버퍼 캐시 내의 원본 데이터는 다른 스레드를 통한 쿼리 요청의 처리에 의해 원본 데이터인 데이터 페이지 B'에 포함된 데이터 중 적어도 일부가 변경될 수 있으며 이 단계를 나타낸 것이 도 8(d)이다. 도 8(d)에서는 변경된 데이터 페이지를 원본 데이터인 데이터 페이지 B'와 구별하기 위해 데이터 페이지 B''로 명명하였다. 만일 원본 데이터인 데이터 페이지 B'에 대한 플러시 처리가 완료되지 않은 상황에서 만일 데이터 페이지 B''에 대한 플러시가 또 발생하는 경우 앞서 설명한 방식에 의하면 또 다른 로컬 버퍼 공간에 데이터 페이지 B''를 저장하고 플러시를 수행해야 하므로 원본 데이터에 대해 서로 다른 데이터를 갖는 복수개의 복사 데이터(예컨대, B'및 B'')가 존재할 수 있다는 문제점이 발생할 수 있다는 점이다. 따라서, 이러한 문제점을 방지하기 위해 버퍼 캐시의 데이터 페이지는 플러시 처리 도중에도 쓰기 모드로 접근될 수는 있으나 플러시가 처리 완료될 때까지는 또 다시 플러시 대상으로 선택되지 않도록 하는 것이 중요하다. It should be noted through FIG. 8 that the original data in the buffer cache can be accessed in write mode while the copy data stored in the local buffer is flushed, so that the original data in the buffer cache can be accessed by processing a query request through another thread. At least some of the data included in the data page B 'may be changed, and this step is illustrated in FIG. In FIG. 8 (d), the changed data page is named data page B ″ to distinguish it from data page B ′ which is the original data. If the flush for data page B '' occurs again when the flushing process for data page B 'is not completed, the data page B' 'is stored in another local buffer space according to the method described above. In this case, a problem may occur in that a plurality of copy data (eg, B ′ and B ″) having different data with respect to the original data may exist. Therefore, in order to prevent such a problem, it is important that the data page of the buffer cache can be accessed in the write mode even during the flush processing, but it is not selected again as the flush target until the flush is completed.

앞서 설명한 본 발명의 일 실시예에 따른 플러시 처리 방식을 수행하기 위한 데이터베이스 서버(100)의 각 구성요소를 이하에 상세히 설명하도록 한다. Each component of the database server 100 for performing the flush processing method according to an embodiment of the present invention described above will be described in detail below.

데이터베이스 서버Database server

도 4를 참조하여, 본 발명의 일 실시예에 따라 향상된 데이터베이스 성능을 갖는 데이터베이스 서버(100)를 더욱 상세히 설명하면, 데이터베이스 서버(100)는 관리 설정부(110), 버퍼 복사부(120) 및 플러시부(130)를 포함할 수 있고 내부 저장 공간으로서 로컬 버퍼(140), 버퍼 캐시(150) 및 로그 캐시(160)를 포함할 수 있다. 상기 도 4에는 기존의 DBMS가 갖는 일반적인 기능 및 이를 수행하기 위한 구성요소는 생략되고, 본 발명을 실시하기 위한 구성요소만을 중심으로 기재하였음은 이해될 수 있다. Referring to FIG. 4, in more detail describing a database server 100 having improved database performance according to an embodiment of the present invention, the database server 100 includes a management setting unit 110, a buffer copying unit 120, and The flushing unit 130 may be included, and the internal storage space may include a local buffer 140, a buffer cache 150, and a log cache 160. It can be understood that the general function of the existing DBMS and components for performing the same are omitted in FIG. 4, and only the components for implementing the present invention are described.

먼저, 관리 설정부(110)는 버퍼 캐시(150) 내에서 플러시 대상이 되는 데이터 페이지인 원본 데이터가 로컬 버퍼(140)에 복사되고 복사된 로컬 버퍼(140) 내의 복사 데이터를 데이터베이스에 저장하는 동안, 즉 플러시 처리가 완료되는 동안 원본 데이터에 대해 서로 다른 데이터를 갖는 복수 개의 복사 데이터가 발생하지 않도록, 즉 버퍼 캐시(150) 내의 원본 데이터가 플러시 대상으로 선택되지 않도록 관리 설정하는 기능을 한다. 보다 상세하게 설명하면, 버퍼 캐시(150) 내에 저장된 각각의 데이터 페이지는 도 6에서 예시되는 바와 같은 데이터 구조를 포함할 수 있으며, 데이터 구조 내의 특정 값을 변경함으로써 특정 기능을 수행 또는 제한할 수 있다. 도 6에서 예시되는 데이터 구조는 별도의 저장 공간에서 관리될 수 있음은 물론이다. First, while the management setting unit 110 stores the copy data in the local buffer 140 and the original data which is the data page to be flushed in the buffer cache 150 is copied to the local buffer 140 in the database. That is, while the flush processing is completed, the plurality of copy data having different data with respect to the original data does not occur, that is, the function to manage and set so that the original data in the buffer cache 150 is not selected as the flush target. In more detail, each data page stored in the buffer cache 150 may include a data structure as illustrated in FIG. 6, and may perform or limit a specific function by changing a specific value in the data structure. . Of course, the data structure illustrated in FIG. 6 may be managed in a separate storage space.

플러시 발생시, 관리 설정부(110)는 버퍼 복사부(120)가 원본 데이터를 버퍼 캐시(150)로부터 로컬 버퍼(140)로 복사하는 과정 동안 원본 데이터에 대한 배타적인 접근이 되도록 한다. 이는 복사 과정이 수행되기 이전 또는 수행 도중에 원본 데이터의 내용이 다른 스레드에 의한 쿼리 요청에 대한 처리 결과로서 변경되는 것을 막기 위함이다. 그 구체적인 방식으로 버퍼 캐시(150)의 원본 데이터에 대해 뮤텍스(Mutex: Mutually Exclusive) 상태를 설정하며 이는 상기 도 6의 데이터 구조 중 '뮤텍스 여부'에 특정 값(예를 들어, mutex로 설정된 값 등)을 설정함으로서 수행될 수 있다. 필요한 절차의 수행 후 버퍼 캐시(150)의 원본 데이터는 다른 스레드에 의해 쓰기 모드를 포함하는 접근이 수행되어야 하므로 관리 설정부(110)는 그 뮤텍스가 해제되도록 뮤텍스 상태를 변경한다. When the flush occurs, the management setting unit 110 allows exclusive access to the original data while the buffer copying unit 120 copies the original data from the buffer cache 150 to the local buffer 140. This is to prevent the contents of the original data from being changed as a result of processing a query request by another thread before or during the copying process. In a specific manner, a mutex (mutually exclusive) state is set for the original data of the buffer cache 150, which is a specific value (for example, a value set to mutex, etc.) in the data structure of FIG. Can be performed by setting Since the original data of the buffer cache 150 needs to be accessed by another thread after performing the necessary procedure, the management setting unit 110 changes the mutex state so that the mutex is released.

또한, 관리 설정부(110)는 플러시부(130)에 의해 로컬 버퍼(140)에 저장된 복사 데이터가 플러시되어 데이터베이스(200)로 기록되는 동안 버퍼 캐시(150) 내의 원본 데이터가 플러시되지 않도록 하여야 한다. 그 구체적인 방식으로 버퍼 캐시(150) 내의 원본 데이터에 대해 플러시 대상이 되는 빅팀(victim)으로 선정되는 것을 막기 위해 빅팀이 되지 않도록 설정하며, 이는 상기 도 6의 데이터 구조 중 '빅팀 여부'에 특정 값(예를 들어, avoid_victim으로 설정된 값 등)을 설정함으로써 수행될 수 있다. 데이터베이스는 지연 기록기 스레드 등으로 버퍼 캐시(150) 내의 특정 데이터 페이지에 대해 플러시 및 삭제를 수행할 경우 데이터 구조 중 '빅팀 여부'를 참조하여 avoid_victim으로 설정된 데이터 페이지를 제외하고 나머지 데이터 페이지를 대상으로 특정 선정 방식에 의해 플러시되고 제거되는 페이지, 소위 빅팀,를 선정한다. 따라서, '빅팀 여부'에 빅팀을 방지하기 위한 특정 값이 설정되어 있는 경우, 해당 데이터 페이지는 빅팀 대상으로 선정되지 않는다. 한편, 플러시가 처리 완료된 이후에는 더 이상 원본 데이터가 빅팀에서 방지될 이유가 없으므로 관리 설정부(110)는 그 빅팀 여부를 재설정한다. In addition, the management setting unit 110 must prevent the original data in the buffer cache 150 from being flushed while the copy data stored in the local buffer 140 is flushed by the flushing unit 130 and written to the database 200. . In such a specific manner, it is set not to become a big team in order to prevent being selected as a victim to be flushed with respect to the original data in the buffer cache 150, which is a specific value for whether or not the `` Big team '' in the data structure of FIG. (For example, a value set to avoid_victim, etc.). When flushing and deleting a specific data page in the buffer cache 150 by using a lazy writer thread, the database refers to the remaining data pages except for the data page set to avoid_victim by referring to 'Validity' in the data structure. Select pages, so-called big teams, that are flushed and removed by the selection method. Therefore, when a specific value for preventing the big team is set in the 'big team' or not, the corresponding data page is not selected for the big team. On the other hand, after the flush is completed, since there is no reason why the original data is no longer prevented from the big team, the management setting unit 110 resets whether the big team is present.

또한, 관리 설정부(110)는 로컬 버퍼(140)의 복사 데이터가 플러시되어 데이터베이스로 기록됨에 따라 데이터베이스(200)에 저장된 데이터와 버퍼 캐시(150)의 원본 데이터간에 그 동기화가 이루어졌으므로 버퍼 캐시(150) 내의 원본 데이터는 더 이상 더티 페이지에 해당하지 않는다. 따라서, 버퍼 캐시(150) 내의 원본 데이터가 더티 페이지가 아님을 설정하며 이는 상기 도 6의 데이터 구조 중 '더티 페이지 여부'에 특정 값(예를 들어, no_dirty_page로 설정된 값 등)을 설정함으로써 수행될 수 있다. In addition, the management setting unit 110 is synchronized with the data stored in the database 200 and the original data of the buffer cache 150 as the copy data of the local buffer 140 is flushed and written to the database, so that the buffer cache ( The original data in 150 no longer corresponds to the dirty page. Therefore, the original data in the buffer cache 150 is set to not a dirty page, which is performed by setting a specific value (eg, a value set to no_dirty_page, etc.) in 'whether dirty page' in the data structure of FIG. 6. Can be.

다음으로, 버퍼 복사부(120)는 관리 설정부(110)의 요청에 의해 버퍼 캐시(150) 내의 특정 데이터 페이지인 원본 데이터를 로컬 버퍼(140)로 복사하는 기능을 수행한다. 전술한 바와 같이, 원본 데이터는 버퍼 캐시(150) 내의 특정 데이터 페이지뿐만이 아닌 로그 캐시(160) 내의 로그 데이터도 포함할 수 있으며 이 경우 버퍼 복사부(120)는 버퍼 캐시(150) 및 로그 캐시(160) 모두로부터 데이터를 로컬 버퍼(140)로 복사한다. Next, the buffer copy unit 120 copies the original data, which is a specific data page in the buffer cache 150, to the local buffer 140 at the request of the management setting unit 110. As described above, the original data may include not only a specific data page in the buffer cache 150 but also log data in the log cache 160. In this case, the buffer copy unit 120 may include the buffer cache 150 and the log cache ( 160 copies data from all to local buffer 140.

다음으로, 플러시부(130)는 관리 설정부(110)의 요청에 의해 로컬 버퍼(140)에 복사된 복사 데이터를 데이터베이스(200)에 플러시한다. 만일 복사 데이터에 대응되는 로그 데이터도 포함되어 있는 경우, 로그 데이터를 먼저 데이터베이스(200)에 동기화하고 이후 데이터 페이지를 데이터베이스(200)에 동기화하는 순서로 수행될 수 있다. 플러시 완료 후 플러시부(130)는 원본 데이터인 특정 데이터 페이지에 대한 빅팀 여부 변경을 위해 관리 설정부(110)에 플러시 완료 여부를 통지할 수 있다. Next, the flusher 130 flushes the copy data copied to the local buffer 140 by the request of the management setting unit 110 to the database 200. If log data corresponding to the copy data is also included, the log data may be performed in the order of first synchronizing the log data to the database 200 and then synchronizing the data page to the database 200. After the flushing is completed, the flushing unit 130 may notify the management setting unit 110 of whether the flushing has been completed in order to change whether or not the team is a big team for the specific data page which is the original data.

한편, 로컬 버퍼(140), 버퍼 캐시(150) 및 로그 캐시(160)는 모두 데이터베이스 서버(100) 내에 존재하는 저장 공간으로서 데이터베이스(200)에 비해 빠른 데이터 처리 속도를 보장하기 위해 그 물리적 구성은 RAM(Random Access Memory) 또는 캐시(Cache) 메모리 등으로 구현될 수 있으나 반드시 이에 한정되는 것은 아니다. 한편, 버퍼 캐시(150) 및 로그 캐시(160)는 종래 기술에서와 같이 쿼리 요청 처리를 위해 데이터베이스(200)로부터 해당하는 데이터 페이지를 복사해서 저장하고, 쿼리 요청 처리에 따른 변경 내용 및 그 로그를 저장하는 기능을 수행하나, 본 발명에서는 이에 부가하여 플러시 발생시 버퍼 캐시(150)에 저장된 원본 데이터는 직접 플러시되지 않고 또한 뮤텍스 상태가 설정되지 않아 다른 스레드도 쓰기 모드로 접근할 수 있는 특별한 기능을 갖는다. 또한, 로컬 버퍼(140)는 종래 기술에서는 존재하지 않았던 구성요소로서 플러시 발생시 버퍼 캐시(150)의 원본 데이터, 또는 이에 부가하여 로그 캐시(160)의 로그를 복사해서 복사 데이터로 저장하고, 복사 데이터로부터 플러시를 수행하여 데이터베이스(200)에 기록하는 특별한 기능을 갖는다. Meanwhile, the local buffer 140, the buffer cache 150, and the log cache 160 are all storage spaces existing in the database server 100, and the physical configuration of the local buffer 140 is faster in order to ensure faster data processing speed than the database 200. It may be implemented as random access memory (RAM) or cache memory, but is not necessarily limited thereto. Meanwhile, the buffer cache 150 and the log cache 160 copy and store corresponding data pages from the database 200 for processing a query request as in the prior art, and store the changes and the logs according to the processing of the query request. In addition, in the present invention, the original data stored in the buffer cache 150 is not directly flushed and the mutex state is not set when the flush occurs. Therefore, other threads may access the write mode. . In addition, the local buffer 140 is a component that does not exist in the prior art, and when the flush occurs, copy the original data of the buffer cache 150, or in addition to the log of the log cache 160 to store the copy data, and copy data It has a special function of performing a flush from and writing it to the database 200.

플러시 처리 흐름Flush processing flow

다음으로, 도 5를 참조하여 보다 구체적으로 데이터베이스 서버(100)에서 수행되는 플러시 처리 흐름을 설명하면, 버퍼 캐시(150) 내의 특정 데이터 페이지인 원본 데이터에 대한 플러시 발생시, 관리 설정부(110)는 스레드의 접근을 통해 원본 데이터가 변경되지 않도록 해당 페이지에 먼저 뮤텍스를 설정한다(S501). 다음으로, 버퍼 복사부(120)는 버퍼 캐시(150) 내의 원본 데이터를 로컬 버퍼(140)에 복사하여 복사 데이터를 생성한다(S502). 단계 S501 및 S502에서 원본 데이터 및 복사 데이터는 특정 데이터 페이지에 대한 데이터만이 아닌 이와 관련된 로그 데이터를 포함할 수 있는 것은 전술한 바 있다. Next, referring to FIG. 5, in more detail, the flow of the flush processing performed by the database server 100, when the flush occurs for the original data which is a specific data page in the buffer cache 150, the management setting unit 110 A mutex is first set on the corresponding page so that the original data is not changed through the thread's access (S501). Next, the buffer copy unit 120 copies the original data in the buffer cache 150 to the local buffer 140 to generate the copy data (S502). As described above, in steps S501 and S502, the original data and the copy data may include not only data for a specific data page but log data related thereto.

복사 데이터 생성 후, 관리 설정부(110)는 플러시 완료시까지 원본 데이터가 플러시되지 않도록 원본 데이터에 대해 빅팀 방지를 위한 값을 설정한다(S503). 또한, 관리 설정부(110)는 복사 데이터의 플러시를 통해 원본 데이터와 실제 데이터베이스에 저장된 데이터 간의 동기화가 완료된다고 볼 수 있으므로 플러시 완료 전이라도 원본 데이터에 대해 더티 페이지가 아님을 나타내기 위한 값을 설정한다(S504). 단계 S502 내지 S504를 통해 플러시 처리에 필요한 준비는 모두 수행하였으므로, 원본 데이터에 대한 다른 스레드로부터의 쓰기 모드를 포함하는 접근을 허용하기 위해 관리 설정부(110)는 원본 데이터의 뮤텍스를 해제한다(S505). After the copy data is generated, the management setting unit 110 sets a value for preventing big team on the original data so that the original data is not flushed until the flush is completed (S503). In addition, since the management setting unit 110 can see that the synchronization between the original data and the data stored in the actual database is completed by flushing the copy data, the management setting unit 110 sets a value to indicate that the original data is not a dirty page even before the flush is completed. (S504). Since all preparations necessary for the flush processing have been performed through steps S502 to S504, the management setting unit 110 releases the mutex of the original data in order to allow access including the write mode from another thread to the original data (S505). ).

이후, 실제적으로 동기화를 위한 플러시가 플러시부(130)에 의해 이루어지며(S506), 이 때 플러시부(130)는 로컬 버퍼(140)에 저장된 복사 데이터를 대상으로 플러시를 수행한다. 단계 S506에 의한 플러시가 수행되는 도중에도 다른 스레드에서 원본 데이터를 쓰기 모드로도 접근 가능한 것은 전술한 바 있다. Thereafter, the flushing for synchronization is actually performed by the flushing unit 130 (S506). At this time, the flushing unit 130 flushes the copy data stored in the local buffer 140. FIG. It has been described above that the original data can be accessed even in the write mode from another thread while the flush by step S506 is performed.

플러시부(130)로부터의 관리 설정부(110)에의 통지 또는 관리 설정부(110)의 확인에 의해 플러시 수행이 완료된 것을 확인(S507)한 경우, 더 이상 원본 데이터에 대해 플러시가 수행되는 것을 막을 필요가 없다. 따라서, 원본 데이터에 대해 빅팀으로 허용될 수 있도록 그 값을 설정(S508)한다. 이 과정에서, 관리 설정부(110)는 필요시 다시 한 번 원본 데이터에 대해 뮤텍스를 설정하고 빅팀 허용 설정이 끝난 후, 설정에 따른 원본 데이터의 뮤텍스를 해제할 수 있다. If it is confirmed (S507) that the flushing has been completed by notification from the flushing unit 130 to the management setting unit 110 or confirmation of the management setting unit 110 (S507), the flushing of the original data is no longer prevented from being performed. no need. Therefore, the value is set (S508) so as to be allowed to the big team for the original data. In this process, if necessary, the management setting unit 110 may set the mutex for the original data once again and, after completing the allow-team setting, may release the mutex of the original data according to the setting.

데이터베이스 성능 향상 효과Database Performance Improvements

도 7은 본 발명의 일 실시예에 따라 향상된 데이터베이스 성능을 갖는 데이터베이스 서버에서 측정된 TPS 수치를 도시한 그래프이다. 도 2와 대비하여 살펴보면, 본 발명을 적용한 결과 TPS 수치가 거의 균일해진 것을 확인할 수 있는데 이는 버퍼 캐시 내에서 플러시가 이루어지는 데이터 페이지의 특성에 따라 그 TPS 값의 변동이 심한 종래 기술에 비해 그 성능에 있어 크게 향상된 효과를 발휘하는 것을 확인할 수 있다. 7 is a graph illustrating TPS values measured in a database server with improved database performance according to an embodiment of the present invention. As compared with FIG. 2, it can be seen that the TPS value becomes almost uniform as a result of applying the present invention, which is more effective in performance compared to the prior art in which the TPS value fluctuates depending on the characteristics of the data page flushed in the buffer cache. It can be seen that the greatly improved effect.

한편, 본 발명에 따른 실시예들은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 본 발명을 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(Floptical disk)와 같은 자기-광 매체(megneto-optical media) 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. 상기된 하드웨어 장치는 본 발명의 동작을 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동되도록 구성될 수 있으며, 그 역도 마찬가지다. Meanwhile, the embodiments according to the present invention may be embodied in the form of program instructions that may be executed by various computer means and may be 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 those specially designed and constructed for the present invention or may be available to those skilled in the art of computer software. Examples of the computer-readable recording medium include magnetic media such as a hard disk, a floppy disk, and a magnetic tape; optical media such as CD-ROM and DVD; magnetic recording media such as a floppy disk; Includes hardware devices specifically configured to store and perform program instructions such as megneto-optical media and ROM, RAM, flash memory, and the like. Examples of program instructions include machine language code such as those produced by a compiler, as well as high-level language code that can be executed by a computer using an interpreter or the like. The hardware devices described above may be configured to operate as one or more software modules to perform the operations of the present invention, and vice versa.

이상과 같이 본 발명에서는 구체적인 구성 요소 등과 같은 특정 사항들과 한정된 실시예 및 도면에 의해 설명되었으나 이는 본 발명의 보다 전반적인 이해를 돕기 위해서 제공된 것일 뿐, 본 발명은 상기의 실시예에 한정되는 것은 아니며, 본 발명이 속하는 분야에서 통상적인 지식을 가진 자라면 이러한 기재로부터 다양한 수정 및 변형이 가능하다. As described above, the present invention has been described by specific embodiments such as specific components and the like. For those skilled in the art, various modifications and variations are possible from these descriptions.

따라서, 본 발명의 사상은 설명된 실시예에 국한되어 정해져서는 아니되며, 후술하는 특허청구범위뿐 아니라 이 특허청구범위와 균등하거나 등가적 변형이 있는 모든 것들은 본 발명 사상의 범주에 속한다고 할 것이다.Accordingly, the spirit of the present invention should not be construed as being limited to the embodiments described, and all of the equivalents or equivalents of the claims, as well as the following claims, belong to the scope of the present invention .

100 : 데이터베이스 서버 110 : 관리 설정부
120 : 버퍼 복사부 130 : 플러시부
140 : 로컬 버퍼 150 : 버퍼 캐시
160 : 로그 캐시 200 : 데이터베이스
300 : 단말장치 400 : 통신 네트워크
100: database server 110: management settings
120: buffer copy unit 130: flush unit
140: local buffer 150: buffer cache
160: log cache 200: database
300: terminal device 400: communication network

Claims (19)

데이터베이스에 저장된 데이터 페이지의 적어도 일부를 저장하고 있는 버퍼 캐시;
상기 버퍼 캐시에 저장된 데이터 페이지의 적어도 일부를 저장하기 위한 로컬 버퍼;
상기 버퍼 캐시 내의 원본 데이터를 상기 로컬 버퍼에 복사하는 버퍼 복사부; 및
상기 로컬 버퍼에 복사된 데이터를 상기 데이터베이스에 플러시하는 플러시부;를 포함하고,
상기 플러시가 수행되는 동안 상기 원본 데이터는 다른 스레드들이 쓰기 모드(WRITE mode)로 접근 가능한 것을 특징으로 하는 장치.
A buffer cache for storing at least a portion of data pages stored in a database;
A local buffer for storing at least a portion of data pages stored in the buffer cache;
A buffer copy unit which copies original data in the buffer cache to the local buffer; And
And a flushing unit configured to flush data copied to the local buffer to the database.
Wherein the original data is accessible to other threads in a write mode while the flush is being performed.
청구항 1에 있어서,
상기 장치는 상기 버퍼 캐시에 저장된 상기 원본 데이터의 변경과 관련된 로그 데이터가 저장되는 로그 캐시를 더 포함하고,
상기 버퍼 복사부는 상기 원본 데이터의 변경과 관련하여 상기 로그 캐시에 저장된 로그 데이터를 상기 로컬 버퍼에 더 복사하는 것을 특징으로 하는 장치.
The method according to claim 1,
The apparatus further includes a log cache storing log data related to the change of the original data stored in the buffer cache,
And the buffer copy unit further copies the log data stored in the log cache to the local buffer in association with the change of the original data.
청구항 1에 있어서,
상기 장치는 상기 버퍼 캐시 내의 원본 데이터에 대한 플러시 요청에 의해 그 동작이 개시되는 것을 특징으로 하는 장치.
The method according to claim 1,
And the device is initiated by a flush request for original data in the buffer cache.
청구항 1에 있어서,
상기 장치는 상기 버퍼 복사부의 복사가 수행되기 전에 다른 스레드들이 상기 원본 데이터를 쓰기 모드로 접근하지 못하도록 설정하는 제1기능; 및
상기 버퍼 복사부의 복사가 완료된 이후 다른 스레드들이 상기 원본 데이터를 쓰기 모드로 접근할 수 있도록 설정하는 제2기능을 갖는 관리 설정부를 더 포함하는 것을 특징으로 하는 장치.
The method according to claim 1,
The apparatus includes a first function of setting other threads to prevent access to the original data in a write mode before a copy of the buffer copy unit is performed; And
And a management setting unit having a second function of setting another thread to access the original data in a write mode after copying of the buffer copy unit is completed.
청구항 4에 있어서, 상기 관리 설정부는
상기 원본 데이터가 플러시 대상으로 선정되지 않도록 설정하는 제3기능을 더 갖는 것을 특징으로 하는 장치.
The method according to claim 4, wherein the management setting unit
And a third function of setting the original data so that the original data is not selected as a flush target.
청구항 4에 있어서, 상기 관리 설정부는
상기 원본 데이터가 상기 데이터베이스와 동기화되었음을 설정하는 제4기능을 더 갖는 것을 특징으로 하는 장치.
The method according to claim 4, wherein the management setting unit
And a fourth function of establishing that the original data is synchronized with the database.
청구항 5에 있어서, 상기 관리 설정부는 상기 플러시부의 플러시가 완료된 이후 상기 원본 데이터가 플러시 대상으로 선정될 수도 있도록 설정하는 제5기능을 더 갖는 것을 특징으로 하는 장치. The apparatus of claim 5, wherein the management setting unit further has a fifth function of setting the original data to be selected as a flushing target after the flushing of the flushing unit is completed. 청구항 7에 있어서, 상기 제5기능은 상기 원본 데이터를 다른 스레드들이 쓰기 모드로 접근하지 못하도록 설정된 이후에 수행되고, 상기 제5기능이 수행된 이후 상기 원본 데이터는 다른 스레드들이 쓰기 모드로 접근할 수 있도록 설정되는 것을 특징으로 하는 장치. The method of claim 7, wherein the fifth function is performed after the original data is set to prevent other threads from accessing the write mode, and after the fifth function is performed, the original data can be accessed by other threads in the write mode. And the device is set to be. 청구항 4에 있어서, 상기 관리 설정부의 각 기능은 상기 버퍼 캐시 내에 저장된 원본 데이터의 데이터 구조에 저장된 값 중 적어도 하나 이상을 변경하는 것을 특징으로 하는 장치. The apparatus of claim 4, wherein each function of the management setting unit changes at least one or more of values stored in a data structure of original data stored in the buffer cache. 데이터베이스의 성능을 향상하기 위한 장치에서 수행되는 각 단계가,
버퍼 캐시 내의 원본 데이터를 로컬 버퍼에 복사하는 단계; 및
상기 로컬 버퍼에 복사된 데이터를 상기
데이터베이스로 플러시하는 단계를 포함하고,
여기서 상기 버퍼 캐시는 상기 데이터베이스에 저장된 데이터 페이지의 적어도 일부를 저장하고 있으며,
상기 플러시가 수행되는 동안 상기 원본 데이터에는 다른 스레드들이 쓰기 모드로 접근 가능한 것을 특징으로 하는 방법.
Each step performed by the device to improve the performance of the database,
Copying original data in the buffer cache to a local buffer; And
Recall data copied to the local buffer
Flushing to the database,
Wherein the buffer cache stores at least a portion of data pages stored in the database,
And while the flush is being performed, other threads can access the original data in write mode.
청구항 10에 있어서, 상기 복사하는 단계는,
상기 버퍼 캐시 내의 상기 원본 데이터 및 상기 원본 데이터의 변경과 관련하여 로그 캐시에 저장된 로그 데이터를 상기 로컬 버퍼에 더 복사하는 것을 특징으로 하는 방법.
The method of claim 10, wherein the copying step,
And copying the original data in the buffer cache and log data stored in a log cache in association with the change of the original data to the local buffer.
청구항 10에 있어서, 상기 방법은,
상기 버퍼 캐시 내의 원본 데이터에 대한 플러시 요청에 의해 그 수행이 개시되는 것을 특징으로 하는 방법.
11. The method of claim 10,
The execution is initiated by a flush request for the original data in the buffer cache.
청구항 10에 있어서, 상기 방법은,
상기 복사하는 단계 이전에 다른 스레드들이 상기 원본 데이터를 쓰기 모드로 접근하지 못하도록 설정하는 제1 단계; 및
상기 복사하는 단계 이후에 다른 스레드들이 상기 원본 데이터를 쓰기 모드로 접근할 수 있도록 설정하는 제2단계를 더 포함하는 것을 특징으로 하는 방법.
11. The method of claim 10,
A first step of preventing other threads from accessing the original data in a write mode before the copying step; And
And after the copying step, setting another thread to access the original data in a write mode.
청구항 13에 있어서, 상기 방법은,
상기 원본 데이터가 플러시 대상으로 선정되지 않도록 설정하는 제3단계를 더 포함하는 것을 특징으로 하는 방법.
14. The method of claim 13,
And a third step of setting the original data so that the original data is not selected to be flushed.
청구항 13에 있어서, 상기 방법은,
상기 원본 데이터가 상기 데이터베이스와 동기화되었음을 설정하는 제4단계를 더 포함하는 것을 특징으로 하는 방법.
14. The method of claim 13,
And a fourth step of establishing that the original data is synchronized with the database.
청구항 14에 있어서, 상기 방법은,
상기 플러시하는 단계 이후에 상기 원본 데이터가 플러시 대상으로 선정될 수도 있도록 설정하기 위한 제5단계를 더 포함하는 것을 특징으로 하는 방법.
15. The method of claim 14,
And a fifth step of setting the original data to be selected as a flush object after the flushing.
청구항 16에 있어서, 상기 방법은,
상기 제5단계 이전에 상기 원본 데이터를 다른 스레드들이 쓰기 모드로 접근하지 못하도록 설정하는 단계; 및
상기 제5단계 이후에 상기 원본 데이터를 다른 스레드들이 쓰기 모드로 접근할 수 있도록 설정하는 단계를 더 포함하는 것을 특징으로 하는 방법.
17. The method of claim 16,
Setting the original data to prevent other threads from accessing the write mode before the fifth step; And
And setting the original data to allow other threads to access the write mode after the fifth step.
청구항 13에 있어서, 상기 각 단계는 상기 버퍼 캐시 내에 저장된 원본 데이터의 데이터 구조에 저장된 값 중 적어도 하나 이상을 변경하는 것을 특징으로 하는 방법. 14. The method of claim 13, wherein each step alters at least one or more of values stored in a data structure of original data stored in the buffer cache. 청구항 10 내지 17 중 어느 한 항에 기재된 방법의 각 단계를 컴퓨터상에서 수행하기 위한 프로그램을 기록한 컴퓨터 판독 가능한 기록매체. A computer-readable recording medium having recorded thereon a program for performing each step of the method according to claim 10 on a computer.
KR1020120008441A 2012-01-27 2012-01-27 Method and device for improving performance of database KR101375794B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020120008441A KR101375794B1 (en) 2012-01-27 2012-01-27 Method and device for improving performance of database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020120008441A KR101375794B1 (en) 2012-01-27 2012-01-27 Method and device for improving performance of database

Publications (2)

Publication Number Publication Date
KR20130087250A KR20130087250A (en) 2013-08-06
KR101375794B1 true KR101375794B1 (en) 2014-03-18

Family

ID=49214138

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020120008441A KR101375794B1 (en) 2012-01-27 2012-01-27 Method and device for improving performance of database

Country Status (1)

Country Link
KR (1) KR101375794B1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0950393A (en) * 1995-03-31 1997-02-18 Sun Microsyst Inc Method and apparatus for management of database in distributed object operating environment
KR20010053691A (en) * 1999-12-01 2001-07-02 오길록 Method for entering critical section for synchronizing distributed database applications
KR100439035B1 (en) 2001-10-04 2004-07-03 삼성전자주식회사 Non Intrusive Performance Data Polling Method And Communication System Thereof
KR100941350B1 (en) 2001-11-01 2010-02-11 베리사인 인코포레이티드 Transactional memory manager

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0950393A (en) * 1995-03-31 1997-02-18 Sun Microsyst Inc Method and apparatus for management of database in distributed object operating environment
KR20010053691A (en) * 1999-12-01 2001-07-02 오길록 Method for entering critical section for synchronizing distributed database applications
KR100439035B1 (en) 2001-10-04 2004-07-03 삼성전자주식회사 Non Intrusive Performance Data Polling Method And Communication System Thereof
KR100941350B1 (en) 2001-11-01 2010-02-11 베리사인 인코포레이티드 Transactional memory manager

Also Published As

Publication number Publication date
KR20130087250A (en) 2013-08-06

Similar Documents

Publication Publication Date Title
US11281377B2 (en) Method and apparatus for managing storage system
US11487740B2 (en) Reduce log contention by batching log record transfers to the log
CN109086388B (en) Block chain data storage method, device, equipment and medium
US9632944B2 (en) Enhanced transactional cache
US9477609B2 (en) Enhanced transactional cache with bulk operation
US20060167895A1 (en) Database system and method for adapting a main database components in a main memory thereof
JP5012628B2 (en) Memory database, memory database system, and memory database update method
US9990150B2 (en) Method to provide transactional semantics for updates to data structures stored in a non-volatile memory
US8433871B2 (en) Data copy management for faster reads
US10621202B2 (en) Method, apparatus and data structure for copying values of a table of a database
Son et al. SSD-assisted backup and recovery for database systems
JP5721056B2 (en) Transaction processing apparatus, transaction processing method, and transaction processing program
US11016937B2 (en) Updateable distributed file framework
US9411692B2 (en) Applying write elision
US10430287B2 (en) Computer
US20170177615A1 (en) TRANSACTION MANAGEMENT METHOD FOR ENHANCING DATA STABILITY OF NoSQL DATABASE BASED ON DISTRIBUTED FILE SYSTEM
KR101946135B1 (en) Database management system and method thereof using a non-volatile memory
US11880495B2 (en) Processing log entries under group-level encryption
KR101375794B1 (en) Method and device for improving performance of database
KR101295210B1 (en) Method and device for managing database
US20110131181A1 (en) Information processing device and computer readable storage medium storing program
US9933961B1 (en) Method to improve the read performance in a deduplicated storage system
US10042558B1 (en) Method to improve the I/O performance in a deduplicated storage system
Kissinger et al. A high-throughput in-memory index, durable on flash-based SSD: insights into the winning solution of the SIGMOD programming contest 2011
KR101789933B1 (en) Computing system and method for data consistency

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20170117

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20180102

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20190102

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20200102

Year of fee payment: 7