Data writing method, device and medium of a block device

A data writing and block device technology, applied in the field of data writing to block devices, can solve problems affecting the service life of block devices, increasing overall system overhead, affecting performance, etc., to ensure performance, reduce overall system overhead, and reduce usage Effects of Lifespan Impact

Active Publication Date: 2021-06-29
ZHENGZHOU YUNHAI INFORMATION TECH CO LTD
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, when new data arrives, the above-mentioned file system needs to write the data into the log first, and then write the data from the log into the data file and store it in the block device after a period of time. Therefore, before the data is stored in the block device, it needs to go through the log and I / O operations between data files cause write amplification and affect the service life of block devices. In addition, each I / O operation will occupy the available resources of the system, which will increase the overall overhead of the system and affect the overall performance. performance

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Data writing method, device and medium of a block device
  • Data writing method, device and medium of a block device
  • Data writing method, device and medium of a block device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0041] figure 1 It is a flow chart of a data writing method for a block device provided by an embodiment of the present invention. Please refer to figure 1 , the specific steps of the data writing method of the block device include:

[0042] Step S10: Obtain the data to be written and the total amount of data.

[0043] It should be noted that since the data needs to be written into the block device, it is necessary to know the total amount of data in advance, and then in the subsequent steps, the block device will open up a corresponding storage space for data storage.

[0044] Step S11: Apply for a storage space whose capacity corresponds to the total amount of data in the block device, and write the data into the storage space in blocks.

[0045] It can be understood that this step is to apply for a storage space corresponding to the total amount of data to be written in the block device, and then directly write the data into the storage space to implement data storage to...

Embodiment 2

[0052] figure 2 It is a flow chart of another method for writing data to a block device provided by an embodiment of the present invention. figure 2 In steps S10 and S12 and figure 1 Same, no more details here.

[0053] Such as figure 2 As shown, as a preferred implementation manner, before applying for storage space in the block device with a capacity corresponding to the total amount of data, the method further includes:

[0054] Step S20: Build a B+ tree, and record the available space in the block device through the B+ tree.

[0055] Correspondingly, step S11 is specifically:

[0056] Step S21: Select the available space according to the B+ tree to apply for storage space in the block device.

[0057] It should be noted that since the traversal efficiency of data in the B+ tree is higher, the use of the B+ tree to record the available space of the block device can traverse the available space of the block device more quickly, thereby improving the overall writing o...

Embodiment 3

[0071] The embodiment of the method for writing data to a block device has been described in detail above, and the present invention also provides a device for writing data to a block device corresponding to the method. Since the embodiment of the device part and the implementation of the method part The examples correspond to each other, so for the embodiments of the device part, please refer to the description of the embodiments of the method part, and details will not be repeated here.

[0072] image 3 It is a structural diagram of a data writing device of a block device provided by an embodiment of the present invention. The data writing device of the block device provided by the embodiment of the present invention specifically includes:

[0073] The acquisition calculation module 10 is configured to acquire the data to be written and the total amount of data.

[0074] The block device writing module 11 is configured to apply for a storage space whose capacity correspon...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a data writing method, device and medium of a block device. The steps of the method include: acquiring data to be written and the total amount of data; applying for a storage space whose capacity meets the total amount of data in the block device , and write the data into the storage space in blocks; generate the address offset of the data in the storage space and the attribute information of the data to write into the key-value database, and write the address offset and attribute information into the block device through the MiniFS file system . This method further improves the data writing mechanism on the basis of the MiniFS file system that only has the basic functions of the file system. The data does not need to be written into the log before being stored in the block device, thereby reducing the impact on the service life of the block device. . This method reduces the overall system overhead caused when data is written, and ensures the overall system performance. In addition, the present invention also provides a data writing device and medium of a block device, and the beneficial effect is as described above.

Description

technical field [0001] The invention relates to the field of data storage, in particular to a data writing method, device and medium of a block device. Background technique [0002] With the advent of the era of big data, the added value of data is gradually increasing, and more and more enterprises attach importance to safe and reliable storage of data. [0003] At present, the most mainstream data storage method is to adopt a distributed storage system, and finally write the data to the block device to realize the safe storage of the data. The most common method at present is to use conventional file systems such as xfs and ext4. However, when new data arrives, the above-mentioned file system needs to write the data into the log first, and then write the data from the log into the data file and store it in the block device after a period of time. Therefore, before the data is stored in the block device, it needs to go through the log and I / O operations between data files ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G06F3/06
CPCG06F3/061G06F3/064G06F3/067
Inventor 李成杰
Owner ZHENGZHOU YUNHAI INFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products