Storage controller, storage device, and operation method of storage device
The storage controller improves SSD performance and lifespan by using machine learning to manage data streams, reducing maintenance operations and write amplification through stream-based data management.
Patent Information
- Authority / Receiving Office
- KR · KR
- Patent Type
- Patents
- Current Assignee / Owner
- SAMSUNG ELECTRONICS CO LTD
- Filing Date
- 2020-10-14
- Publication Date
- 2026-07-15
AI Technical Summary
Existing semiconductor memory devices, such as SSDs, face challenges in improving operational performance and lifespan due to inadequate management of data streams without host control.
A storage controller and method that utilizes machine learning to separate data into streams based on cosine similarity and statistical information, assigning stream identifiers for efficient storage in non-volatile memory devices.
Enhances the performance and lifespan of storage devices by managing similar write requests as the same stream, reducing maintenance operations and write amplification.
Smart Images

Figure R1020200132838_ABST
Abstract
Description
Technology Field
[0001] The present invention relates to a semiconductor memory, and more specifically, to a storage controller configured to support multiple streams, a storage device, and a method of operating the storage device. Background Technology
[0002] Semiconductor memory is classified into volatile memory devices, such as SRAM and DRAM, in which stored data is lost when the power supply is cut off, and non-volatile memory devices, such as flash memory devices, PRAM, MRAM, RRAM, and FRAM, which retain stored data even when the power supply is cut off.
[0003] Recently, flash memory-based solid-state drives (SSDs) are widely used as mass storage media for computing systems. Hosts using SSDs can generate various types of data depending on the application. To improve the operational performance of the SSD, the host can provide information about the data to the storage device along with the data. However, if the host does not control the information, problems may arise in improving the performance and lifespan of the SSD. The problem to be solved
[0004] The objective of the present invention is to provide a storage controller, a storage device, and a method of operation of the storage device having improved performance and improved lifespan by separating data from a host into stream units. means of solving the problem
[0005] A method of operation of a storage device including a non-volatile memory device according to an embodiment of the present invention may include: receiving a first write request from an external host; adding the first write request to a first fragment; selecting at least n streams among the previously allocated streams based on the cosine similarity between each of the previously allocated streams and the first fragment when the size of the first fragment is greater than or equal to a reference value, wherein n is a natural number greater than 2; performing machine learning with statistical information of the at least n streams and statistical information of the first fragment as input information to detect a first sequential stream for the first fragment among the at least n streams; assigning a stream identifier of the first sequential stream to the first fragment; and storing write data included in the first fragment in the non-volatile memory device based on the assigned stream identifier of the first sequential stream.
[0006] A storage controller configured to control a non-volatile memory device according to an embodiment of the present invention may include: a host interface circuit configured to receive a first write request from an external host; a stream manager configured to add the first write request to a first fragment and, if the first fragment is greater than or equal to a threshold, to perform machine learning based on statistical information of the first fragment and statistical information of pre-allocated streams to allocate a first sequential stream for the first fragment; a flash conversion layer configured to convert a logical block address of the first write request into a physical block address based on the first sequential stream; a processor configured to drive the flash conversion layer; and a memory interface circuit configured to provide the physical block address, the write data of the first write request, and a write command to the non-volatile memory device.
[0007] A storage controller according to an embodiment of the present invention comprises a plurality of non-volatile memories; and a storage controller configured to communicate with the plurality of non-volatile memories through a plurality of channels, wherein the storage controller may be configured to receive a plurality of write requests from an external host, perform machine learning on statistical information of the received plurality of write requests and statistical information of pre-allocated streams, allocate a first sequential stream for the received plurality of write requests, and store a plurality of write data corresponding to the plurality of write requests in one of the plurality of non-volatile memories based on the allocated first sequential stream. Effects of the invention
[0008] According to the present invention, a storage device can allocate a stream for write requests received from a host based on machine learning. Therefore, since write requests having similar characteristics are managed as the same stream, the performance and lifespan of the storage device can be improved. Brief explanation of the drawing
[0009] FIG. 1 is a block diagram illustrating an exemplary storage system according to an embodiment of the present invention. Figure 2 is a diagram illustrating the software layer of the storage system of Figure 1 in an exemplary manner. FIG. 3 is a block diagram exemplarily showing the non-volatile memory device of FIG. 1. Figure 4 is a diagram illustrating a stream managed in a storage device. Figure 5 is a diagram illustrating the stream manager of Figure 1 as an example. Figure 6 is a diagram illustrating the stream attribute table of Figure 5 as an example. FIG. 7 is a flowchart illustrating the stream allocation operation of the storage controller of FIG. 1 in an exemplary manner. FIG. 8 is an exemplary diagram for explaining the operation of step S120 of FIG. 7. Figure 9 is a diagram illustrating the operation of step S140 of Figure 7. FIG. 10 is a flowchart showing the operation of step S180 of FIG. 7 in detail. FIG. 11 is a block diagram exemplarily showing the stream classification module of FIG. 5. Figure 12 is a diagram illustrating the machine learning module of Figure 11 in an exemplary manner. FIG. 13 is a drawing that exemplarily shows a storage system to which a storage device according to the present invention is applied. FIG. 14 is a drawing for explaining the effects of a storage device according to the present invention. FIG. 15 is a block diagram illustrating an exemplary storage system according to an embodiment of the present invention. FIG. 16 is a block diagram exemplarily showing a data center to which a storage device according to an embodiment of the present invention is applied. Specific details for implementing the invention
[0010] In the following, embodiments of the present invention will be described clearly and in detail so that a person skilled in the art can easily practice the present invention.
[0011] Components described by reference to terms such as part or unit, module, engine, etc. used in the detailed description and functional blocks illustrated in the drawings may be implemented in the form of software, hardware, or a combination thereof. For example, software may be machine code, firmware, embedded code, and application software. For example, hardware may include electrical circuits, electronic circuits, processors, computers, integrated circuits, integrated circuit cores, pressure sensors, inertial sensors, MEMS (microelectromechanical systems), passive components, or a combination thereof.
[0012] Furthermore, unless otherwise defined, all terms used herein, including those with a technical or scientific meaning, shall have a meaning that can be understood by those skilled in the art to which this invention pertains. Generally, terms defined in dictionaries shall be interpreted to have a meaning equivalent to their contextual meaning in the relevant technical field, and shall not be interpreted to have an ideal or overly formal meaning unless explicitly defined in the text.
[0013] FIG. 1 is a block diagram illustrating an exemplary storage system according to an embodiment of the present invention. Referring to FIG. 1, the storage system (10) may include a host (11) and a storage device (100). In an exemplary embodiment, the storage system (10) may be one of information processing devices configured to process various information and store the processed information, such as a personal computer, laptop, server, workstation, smartphone, tablet PC, digital camera, black box, etc.
[0014] The host (11) can control the general operations of the storage system (100). For example, the host (11) can send a request (RQ) to the storage device (100) to store data (DATA) in the storage device (100) or to read data (DATA) stored in the storage device (100). In an exemplary embodiment, the host (11) may be a processor core, such as a central processing unit (CPU) or an application processor (AP), configured to control the storage system (10), or a computing node connected via a network.
[0015] In an exemplary embodiment, the host (11) may include a host controller (12) and a host memory (13). The host controller (12) may be a device configured to control the general operations of the host (11) or to control the storage device (100) on the host (11) side. The host memory (13) may be a buffer memory, cache memory, or operational memory used by the host (11).
[0016] The storage device (100) may operate under the control of the host (11). The storage device (100) may include a storage controller (110) and a non-volatile memory device (120). The storage controller (110) may store data in the non-volatile memory device (120) or read data stored in the non-volatile memory device (120) under the control of the host (11). In an exemplary embodiment, the storage controller (110) may perform various management operations to efficiently use the non-volatile memory device (120).
[0017] The storage controller (110) may include a central processing unit (CPU) (111), a flash translation layer (FTL) (112), an error correction code (ECC) engine (113), an advanced encryption standard (AES) engine (114), a buffer memory (115), a host interface circuit (116), a memory interface circuit (117), and a stream manager (118).
[0018] The CPU (111) can control the general operations of the storage controller (110). The FTL (112) can perform various operations to efficiently use the non-volatile memory device (120). For example, the host (11) can manage the storage space of the storage device (100) as a logical address. The FTL (112) can be configured to manage address mapping between the logical address from the host (11) and the physical address of the storage device (100). The FTL (112) can perform wear leveling operations to prevent excessive degradation of specific memory blocks among the memory blocks of the non-volatile memory device (120). The lifespan of the non-volatile memory device (120) can be improved by the wear leveling operations of the FTL (112). The FTL (112) can perform garbage collection on the non-volatile memory device (120) to secure free memory blocks.
[0019] In an exemplary embodiment, the FTL (112) may be implemented in software or hardware form. If the FTL (112) is implemented in software form, program code or information related to the FTL (112) may be stored in a buffer memory (115) and executed by the CPU (111). If the FTL (112) is implemented in hardware form, a hardware accelerator configured to perform the operation of the FTL (112) may be provided separately from the CPU (112).
[0020] The ECC engine (113) can perform error detection and error correction on data read from the non-volatile memory device (120). For example, the ECC engine (113) can generate an error correction code (or parity bit) for data to be written to the non-volatile memory device (120). The generated error correction code (or parity bit) can be stored in the non-volatile memory device (120) along with the data to be written. Subsequently, when the data written from the non-volatile memory device (120) is read out, the ECC engine (113) can detect and correct errors in the read-out data based on the read-out data and the corresponding error correction code (or corresponding parity bit).
[0021] The AES engine (114) can perform an encryption or decryption operation on data received from a host (11) or a non-volatile memory device (120). In an exemplary embodiment, the encryption or decryption operation may be performed based on a symmetric-key algorithm.
[0022] The buffer memory (115) may be a write buffer or a read buffer configured to temporarily store data input to the storage controller (110). Alternatively, the buffer memory (115) may be configured to store various information necessary for the operation of the storage controller (110). For example, the buffer memory (115) may store a mapping table managed by the FTL (112). Alternatively, the buffer memory (115) may store software, firmware, or information related to the FTL (112).
[0023] In an exemplary embodiment, the buffer memory (115) may be an SRAM, but the scope of the invention is not limited thereto, and the buffer memory (115) may be implemented as various types of memory devices such as DRAM, MRAM, PRAM, etc. For the sake of brevity of the drawings and convenience of explanation, the buffer memory (115) is shown in FIG. 1 as being included in the storage controller (110), but the scope of the invention is not limited thereto. The buffer memory (115) may be located outside the storage controller (110), and the storage controller (110) may communicate with the buffer memory through a separate communication channel or interface.
[0024] The host interface circuit (116) may be configured to communicate with the host (11) according to a predetermined interface protocol. In an exemplary embodiment, the predetermined interface protocol may include at least one of various interface protocols such as an ATA (Advanced Technology Attachment) interface, a SATA (Serial ATA) interface, an e-SATA (external SATA) interface, a SCSI (Small Computer Small Interface) interface, a SAS (Serial Attached SCSI) interface, a PCI (Peripheral Component Interconnection) interface, a PCIe (PCI express) interface, an NVMe (NVM express) interface, IEEE 1394, a USB (universal serial bus) interface, an SD (secure digital) card, a MMC (multi-media card) interface, an eMMC (embedded multi-media card) interface, a UFS (Universal Flash Storage) interface, an eUFS (embedded Universal Flash Storage) interface, a CF (compact flash) card interface, or a network interface. The host interface circuit (116) can receive a signal based on a predetermined interface protocol from the host (11) and operate based on the received signal. Alternatively, the host interface circuit (116) can transmit a signal based on a predetermined interface protocol to the host (11).
[0025] The memory interface circuit (117) may be configured to communicate with the non-volatile memory device (120) according to a predetermined interface protocol. In an exemplary embodiment, the predetermined interface protocol may include at least one of various interface protocols, such as a toggle interface, an ONFI interface, etc. In an exemplary embodiment, the memory interface circuit (117) may communicate with the non-volatile memory device (120) based on a toggle interface. In this case, the memory interface circuit (117) may communicate with the non-volatile memory device (120) through a plurality of channels (CHs). In an exemplary embodiment, each of the plurality of channels (CHs) may include a plurality of signal lines configured to transmit various control signals (e.g., / CE, CLE, ALE, / WE, / RE, R / B, etc.), data signals (DQ), and data strobe signals (DQS).
[0026] The stream manager (118) can separate data received from the host (11) into multiple streams or manage it on a stream basis. For example, data received from the host (11) may have various attributes. In this case, if the data is stored in the non-volatile memory device (120) without separate classification of the data, maintenance operations (e.g., garbage collection) on the non-volatile memory device (120) may occur frequently. Frequent occurrence of maintenance operations may degrade the overall performance of the storage device (100).
[0027] A stream manager (118) of a storage controller (110) according to an embodiment of the present invention can classify data into stream units based on various attributes of data received from a host (11) (e.g., logical block address, data size, data frequency, etc.) and can store data in a non-volatile memory device (120) based on the classified streams. In this case, since data having similar characteristics is classified into the same stream, the number of maintenance operations for the non-volatile memory device (120) can be reduced. Therefore, overall performance degradation of the storage device (100) can be prevented. In an exemplary embodiment, the stream manager (118) can perform stream allocation for data from the host (11) based on machine learning. A stream allocation method according to an embodiment of the present invention is described in more detail with reference to the drawings below.
[0028] As described above, according to an embodiment of the present invention, the storage device (100) can classify and manage data into multiple streams based on various attribute information of the data, even without information about the characteristics of the data (e.g., explicit stream designation) from the host (11). In this case, since the number of maintenance operations for the non-volatile memory device (120), such as garbage collection, is reduced, the storage device (100) having improved performance and improved lifespan is provided.
[0029] FIG. 2 is a diagram illustrating the software layer of the storage system of FIG. 1 as an example. Referring to FIG. 1 and FIG. 2, the software layer of the storage system (10) may include an application layer (APP), a file system layer (FS), a device driver layer (DD), a stream manager (118), and a flash conversion layer (112).
[0030] The application layer (APP) may include various applications running on the host (11). The file system (FS) may be configured to organize files or data used by the application layer (APP). For example, the file system (FS) may manage the storage space of the storage device (100) as logical block addresses (LBA). The file system (FS) may assign and manage logical block addresses to data stored in the storage device (100). In an exemplary embodiment, the file system (FS) may have a different form depending on the operating system of the host (11). The file system (FS) may include at least one of various file system types such as FAT (File Allocation Table), FAT32, NTFS (NT File System), HFS (Hierarchical File System), JSF2 (Journaled File System2), XFS, ODS-5 (On-Disk Structure-5), UDF, ZFS, UFS (Unix File System), ext2, ext3, ext4, ReiserFS, Reiser4, ISO 9660, Gnome VFS, BFS, WinFS, etc. The device driver (DD) may perform an operation of converting information from the file system layer (FS) or the application layer (APP) into information recognizable by the storage device (100). In an exemplary embodiment, the application layer (APP), the file system layer (FS), and the device driver (DD) may be implemented in software form and may run on the host (11).
[0031] The stream manager (118) may be configured to allocate a stream for a request received from the host (11). In an exemplary embodiment, the stream manager (118) may be configured to allocate a stream for data based on machine learning.
[0032] The FTL (112) may be configured to convert the logical block address of a request received from the host (11) into a physical block address (or physical address) used in the non-volatile memory device (120). In an exemplary embodiment, the FTL (112) may receive information about a stream identifier assigned from the stream manager (118) and perform address mapping so that the request received from the host (11) is stored in the non-volatile memory device (120) according to the assigned stream.
[0033] FIG. 3 is a block diagram illustrating an exemplary non-volatile memory device of FIG. 1. FIG. 4 is a diagram illustrating a stream managed by a storage device. Referring to FIG. 1, FIG. 3, and FIG. 4, the non-volatile memory device (120) may include a plurality of non-volatile memories (NVM11 to NVM44). Each of the plurality of non-volatile memories (NVM11 to NVM44) may be implemented as a single semiconductor chip, a single semiconductor die, or a single semiconductor package.
[0034] The non-volatile memory (NVM11) may include a plurality of planes (PL1, PL2) and peripheral circuits (PERI). Each of the plurality of planes (PL1, PL2) may include a plurality of memory blocks (BLK11–BLK14, BLK21–BLK24). Each of the plurality of memory blocks (BLK11–BLK14, BLK21–BLK24) may include a plurality of pages. In an exemplary embodiment, a plurality of memory blocks (e.g., BLK11–BLK14) included in the same plane (e.g., PL1) may be configured to share the same bitline, but the scope of the invention is not limited thereto.
[0035] Peripheral circuitry (PERI) of the non-volatile memory (NVM11) may be connected to a corresponding channel (e.g., CH1) among multiple channels (CH1 to CH4). In response to various signals received through the corresponding channel, the peripheral circuitry (PERI) may store data received through the corresponding channel in multiple planes (PL1, PL2) or output data stored in the multiple planes (PL1, PL2) through the corresponding channel. For the above-described operation, the peripheral circuitry (PERI) may include various components such as an address decoder, a voltage generator, a page buffer circuit, an input / output circuit, and a control logic circuit.
[0036] For the sake of brevity in the drawings, one non-volatile memory (NVM11) is depicted as comprising two planes (PL2) and one plane as comprising four memory blocks; however, the scope of the invention is not limited thereto, and the number of planes, the number of memory blocks, or the number of pages may be varied. In an exemplary embodiment, the remaining non-volatile memories (NVM12 to NVM44) may have a structure similar to the non-volatile memory (NVM11) described above, and a detailed description thereof is omitted.
[0037] Among the plurality of non-volatile memories (NVM11~NVM44), a first portion (NVM11, NVM12, NVM13, NVM14) can communicate with the storage controller (1100) through a first channel (CH1), a second portion (NVM21, NVM22, NVM23, NVM24) can communicate with the storage controller (1100) through a second channel (CH2), a third portion (NVM31, NVM32, NVM33, NVM34) can communicate with the storage controller (1100) through a third channel (CH3), and a fourth portion (NVM41, NVM42, NVM43, NVM44) can communicate with the storage controller (1100) through a fourth channel (CH4). Among the plurality of non-volatile memories (NVM11~NVM44), a first portion (NVM11, NVM21, NVM31, NVM41) can form a first way (WAY1), a second portion (NVM12, NVM22, NVM32, NVM42) can form a second way (WAY2), a third portion (NVM13, NVM23, NVM33, NVM43) can form a third way (WAY3), and a fourth portion (NVM14, NVM24, NVM34, NVM44) can form a fourth way (WAY4). That is, the non-volatile memory device (1200) can have a multi-way / multi-channel structure, and it will be understood that the scope of the present invention is not limited to the structure shown in FIG. 3.
[0038] In an exemplary embodiment, the storage device (1000) may manage a plurality of memory blocks included in a non-volatile memory device (1200) based on a plurality of streams. For example, as illustrated in FIG. 4, the storage device (1100) may manage a first memory block (BLK1) among a plurality of memory blocks as a stream corresponding to a first stream identifier (SID1), a second memory block (BLK2) as a stream corresponding to a second stream identifier (SID2), a third memory block (BLK3) as a stream corresponding to a third stream identifier (SID3), and a first memory block (BLK4) as a stream corresponding to a fourth stream identifier (SID4).
[0039] In an exemplary embodiment, memory blocks (e.g., first memory blocks (BLK1)) corresponding to the same stream identifier (e.g., SID1) may be contained in the same plane, contained in the same non-volatile memory, contained in non-volatile memories connected to the same channel, or contained in non-volatile memories contained in the same way. Alternatively, memory blocks (e.g., first memory blocks (BLK1)) corresponding to the stream identifier (e.g., SID1) may be distributed among a plurality of non-volatile memories. However, the foregoing is merely an example and the scope of the invention is not limited thereto.
[0040] As described above, the stream manager (118) can manage data having similar characteristics as the same stream, and accordingly, data having similar characteristics will be stored in memory blocks corresponding to the same stream. In this case, since the data stored in the same stream has similar characteristics, performance degradation due to maintenance operations (e.g., garbage collection) of the storage device (100) may be reduced or the write amplification factor (WAF) may be reduced.
[0041] FIG. 5 is a diagram illustrating the stream manager of FIG. 1 as an example. FIG. 6 is a diagram illustrating the stream attribute table of FIG. 5 as an example. Hereinafter, to facilitate the explanation of the technical concept of the present invention, embodiments are described in which a storage device (100) receives a first write request (RQ1), which is a write request, from a host (11), and the storage device (100) allocates a stream for the first write request (RQ1). In an exemplary embodiment, the first write request (RQ1) provided by the host (11) may not include information regarding a stream identifier. However, the scope of the present invention is not limited thereto.
[0042] In an exemplary embodiment, a stream allocation method for a first write request (RQ1) is described in detail with reference to the drawings below, but the scope of the invention is not limited thereto. For example, a storage device (100) may perform subsequent operations (i.e., address mapping and program operations) so that write data corresponding to a write request is stored in a non-volatile memory device (120) for each allocated stream based on the method described with reference to FIGS. 1 to FIGS. 4.
[0043] In the following, terms such as "stream," "stream identifier," and "fragment" are used to facilitate the explanation of the technical concept of the present invention. A stream may refer to a set of data having identical or similar characteristics. Alternatively, a stream may refer to a set of data consisting of consecutive logical block addresses managed by the host (11). A stream identifier may be unique information assigned to each of a plurality of streams to distinguish each of the plurality of streams. A fragment may refer to a unit of data from which a stream has been divided. In an exemplary embodiment, even if a specific data group (i.e., a data group having identical or similar characteristics) is managed by the host (11) as consecutive logical block addresses, the specific data group may be fragmented by the operation of the kernel layer or file system layer of the host (11). In this case, write requests received continuously from the host (11) may have discontinuous logical block addresses. That is, the receiving time is discontinuous, but at least the logical block addresses are consecutive Two write requests may be included in a single fragment. In an exemplary embodiment, a single fragment may include at least one request, and a single stream may include at least one fragment. However, the scope of the invention is not limited thereto.
[0044] In the following, the term "sequential stream" is used to facilitate the explanation of the technical concept of the present invention. A sequential stream may refer to a stream that is sequential with respect to a specific write request or a stream having characteristics similar to a specific fragment. That is, a sequential stream for a write request may refer to a stream among the allocated streams that is sequential with respect to the write request. A sequential stream for a specific fragment may refer to a stream among the allocated streams that has attributes identical or similar to the attributes of the specific fragment.
[0045] Referring to FIGS. 1, 5, and 6, the stream manager (118) may include a stream attribute table (SAT), a sequential detecting module (SDM), a fragment collecting module (FCM), and a stream classifying module (SCM). In an exemplary embodiment, the stream manager (118) may be implemented in the form of software, hardware, or a combination thereof. For example, the components of the stream manager (118) may be implemented in the form of software, and the related components may be stored in a buffer memory (115) (see FIG. 1) and executed or managed by a processor (111). Alternatively, the components of the stream manager (118) may be implemented in the form of hardware, in which case a hardware accelerator for implementing the operation of the stream manager (118) may be further included in the storage controller (110). Alternatively, the components of the stream manager (118) may be implemented in the form of a combination of software and hardware, in which case the components implemented in software may be stored in a buffer memory (115) or a separate storage circuit, and the remaining components may be executed by dedicated hardware. However, the scope of the present invention is not limited thereto, and the stream manager (118) may be implemented in various ways without departing from the technical spirit of the present invention.
[0046] The stream attribute table (SAT) may be configured to include statistical information for each of the allocated streams. The statistical information may include information regarding the stream identifier (SID), start logical block address (sLBA), end logical block address (eLBA), start time (sT), end time (eT), throughput (TH), and size vector (SV) for each of the allocated streams.
[0047] A stream identifier (SID) may be unique information assigned to each of a plurality of pre-assigned streams. For example, as illustrated in FIG. 6, a plurality of stream identifiers (SID_1 to SID_n) may be assigned to each of a plurality of pre-assigned streams. A plurality of pre-assigned streams can be distinguished through the plurality of stream identifiers (SID_1 to SID_n).
[0048] In the following, for the sake of convenience of explanation, the terms and reference symbols for "stream identifier" and "stream" are used interchangeably. That is, SID_1 is a reference symbol designating the first stream identifier, but it can also directly designate the first stream corresponding to the first stream identifier. This is merely to facilitate the explanation of the technical concept of the present invention, and the technical configuration of this explanation will be easily understood by those skilled in the art.
[0049] The start logical block address (sLBA) may point to the smallest logical block address among the logical block addresses of write requests (or write data) contained in each of the plurality of pre-allocated streams. For example, as illustrated in FIG. 6, the smallest logical block address among the logical block addresses of write requests or write data contained in the first stream (SID_1) may be the first start logical block address (sLBA_1). The smallest logical block address among the logical block addresses of write requests or write data contained in the second stream (SID_2) may be the second start logical block address (sLBA_2). Likewise, the smallest logical block address among the logical block addresses of write requests or write data contained in the nth stream (SID_n) may be the nth start logical block address (sLBA_n).
[0050] The termination logical block address (eLBA) may point to the largest logical block address among the logical block addresses of write requests (or write data) contained in each of the plurality of pre-allocated streams. For example, as illustrated in FIG. 6, the largest logical block address among the logical block addresses of write requests or write data contained in the first stream (SID_1) may be the first termination logical block address (eLBA_1). The largest logical block address among the logical block addresses of write requests or write data contained in the second stream (SID_2) may be the second termination logical block address (eLBA_2). Likewise, the largest logical block address among the logical block addresses of write requests or write data contained in the nth stream (SID_n) may be the nth termination logical block address (eLBA_n).
[0051] In an exemplary embodiment, a range of logical block addresses for each of a plurality of write streams can be calculated based on the start logical block address and the end logical block address for each of a plurality of pre-allocated streams. For example, the range of logical block addresses of a first stream (SID_1) may be a range between a first start logical block address (sLBA_1) and a first end logical block address (eLBA_1).
[0052] The start time (sT) may indicate the time at which each of the plurality of pre-allocated streams is created. For example, as illustrated in FIG. 6, the first stream (SID_1) may be created at the first start time (sT_1), the second stream (SID_2) may be created at the second start time (sT_2), and the nth stream (SID_n) may be created at the nth start time (sT_n). In an exemplary embodiment, the creation of a specific stream may mean that write data or a write request is first allocated to that specific stream.
[0053] The end time (eT) may refer to the final time at which a write request or write data is added to each of the plurality of pre-allocated streams. For example, as illustrated in FIG. 6, the final time at which a write request or write data is added to the first stream (SID_1) may be the first end time (eT_1), the final time at which a write request or write data is added to the second stream (SID_2) may be the second end time (eT_2), and the final time at which a write request or write data is added to the nth stream (SID_n) may be the nth end time (eT_n).
[0054] Throughput (TH) may refer to the size of write data added per unit time to each of a plurality of pre-allocated streams. For example, as illustrated in FIG. 6, the size of write data added per unit time to the first stream (SID_1) may be the first throughput (TH_1), the size of write data added per unit time to the second stream (SID_2) may be the second throughput (TH_2), and the size of write data added per unit time to the nth stream (SID_n) may be the nth throughput (TH_n).
[0055] A size vector (SV) may indicate a size distribution of write requests or write data corresponding to each of a plurality of pre-allocated streams. For example, as illustrated in FIG. 6, the size distribution of write requests or write data included in a first stream (SID_1) may be a first size vector (SV_1), the size distribution of write requests or write data corresponding to a second stream (SID_2) may be a second size vector (SV_2), and the size distribution of write requests or write data corresponding to an nth stream (SID_n) may be an nth size vector (SV_n). In an exemplary embodiment, the size vector (SV) may be expressed in the form of a vector for the size and frequency of requested data as in Equation 1.
[0056]
[0057] Referring to mathematical formula 1, v represents the size vector (SV), r represents the size of the requested data, and c represents the frequency of the size of the requested data.
[0058] As described above, the stream attribute table (SAT) may include statistical information for each of the allocated streams (e.g., start logical block address, end logical block address, start time, end time, throughput, and size vector). In an exemplary embodiment, the stream attribute table (SAT) may be stored in the buffer memory (115) of the storage controller (110) or in a separate storage circuit.
[0059] The sequentiality detection module (SDM) may be configured to detect a sequential stream corresponding to a first write request (RQ1) received by the host (11) based on a stream attribute table (SAT). For example, the sequentiality detection module (SDM) may determine, based on the stream attribute table (SAT), which of the pre-assigned streams the first write request (RQ1) is sequential with respect to.
[0060] As a more detailed example, the sequentiality detection module (SDM) can determine whether the logical block address of the first write request (RQ1) falls within the logical block address range of pre-allocated streams. If the logical block address of the first write request (RQ1) falls within the logical block address range of a specific stream among the pre-allocated streams, the sequentiality detection module (SDM) can determine that the first write request (RQ1) is sequential with respect to the specific stream. In this case, the specific stream may be a sequential stream for the first write request (RQ1).
[0061] When a sequential stream for a first write request (RQ1) is detected by the sequentiality detection module (SDM), information regarding the first write request (RQ1) is provided to the stream classification module (SCM), and the stream classification module (SCM) can assign the sequential stream detected for the first write request (RQ1) (i.e., assign a stream identifier corresponding to the sequential stream).
[0062] If the logical block address of the first write request (RQ1) is not included within the range of logical block addresses of the allocated streams, the sequentiality detection module (SDM) may determine that the first write request (RQ1) is not sequential with respect to the allocated streams. In this case, there may not be a sequential stream for the first request (RQ1) among the allocated streams. If the first write request (RQ1) is determined to be not sequential with respect to the allocated streams, information related to the first write request (RQ1) (e.g., logical block address and data size) may be provided to the fragmentation collection module (FCM).
[0063] The fragment collection module (FCM) can manage, classify, or collect the first write request (RQ1) in fragment units. For example, the fragment collection module (FCM) can manage, classify, or collect non-sequential write requests in fragment units for pre-assigned streams among the write requests received from the sequentiality detection module (SDM). In an exemplary embodiment, the fragment collection module (FCM) can use a hash table to search for sequential fragments for a write request.
[0064] If no sequential fragment is found for a write request received from the Sequentiality Detection Module (SDM), the Fragment Collection Module (FCM) may forward information about the request to the Stream Classification Module (SCM). The Stream Classification Module (SCM) may assign a stream identifier of a random stream to the write request received from the Fragment Collection Module (FCM). In an exemplary embodiment, the random stream identifier may refer to any stream identifier. Alternatively, the random stream identifier may refer to a stream identifier of a stream different from the previously assigned streams.
[0065] If a sequential fragment is found for a write request received from the Sequentiality Detection Module (SDM), the Fragment Collection Module (FCM) can add information about the write request to the found fragment.
[0066] The Fragment Collection Module (FCM) can transmit attribute information regarding a specific fragment to the Stream Classification Module (SCM) if the number of requests or the size of requests, or the number or size of data, contained in a specific fragment exceeds a threshold. In other words, the Fragment Collection Module (FCM) can classify, manage, or collect requests or data on a fragment basis until the size of requests or data contained in the same fragment reaches the threshold.
[0067] The stream classification module (SCM) may be configured to identify the stream for a request based on information received from the fragmentation collection module (FCM) or the sequentiality detection module (SDM). For example, as previously described, receiving information about a write request from the sequentiality detection module (SDM) may indicate that the write request is sequential with respect to a specific stream. In this case, the stream classification module (SCM) may assign the stream identifier of the specific stream to the write request.
[0068] Alternatively, as previously described, the receipt of information regarding a write request from the Fragment Collection Module (FCM) may indicate that the write request is not sequential with respect to the pre-assigned streams and is not sequential with respect to the fragments. In this case, the Stream Classification Module (SCM) may assign a stream identifier of a random stream to the write request.
[0069] Alternatively, the receipt of attribute information of a specific fragment from the Fragment Collection Module (FCM) may indicate that the specific fragment contains write requests or write data exceeding a threshold. In this case, the Stream Classification Module (SCM) may assign a stream identifier to the specific fragment corresponding to the specific fragment among the pre-assigned streams, based on the attribute information of the specific fragment and the Stream Assignment Table (SAT). In an exemplary embodiment, the operation of assigning a stream identifier to a specific fragment may be performed based on machine learning.
[0070] FIG. 7 is a flowchart illustrating the stream allocation operation of the storage controller of FIG. 1. For convenience of explanation, the operation according to the flowchart of FIG. 7 is described as being performed by the storage controller (110) of FIG. 1, but the scope of the present invention is not limited thereto.
[0071] Referring to FIGS. 1, FIGS. 5, and FIGS. 7, in step S110, the storage controller (110) may receive a write request from the host (11). In an exemplary embodiment, the write request may be received via signals based on a predetermined interface protocol between the host (11) and the storage device (110). The write request may include information regarding a write command, write data, and a logical block address. In an exemplary embodiment, the write request may not include a stream identifier or stream information.
[0072] In step S120, the storage controller (110) can determine whether the received write request is sequential with respect to the allocated streams. For example, the storage controller (110) can determine whether the write request is sequential with respect to which of the allocated streams based on the logical block address of the write request and the stream attribute table (SAT). As a more detailed example, as described with reference to FIGS. 5 and 6, the stream attribute table (SAT) may contain statistical information for each of the allocated streams. Since the stream attribute table (SAT) has been described previously, a detailed description thereof is omitted.
[0073] If the logical block address of a received write request falls within the range of logical block addresses of a specific stream (i.e., the range between the start logical block address and the end logical block address of a specific stream), the storage controller (110) can determine that the received write request is sequential for a specific stream. In this case, the specific stream may be a sequential stream for the write request, and at step S130, the storage controller (120) can assign a stream identifier of the corresponding sequential stream (i.e., the stream determined to be sequential) to the write request.
[0074] If there is no stream corresponding to the write request among the pre-allocated streams included in the stream attribute table (SAT) (i.e., no sequential stream for the write request), in step S140, the storage controller (120) can determine which fragment the write request is sequential. For example, the storage controller (110) can determine which fragment the write request is sequential by checking a hash table based on the logical block address of the write request. For convenience of explanation, the fact that the write request is sequential to a specific fragment is described below as the write request corresponding to a specific fragment.
[0075] If no fragment corresponding to the write request exists (i.e., if no sequential fragment exists for the write request), in step S150, the storage controller (110) may assign a random identifier to the write request. For example, the absence of a sequential stream for the write request means that a stream corresponding to the write request has not been previously assigned. Additionally, the absence of a fragment corresponding to the write request indicates that no other write request having attributes similar to the write request has been received. Therefore, the storage controller (110) may assign a random identifier to the received write request. In an exemplary embodiment, after the random identifier is assigned, the hash table may be updated. That is, the write request to which the random identifier has been assigned may be newly registered in the hash table.
[0076] If a fragment corresponding to a write request exists (i.e., if the write request is sequential to the corresponding fragment), in step S160, the storage controller (110) may add the write request to the corresponding fragment. In an exemplary embodiment, adding the write request to the corresponding fragment may mean adding information or attributes regarding the write request to a hash table, or managing or storing the write data for the write request together with the data for the corresponding fragment.
[0077] In step S170, the storage controller (110) can determine whether the size of the write requests or data contained in the corresponding fragment is greater than or equal to a reference size. In an exemplary embodiment, the reference size may refer to a program unit executed in a non-volatile memory device (120). If the size of the write requests contained in the corresponding fragment is not greater than the reference size, the storage controller (110) performs step S110 again. That is, the storage controller (110) can repeat the operations of steps S110 through S170 until the size of the write requests contained in a specific fragment becomes greater than or equal to the reference size.
[0078] If the size of the write requests included in a specific fragment is greater than or equal to a reference size, in step S180, the storage controller (110) can determine whether there exists a stream corresponding to the write requests included in the specific fragment. For example, the storage controller (110) can determine whether there exists a stream corresponding to the specific fragment (i.e., a sequential stream for the specific fragment) based on statistical information of multiple streams included in the stream attribute table (SAT) and attribute information of the specific fragment. In an exemplary embodiment, the storage controller (110) can detect a stream having characteristics similar to the attribute information of the specific fragment based on machine learning.
[0079] If a stream corresponding to a specific fragment exists, in step S130, the storage controller (110) may assign a stream identifier of the sequential stream (i.e., the corresponding stream) retrieved for the specific fragment.
[0080] If there is no stream corresponding to a specific fragment, at step S190, the storage controller (110) may create a new stream and assign the stream identifier of the newly created stream to the specific fragment. In an exemplary embodiment, the storage controller (110) may update the stream attribute table (SAT) based on information about the assigned stream after step S130, step S150, or step S190.
[0081] In an exemplary embodiment, after a stream (sequential stream or random stream) is allocated for a write request or fragment, the storage controller (110) may perform address mapping so that the write request or fragment is stored in the non-volatile memory device (120) according to the allocated stream. That is, the storage controller (110) may perform address mapping so that requests or fragments having the same stream are stored in the same group of memory blocks within the non-volatile memory device (120), and may control the non-volatile memory device (120).
[0082] Accordingly, even if no separate information regarding the data (e.g., stream identifier or stream information) is provided from the host (11), the storage device (100) according to the present invention can manage the data by dividing it into stream units. In this case, as described above, the number of unnecessary maintenance operations for the non-volatile memory device (120) is reduced, so the lifespan and performance of the storage device (100) can be improved.
[0083] FIG. 8 is an exemplary drawing for explaining the operation of step S120 of FIG. 7. For the brevity of the drawing and convenience of explanation, it is assumed that the storage controller (110) has pre-assigned the first stream (SID_1) and the second stream (SID_2). In the exemplary embodiment, the operation described with reference to FIG. 8 is described with reference to the storage controller (110), but the scope of the invention is not limited thereto. For example, the operation described with reference to FIG. 8 may be performed by the stream manager (118) of the storage controller (110). Or, the operation described with reference to FIG. 8 may be performed by the sequential determination module (SDM) of the stream manager (118).
[0084] Referring to FIGS. 1, 7, and 8, the storage controller (110) can detect a sequential stream of a received request based on the logical block address of the request received from the host (11). For example, as shown in FIG. 8, the storage space of the storage device (100) identified by the host (11) may be equal to a logical block address range (LBA_range). That is, the host (11) can manage the storage space of the storage device (100) through the logical block address range (LBA_range).
[0085] A storage controller (110) may receive a zero write request (RQ0) having a zero logical block address (LBA_0). At this time, the zero logical block address (LBA_0) may be included in the range between a first start logical block address (sLBA_1) and a first end logical block address (eLBA_1). The first start logical block address (sLBA_1) and the first end logical block address (eLBA_1) may correspond to a first stream (SID_1). In this case, the storage controller (110) may determine that the zero write request (RQ0) having the zero logical block address (LBA_0) is sequential with respect to the first stream (SID1). That is, the sequential stream for the write request having the zero logical block address (LBA_0) may be the first stream (SID_1). The storage controller (110) can assign the stream identifier (i.e., SID_1) of the first stream (SID_1) to the first write request (RQ0) having the first logical block address (LBA_0). This can correspond to the Yes step in the operation of step S120 of FIG. 7.
[0086] The storage controller (110) may receive a first write request (RQ1) having a first logical block address (LBA_1). At this time, the first logical block address (LBA_1) may not be included in the logical block address range (e.g., sLBA_1 to eLBA_1, sLBA_2 to eLBA_2) corresponding to the first stream (SID_1) and the second stream (SID_2), respectively. That is, for the first write request (RQ1) having the first logical block address (LBA_1), there may not be a sequential stream among the pre-allocated streams. In this case, the storage controller (110) may perform a fragment search operation (or fragment collection operation) for the first request (RQ1). This may correspond to step No in the operation of step S120 of FIG. 7.
[0087] As described above, the storage controller (110) can detect a sequential stream for a received write request among the pre-allocated streams based on the stream attribute table (SAT). If a sequential stream is detected, the storage controller (110) allocates the detected sequential stream for the write request, and if a sequential stream is not detected, the storage controller (110) can perform a fragment search operation or a fragment collection operation for the write request.
[0088] FIG. 9 is a diagram illustrating the operation of step S140 of FIG. 7. In an exemplary embodiment, the operation described with reference to FIG. 9 is described with reference to a storage controller (110), but the scope of the invention is not limited thereto. For example, the operation described with reference to FIG. 9 may be performed by a stream manager (118) of the storage controller (110). Alternatively, the operation described with reference to FIG. 9 may be performed by a fragment collection module (FCM) of the stream manager (118).
[0089] Referring to FIGS. 5, 7, and 9, the fragment collection module (FCM) can receive information about a first write request (RQ1) having a first logical block address (LBA_1) from the sequentiality detection module (SCM). In an exemplary embodiment, the sequential stream for the first write request (RQ1) having the first logical block address (LBA_1) may be determined to be non-existent by the sequentiality detection module (SDM).
[0090] The fragment collection module (FCM) can search for sequential fragments for a first write request (RQ1) based on a first logical block address (LBA_1). For example, the fragment collection module (FCM) can perform a hash operation (HF) on the first logical block address (LBA_1) and compare the result of the hash operation with an index (IND). The index (IND) may contain values corresponding to multiple fragments (FR1~FR8). The multiple fragments (FR1~FR8) may contain information regarding corresponding write requests. For example, the first fragment (FR1) may contain information regarding write requests (RQa, RQb), the third fragment (FR3) may contain information regarding a write request (RQc), and the sixth fragment (FR6) may contain information regarding write requests (RQd, RQe).
[0091] If there is an index (IND) that matches the result of the hash operation (HF), the fragment collection module (FCM) can add information about a write request to the fragment corresponding to the index (IND) that matches the result of the hash operation (HF). For example, in the embodiment of FIG. 9, the result of the hash operation (HF) may correspond to the sixth fragment (FR6), and in this case, the fragment collection module (FCM) can add information about the first write request (RQ1) to the sixth fragment (FR6).
[0092] As described above, the Fragment Collection Module (FCM) can search for sequential fragments for a received write request and add the write request to the searched fragments. In other words, the Fragment Collection Module (FCM) can manage, collect, or accumulate write requests with similar characteristics as fragments.
[0093] In an exemplary embodiment, if there is no index (IND) that matches the result of the hash operation (HF), the fragment collection module (FCM) transmits information about the first write request (RQ1) to the stream classification module (SCM), and the stream classification module (SCM) may assign a random stream identifier to the first write request (RQ1).
[0094] FIG. 10 is a flowchart showing in detail the operation of step S180 of FIG. 7. In an exemplary embodiment, the operation described with reference to FIG. 10 is described with reference to a storage controller (110), but the scope of the invention is not limited thereto. For example, the operation described with reference to FIG. 10 may be performed by a stream manager (118) of the storage controller (110). Or, the operation described with reference to FIG. 10 may be performed by a stream classification module (SCM) of the stream manager (118).
[0095] For convenience of explanation, the term "collected fragments" is used below. Collected fragments may refer to fragments in which write requests or write data exceeding a threshold are collected or accumulated by the Fragment Collection Module (FCM). However, the scope of the present invention is not limited thereto.
[0096] Referring to FIGS. 1, FIGS. 7, and FIGS. 10, the operation of step S180 may include the operations of steps S181, S182, and S183. In step S181, the storage controller (110) may obtain cosine similarity. For example, the storage controller (110) may obtain cosine similarity between each of the collected fragments and pre-assigned streams based on the attribute information of the collected fragments and the stream attribute table (SAT). The operation of step S181 is described in more detail with reference to FIG. 11.
[0097] In step S182, the storage controller (110) may select n streams from among the pre-assigned streams based on cosine similarity. For example, the storage controller (110) may select n streams from among the pre-assigned streams that have a high acquired cosine similarity. In an exemplary embodiment, n may be 3, but the scope of the invention is not limited thereto.
[0098] In step S183, the storage controller (110) can use machine learning to determine which of the selected n streams corresponds to the collected fragment (i.e., the sequential stream for the collected fragment). Depending on the result of step S183, the storage controller (110) can perform the operation of step S130 or step S190.
[0099] FIG. 11 is a block diagram exemplifying the stream classification module of FIG. 5. FIG. 12 is a diagram exemplifying the machine learning module of FIG. 11. Referring to FIG. 5, FIG. 10, FIG. 11, and FIG. 12, the stream classification module (SCM) may include a cosine similarity module (CSM), a machine learning model (ML), a stream selection module (SSM), and a SAT update module (SUM). As previously described, the stream classification module (SCM) may be configured to assign a sequential stream or a random stream for a first write request (RQ1) received from a sequentiality detection module (SCM) or a fragment collection module (FCM), or to assign a stream corresponding to a collected fragment received from a fragment collection module (FCM).
[0100] First, the operation of allocating a sequential stream for a first write request (RQ1) received from a sequentiality detection module (SCM) is described. As previously described, when a sequential stream for the first write request (RQ1) is detected by the sequentiality detection module (SCM), the stream classification module (SCM) can receive information regarding the first write request (RQ1) from the sequentiality detection module (SCM). In this case, the stream classification module (SCM) can allocate a sequential stream for the first write request (RQ1) based on a stream attribute table (SAT).
[0101] Next, the operation of allocating a random stream for a first write request (RQ1) received from the fragment collection module (FCM) is described. As previously described, the receipt of a first write request (RQ1) from the fragment collection module (FCM) means that neither a sequential stream nor a sequential fragment exists for the first write request (RQ1). In this case, the stream selection module (SSM) can allocate a random stream for the first write request (RQ1).
[0102] Next, the operation of assigning streams for collected fragments received from the fragment collection module (FCM) is described. The stream classification module (SCM) can receive information about collected fragments (hereinafter referred to as "target fragment information") (FR_t) from the fragment collection module (FCM). The cosine similarity module (CSM) of the stream classification module (SCM) can calculate the cosine similarity of the target fragment information (FR_t) for each of the pre-assigned streams based on the target fragment information (FR_t) and the stream attribute table (SAT).
[0103] For example, as previously described, the stream attribute table (SAT) may contain information on size vectors (SV) for pre-allocated streams. Target fragment information (FR_t) may contain information on the size and frequency of write requests or write data contained in the target fragment. Based on the information described above, a cosine similarity such as Equation 2 may be calculated.
[0104]
[0105] Referring to Equation 2, cos θ represents cosine similarity, and A and B represent the size vector (SV) of each of the pre-allocated streams and the vector for the size and frequency of write requests contained in the target fragment, respectively. The cosine similarity based on Equation 2 can have a magnitude between -1 and 1, where a value of cosine similarity (SIM) closer to -1 indicates that the two vectors are not similar, and a value of cosine similarity (SIM) closer to 1 indicates that the two vectors are similar to each other.
[0106] In an exemplary embodiment, from a statistical perspective, if the distribution of the size and frequency of write requests included in the target fragment is similar to the distribution of the size vector of a specific stream among the pre-assigned streams, it may imply that the target fragment is highly likely to be sequential with respect to the specific stream. That is, based on the cosine similarity described above, some streams among the pre-assigned streams that have a distribution similar to the target fragment may be selected. In an exemplary embodiment, the selected streams may be n streams among the pre-assigned streams that have a cosine similarity closest to 1. In an exemplary embodiment, n may be 3, but the scope of the invention is not limited thereto.
[0107] After n streams are selected from the pre-assigned streams, the stream classification module (SCM) can determine the stream corresponding to the target fragment among the n streams based on a machine learning model (ML).
[0108] For example, a machine learning model (ML) may include three layers (LAY1, LAY2, LAY3) as illustrated in FIG. 12. The first layer (LAY1) may include a linear combination layer and a ReLU & Dropout layer. The second layer (LAY2) may include a linear combination layer and a ReLU & Dropout layer. The third layer (LAY3) may include a linear combination layer and a softmax layer.
[0109] The operation of the first to third layers (LAY1~LAY3) can be expressed as Equation 3.
[0110]
[0111] Referring to Equation 3, L1 refers to the output of the first layer (LAY1), L2 refers to the output of the second layer (LAY2), and out refers to the output of the third layer (LAY3), i.e., the probability value (PRB). In each layer, x refers to the vector input to each layer, squeezing refers to the hidden vector of each layer, and bk refers to the bias of each layer.
[0112] That is, statistical information from a stream attribute table (SAT), target fragment information (FR_t), and cosine similarity (SIM) can be input into a machine learning model (ML). At this time, through the machine learning model (ML), n streams whose cosine similarity (SIM) is closest to 1 can be selected, and a probability value (PRB) can be calculated through machine learning on the statistical information of the selected streams (i.e., statistical information obtained from the stream attribute table (SAT)) and target fragment information (FR_t).
[0113] In an exemplary embodiment, the target fragment information (FR_t) may include information similar to the statistical information contained in the stream attribute table (SAT). For example, the target fragment information (FR_t) may include information regarding the start logical block address, end logical block address, start time, end time, throughput, and size vector of the target fragment. That is, the machine learning model (ML) may be configured to detect streams having statistical information identical or similar to the target fragment information (FR_t). In an exemplary embodiment, the machine learning model (ML) may be pre-trained and may be additionally trained during the process of performing the stream allocation operation.
[0114] In an exemplary embodiment, the probability value (PRB) may be a value in the form of a vector representing the possibility that a target fragment may correspond to each of the selected n streams.
[0115] In an exemplary embodiment, the machine learning model (ML) may be based on a decision tree model, but the scope of the invention is not limited thereto.
[0116] The stream selection module (SSM) can assign a stream to a target fragment based on a probability value (PRB). For example, the stream selection module (SSM) can determine which stream is a sequential stream for the target fragment based on the probability value (PRB). The stream selection module (SSM) can assign the selected sequential stream to the target fragment. In an exemplary embodiment, if the stream selection module (SSM) cannot determine a sequential stream for the target fragment based on the probability value (PRB) (i.e., if no sequential stream exists for the target fragment), the stream selection module (SSM) can create a new stream and assign the created new stream to the target fragment.
[0117] In an exemplary embodiment, after a stream is allocated, the SAT update module (SUM) can update information corresponding to the allocated stream in the stream attribute table (SAT).
[0118] As described above, the stream classification module (SCM) according to an embodiment of the present invention collects fragmented write requests based on specific conditions (i.e., sequentiality of logical block addresses) and can allocate or classify streams for the collected write requests. At this time, the stream classification module (SCM) can select some streams among the pre-allocated streams based on the previously described cosine similarity and allocate streams for the collected write requests through machine learning on the selected some streams. That is, since learning or computation is performed only on some streams instead of on all pre-allocated streams, the amount of computation for stream allocation can be reduced. Accordingly, the configuration and computational amount of the stream classification module (SCM) can be reduced.
[0119] FIG. 13 is a diagram illustrating an exemplary storage system to which a storage device according to the present invention is applied. FIG. 13 may have a configuration similar to the storage device (10) of FIG. 1. However, in order to explain the effects according to the present invention more clearly, the storage system is illustrated in a conceptual form.
[0120] Referring to FIGS. 1 and FIGS. 13, a plurality of applications (APP1 to APP4) can be run in a storage system (10). In an exemplary embodiment, the plurality of applications (APP1 to APP4) can be run on a host (11). In an exemplary embodiment, the host (11) can be implemented as a multi-tenant, and each of the plurality of applications (APP1 to APP4) can be run on a different tenant.
[0121] Multiple applications (APP1 to APP4) may be configured to access the storage device (100) through a file system (FS). In an exemplary embodiment, files or data generated by each of the multiple applications (APP1 to APP4) may have different characteristics. However, if multiple applications (APP1 to APP4) access the storage device (100) through the same file system (FS), the storage device (100) will generally manage the files or data generated by each of the multiple applications (APP1 to APP4) unless separate information (e.g., stream information managed by the host (11)) is provided. In this case, since the files or data generated by each of the multiple applications (APP1 to APP4) are not distinguished within the non-volatile memory device (120), maintenance operations will occur frequently.
[0122] On the other hand, the stream manager (118) of the storage device (100) according to an embodiment of the present invention can separate files or data generated by a plurality of applications (APP1 to APP4) into a plurality of streams (SID_1 to SID_4) based on the stream allocation method described with reference to FIGS. 1 to 12. That is, files or data generated by the first application (APP_1) can be classified into the first stream (SID_1), files or data generated by the second application (APP_2) can be classified into the second stream (SID_2), files or data generated by the third application (APP_3) can be classified into the third stream (SID_3), and files or data generated by the fourth application (APP_4) can be classified into the fourth stream (SID_4). In this case, since files or data generated by one application are managed as the same stream, maintenance operations for the non-volatile memory device (120) may be reduced or WAF characteristics may be improved.
[0123] FIG. 14 is a diagram illustrating the effects of a storage device according to the present invention. As described above, the storage device (100) according to the present invention can classify, allocate, or manage streams for input data based on the attributes of input data and statistical information of pre-allocated streams without separate information (e.g., stream classification information) from the host (11). In this case, the number of maintenance operations performed in the storage device (100) may be reduced or WAF characteristics may be improved.
[0124] For example, the graph in FIG. 14 shows the results using YCSB (yahoo cloud serving benchmark). Case 1 is the result for a workload where the ratio of Insert to RMW (read-modify-write) is 50:50, Case 2 is the result for a workload where the ratio of Insert to RMW (read-modify-write) is 25:75, and Case 3 is the result for a workload where the ratio of Insert to RMW (read-modify-write) is 10:90. As illustrated in the graph in FIG. 14, compared to the case where stream allocation is not performed on the input data (i.e., non-streamed), when the stream manager (118) according to the present invention is applied (i.e., Deep-streamed), the WAF size is reduced. That is, when the stream manager or stream allocation method according to the embodiment of the present invention is applied, the performance and lifespan of the storage device can be improved.
[0125] FIG. 15 is a block diagram illustrating an exemplary storage system according to an embodiment of the present invention. For convenience of explanation, detailed descriptions of the components described above are omitted. Referring to FIG. 15, the storage system (1000) may include a host (1100) and a storage device (1200). The host (1100) may include a host controller (1110), a host memory (1120), a device driver (1130), and a stream manager (1140). The storage device (1200) may include a storage controller (1210) and a non-volatile memory device (1220).
[0126] In an exemplary embodiment, in the embodiments described with reference to FIGS. 1 through 14, the storage device managed the stream for write requests, but in the embodiment of FIG. 15, the host (1100) may be configured to manage the stream for data to be stored in the storage device (1200). In an exemplary embodiment, the stream manager (1140) of the host (1100) may be the stream manager described with reference to FIGS. 1 through 14 or may operate based on the stream allocation method described with reference to FIGS. 1 through 14.
[0127] In an exemplary embodiment, information about a stream allocated by a stream manager (1140) of a host (1100) may be provided to a storage device (1200) along with a write request.
[0128] In an exemplary embodiment, the storage device (1200) may be configured to manage data based on stream information provided by the host (1100). In an exemplary embodiment, the storage device (1200) may be configured to manage internal streams for write requests internally, separately from the stream information provided by the host (1100). In this case, the storage device (1200) may manage internal streams based on the stream allocation method described with reference to FIGS. 1 through 14.
[0129] FIG. 16 is a block diagram exemplarily showing a data center to which a storage device according to an embodiment of the present invention is applied. The data center (2000) is a facility that maintains and manages various data and provides various services for various data, and may be called a data storage center. The data center (200) may be a system for operating a search engine or database, and may be a computing system used by various organizations. The data center (2000) may include a plurality of application servers (2100_1 to 2100_n) and a plurality of storage servers (2200_1 to 2200_m). The number of the plurality of application servers (2100_1 to 2100_n) and the number of the plurality of storage servers (2200_1 to 2200_m) may be varied in various ways.
[0130] For convenience of explanation, an example of a first storage server (2200_1) is described below. Each of the remaining storage servers (2200_2 to 2200_m) and the plurality of application servers (2100_1 to 2100_n) may have a structure similar to that of the first storage server (2200_1).
[0131] The first storage server (2200_1) may include a processor (2210_1), memory (2220_1), a switch (2230_1), a network interface connector (NIC) (2240_1), and a storage device (2250_1). The processor (2210_1) may control the overall operation of the first storage server (2200_1). The memory (2220_1) may store various instructions or data under the control of the processor (2210_1). The processor (2210_1) may be configured to access the memory (2220_1) to execute various instructions or process data. In an exemplary embodiment, the memory (2220_1) may include at least one of various types of memory devices such as DDR SDRAM (Double Data Rate Synchronous DRAM), HBM (High Bandwidth Memory), HMC (Hybrid Memory Cube), DIMM (Dual In-line Memory Module), Optane DIMM, or NVDIMM (Non-Volatile DIMM).
[0132] In an exemplary embodiment, the number of processors (2210_1) and the number of memories (2220_1) included in the first storage server (2200_1) may vary. In an exemplary embodiment, the processors (2210_1) and memories (2220_1) included in the first storage server (2200_1) may form processor-memory pairs, and the number of processor-memory pairs included in the first storage server (2200_1) may vary. In an exemplary embodiment, the number of processors (2210_1) and the number of memories (2220_1) included in the first storage server (2200_1) may differ from each other. The processor (2210_1) may include a single-core processor or a multi-core processor.
[0133] The switch (2230_1) can selectively connect the processor (2210_1) and the storage device (2250_1) or selectively connect the NIC (2240_1) and the storage device (2250_1) according to the control of the processor (2210_1).
[0134] The NIC (2240_1) may be configured to connect the first storage server (2200_1) to a network (NT). The NIC (2240_1) may include a network interface card, a network adapter, etc. The NIC (2240_1) may be connected to the network (NT) by a wired interface, a wireless interface, a Bluetooth interface, an optical interface, etc. The NIC (2240_1) may include internal memory, a DSP, a host bus interface, etc., and may be connected to a processor (2210_1) or a switch (2230_1), etc., through the host bus interface. The host bus interface may include at least one of various interfaces such as ATA (Advanced Technology Attachment), SATA (Serial ATA), e-SATA (external SATA), SCSI (Small Computer Small Interface), SAS (Serial Attached SCSI), PCI (Peripheral Component Interconnection), PCIe (PCI express), NVMe (NVM express), IEEE 1394, USB (universal serial bus), SD (secure digital) card, MMC (multi-media card), eMMC (embedded multi-media card), UFS (Universal Flash Storage), eUFS (embedded Universal Flash Storage), CF (compact flash) card interface, etc. In an exemplary embodiment, the NIC (2240_1) may be integrated with at least one of a processor (2210_1), a switch (2230_1), and a storage device (2250_1).
[0135] The storage device (2250_1) can store data or output stored data under the control of the processor (2210_1). The storage device (2250_1) may include a controller (2251_1), non-volatile memory (2252_1), DRAM (2253_1), and an interface (2254_1). In an exemplary embodiment, the storage device (2250_1) may further include a Secure Element (SE) for security or privacy.
[0136] The controller (2251_1) can control the general operations of the storage device (2250_1). In an exemplary embodiment, the controller (2250_1) may include an SRAM. The controller (2251_1) can store data in the non-volatile memory (2252_1) or output data stored in the non-volatile memory (2252_1) in response to signals received through the interface (2254_1). In an exemplary embodiment, the controller (2251_1) may be configured to control the non-volatile memory (2252_1) based on a toggle interface or an ONFI interface.
[0137] The DRAM (2253_1) may be configured to temporarily store data to be stored in the non-volatile memory (2252_1) or data read from the non-volatile memory (2252_1). The DRAM (2253_1) may be configured to store various data (e.g., metadata, mapping data, etc.) required for the controller (2251_1) to operate. The interface (2254_1) may provide a physical connection between the processor (2210_1), the switch (2230_1), or the NIC (2240_1) and the controller (2251_1). In an exemplary embodiment, the interface (2254_1) may be implemented in a Direct Attached Storage (DAS) manner, which directly connects the storage device (2250_1) via a dedicated cable. In an exemplary embodiment, the interface (2254_1) may be configured based on at least one of the various interfaces described above via the host interface bus.
[0138] The configurations of the first storage server (2200_1) described above are exemplary and the scope of the invention is not limited thereto. The configurations of the first storage server (2200_1) described above may be applied to other storage servers or each of a plurality of application servers. In an exemplary embodiment, in each of the plurality of application servers (2100_1 to 2100_n), the storage device (2150_1) may be optionally omitted.
[0139] Multiple application servers (2100_1 to 2100_n) and multiple storage servers (2200_1 to 2200_m) can communicate with each other via a network (NT). The network (NT) can be implemented using Fibre Channel (FC) or Ethernet, etc. In this case, FC is a medium used for relatively high-speed data transmission, and an optical switch providing high performance / high availability can be used. Depending on the access method of the network (NT), the storage servers (2200_1 to 2200_m) can be provided as file storage, block storage, or object storage.
[0140] In an exemplary embodiment, the network (NT) may be a storage-dedicated network such as a Storage Area Network (SAN). For example, the SAN may be an FC-SAN that utilizes an FC network and is implemented according to the FC Protocol (FCP). Alternatively, the SAN may be an IP-SAN that utilizes a TCP / IP network and is implemented according to the iSCSI (SCSI over TCP / IP or Internet SCSI) protocol. In an exemplary embodiment, the network (NT) may be a general network such as a TCP / IP network. For example, the network (NT) may be implemented according to protocols such as FC over Ethernet (FCoE), Network Attached Storage (NAS), and NVMe over Fabrics (NVMe-oF).
[0141] In an exemplary embodiment, at least one of the plurality of application servers (2100_1 to 2100_n) may be configured to access at least one other of the plurality of application servers (2100_1 to 2100_n) or at least one of the plurality of storage servers (2200_1 to 2200_m) through a network (NT).
[0142] For example, the first application server (2100_1) can store data requested by a user or client in at least one of a plurality of storage servers (2200_1 to 2200_m) via a network (NT). Alternatively, the first application server (2100_1) can obtain data requested by a user or client from at least one of a plurality of storage servers (2200_1 to 2200_m) via a network (NT). In this case, the first application server (2100_1) can be implemented as a web server or a DBMS (Database Management System), etc.
[0143] That is, the processor (2110_1) of the first application server (2100_1) can access the memory (2120_n) or storage device (2150_n) of another application server (e.g., 2100_n) through the network (NT). Alternatively, the processor (2110_1) of the first application server (2100_1) can access the memory (2220_1) or storage device (2250_1) of the first storage server (2200_1) through the network (NT). Through this, the first application server (2100_1) can perform various operations on data stored in other application servers (2100_2 to 2100_n) or multiple storage servers (2200_1 to 2200_m). For example, the first application server (2100_1) may execute or issue a command to move or copy data between other application servers (2100_2 to 2100_n) or multiple storage servers (2200_1 to 2200_m). In this case, the data to be moved or copied may be moved from the storage devices (2250_1 to 2250_m) of the storage servers (2200_1 to 2200_m) through the memories (2220_1 to 2220_m) of the storage servers (2200_1 to 2200_m) or directly to the memories (2120_1 to 2120_n) of the application servers (2100_1 to 2100_n). Data transmitted over the network (NT) may be encrypted data for security or privacy.
[0144] In an exemplary embodiment, the storage servers (2200_1 to 2200_m) or storage devices (2150_1 to 2150_n, 2250_1 to 2250_m) described above may include a stream manager according to an embodiment of the present invention. That is, at least one of the storage servers (2200_1 to 2200_m) or storage devices (2150_1 to 2150_n, 2250_1 to 2250_m) may be configured to allocate and manage a stream for input data based on the method described with reference to FIGS. 1 to 15.
[0145] The above description describes specific embodiments for implementing the present invention. The present invention will include not only the embodiments described above, but also embodiments that can be simply modified or easily modified. Furthermore, the present invention will include technologies that can be easily modified and implemented using the embodiments. Accordingly, the scope of the present invention should not be limited to the embodiments described above, but should be defined by the claims set forth below as well as equivalents to the claims of this invention.
Claims
Claim 1 A method of operation of a storage device including a non-volatile memory device, comprising: receiving a first write request from an external host; adding the first write request to a first fragment; selecting at least n streams among the previously allocated streams based on cosine similarity between each of the previously allocated streams and the first fragment when the size of the first fragment is greater than or equal to a reference value, wherein n is a natural number greater than 2; performing machine learning with statistical information of the at least n streams and statistical information of the first fragment as input information to detect a first sequential stream for the first fragment among the at least n streams; assigning a stream identifier of the first sequential stream to the first fragment; and storing write data included in the first fragment in the non-volatile memory device based on the assigned stream identifier of the first sequential stream. Claim 2 A method of operation in which the cosine similarity is calculated based on a first size vector indicating the size and frequency of data included in each of the pre-assigned streams and a second size vector indicating the size and frequency of the write data included in the first fragment. Claim 3 A method of operation in which, in claim 2, the at least n streams are the streams among the pre-assigned streams whose calculated cosine similarity is closest to 1. Claim 4 A method of operation according to claim 1, wherein the statistical information of the at least n streams includes a start logical block address, an end logical block address, a start time, an end time, throughput, and a size vector of data included in each of the at least n streams, and the statistical information of the first fragment includes a start logical block address, an end logical block address, a start time, an end time, throughput, and a size vector of the write data included in the first fragment. Claim 5 A method of operation according to claim 1, further comprising the step of updating a stream attribute table containing statistical information of the previously assigned streams after the stream identifier of the first sequential stream is assigned to the first fragment. Claim 6 In claim 1, the step of adding the first write request to the first fragment comprises: performing a hash operation on the logical block address of the first write request; and searching a hash table for an index corresponding to the result of the hash operation, and a method of operation in which the first write request is selectively added to the first fragment based on the search result. Claim 7 A method of operation according to claim 1, further comprising the step of searching for a second sequential stream for the first write request among the allocated streams based on the logical block address of the first write request and the logical block address range of each of the allocated streams prior to the step of adding the first write request to the first fragment, and if the stream corresponding to the first write request is not found, the step of adding the first write request to the first fragment is performed. Claim 8 A method of operation according to claim 7, further comprising the step of assigning a stream identifier of the second sequential stream to the first write request when the logical block address of the first write request is included in the logical block address range of the second sequential stream. Claim 9 A method of operation according to claim 1, further comprising: receiving a second write request from the external host; assigning a stream identifier of a third sequential stream for the second write request among the previously allocated streams based on the logical block address of the second write request and the logical block address range of each of the previously allocated streams; and storing write data corresponding to the second write request in the non-volatile memory device based on the stream identifier of the third sequential stream, wherein if the third sequential stream and the first sequential stream are different, the write data included in the first fragment and the write data corresponding to the second write request are stored in different memory blocks in the non-volatile memory device. Claim 10 A method of operation according to claim 1, wherein a plurality of data included in the first sequential stream have logical block addresses that are consecutive to each other. Claim 11 A method of operation in which, in claim 1, the size of the data included in each of the aforementioned pre-allocated streams is greater than or equal to the size of the write data included in the first fragment. Claim 12 A storage controller configured to control a non-volatile memory device comprises: a host interface circuit configured to receive a first write request from an external host; a stream manager configured to add the first write request to a first fragment and, if the first fragment is greater than or equal to a threshold, to perform machine learning based on statistical information of the first fragment and statistical information of pre-allocated streams to allocate a first sequential stream to the first fragment; a flash conversion layer configured to convert a logical block address of the first write request to a physical block address based on the first sequential stream; a processor configured to drive the flash conversion layer; and a memory interface circuit configured to provide the physical block address, the write data of the first write request, and a write command to the non-volatile memory device, wherein the stream manager comprises: a stream attribute table configured to manage the statistical information for the pre-allocated streams; and a fragment collection module configured to add the first write request to the first fragment. A storage controller comprising a stream classification module configured to allocate the first sequential stream by performing machine learning based on the stream attribute table and statistical information of the first fragment. Claim 13 delete Claim 14 In claim 12, the stream classification module selects n streams (where n is a natural number greater than or equal to 2) among the previously assigned streams based on the cosine similarity between each of the previously assigned streams and the first fragment, and performs machine learning on the statistical information of the selected n streams and the statistical information of the first fragment to assign the first sequential stream. Claim 15 In claim 12, the stream attribute table comprises a storage controller including a start logical block address, an end logical block address, a start time, an end time, throughput, and a size vector of data included in each of the pre-allocated streams. Claim 16 In claim 12, after the first sequential stream is allocated, the storage controller further configured such that the stream classification module updates the stream attribute table based on the statistical information of the first fragment and the first sequential stream. Claim 17 A storage device comprising: a plurality of non-volatile memories; and a storage controller configured to communicate with the plurality of non-volatile memories through a plurality of channels, wherein the storage controller is configured to receive a plurality of write requests from an external host, perform machine learning on statistical information of the received plurality of write requests and statistical information of pre-allocated streams, allocate a first sequential stream for the received plurality of write requests, and store a plurality of write data corresponding to the plurality of write requests in one of the plurality of non-volatile memories based on the allocated first sequential stream, wherein the storage controller comprises a stream manager configured to allocate the first sequential stream, and the stream manager comprises: a stream attribute table configured to manage the statistical information for the pre-allocated streams; a fragment collection module configured to add the plurality of write requests to a first fragment; and a stream classification module configured to allocate the first sequential stream by performing machine learning based on the stream attribute table and the statistical information of the first fragment. Claim 18 In claim 17, the storage controller is a storage device that discontinuously receives the plurality of write requests from the external host. Claim 19 In claim 17, the logical block addresses corresponding to each of the plurality of write requests are contiguous with each other in the storage device. Claim 20 In claim 17, the size of each of the plurality of write data corresponding to the plurality of write requests is a different storage device.