KR101750744B1 - Apparatus and Method for Operating Write-Ahead-Logging - Google Patents
Apparatus and Method for Operating Write-Ahead-Logging Download PDFInfo
- Publication number
- KR101750744B1 KR101750744B1 KR1020150148998A KR20150148998A KR101750744B1 KR 101750744 B1 KR101750744 B1 KR 101750744B1 KR 1020150148998 A KR1020150148998 A KR 1020150148998A KR 20150148998 A KR20150148998 A KR 20150148998A KR 101750744 B1 KR101750744 B1 KR 101750744B1
- Authority
- KR
- South Korea
- Prior art keywords
- data
- storage medium
- area
- copy command
- log
- 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
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, the file system uses the Write-Ahead-Logginf technique to prevent data consistency from being corrupted by 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 file 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. Since the buffer area is divided and managed in units of pages, the loaded data is also loaded in page units.
Modification of the original data in the file system is performed by dividing into two steps: commit and checkpoint.
First, the commit means writing the changed page of the operating system to the buffer area of the kernel page cache (DB buffer), and when the recording is completed, the log file of the secondary storage (log file) 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 buffer area of the kernel page cache (DB buffer) and writes it again to the file of the secondary storage (Checkpoint 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.
Accordingly, the conventional file system may cause problems such as data access speed deterioration, power consumption, and cache pollution due to the inefficiency.
In this way, there is a problem that inefficiency occurs because the journaling technique is used in the file 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)
A main memory which is a memory including a buffer area;
A storage medium having a storage area logically divided into a log area in which log data is stored and a data area in which original data is stored and a copy function between internal logical blocks according to an internal copy command; And
When a write transaction occurs, new data is loaded in a buffer area of the main memory on a page-by-page basis, and new data of the buffer area is sequentially written to the log area of the storage medium according to a commit operation To the storage medium, an internal copy command instructing to change the position of the new data in the log area to the original data position in the data area according to a checkpoint operation when the commit operation is completed, / RTI >
The control unit recognizes a first logical block address (LBA) of the new data in the log area and a second logical block address of the original data, and determines the first logical block address And transmits the internal copy command to the storage medium in such a manner that new data is copied 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.
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 KR20170048084A (en) | 2017-05-08 |
KR101750744B1 true 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 |
---|---|---|---|---|
US11556268B2 (en) | 2021-04-22 | 2023-01-17 | Western Digital Technologies, Inc. | Cache based flow for a simple copy command |
US11733920B2 (en) | 2020-09-10 | 2023-08-22 | Western Digital Technologies, Inc. | NVMe simple copy command support using dummy virtual function |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102098253B1 (en) * | 2018-02-13 | 2020-04-07 | 재단법인대구경북과학기술원 | System and method for large-scale frequent pattern mining on distributed systems |
KR102132387B1 (en) * | 2018-10-19 | 2020-07-09 | 한양대학교 산학협력단 | Method and apparatus for logging based on barrier |
-
2015
- 2015-10-26 KR KR1020150148998A patent/KR101750744B1/en active IP Right Grant
Cited By (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 |
Also Published As
Publication number | Publication date |
---|---|
KR20170048084A (en) | 2017-05-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11216214B2 (en) | Memory system and operation method thereof | |
KR102395360B1 (en) | A device controller and method for performing a plurality of write transactions atomically within a nonvolatile data storage device | |
KR102403034B1 (en) | Dynamic garbage collection p/e policies for redundant storage blocks and distributed software stacks | |
CN109426619B (en) | Method for accessing flash memory module, related flash memory controller and electronic device | |
US9244839B2 (en) | Methods and apparatus for supporting persistent memory | |
KR101750744B1 (en) | Apparatus and Method for Operating Write-Ahead-Logging | |
US9940201B2 (en) | Disk array having mirror configuration and rebuilding method therefor | |
US20130111103A1 (en) | High-speed synchronous writes to persistent storage | |
EP3446221B1 (en) | Adapted block translation table (btt) | |
TW202001573A (en) | Memory system | |
US10769074B2 (en) | Computer memory content movement | |
US20140304487A1 (en) | Information processing apparatus, memory control device, and data transfer control method | |
JP4745465B1 (en) | Semiconductor memory device and method for controlling semiconductor memory device | |
US20170160940A1 (en) | Data processing method and apparatus of solid state disk | |
CN111026325B (en) | Flash memory controller, control method of flash memory controller and related electronic device | |
JP4892812B2 (en) | Cache control and data processing system and processing program therefor | |
WO2018139223A1 (en) | Information processing device, control program and information processing method | |
US20210271600A1 (en) | Data storage device and operating method thereof | |
US10714176B2 (en) | Read-write cycle execution based on history | |
WO2023245942A1 (en) | Ssd finite window data deduplication identification method and apparatus, and computer device | |
CN104978280B (en) | Data storage system and specific instruction execution method thereof | |
JP2011175666A (en) | Semiconductor storage device, and method for controlling the same | |
CN108984117B (en) | Data reading and writing method, medium and equipment | |
WO2015141219A1 (en) | Storage system, control device, memory device, data access method, and program recording medium | |
JP2013109404A (en) | Information processing 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 |