KR20170048084A - Apparatus and Method for Operating Write-Ahead-Logging - Google Patents
Apparatus and Method for Operating Write-Ahead-Logging Download PDFInfo
- Publication number
- KR20170048084A KR20170048084A KR1020150148998A KR20150148998A KR20170048084A KR 20170048084 A KR20170048084 A KR 20170048084A KR 1020150148998 A KR1020150148998 A KR 1020150148998A KR 20150148998 A KR20150148998 A KR 20150148998A KR 20170048084 A KR20170048084 A KR 20170048084A
- Authority
- KR
- South Korea
- Prior art keywords
- data
- storage medium
- updated
- address
- area
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0804—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches with main memory updating
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1405—Saving, restoring, recovering or retrying at machine instruction level
- G06F11/141—Saving, restoring, recovering or retrying at machine instruction level for bus or memory accesses
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0866—Addressing 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
- G06F12/0871—Allocation or management of cache space
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Retry When Errors Occur (AREA)
Abstract
The present invention discloses an apparatus and method for pre-write logging. The pre-write logging operation apparatus according to an embodiment of the present invention has a log area for storing data to be updated according to a commit operation and a storage space logically divided into a data area for storing original data, A storage medium providing the storage medium; And a controller for instructing an internal copy command to update the data to be updated to the original data position of the data area at the time of the checkpoint operation to the storage medium.
Description
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data logging technique, and more particularly, to a pre-write logging operation apparatus and method including a commit and a checkpoint operation.
In general, a database or file system uses the Write-Ahead-Logginf technique to prevent corruption of data consistency due to unexpected errors.
Specifically, when an update (change) of data occurs in an atomic transaction, the change is not directly applied to the original data, but is recorded in the log area. When the transaction is completed, the change is reflected in the original data.
A conventional database system is a hierarchical memory structure composed of a main memory and a storage of a host. In the storage area, an area in which original data is stored and an area in which a log file is stored are allocated in a divided manner.
In this way, the main memory is basically managed by the operating system (kernel) in the form of a page cache, and utilizes a part of the storage area as a unique buffer area. At this time, the buffer area is used to load the data to be updated before updating the data in the database. Since the buffer area is managed in units of pages, the loaded data is also loaded in page units.
In the database system, modification of the original data is performed in two steps: commit and checkpoint.
First, the commit means writing the changed page of the operating system into the database buffer area of the kernel page cache, and when the recording is completed, the log file of the storage area of the secondary storage Log file) is recorded again.
Next, the point at which the data in the log file is written directly to the data source file is called a checkpoint.
When a checkpoint occurs, the operating system loads the log file of the secondary storage into the database buffer area of the kernel page cache and then writes the database file of the secondary storage ) (Check point operation).
When attempting to load log file data into main memory, the operating system must read the remaining data from main memory back into main memory via physical physical storage access. This series of processes leads to double input / output to the secondary storage, causing considerable overhead. In other words, although the log file data is in the secondary storage at the checkpoint time, the operating system loads the log file data into the buffer area of the kernel page cache (DB buffer) And then re-read it to write to the secondary storage.
Therefore, the conventional database system may cause problems such as data access speed, power consumption, and cache pollution due to the inefficiency.
Similar inefficiencies can result from using journaling techniques in the same way in the file system as well as in the database system.
SUMMARY OF THE INVENTION It is an object of the present invention to provide a pre-write logging operation apparatus and method using an improved check point operation.
The objects of the present invention are not limited to the above-mentioned objects, and other objects not mentioned can be clearly understood by those skilled in the art from the following description.
The pre-write logging operation apparatus according to an embodiment of the present invention has a log area for storing data to be updated according to a commit operation and a storage space logically divided into a data area for storing original data, A storage medium providing the storage medium; And a controller for instructing an internal copy command to update the data to be updated to the original data position of the data area at the time of the checkpoint operation to the storage medium.
The internal copy command may include a first logical block address at which the data to be updated is stored, a second logical block address at the original data location, and information of original data corresponding to the data to be updated.
The storage medium may update the original data stored in the second logical block address by copying the updated data stored in the first logical block address to the second logical block address.
The controller may wait until the copying completion is received from the storage medium after transmitting the internal copy command, or may perform another transaction from the storage medium without waiting for the completion of the copying.
On the other hand, when the controller receives the failure report for the internal copy command from the storage medium, the controller can retransmit the internal copy command.
According to another aspect of the present invention, there is provided a pre-write logging operation method using a storage medium having a self-copy function by a control unit, the method comprising: Confirming the address of the original data in the data area of the data area; And transmitting an internal copy command for instructing a data copy from the storage address of the data to be updated to the storage address of the original data to the storage medium, wherein the internal copy command includes data in one address of the storage medium To another address, to the other address.
The internal copy command may include a logical block address of the data to be updated in the log area, a logical block address of the original data in the data area corresponding to the logical block address, and a copy command thereof.
In addition, the above-described steps may include waiting after transmitting the command and reporting completion of copying from the storage medium; Or performing another transaction without waiting for a copy completion report from the storage medium after transmitting the command.
According to the present invention, it is possible to reduce the software load at the time of check point calculation.
FIG. 1 illustrates a conventional pre-write logging calculation process. FIG.
BACKGROUND OF THE INVENTION 1. Field of the Invention [0001]
FIG. 3A illustrates a commit operation process according to an embodiment of the present invention; FIG.
FIG. 3B illustrates a checkpoint calculation process according to an embodiment of the present invention; FIG.
FIG. 4 is a flowchart illustrating a pre-write logging operation method according to an embodiment of the present invention; FIG.
BRIEF DESCRIPTION OF THE DRAWINGS The above and other objects, advantages and features of the present invention and methods of achieving them will be apparent from the following detailed description of embodiments thereof taken in conjunction with the accompanying drawings. The present invention may, however, be embodied in many different forms and should not be construed as being limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art. Is provided to fully convey the scope of the invention to those skilled in the art, and the invention is only defined by the scope of the claims. It is to be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. In the present specification, the singular form includes plural forms unless otherwise specified in the specification. As used herein, the terms " comprises, " and / or "comprising" refer to the presence or absence of one or more other components, steps, operations, and / Or additions.
Embodiments of the present invention will now be described in detail with reference to the accompanying drawings. FIG. 3 is a flowchart illustrating a commit operation process according to an embodiment of the present invention, and FIG. 3B is a flowchart illustrating a write operation according to an embodiment of the present invention. And FIG.
2, the pre-write logging computing device according to an embodiment of the present invention includes a
The
The
For example, the
The
Here, the
The
Here, the
At this time, the
3A, when the commit operation is performed, the
Here, the
At the time of a check point calculation for updating (applying) the data of the
The internal copy command transmitted to the
For example, when a, b, and c stored in the first to third logical block addresses in the
As described above, according to the embodiment of the present invention, the log data stored in the storage medium is written back to the main memory at the time of the conventional checkpoint operation using the internal storage copying operation at the time of the checkpoint operation and then transferred to the storage medium, It is possible to improve the problem that traffic is generated.
In addition, the embodiment of the present invention improves storage performance by reducing unnecessary I / O traffic in the check point calculation, reduces energy consumption used for data transmission and reception, and reduces software overhead.
Hereinafter, a pre-write logging operation method according to an embodiment of the present invention will be described with reference to FIG. 4 is a flowchart illustrating a pre-write logging operation method according to an embodiment of the present invention.
Referring to FIG. 4, the
When a write transaction occurs, the
When the data to be changed is loaded in the
When the data in the
Thereafter, the
If the received command execution result indicates failure, the
As described above, the embodiment of the present invention improves the performance of the storage medium and reduces the energy consumption and the software overhead as the data input / output traffic is reduced in the checkpoint calculation.
While the present invention has been described in detail with reference to the accompanying drawings, it is to be understood that the invention is not limited to the above-described embodiments. Those skilled in the art will appreciate that various modifications, Of course, this is possible. Accordingly, the scope of protection of the present invention should not be limited to the above-described embodiments, but should be determined by the description of the following claims.
210: control unit 220: main memory 230: storage medium
221: buffer area 231: log area 232: data area
Claims (7)
And a controller for instructing an internal copy command to update the data to be updated to the original data position of the data area at the time of a checkpoint calculation to the storage medium.
Wherein the internal copy command includes information of a first logical block address where the data to be updated is stored, a second logical block address of the original data position, and original data corresponding to the data to be updated,
Wherein the storage medium updates the original data stored in the second logical block address by copying the data to be updated stored in the first logical block address to the second logical block address.
Wherein the controller is configured to wait until the copying completion is reported from the storage medium after transmitting the internal copy command or to perform another transaction without waiting for the report of completion of copying from the storage medium.
And upon receipt of a failure report for the internal copy command from the storage medium, retransmits the internal copy command.
Confirming the address of the data to be updated in the log area of the storage medium and the address of the original data of the data area of the storage medium upon completion of the commit operation; And
And transmitting an internal copy command for instructing a data copy from the storage address of the data to be updated to the storage address of the original data to the storage medium,
Wherein the internal copy command is a command for instructing a function of copying data in one address of the storage medium to another address.
A logical block address of the original data in the data area corresponding to the logical block address of the data to be updated in the log area, and a copy command thereof.
Waiting for a completion of copying from the storage medium after receiving the command; or,
Performing another transaction without waiting for a copy completion report from the storage medium after transmitting the command
Write pre-write operation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020150148998A KR101750744B1 (en) | 2015-10-26 | 2015-10-26 | Apparatus and Method for Operating Write-Ahead-Logging |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020150148998A KR101750744B1 (en) | 2015-10-26 | 2015-10-26 | Apparatus and Method for Operating Write-Ahead-Logging |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20170048084A true KR20170048084A (en) | 2017-05-08 |
KR101750744B1 KR101750744B1 (en) | 2017-06-23 |
Family
ID=59283391
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020150148998A KR101750744B1 (en) | 2015-10-26 | 2015-10-26 | Apparatus and Method for Operating Write-Ahead-Logging |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR101750744B1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20190103918A (en) * | 2018-02-13 | 2019-09-05 | 재단법인대구경북과학기술원 | System and method for large-scale frequent pattern mining on distributed systems |
KR20200044660A (en) * | 2018-10-19 | 2020-04-29 | 한양대학교 산학협력단 | Method and apparatus for logging based on barrier |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11733920B2 (en) | 2020-09-10 | 2023-08-22 | Western Digital Technologies, Inc. | NVMe simple copy command support using dummy virtual function |
US11556268B2 (en) | 2021-04-22 | 2023-01-17 | Western Digital Technologies, Inc. | Cache based flow for a simple copy command |
-
2015
- 2015-10-26 KR KR1020150148998A patent/KR101750744B1/en active IP Right Grant
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20190103918A (en) * | 2018-02-13 | 2019-09-05 | 재단법인대구경북과학기술원 | System and method for large-scale frequent pattern mining on distributed systems |
KR20200044660A (en) * | 2018-10-19 | 2020-04-29 | 한양대학교 산학협력단 | Method and apparatus for logging based on barrier |
Also Published As
Publication number | Publication date |
---|---|
KR101750744B1 (en) | 2017-06-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11216214B2 (en) | Memory system and operation method thereof | |
KR102403034B1 (en) | Dynamic garbage collection p/e policies for redundant storage blocks and distributed software stacks | |
KR102395360B1 (en) | A device controller and method for performing a plurality of write transactions atomically within a nonvolatile data storage device | |
CN109426619B (en) | Method for accessing flash memory module, related flash memory controller and electronic device | |
US7921339B2 (en) | Flash storage device with data correction function | |
US9244839B2 (en) | Methods and apparatus for supporting persistent memory | |
US10860246B2 (en) | Persistent memory updating | |
JP6470300B2 (en) | Method and processor for data processing | |
KR101750744B1 (en) | Apparatus and Method for Operating Write-Ahead-Logging | |
JP2015201234A (en) | Host system and host controller | |
US9940201B2 (en) | Disk array having mirror configuration and rebuilding method therefor | |
EP3446221B1 (en) | Adapted block translation table (btt) | |
US10769074B2 (en) | Computer memory content movement | |
KR102287677B1 (en) | Data accessing method, apparatus, device, and storage medium | |
US20170160940A1 (en) | Data processing method and apparatus of solid state disk | |
US20160103613A1 (en) | Tagging for storage device regions | |
CN105760218A (en) | Online migration method and device for virtual machine | |
CN111026325B (en) | Flash memory controller, control method of flash memory controller and related electronic device | |
WO2022144646A1 (en) | Migrating pages of memory accessible by input-output devices | |
JP4892812B2 (en) | Cache control and data processing system and processing program therefor | |
US20210271600A1 (en) | Data storage device and operating method thereof | |
US8856468B2 (en) | Memory device capable of improving write processing speed and memory control method | |
CN108519860B (en) | SSD read hit processing method and device | |
WO2015141219A1 (en) | Storage system, control device, memory device, data access method, and program recording medium | |
KR20210022260A (en) | Operating method of memory controller, memory controller, and storage device |
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 |