A data saving method and a related device
It is a technology of placing and data, which is applied in the direction of electrical digital data processing, input/output process of data processing, instruments, etc. It can solve the problems of low efficiency of placing to disk and performance degradation of storage system, and achieve the effect of improving the efficiency of placing to disk
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
no. 1 example
[0057] see figure 1 , which is a flow chart of a data flushing method provided in the embodiment of this application.
[0058] Such as figure 1 As shown, the data transfer method provided in this embodiment includes:
[0059] Step 101: Determine the node metadata in the memory that needs to be flushed to the disk.
[0060]As a possible implementation, the refresh threshold can be set in advance. When the storage data structure (such as B+ tree) in the memory reaches the preset refresh threshold, it indicates that the metadata in the memory needs to be written to the disk for metadata Persistence. At this time, the node metadata with a smaller logical address in the memory B+ tree may be determined as the node metadata that needs to be flushed to the disk.
[0061] Of course, it is also possible to determine the node metadata in the memory that needs to be flushed to the disk according to the I / O request. In this embodiment, no limitation is imposed on the specific manner ...
no. 2 example
[0077] see figure 2 , which is a flow chart of another method for placing data to disk provided by this application.
[0078] Such as figure 2 As shown, the data transfer method provided in this embodiment includes:
[0079] Step 201: Create the buffer queue for placing disks.
[0080] In this embodiment, the disk drop buffer queue is used to reserve node data on the disk to be merged with node metadata. The node metadata here specifically refers to the node metadata to be flashed to the disk.
[0081] Step 202: According to the preset order, load the node data on the disk into the disk buffer queue until the disk buffer queue is full of node data.
[0082] As an optional implementation manner, this step may be specifically implemented through a Load (loading) thread. The Load thread sequentially loads the nodes of the storage data structure (for example, the first B+ tree) from the disk into the disk buffer queue in a preset order (for example, the order in which logic...
no. 3 example
[0097] see image 3 , which is a schematic structural diagram of a data flushing device provided in this embodiment.
[0098] Such as image 3 As shown, the data loading device provided in this embodiment includes: a metadata determination unit 301 , a disk node data acquisition unit 302 , a data merging unit 303 , and a data brushing unit 304 .
[0099] The metadata determination unit 301 to be placed on the disk is configured to determine the node metadata in the memory that needs to be flashed to the disk;
[0100] The disk node data acquisition unit 302 is used to obtain the node data arranged at the top from the disk buffer queue; the disk buffer queue contains a plurality of node data on the disk arranged in a preset order;
[0101] a data merging unit 303, configured to merge the node metadata with the first-arranged node data;
[0102] The data brushing unit 304 is configured to write down the combined data to the disk.
[0103] The above is the data flushing devic...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


