Method, apparatus and computer program for data storage
Through multi-stream writing technology, selecting streams that match the data update frequency in SSDs, solving the performance problems caused by write amplification and garbage collection in SSDs, and achieving the effect of improving SSD life and performance.
Patent Information
- Application Number
- CN202010225026.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-26
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2040-03-26
AI Technical Summary
There is a problem of write amplification in SSD, which affects the lifetime of the SSD and requires garbage collection operations, which brings additional overhead and reduces system performance.
Through multi-stream writing technology, a stream is selected from multiple streams with respective update frequencies, so that its update frequency matches the update frequency of the data to be written, the tag of the data is determined based on the tag of the selected stream, and the storage system is used to determine the data label and the tag is used to determine the storage system. A write request is sent, causing the storage system to perform a write operation based on the stream identified by the tag.
Reduces additional data copy operations introduced in garbage collection, improves the effective life of SSDs, and improves write performance.
Smart Images

Figure CN113448877B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate generally to storage systems, and more particularly to methods, devices, and computer programs for data storage. Background Art
[0002] As the requirements for read and write performance become higher and higher, solid-state storage devices (SSDs) such as NAND flash memory have been widely used. However, there is usually a write amplification problem in SSDs, which affects the life of the SSDs. In addition, garbage collection (GC) operations are required for SSDs, which will bring additional overhead and thus reduce system performance. This problem may also exist in other types of storage devices besides SSDs. Summary of the invention
[0003] Embodiments of the present disclosure provide a method, device, computer-readable storage medium, and computer program product for data storage.
[0004] In a first aspect, a method for data storage is provided, the method comprising: selecting a stream from a plurality of streams having respective update frequencies, the update frequency of the selected stream matching the update frequency of data to be written; determining a tag of the data based on a tag of the selected stream; and sending a write request for the data to a storage system, the write request including the tag of the data, so that the storage system performs a write operation for the data based on the stream identified by the tag.
[0005] In a second aspect, an electronic device is provided. The electronic device comprises: a processor; and a memory coupled to the processor and comprising instructions stored thereon, wherein when the instructions are executed by the processor, the electronic device performs an action, wherein the action comprises: selecting a stream from a plurality of streams having respective update frequencies, wherein the update frequency of the selected stream matches the update frequency of data to be written; determining a tag of the data based on a tag of the selected stream; and sending a write request for the data to a storage system, wherein the write request comprises the tag of the data, so that the storage system performs a write operation for the data based on the stream identified by the tag.
[0006] In a third aspect, a computer-readable storage medium is provided, on which machine-executable instructions are stored. When the machine-executable instructions are executed by at least one processor, the at least one processor implements the method according to the first aspect.
[0007] In a fourth aspect, a computer program product is provided, the computer program product being stored on a computer readable medium and comprising machine executable instructions which, when executed, cause a machine to perform the method according to the first aspect.
[0008] In a fifth aspect, a computer program is provided. When the computer program is executed by at least one processor, the at least one processor is enabled to implement the method according to the first aspect.
[0009] This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the disclosure, nor is it intended to limit the scope of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The above and other objects, features and advantages of the present disclosure will become more apparent through a more detailed description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, wherein like reference numerals generally represent like components in the exemplary embodiments of the present disclosure.
[0011] Figure 1 A schematic block diagram of performing a conventional write operation in a storage system is shown;
[0012] Figure 2 A schematic block diagram of performing a multi-stream write operation in a storage system is shown;
[0013] Figure 3 A flowchart showing a method for data storage according to some embodiments of the present disclosure; and
[0014] Figure 4 A schematic block diagram of an example device according to some embodiments of the present disclosure that can be used to implement embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0015] The preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0016] As used herein, the term "including" and its variations mean open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "based at least in part on". The terms "an example embodiment" and "an embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0017] For ease of description only, some embodiments of the present disclosure will be described in the context of SDD. However, it should be understood that this is not intended to limit the scope of the present disclosure in any way. The principles and ideas described herein may be applicable to other appropriate technologies or environments currently known or developed in the future.
[0018] As mentioned above, there is a write amplification problem in SSDs. This problem will now be described in detail. The unit of write operation in SSDs is page, and the size of a page is usually 2-64KB. NAND flash memory must perform an erase operation on the page before writing to it. However, the unit of erase operation is block, and a block usually contains 32-256 pages.
[0019] Since the erase operation is relatively time-consuming, when modifying a page, the modified data is usually written directly to a new erased page, and the old page is set to an invalid state. At this time, the modification operation of the page is completed. After that, the flash translation layer (FTL) of the SSD will execute the garbage collection (GC) algorithm to recycle the invalid page.
[0020] FTL needs to perform an erase operation on invalid pages to recycle them, and the unit of the erase operation is a block. A block contains multiple pages, including both invalid pages and valid pages. Therefore, when FTL needs to recycle invalid pages in block A, it must first copy the valid pages in block A to other new blocks (such as block B), and set the valid pages in block A to invalid state. At this time, all pages in block A are in invalid state, and FTL can safely perform an erase operation on block A.
[0021] During the above operation, FTL needs to perform additional copy operations on the valid pages in the recycled blocks, so that the number of IOs actually executed by the device is greater than the number of IOs submitted by the user. This feature is called "write amplification".
[0022] In technologies such as SSDs, this characteristic is described using the "write amplification factor" (WAF), which is set to the ratio of the number of write operations submitted to the flash memory to the number of write operations from the host. Since the FTL needs to perform additional copy operations for valid pages, the value of the WAF parameter is usually greater than 1.
[0023] WAF parameters affect the life of the SSD. Generally speaking, the larger the WAF value, the shorter the actual effective life of the SSD. In addition, WAF parameters also affect the performance of SSD read and write operations. Garbage collection operations usually run in the background, so when the load is light, garbage collection operations generally do not affect read and write operations; however, when the load is heavy, write operations need to wait for the garbage collection algorithm to release free pages, thereby reducing write performance; at the same time, read operations will run in parallel with garbage collection operations and compete for resources, thereby increasing read latency.
[0024] Figure 1 A schematic block diagram of performing a conventional write operation in a storage system is shown. In this example, it is assumed that there are two types of data, hot data (H) and cold data (C), where hot data is updated more frequently than cold data. In other words, the life cycle of hot data is shorter than that of cold data.
[0025] In a conventional SSD FTL implementation, after the operating system submits a write request to the SSD, the FTL writes the data submitted by the operating system into available blocks in sequence. For example, Figure 1 As shown, the operating system submits a write operation sequence 101, including H1, C1, H2, C2, C3, H3, H4, C4. The FTL writes these data to blocks 102 and 103 in sequence (assuming that a block contains 4 pages).
[0026] Then, the operating system submits a write operation sequence 104. When the hot data H1, H2, H3, and H4 are modified, the modified data must be written to block 107, and the H1 and H2 pages in block 102 and the H3 and H4 pages in block 103 are set to invalid, which are represented as blocks 105 and 106. Then, when garbage collection needs to reclaim blocks 105 and 106 (i.e., blocks 102 and 103), additional copies of the valid pages C1, C2, C3, and C4 therein need to be performed.
[0027] Figure 2 The schematic diagram of performing a multi-stream write operation in a storage system is shown. When the SSD FTL supports multi-stream write technology, the operating system can bind the written data to a certain stream, for example, bind hot data (H) to stream x and cold data (C) to stream y. At this time, when the FTL accepts the write request submitted by the operating system, it writes the data of different streams to different blocks. For example, Figure 2As shown, for the write operation sequence 201 , all stream x (hot data) is written to block 202 , and all stream y (cold data) is written to block 203 .
[0028] Then, when the operating system submits the write operation sequence 204 and modifies H1, H2, H3, and H4, the FTL writes the modified data to block 207. At this time, block 202 does not contain any valid pages, which is represented as block 205. In addition, block 203 remains unchanged, which is represented as block 206. Then, the garbage collection can directly perform the erase operation on block 205 without incurring additional copy operations.
[0029] Through multi-stream writing technology, data with different update frequencies are written to different blocks, thereby minimizing the additional data copy operations introduced in garbage collection, thereby increasing the effective life of the SSD and improving write performance.
[0030] The essence of multi-stream writing technology is to provide a mechanism for writing data with different update frequencies to different blocks based on the special writing characteristics of solid-state storage devices such as flash memory. In the multi-stream mechanism, streams are used to abstract data with different update frequencies, and stream identifiers (IDs) are used to identify different streams.
[0031] The storage device (for example, SSD) itself has very little information and has basically no concept of the data update frequency. Only the data producer, that is, the upper-level software (including user programs and operating systems), knows the data update frequency. Therefore, the upper-level software is responsible for mapping the written data and the stream ID. The interface protocol is responsible for passing the data and the stream ID to the SSD device, and SSDFTL is only responsible for writing data with different stream IDs into different blocks.
[0032] SSD devices support multiple interface protocols. Currently, small computer interface SCSI (T10 (SCSI) standard) and fast non-volatile memory NVMe (for example, NVMe 1.3) have officially supported multi-stream features. For example, the FTL of the SSD can be responsible for the mapping between the logical block address (LBA) used by the operating system and the physical address used inside the SSD.
[0033] Traditional SSD FTL that does not support multi-stream mechanism usually only maintains a log structure, which only stores these IO requests in the available storage space in sequence according to the order of IO requests submitted by the operating system.
[0034] An SSD FTL that supports a multi-stream mechanism will maintain multiple log structures, with a separate log structure for each stream. The FTL allocates storage space in units of stream granularity size (SGS), that is, the FTL will pre-allocate a storage block of SGS size for each stream at the beginning, and then the data of the stream will be stored in this pre-allocated storage block of SGS size. When the space of this storage block is exhausted, the FTL will allocate another storage block of SGS size. The log structure of the stream will maintain all the storage blocks allocated to the stream, and it is all these SGS-sized storage blocks that constitute a stream. For example, the multi-stream mechanism can be supported in the form of directives. The directive mechanism is used to realize information communication between the SSD device and the upper-level software, and the stream is only a subset of the directive.
[0035] Figure 3 FIG. 3 is a flowchart of a method 300 for storing data according to an embodiment of the present disclosure. For example, the method 300 may be applied to Figure 2 The multi-stream write operation shown.
[0036] At block 302, a stream is selected from a plurality of streams having respective update frequencies, the selected stream having an update frequency that matches the update frequency of the data to be written. Figure 2 In the example shown, if one data is hot data, stream x is selected from streams x and y.
[0037] In some embodiments, the data may include metadata. Since different types of metadata may be associated with their update frequency or life cycle, the stream may be selected by the type of metadata. For example, four streams may be defined, each of which has a corresponding update frequency or type of metadata. For example, a first stream corresponds to a log, a second stream corresponds to a virtual block map (VBM), a third stream corresponds to an indirect block (IB), and a fourth stream corresponds to a super block, a bitmap, or per-block metadata (BMD). From the first stream to the fourth stream, the update frequency increases in sequence. For example, the stream IDs of the first stream to the fourth stream may be defined as 1-4, respectively.
[0038] In block 304, based on the label of the selected stream, the label of the data is determined. For example, if the label of stream x is x or 1, the label of the data to be written may be determined to be x or 1. In the example of metadata described above, the label of the stream may be a stream ID or a variable corresponding to the stream ID.
[0039] In box 306, a write request for the data is sent to the storage system, and the write request includes a tag for the data, so that the storage system performs a write operation for the data based on the stream identified by the tag. The storage system supports multi-stream write technology, for example, it can be an SSD, especially an SSD with an NVMe interface. If the storage system can perform operations on the corresponding stream based on the tag in the data. For example, data of the same stream can be stored in the same area, thereby reducing the frequency of data copying and thus reducing the write amplification factor. In this way, the life and performance of the storage system can be improved.
[0040] The following will describe an example embodiment of the present disclosure in conjunction with a common block file system (CBFS). In an example embodiment, various metadata and file data in the CBFS are mapped to different stream IDs, so that different data are stored separately in an SSD (e.g., an NVMe SSD). For example, different types of metadata and file data may be bound to different stream IDs to achieve such separate storage.
[0041] The metadata in the CBFS file system includes: superblock, inode, data block bitmap, inode bitmap, indirect block (IB), virtual block map (VBM), per-block metadata (BMD) and journal. The update frequency of these metadata can be divided into a corresponding number of levels according to the number of streams supported by the storage device (for example, 4 or any other appropriate value). For example, in a specific example, the storage device supports at least 4 streams, and the update frequency of these metadata can be divided into four levels, namely:
[0042] flow data Log Stream log IB Stream IB VBM Flow VBM Other Streams Superblock, i-node, block bitmap, BMD
[0043] Among them, the log stream corresponds to the short (SHORT) level, the IB stream corresponds to the medium (MEDIUM) level, the VBM stream corresponds to the long (LONG) level, and the other streams correspond to the extreme (EXTREME) level. In addition, SHORT corresponds to stream ID 1, MEDIUM corresponds to stream ID 2, LONG corresponds to stream ID 3, and EXTREME corresponds to stream ID 4. When the user does not explicitly specify the update frequency of the data, it ultimately defaults to using stream ID 0.
[0044] The file system uses the block buffer as an interface to manage IO requests for metadata and file data. Therefore, a field can be added to the block buffer to describe the life cycle corresponding to the data buffered in the block buffer. The initial value of this field is set to 0, that is, stream ID 0 is used. When the modified metadata is written to the storage device, this field of the corresponding buffer is set to map the various metadata of the CBFS file system to the four levels described above.
[0045] The file system can send the data and its level to the underlying storage driver, which maps the level of data update frequency to a corresponding stream ID and saves the stream ID in a corresponding field for transmitting the write request to the storage device for processing.
[0046] In some embodiments, other multi-layer structures are also included between the file system and the storage drive. For example, CBFS passes the data and its level to the multi-core cache (MCC) in the next layer. The MCC then sends the data to an independent redundant disk array (RAID), for example, a mapped RAID. Other data packet information is filled in the mapped RAID, such as the starting LBA address, length, and flags (including data flags), and then a write request is sent to the underlying storage drive. The storage driver (e.g., an NVMe drive) then maps the levels of each data to the corresponding stream ID, saves the stream ID in the instruction-specific field of the write command, and passes the write command to the storage device for processing. Subsequent processing is then performed by the FTL on the storage device.
[0047] The above describes a specific embodiment of the present disclosure in combination with the CBFS file system and the NVMe storage. Through the embodiments of the present disclosure, the WAF parameters can be reduced, thereby increasing the effective life of the storage device. In addition, since the WAF parameters also affect the performance of read and write operations, reducing the WAF parameters also improves the read and write performance of the storage system.
[0048] Figure 4 4 shows a schematic block diagram of a device 400 that can be used to implement an embodiment of the present disclosure. Figure 4 As shown, the device 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 402 or loaded from a storage unit 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the device 400 can also be stored. The CPU 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0049] A number of components in the device 400 are connected to the I / O interface 405, including: an input unit 406, such as a keyboard, a mouse, etc.; an output unit 407, such as various types of displays, speakers, etc.; a storage unit 408, such as a disk, an optical disk, etc.; and a communication unit 409, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 409 allows the device 400 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0050] The various processes and processing described above, such as method 300, may be performed by processing unit 401. For example, in some embodiments, method 300 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on device 400 via ROM 402 and / or communication unit 409. When the computer program is loaded into RAM 403 and executed by CPU 401, one or more steps of method 300 described above may be performed.
[0051] The present disclosure may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present disclosure.
[0052] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0053] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0054] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0055] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0056] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0057] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0058] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0059] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A method for data storage, comprising: Selecting a stream from a plurality of streams having respective update frequencies, the selected stream having an update frequency that matches an update frequency of the data to be written; determining a label for the data, the label for the data i) being a label for the selected stream and ii) indicating one of a plurality of update frequency levels, wherein a total number of the update frequency levels in the plurality of update frequency levels is equal to a total number of streams in the plurality of streams, wherein each update frequency level corresponds to a respective one of a plurality of types of metadata; as well as A write request for the data is sent, at least in part, by a file system to a storage drive, the file system sets a field of a block buffer storing the data to the tag of the data, causing the storage drive to store a stream identifier corresponding to the stream identified by the tag of the data in the field of the block buffer, and then sends the write request to a solid-state storage device, causing the solid-state storage device to perform a write operation on the data based on the stream identified by the stream identifier.
2. The method of claim 1 , wherein the data comprises metadata, and selecting the stream from the plurality of streams comprises: The stream is selected based on a type of the metadata, wherein the type of the metadata is associated with an update frequency of the metadata.
3. The method of claim 2, wherein selecting the stream from the plurality of streams comprises: In response to determining that the type of the metadata is a log, selecting a first stream among the plurality of streams as the stream; In response to determining that the type of the metadata is a virtual block map (VBM), selecting a second stream of the plurality of streams as the stream; In response to determining that the type of the metadata is an indirect block (IB), selecting a third stream of the plurality of streams as the stream; as well as In response to determining that the type of the metadata is a super-block, a bitmap, or per-block metadata (BMD), a fourth stream of the plurality of streams is selected as the stream.
4. The method of claim 1, wherein the storage drive comprises a non-volatile memory express (NVMe) storage drive. The method of claim 4 , wherein each update frequency level has a single corresponding stream among the plurality of streams.
6. The method according to claim 1, wherein the flow identifier is one of a plurality of flow identifiers; wherein a total number of flow identifiers in the plurality of flow identifiers is equal to a total number of the flows in the plurality of flows; and Wherein a total number of update frequency levels in the plurality of update frequency levels is equal to a total number of the streams in the plurality of streams.
7. The method according to claim 6, further comprising: Based on the update frequency of the single type of metadata, the single type of metadata is classified into the plurality of update frequency levels, wherein each single type of metadata is classified into one update frequency in the update frequency levels in the plurality of update frequency levels.
8. An electronic device comprising: processor; as well as a memory coupled to the processor and including instructions stored thereon, the instructions, when executed by the processor, causing the electronic device to perform actions, the actions comprising: Selecting a stream from a plurality of streams having respective update frequencies, the selected stream having an update frequency that matches an update frequency of the data to be written; determining a label for the data, the label for the data i) being a label for the selected stream and ii) indicating one of a plurality of update frequency levels, wherein a total number of the update frequency levels in the plurality of update frequency levels is equal to a total number of streams in the plurality of streams, wherein each update frequency level corresponds to a respective one of a plurality of types of metadata; and A write request for the data is sent, at least in part, by a file system to a storage drive, the file system sets a field of a block buffer storing the data to the tag of the data, causing the storage drive to store a stream identifier corresponding to the stream identified by the tag of the data in the field of the block buffer, and then sends the write request to a solid-state storage device, causing the solid-state storage device to perform a write operation on the data based on the stream identified by the stream identifier.
9. The electronic device of claim 8, wherein the data comprises metadata, and selecting the stream from the plurality of streams comprises: The stream is selected based on a type of the metadata, wherein the type of the metadata is associated with an update frequency of the metadata.
10. The electronic device of claim 9, wherein selecting the stream from the plurality of streams comprises: In response to determining that the type of the metadata is a log, selecting a first stream among the plurality of streams as the stream; In response to determining that the type of the metadata is a virtual block map (VBM), selecting a second stream of the plurality of streams as the stream; In response to determining that the type of the metadata is an indirect block (IB), selecting a third stream of the plurality of streams as the stream; as well as In response to determining that the type of the metadata is a super-block, a bitmap, or per-block metadata (BMD), a fourth stream of the plurality of streams is selected as the stream.
11. The electronic device of claim 8, wherein the storage drive comprises a non-volatile memory express (NVMe) storage drive.
12. A computer program product, which, when executed by at least one processor, causes the at least one processor to perform an execution action, the action comprising: Selecting a stream from a plurality of streams having respective update frequencies, the selected stream having an update frequency that matches an update frequency of the data to be written; determining a label for the data, the label for the data i) being a label for the selected stream and ii) indicating one of a plurality of update frequency levels, wherein a total number of the update frequency levels in the plurality of update frequency levels is equal to a total number of streams in the plurality of streams, wherein each update frequency level corresponds to a respective one of a plurality of types of metadata; as well as A write request for the data is sent, at least in part, by a file system to a storage drive, the file system sets a field of a block buffer storing the data to the tag of the data, causing the storage drive to store a stream identifier corresponding to the stream identified by the tag of the data in the field of the block buffer, and then sends the write request to a solid-state storage device, causing the solid-state storage device to perform a write operation on the data based on the stream identified by the stream identifier.
13. The computer program product of claim 12, wherein the data comprises metadata, and selecting the stream from the plurality of streams comprises: The stream is selected based on a type of the metadata, wherein the type of the metadata is associated with an update frequency of the metadata.
14. The computer program product of claim 13, wherein selecting the stream from the plurality of streams comprises: In response to determining that the type of the metadata is a log, selecting a first stream among the plurality of streams as the stream; In response to determining that the type of the metadata is a virtual block map (VBM), selecting a second stream of the plurality of streams as the stream; In response to determining that the type of the metadata is an indirect block (IB), selecting a third stream of the plurality of streams as the stream; as well as In response to determining that the type of the metadata is a super-block, a bitmap, or per-block metadata (BMD), a fourth stream of the plurality of streams is selected as the stream.
15. The computer program product of claim 12, wherein the storage drive comprises a non-volatile memory express (NVMe) storage drive.
Citation Information
Patent Citations
Stream classification based on logical regions
US20190034120A1
Solid state drive stream allocation and mapping
US20190205062A1
US201615281338A