Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Cache writing method, device, apparatus, and readable storage medium

A storage medium and cache technology, applied in the storage field, can solve the problems of insufficient utilization of HDD bandwidth and high cost of SSD

Inactive Publication Date: 2019-02-22
LANGCHAO ELECTRONIC INFORMATION IND CO LTD
View PDF8 Cites 9 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, due to the high cost of SSD, the capacity of SSD used as a cache is usually much smaller than that of HDD. When the space on SSD is full, the data on SSD has to be flushed to HDD as soon as possible to release SSD. space
Therefore, the writing performance of the client will eventually be basically the same as the speed at which the SSD is flashed to the HDD, but due to the limitation of IO, the bandwidth of the HDD cannot be fully utilized.

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
  • Cache writing method, device, apparatus, and readable storage medium
  • Cache writing method, device, apparatus, and readable storage medium
  • Cache writing method, device, apparatus, and readable storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0053] Please refer to figure 1 , figure 1It is a flow chart of a cache writing method in an embodiment of the present invention, and the method can be applied to a distributed block storage system. The method includes the following steps:

[0054] S101. Read the cached target stripe file from the SSD according to the file index arrangement sequence in the LRU table.

[0055] Among them, LRU is the abbreviation of Least Recently Used, that is, the least recently used; its purpose is to arrange cold data at the end of the queue and hot data at the beginning of the table. Among them, the hot and cold data can be divided according to the access heat of the data. In a distributed block storage system, blocks are usually divided into stripes of 4MB. At this time, the size of each file is 4MB. In the downlink (download in this article refers to writing the cached data in the SSD to the HDD In the middle), the LRU table formed according to the order in which the files are accesse...

Embodiment 2

[0095] Corresponding to the above method embodiments, an embodiment of the present invention further provides a cache writing device, and the cache writing device described below and the cache writing method described above may be referred to in correspondence.

[0096] see image 3 As shown, the device includes the following modules:

[0097] The file analysis module 101 is used to read the target stripe file of the cache from the SSD according to the order of the file index in the LRU table, and judge whether the number of file fragments of the target stripe file is greater than a preset threshold;

[0098] Aggregation module 102 is used for, if yes, aggregates the target stripe file to obtain an aggregated data block;

[0099] The next brushing module 103 is used to write aggregated data blocks in the HDD at one time through an IO;

[0100] The space reclamation module 104 is configured to delete the target stripe file from the SSD.

[0101] Apply the device provided by ...

Embodiment 3

[0111] Corresponding to the above method embodiments, an embodiment of the present invention further provides a cache writing device, and a cache writing device described below and a cache writing method described above may be referred to in correspondence.

[0112] see Figure 4 As shown, the cache write device includes:

[0113] memory D1 for storing computer programs;

[0114] The processor D2 is configured to implement the steps of the cache writing method in the above method embodiment when executing the computer program.

[0115] Specifically, please refer to Figure 5 , which is a specific structural diagram of a cache writing device provided in this embodiment. The cache writing device may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPUs) ) 322 (eg, one or more processors) and memory 332, one or more storage media 330 (eg, one or more mass storage devices) for storing applic...

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 cache writing method. The method comprises the following steps: according to the file index arrangement order in the LRU table, the cached target strip file is read from theSSD; judging whether the number of file fragments of the target strip file is greater than a preset threshold value; if so, the target strip file is aggregated to obtain an aggregated data block; write the aggregated block of data to the HDD via an IO at a time and remove the target stripe file from the SSD. Compared with the mode that each file segment is written into the HDD by IO once at present, the method provided by the embodiment of the invention can make full use of the fast reading and writing performance of the SSD, can improve the writing performance of the storage system and improve the user experience. The invention also discloses a cache writing device, a device and a readable storage medium, which have corresponding technical effects.

Description

technical field [0001] The present invention relates to the field of storage technologies, in particular to a cache writing method, device, equipment and a readable storage medium. Background technique [0002] Since solid-state drives (such as SATA SSD and NVMe SSD) have very high IOPS. In modern storage systems, this type of fast storage medium is usually used as a cache medium for a mechanical hard disk HDD. That is, the write request is first written to the fast storage medium SSD, and the write completion flag is returned to the client, and then the data on the SSD is flashed (written) to the mechanical hard disk according to a certain strategy, and finally the data is written to the mechanical hard disk. HDD. [0003] To write data in HDD, the magnetic head must find the corresponding track and sector (for multi-disk mechanical hard disks, the cylinder first needs to be determined), all of which are driven by the drive motor of the magnetic head (the magnetic head it...

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 Applications(China)
IPC IPC(8): G06F12/123G06F3/06
CPCG06F3/061G06F3/0611G06F3/064G06F3/0643G06F3/0679G06F12/123G06F2212/202G06F2212/214G06F2212/1024G06F2212/1016
Inventor 冯龙康运风
Owner LANGCHAO ELECTRONIC INFORMATION IND CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products