Log management method, system, storage medium and device
By dividing the cache of the solid-state drive system into multiple intervals and uniformly flushing log data and metadata, the problem caused by storing log data and metadata on different media is solved, achieving efficient management and a robust log module.
Patent Information
- Application Number
- CN202310748017.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-25
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2043-06-25
AI Technical Summary
In existing technologies, when log data and metadata are stored on different media, a problem with one device can affect another, and synchronous flushing wastes physical pages. Furthermore, a power outage can lead to mismatch between metadata and log data.
The solid-state drive system's cache is divided into multiple cache regions, and each region is further divided into a first interval and a second interval. Log data is cached in the first interval, and metadata is cached in the second interval. When the first interval is full, the data is flushed down in a unified manner. The cache is switched using a ping-pong method to record data, and the log data is recovered by time-sequential labeling.
It achieves efficient management of log data and metadata, avoids the impact of dependencies, enhances the robustness of the log module, and ensures data recording and recovery functions in power-on/off scenarios.
Smart Images

Figure CN116775579B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of log technology, and in particular to a log management method, system, storage medium, and device. Background Technology
[0002] In today's SSD (Solid State Disk) system applications, logging is a crucial functional module. A well-designed logging module facilitates efficient maintenance and development of SSD products for both users and developers. Commonly used storage devices in the industry for logging modules include NAND flash memory and NOR flash memory.
[0003] In scenarios where NOR FLASH stores metadata, the raw log data and metadata are stored on different media, creating a dependency between the two module units. When the NOR FLASH device malfunctions and becomes inaccessible, the raw data of the log module becomes unavailable.
[0004] In scenarios where metadata is stored in NAND flash, each time the raw log data is flushed, the metadata also needs to be flushed synchronously. Due to the media properties of NAND flash, metadata needs to be saved in a page-size aligned manner. A physical page size is typically 4KB or 16KB, while the actual size of metadata is generally no more than 100 bytes. This creates a de facto write amplification effect. Furthermore, since the raw data and metadata need to be saved separately during log flushing, this process involves two steps. In special scenarios such as abnormal power outages, the atomicity of these two steps may not be guaranteed, leading to a mismatch between the persistently stored metadata and the raw data. Summary of the Invention
[0005] In view of this, the purpose of this invention is to propose a log management method, system, storage medium and device to solve the problems in the prior art where metadata and log data with dependencies are stored on different media, which causes one device to fail and the other to be affected, and synchronous flushing wastes physical pages. In addition, recovery after power failure may cause confusion in the matching of metadata and log data.
[0006] To achieve the above objectives, the present invention provides a log management method, comprising the following steps:
[0007] The cache of the solid-state drive system is divided into multiple cache regions, and each cache region is further divided into a first interval and a second interval;
[0008] Cache the current log data generated by the system operation to the first interval of the current cache area;
[0009] In response to the current log data filling the first interval, the metadata corresponding to the current log data is cached in the second interval of the current cache area;
[0010] Initiate a cache region flush operation so that the first interval of the next cache region is used to cache the next log data generated by the system.
[0011] In some embodiments, the system has two buffers.
[0012] In some embodiments, the method further includes:
[0013] In response to all first intervals of the first buffer being full, log data is cached using each first interval of the second buffer; and
[0014] Use the second cache to cache the corresponding metadata for each second interval.
[0015] In some embodiments, the size of each cache region is the same as the size of a physical page in flash memory, and the size of the cache is an integer multiple of the physical page size.
[0016] In some embodiments, the method further includes:
[0017] The log data and corresponding metadata of each cache area are stored in the corresponding physical page.
[0018] In some embodiments, storing the log data and corresponding metadata of each cache region into the corresponding physical page includes:
[0019] Log data and corresponding metadata for each cache region are stored in the corresponding physical pages according to the cache order.
[0020] In some embodiments, the method further includes:
[0021] During storage, a label is added to the metadata of each second interval, resulting in multiple labels, with the values of the multiple labels gradually increasing;
[0022] In response to a system power-on, each physical page in the flash memory is scanned to find the metadata in each physical page;
[0023] The index values of the found metadata are compared to determine the metadata with the largest index value;
[0024] The latest log data at the time of the system's last power-off is determined based on the log data corresponding to the metadata with the largest label value;
[0025] Log recovery is performed based on the latest log data.
[0026] Another aspect of the present invention provides a log management system, comprising:
[0027] The partitioning module is configured to divide the cache of the solid-state drive system into multiple cache regions, and each cache region is further divided into a first interval and a second interval.
[0028] The first cache module is configured to cache the current log data generated during system operation to the first interval of the current cache area;
[0029] The second caching module is configured to cache the metadata corresponding to the current log data to the second interval of the current cache area in response to the current log data filling the first interval; and
[0030] The flush module is configured to initiate a cache region flush operation, so that the first interval of the next cache region is used to cache the next log data generated during system operation.
[0031] In another aspect, the present invention provides a computer-readable storage medium storing computer program instructions that, when executed by a processor, implement the above-described method.
[0032] In another aspect, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program that, when executed by the processor, performs the above-described method.
[0033] The present invention has at least the following beneficial technical effects:
[0034] The log management method of this invention divides the cache of a solid-state drive system into multiple cache regions, and further divides each cache region into a first interval and a second interval. The current log data generated during system operation is cached in the first interval of the current cache region. When the current log data fills the first interval, the corresponding metadata is cached in the second interval of the current cache region, and a cache region flushing operation is initiated. This allows the first interval of the next cache region to be used to cache the next log data generated during system operation. By uniformly packaging log data and metadata in the cache for flushing, efficient management of log data and metadata is achieved. This avoids the problem of dependent metadata and log data being stored on different media, which could lead to a problem where a failure in one device affects another. Furthermore, it enables the logging module to record and restore data during power-on and power-off scenarios, reducing coupling between modules and system resource consumption while enhancing the robustness of the logging module. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained based on these drawings without creative effort.
[0036] Figure 1 This is a schematic diagram of a log management method provided according to an embodiment of the present invention;
[0037] Figure 2 This is a schematic diagram of the cache management process provided according to an embodiment of the present invention;
[0038] Figure 3 This is a schematic diagram of a log management system provided according to an embodiment of the present invention;
[0039] Figure 4 A schematic diagram of a computer-readable storage medium for implementing a log management method according to an embodiment of the present invention;
[0040] Figure 5 This is a schematic diagram of the hardware structure of a computer device for an execution log management method provided according to an embodiment of the present invention. Detailed Implementation
[0041] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to specific examples and the accompanying drawings.
[0042] It should be noted that all uses of "first" and "second" in the embodiments of the present invention are for the purpose of distinguishing two different entities or different parameters with the same name. Therefore, "first" and "second" are merely for convenience of expression and should not be construed as limiting the embodiments of the present invention. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, such as other steps or units inherent in a process, method, system, product, or device that includes a series of steps or units.
[0043] Based on the above objectives, the first aspect of the present invention provides an embodiment of a log management method. Figure 1 The diagram shown is a schematic representation of an embodiment of the log management method provided by the present invention. Figure 1 As shown, the embodiments of the present invention include the following steps:
[0044] Step S10: Divide the cache of the solid-state drive system into multiple cache regions, and divide each cache region into a first interval and a second interval;
[0045] Step S20: Cache the current log data generated by the system operation into the first interval of the current cache area;
[0046] Step S30: In response to the current log data filling the first interval, cache the metadata corresponding to the current log data to the second interval of the current cache area;
[0047] Step S40: Initiate the cache area flushing operation so that the first interval of the next cache area is used to cache the next log data generated by the system operation.
[0048] The log management method of this invention divides the cache of the solid-state drive system into multiple cache regions, and further divides each cache region into a first interval and a second interval. The current log data generated by the system operation is cached in the first interval of the current cache region. When the current log data fills the first interval, the corresponding metadata is cached in the second interval of the current cache region, and a cache region flushing operation is initiated. This allows the first interval of the next cache region to be used to cache the next log data generated by the system operation. By uniformly packaging log data and metadata in the cache for flushing, efficient management of log data and metadata is achieved. This avoids the problem of dependent metadata and log data being stored on different media, which could lead to a problem where one device malfunctions and the other is affected. Furthermore, it enables the log module to record and restore data during power-on and power-off scenarios, reducing coupling between modules and system resource consumption while enhancing the robustness of the log module.
[0049] In some embodiments, the system has two buffers.
[0050] In this embodiment of the invention, by using two caches to switch between, hardware resources can be saved while ensuring that log data is cached smoothly and without interruption.
[0051] In some embodiments, the method further includes: in response to all first intervals of the first cache being full, caching log data using each first interval of the second cache; and caching corresponding metadata using each second interval of the second cache.
[0052] Figure 2 This is a schematic diagram of the cache management process provided according to an embodiment of the present invention. Figure 2 As shown, this embodiment uses two buffers to cache the log data generated during system operation. The two buffers can achieve uninterrupted data recording in a ping-pong manner. When one buffer is full, the flushing process is initiated, and the system switches to the other buffer to achieve uninterrupted data caching.
[0053] The cache is a DDR cache (Double Data Rate SDRAM).
[0054] In some embodiments, the size of each cache region is the same as the size of a physical page in flash memory, and the size of the cache is an integer multiple of the physical page size.
[0055] In some embodiments, the method further includes storing the log data and corresponding metadata of each cache region into the corresponding physical page.
[0056] In this embodiment, the flash memory is NAND flash (a type of non-volatile flash memory). The size of each cache is an integer multiple of the NAND flash physical page size (4KB or 16KB). The data stored on each physical page is divided into two parts: raw data and metadata. Assuming the metadata size is N bytes and the NAND flash physical page size is 16KB, the area from the beginning of the cache to (16KB-N) stores the log raw data, and the area [N, 16KB] stores the log metadata. This solves the problem of wasted physical pages caused by storing dependent metadata and log data on different media, leading to synchronous flushing.
[0057] In some embodiments, storing the log data and corresponding metadata of each cache region into the corresponding physical page includes: storing the log data and corresponding metadata of each cache region into the corresponding physical page in the cache order.
[0058] In this embodiment, when the amount of log data generated by the system reaches (16KB-N), the cache is considered full. At this time, the metadata corresponding to the last log data is copied to the [N, 16KB] area of the current cache, and the cache area is flushed. By storing the log data and corresponding metadata to the corresponding physical pages according to the cache order, it is beneficial to maintain the data storage order.
[0059] In some embodiments, the method further includes: adding a label to the metadata of each second interval during storage to obtain multiple labels, wherein the values of the multiple labels gradually increase; scanning each physical page in the flash memory in response to a system power-on to find the metadata in each physical page; comparing the label values of the found metadata to determine the metadata with the largest label value; determining the latest log data at the time of the last power-off based on the log data corresponding to the metadata with the largest label value; and performing log recovery based on the latest log data.
[0060] Currently, in SSD (Solid State Disk) applications, log information recovery after normal or abnormal power outages is a fundamental scenario that requires careful consideration. A well-designed log module needs to support the recovery and export of log data from the previous power-on cycle after power-on, as well as the position of the log data at the end of the storage medium record before the last power-off, thereby confirming the starting position of the log data record in the current power-on cycle. These two requirements are typically achieved through the log module's metadata management functions. Log metadata refers to data that maintains the real-time status information of the NAND resources used by the current log module, including block information used, log header and footer information, etc. Therefore, to perform log recovery, it is necessary to know the log data at the end position before the last power-off.
[0061] In this embodiment, incrementing chronological labels are used to identify the age of each piece of metadata. During the next power-on process, when restoring the log module data, all NAND block resources pre-allocated to the log module are scanned. For each pre-allocated block (a block includes multiple pages), the last N bytes of each page (physical page) are scanned to obtain each piece of metadata. The last piece of metadata is found by comparing label values, which represents the final state of the system log module at the last power-off. This allows the recovery of the log module's log data and metadata, and also determines the flash memory resources available to the log module in the current power-on cycle.
[0062] A second aspect of the present invention also provides a log management system. Figure 3 The diagram shown is a schematic representation of an embodiment of the log management system provided by the present invention. Figure 3 As shown, a log management system includes: a partitioning module 10, configured to divide the cache of a solid-state drive system into multiple cache regions, and to divide each cache region into a first interval and a second interval; a first cache module 20, configured to cache the current log data generated by the system operation into the first interval of the current cache region; a second cache module 30, configured to cache the metadata corresponding to the current log data into the second interval of the current cache region in response to the current log data filling the first interval; and a flush module 40, configured to initiate a cache region flush operation so that the first interval of the next cache region is used to cache the next log data generated by the system operation.
[0063] The log management system of this invention divides the cache of the solid-state drive system into multiple cache regions, and further divides each cache region into a first interval and a second interval. The current log data generated by the system operation is cached in the first interval of the current cache region. When the current log data fills the first interval, the corresponding metadata is cached in the second interval of the current cache region, and a cache region flushing operation is initiated so that the first interval of the next cache region can be used to cache the next log data generated by the system operation. By uniformly packaging log data and metadata in the cache for flushing, efficient management of log data and metadata is achieved. This avoids the problem of dependent metadata and log data being stored on different media, which could lead to a problem where a failure in one device affects another. Furthermore, it enables the logging module to record and restore data during power-on and power-off scenarios, reducing coupling between modules and system resource consumption while enhancing the robustness of the logging module.
[0064] In some embodiments, the system has two buffers.
[0065] In some embodiments, the system further includes a cache switching module configured to cache log data using each first interval of a second cache in response to all first intervals of a first cache being full; and to cache corresponding metadata using each second interval of the second cache.
[0066] This embodiment uses two caches (DDR cache, Double Data Rate SDRAM) to cache the log data generated during system operation. The two caches can achieve uninterrupted data recording in a ping-pong manner. When one cache is full, the flushing process is initiated, and the system switches to the other cache to achieve uninterrupted data caching.
[0067] In some embodiments, the size of each cache region is the same as the size of a physical page in flash memory, and the size of the cache is an integer multiple of the physical page size.
[0068] In some embodiments, the system further includes a storage module configured to store log data and corresponding metadata for each cache region into the corresponding physical page.
[0069] Each cache is a multiple of the physical page size (4KB or 16KB). The data stored on each physical page is divided into two parts: raw data and metadata. Assuming the metadata size is N bytes and the physical page size is 16KB, the area from the beginning of the cache to (16KB-N) stores the raw log data, and the area from [N, 16KB] stores the log metadata. This solves the problem of wasted physical pages during synchronous flushing caused by storing dependent metadata and log data on different media.
[0070] In some embodiments, the storage module is further configured to store the log data and corresponding metadata of each cache region into the corresponding physical page in the order of caching.
[0071] In this embodiment, when the amount of log data generated by the system reaches (16KB-N), the cache is considered full. At this time, the metadata corresponding to the last log data is copied to the [N, 16KB] area of the current cache, and the cache area is flushed. By storing the log data and corresponding metadata to the corresponding physical pages according to the cache order, it is beneficial to maintain the data storage order.
[0072] In some embodiments, the system further includes a log recovery module configured to add labels to the metadata of each second interval during storage, resulting in multiple labels with progressively increasing values; in response to a system power-on, scanning each physical page in the flash memory to find the metadata in each physical page; comparing the label values of the found metadata to determine the metadata with the largest label value; determining the latest log data at the time of the last power-off based on the log data corresponding to the metadata with the largest label value; and performing log recovery based on the latest log data.
[0073] In this embodiment, incrementing chronological labels are used to identify the age of each piece of metadata. During the next power-on process, when restoring the log module data, all NAND block resources pre-allocated to the log module are scanned. For each pre-allocated block (a block includes multiple pages), the last N bytes of each page (physical page) are scanned to obtain each piece of metadata. The last piece of metadata is found by comparing label values, which represents the final state of the system log module at the last power-off. This allows the recovery of the log module's log data and metadata, and also determines the flash memory resources available to the log module in the current power-on cycle.
[0074] A third aspect of the present invention also provides a computer-readable storage medium. Figure 4A schematic diagram of a computer-readable storage medium for implementing a log management method according to an embodiment of the present invention is shown. Figure 4 As shown, the computer-readable storage medium 3 stores computer program instructions 31. When executed by the processor, the computer program instructions 31 perform the following steps:
[0075] The cache of the solid-state drive system is divided into multiple cache regions, and each cache region is further divided into a first interval and a second interval;
[0076] Cache the current log data generated by the system operation to the first interval of the current cache area;
[0077] In response to the current log data filling the first interval, the metadata corresponding to the current log data is cached in the second interval of the current cache area;
[0078] Initiate a cache region flush operation so that the first interval of the next cache region is used to cache the next log data generated by the system.
[0079] In some embodiments, the system has two buffers.
[0080] In some embodiments, the steps further include: in response to all first intervals of the first cache being full, caching log data using each first interval of the second cache; and caching corresponding metadata using each second interval of the second cache.
[0081] In some embodiments, the size of each cache region is the same as the size of a physical page in flash memory, and the size of the cache is an integer multiple of the physical page size.
[0082] In some embodiments, the step further includes: storing the log data and corresponding metadata of each cache region into the corresponding physical page.
[0083] In some embodiments, storing the log data and corresponding metadata of each cache region into the corresponding physical page includes: storing the log data and corresponding metadata of each cache region into the corresponding physical page in the cache order.
[0084] In some embodiments, the steps further include: adding a label to the metadata of each second interval during storage to obtain multiple labels, wherein the values of the multiple labels gradually increase; scanning each physical page in the flash memory in response to a system power-on to find the metadata in each physical page; comparing the label values of the found metadata to determine the metadata with the largest label value; determining the latest log data at the time of the last power-off based on the log data corresponding to the metadata with the largest label value; and performing log recovery based on the latest log data.
[0085] It should be understood that, where there is no conflict, all the embodiments, features and advantages described above for the log management method according to the present invention are equally applicable to the log management system and storage medium according to the present invention.
[0086] A fourth aspect of the present invention also provides a computer device, including as follows: Figure 5 The memory 402 and processor 401 shown are provided. The memory 402 stores a computer program that, when executed by the processor 401, implements the method of any of the above embodiments.
[0087] like Figure 5 The diagram shown is a hardware structure schematic of a computer device according to an embodiment of the execution log management method provided by the present invention. Figure 5 Taking the computer device shown as an example, this computer device includes a processor 401 and a memory 402, and may also include an input device 403 and an output device 404. The processor 401, memory 402, input device 403, and output device 404 can be connected via a bus or other means. Figure 5 Taking a bus connection as an example, input device 403 can receive input digital or character information, and generate key signal inputs related to user settings and function control of the log management system. Output device 404 may include display devices such as a display screen.
[0088] Memory 402, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the log management method in this embodiment. Memory 402 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and application programs required for at least one function; the data storage area may store data created by the use of the log management method, etc. In addition, memory 402 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 402 may optionally include memory remotely located relative to processor 401, and these remote memories can be connected to the local module via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0089] The processor 401 executes various server functions and data processing by running non-volatile software programs, instructions, and modules stored in the memory 402, thereby implementing the log management method of the above method embodiment.
[0090] Finally, it should be noted that the computer-readable storage medium (e.g., memory) described herein can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. By way of example, and not limitation, non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which can act as external cache memory.
[0091] Those skilled in the art will also understand that the various exemplary logic blocks, modules, circuits, and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software, or a combination of both. To clearly illustrate this interchangeability between hardware and software, the functionality of various illustrative components, blocks, modules, circuits, and steps has been generally described. Whether this functionality is implemented as software or as hardware depends on the specific application and the design constraints imposed on the system as a whole. Those skilled in the art can implement the functionality in various ways for each specific application, but such implementation decisions should not be construed as departing from the scope of the embodiments disclosed herein.
[0092] The various exemplary logic blocks, modules, and circuits described herein can be implemented or performed using the following components designed to perform the functions herein: general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic, discrete hardware components, or any combination of these components. A general-purpose processor may be a microprocessor, but alternatively, the processor may be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors combined with a DSP, and / or any other such configuration.
[0093] The above are exemplary embodiments disclosed in this invention. However, it should be noted that various changes and modifications can be made without departing from the scope of the embodiments of this invention as defined by the claims. The functions, steps, and / or actions of the methods according to the disclosed embodiments described herein do not need to be performed in any particular order. Furthermore, although the elements disclosed in the embodiments of this invention may be described or claimed individually, they may be understood as multiple unless explicitly limited to a singular number.
[0094] It should be understood that, as used herein, the singular form "a" is intended to include the plural form as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" refers to any and all possible combinations of one or more of the associatedly listed items. The embodiment numbers disclosed above are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0095] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of the invention (including the claims) is limited to these examples. Within the framework of the invention, technical features of the above embodiments or different embodiments can be combined, and many other variations of different aspects of the invention exist, which are not provided in the details for the sake of brevity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the protection scope of the invention.
Claims
1. A log management method, characterized in that, Includes the following steps: The cache of the solid-state drive system is divided into multiple cache regions, and each cache region is further divided into a first interval and a second interval; The current log data generated by the system operation is cached in the first interval of the current cache area; In response to the current log data filling the first interval, the metadata corresponding to the current log data is cached in the second interval of the current cache area; Initiate a cache region flush operation so that the first interval of the next cache region is used to cache the next log data generated by the system operation; Wherein, the size of each cache region is the same as the size of a physical page in flash memory, and the size of the cache is an integer multiple of the size of the physical page; storing the log data and corresponding metadata of each cache region into the corresponding physical page; storing the log data and corresponding metadata of each cache region into the corresponding physical page includes: storing the log data and corresponding metadata of each cache region into the corresponding physical page in cache order.
2. The method according to claim 1, characterized in that, The system has two of the aforementioned buffers.
3. The method according to claim 2, characterized in that, Also includes: In response to the fact that all first intervals of the first buffer are full, log data is cached using each first interval of the second buffer; as well as The metadata corresponding to each second interval of the second cache is cached using the second cache.
4. The method according to claim 1, characterized in that, Also includes: During storage, a label is added to the metadata of each second interval to obtain multiple labels, and the values of the multiple labels gradually increase; In response to a system power-on, each physical page in the flash memory is scanned to find metadata in each physical page; The index values of the found metadata are compared to determine the metadata with the largest index value; The latest log data at the time of the system's last power-off is determined based on the log data corresponding to the metadata with the largest label value; Log recovery is performed based on the latest log data.
5. A log management system, characterized in that, include: The partitioning module is configured to divide the cache of the solid-state drive system into multiple cache regions, and each cache region is further divided into a first interval and a second interval. The first cache module is configured to cache the current log data generated by the system operation to the first interval of the current cache area; The second caching module is configured to cache the metadata corresponding to the current log data to the second interval of the current cache area in response to the current log data filling the first interval. as well as The flush module is configured to initiate a cache region flush operation so that the first interval of the next cache region is used to cache the next log data generated by the system operation. The size of each cache region is the same as the size of a physical page in flash memory, and the size of the cache is an integer multiple of the size of the physical page; The partitioning module is also configured to: store the log data and corresponding metadata of each cache region into the corresponding physical page; and store the log data and corresponding metadata of each cache region into the corresponding physical page according to the cache order.
6. A computer-readable storage medium, characterized in that, The system stores computer program instructions that, when executed by a processor, implement the method as described in any one of claims 1-4.
7. A computer device, comprising a memory and a processor, characterized in that, The memory stores a computer program, which, when executed by the processor, performs the method as described in any one of claims 1-4.
Citation Information
Patent Citations
Log storage method and system, equipment and medium
CN113342276A
Method, device and equipment for improving log data read-write efficiency
CN115718568A