Method and device for reducing write amplification of storage equipment
Through real -time monitoring and adjustment of the variable region of the storage equipment, the problem of shortening storage equipment caused by the migration of false and effective data in existing technologies and increasing garbage cleaning overhead, and achieved more efficient storage management and extension of equipment life.
Patent Information
- Application Number
- CN202411412094.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-01-24
AI Technical Summary
During the data deletion and synchronization of existing storage devices during application operation, false valid data may be migrated to the low-speed storage part, shortening the life of the storage device and increasing the overhead of garbage cleaning.
By monitoring the operating status of the application, real -time estimate of the storage space running the front desk, and determine the storage equipment adjustment command according to the estimation value, and adjust the storage space in the variable region in the high -speed storage part. At the same time, the labeled data migration and data migration are migrated to reduce the overhead and garbage recycling expenses.
Effectively use variable areas to reduce the large and garbage recovery overhead of the storage equipment, reduce power consumption, and extend the service life of the storage equipment.
Smart Images

Figure CN119356607A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of storage, and more specifically, to a method and apparatus for reducing write amplification of a storage device. Background Art
[0002] Recently, various storage devices (e.g., Universal Flash Storage) have been widely used in various electronic devices. Flash-Friendly File System (F2FS) is a file system developed for NAND flash storage devices in the Android operating system. In the Android operating system, applications will delete a large amount of data and / or update a large number of database files during operation, and F2FS can delay the invalidation of data synchronization to storage devices such as UFS, so that the storage device cannot know which data has become invalid in time.
[0003] TurboWrite (TW) 1.0 technology can use single-level cells (SLC) as cache, write data to the SLC high-speed storage part of the storage device to improve the write performance of the storage device, and migrate data to the low-speed storage parts such as triple-level cells (TLC) and / or quad-level cells (QLC) of the storage device when the storage device is ready to hibernate.
[0004] Applications can delete or modify data during operation, and the F2FS file system can delay invalid data synchronization to the storage device, and TW 1.0 can migrate data in SLC to TLC and / or QLC in sleep mode. Therefore, the F2FS file system can migrate false valid data to TLC and / or QLC, reducing the life of TLC and / or QLC and increasing the cost of garbage cleaning. Summary of the invention
[0005] According to some example embodiments conceived by the present invention, there is provided a method for reducing write amplification of a storage device, comprising: monitoring the running state of at least one application including a first application; switching the running state of the first application to foreground operation based on monitoring, obtaining historical write data of the first application from the application history records to estimate the storage space of the first application currently running in the foreground; determining a storage device adjustment command based on the estimated storage space of the first application currently running in the foreground, wherein the storage device comprises a high-speed storage part and a low-speed storage part, the storage device adjustment command comprises adjusting the storage space of a variable area in the high-speed storage part, and the storage device is configured to store data generated in response to the operation of the at least one application in the variable area.
[0006] The method for reducing write amplification of a storage device may further include: in response to monitoring that the running state of the first application among the at least one application is switched to foreground running, counting the running time and the write amount of the first application and adding them to the application history record.
[0007] The step of obtaining historical write data of the first application from the application history record to estimate the storage space of the first application currently running in the foreground may include: in response to obtaining the historical write data of the first application from the application history record, estimating the storage space of the first application currently running in the foreground based on the historical write data of the first application; in response to not obtaining the historical write data of the first application from the application history record, estimating the storage space of the first application currently running in the foreground based on the historical write data of the at least one application.
[0008] The step of determining the storage device adjustment command based on the estimated storage space of the first application currently running in the foreground may include comparing the estimated storage space of the first application currently running in the foreground with the storage space of the first application last running in the foreground.
[0009] The step of comparing the estimated storage space of the first application currently running in the foreground with the storage space of the first application last running in the foreground may include: in response to the estimated storage space of the first application currently running in the foreground being less than a first proportion of the storage space of the first application last running in the foreground or greater than a second proportion of the storage space of the first application last running in the foreground, determining the storage device adjustment command to perform adjustment based on the estimated storage space of the first application currently running in the foreground; in response to the estimated storage space of the first application currently running in the foreground being not less than a first proportion of the storage space of the first application last running in the foreground and not greater than a second proportion of the storage space of the first application last running in the foreground, determining the storage device adjustment command to not perform adjustment, the first proportion being less than the second proportion.
[0010] The method for reducing storage device write amplification may also include: determining whether a storage device adjustment command exceeds the storage space of the storage device; in response to the storage device adjustment command exceeding the storage space of the storage device, determining the storage device adjustment command to not perform adjustment or to adjust the entire high-speed storage part to the variable area.
[0011] The method for reducing write amplification of a storage device may further include: sending a storage device adjustment command to the storage device to adjust the storage space of the variable area.
[0012] The method for reducing write amplification of a storage device may further include: monitoring available storage space of the variable area, and migrating data in the variable area to a low-speed storage portion based on the available storage space being less than a threshold.
[0013] The method for reducing write amplification of a storage device may also include: based on monitoring that the running state of a second application among the at least one application is switched to background running, counting the running time of the second application; in response to the running time of the second application exceeding a threshold time, marking invalid data in the variable area, and generating a data synchronization status command based on the marked invalid data; and migrating data other than the invalid data in the variable area to a low-speed storage part based on the data synchronization status command.
[0014] The storage device may include a accelerated write 2.0 universal flash storage device (TW 2.0UFS).
[0015] According to some example embodiments conceived by the present invention, there is provided an apparatus for reducing write amplification of a storage device, comprising: an application monitoring module, configured to monitor the running state of at least one application including a first application; a prediction module, configured to switch to foreground operation based on the monitored running state of the first application, and obtain historical write data of the first application from the application history to estimate the storage space of the first application currently running in the foreground; a variable area size control module, configured to determine a storage device adjustment command based on the estimated storage space of the first application currently running in the foreground, the storage device comprising a high-speed storage part and a low-speed storage part, the storage device adjustment command comprising adjusting the storage space of a variable area in the high-speed storage part, and the storage device being configured to store data generated in response to the operation of the at least one application in the variable area.
[0016] The apparatus for reducing write amplification of a storage device may further include: an application history record module configured to, in response to monitoring that the running state of the first application among the at least one application is switched to foreground running, count the running time and write volume of the first application and add them to the application history record.
[0017] The prediction module can also be configured to: in response to obtaining historical write data of the first application from the application history record, estimate the storage space of the first application currently running in the foreground based on the historical write data of the first application; in response to not obtaining the historical write data of the first application from the application history record, estimate the storage space of the first application currently running in the foreground based on the historical write data of the at least one application.
[0018] The variable region size control module may be further configured to compare the estimated storage space of the first application currently running in the foreground with the storage space of the first application last running in the foreground.
[0019] The variable area size control module can also be configured to: determine the storage device adjustment command to perform adjustment based on the estimated storage space of the first application currently running in the foreground, based on the estimated storage space of the first application currently running in the foreground being less than a first proportion of the storage space of the first application last running in the foreground or greater than a second proportion of the storage space of the first application last running in the foreground; determine the storage device adjustment command to not perform adjustment, based on the estimated storage space of the first application currently running in the foreground being not less than a first proportion of the storage space of the first application last running in the foreground and not greater than a second proportion of the storage space of the first application last running in the foreground, and the first proportion is less than the second proportion.
[0020] The apparatus for reducing write amplification of a storage device may further include: a space adjustment monitoring module configured to: determine whether a storage device adjustment command exceeds the storage space of the storage device; in response to the storage device adjustment command exceeding the storage space of the storage device, determine the storage device adjustment command to not perform adjustment or adjust the entire high-speed storage part to the variable area.
[0021] The apparatus for reducing write amplification of a storage device may further include: a space management module configured to send a storage device adjustment command to the storage device to adjust the storage space of the variable area.
[0022] The space management module may also be configured to monitor the available storage space of the variable area, and migrate the data in the variable area to the low-speed storage portion based on the available storage space being less than a threshold.
[0023] The application monitoring module can also be configured to switch to background operation based on the running status of the second application in the at least one application monitored, and count the running time of the second application. The device for reducing the write amplification of the storage device can also include: an application data cleaning module, configured to mark the invalid data in the variable area in response to the running time of the second application exceeding the threshold time, and generate a data synchronization status command based on the marked invalid data; a cleaning control module, configured to migrate the data in the variable area except the invalid data to the low-speed storage part based on the data synchronization status command.
[0024] The storage device may include a accelerated write 2.0 universal flash storage device (TW 2.0UFS).
[0025] According to another exemplary embodiment of the inventive concept, an electronic device is provided, including a memory and a processor, wherein computer executable instructions are stored in the memory, and the aforementioned method is executed by the processor based on the instructions.
[0026] According to another exemplary embodiment of the inventive concept, a non-transitory computer-readable medium is provided, on which computer-executable instructions are stored, and based on the instructions, a processor is executed to cause a device including the processor to perform the aforementioned method.
[0027] According to some example embodiments conceived by the present invention, the storage space of the variable area is adjusted by estimating in real time the storage space of the application running in the foreground, so that the variable area can be used more efficiently; in addition, by marking invalid data in the variable area and performing data migration based on this, the write amplification and garbage collection overhead of the storage device can be reduced, the power consumption of the storage device can be reduced, and the service life of the storage device can be extended. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The above and other objects and features of the present invention will become more apparent from the following detailed description in conjunction with the accompanying drawings, in which:
[0029] Figure 1 is a flowchart illustrating a method of reducing write amplification of a storage device according to some example embodiments of the inventive concept;
[0030] Figure 2 is a block diagram illustrating an apparatus for reducing write amplification of a storage device according to some example embodiments of the inventive concept;
[0031] Figure 3 is a schematic diagram illustrating a storage space adjustment process of a predetermined variable area according to some example embodiments of the inventive concept;
[0032] Figure 4is a schematic diagram illustrating application data cleaning flow processing according to some example embodiments of the inventive concept;
[0033] Figure 5 is a schematic diagram illustrating states of an apparatus for reducing write amplification of a storage device according to some example embodiments of the inventive concept;
[0034] Figure 6 is a schematic diagram illustrating a system to which a storage device is applied according to some example embodiments of the inventive concept;
[0035] Figure 7 is a block diagram illustrating a host storage system according to some example embodiments of the inventive concept;
[0036] Figure 8 is a diagram illustrating a data center to which a storage device is applied according to some example embodiments of the inventive concept. DETAILED DESCRIPTION
[0037] In the following, various exemplary embodiments of the inventive concept are described with reference to the accompanying drawings, wherein the same reference numerals are used to represent the same or similar elements, features and structures. However, it is not intended that the inventive concept be limited to specific embodiments by the various exemplary embodiments described herein, and it is intended that: the inventive concept covers all modifications, equivalents and / or substitutes of the inventive concept, as long as they are within the scope of the attached claims and their equivalents. The terms and words used in the following specification and claims are not limited to their dictionary meanings, but are only used to enable a clear and consistent understanding of the inventive concept. Therefore, it should be apparent to those skilled in the art that the following description of various exemplary embodiments of the inventive concept is provided for illustrative purposes only, and not for the purpose of limiting the inventive concept defined by the attached claims and their equivalents.
[0038] It should be understood that unless the context clearly indicates otherwise, the singular includes the plural.The terms "include", "comprising" and "having" used herein indicate the presence of functions, operations or elements of the inventive concept, but do not exclude other functions, operations or elements.
[0039] For example, the expression "A or B" or "at least one of A and / or B" may indicate A and B, A or B. For example, the expression "A or B" or "at least one of A and / or B" may indicate (1) A, (2) B, or (3) both A and B.
[0040] In various example embodiments of the inventive concept, it is intended that when a component (e.g., a first component) is referred to as being "coupled" or "connected" to another component (e.g., a second component) or being "coupled" or "connected" to another component (e.g., the second component), the component may be directly connected to the other component or may be connected through another component (e.g., a third component). In contrast, when a component (e.g., a first component) is referred to as being "directly coupled" or "directly connected" to another component (e.g., the second component) or being directly coupled to or directly connected to another component (e.g., the second component), there is no other component (e.g., the third component) between the component and the other component.
[0041] The expression "configured to" used in describing various example embodiments of the inventive concept may be used interchangeably with expressions such as "suitable for", "capable of", "designed to", "suitable for", "manufactured to", and "capable of", for example, depending on the circumstances. The term "configured to" may not necessarily indicate that it is "specially designed to" in terms of hardware. On the contrary, the expression "a device configured to..." in some cases may indicate that the device and another device or part "can..." For example, the expression "a processor configured to perform A, B, and C" may indicate a dedicated processor (e.g., an embedded processor) for performing the corresponding operations or a general-purpose processor (e.g., a central processing unit CPU or an application processor (AP)) for performing the corresponding operations by executing at least one software program stored in a memory device.
[0042] The expression “predetermined” in describing various exemplary embodiments of the inventive concept may be used interchangeably with expressions such as “desired,” “selected,” “determined,” or “generated,” for example, depending on circumstances.
[0043] The terms used herein are to describe some example embodiments of the inventive concept, but are not intended to limit the scope of other example embodiments. Unless otherwise noted herein, all terms (including technical or scientific terms) used herein may have the same meaning as those generally understood by those skilled in the art. Generally, the terms defined in the dictionary should be considered to have the same meaning as the contextual meaning in the relevant field, and, unless clearly defined herein, should not be understood differently or understood to have an overly formal meaning. In any case, the terms defined in the inventive concept are not intended to be interpreted as excluding the example embodiments of the inventive concept.
[0044] Figure 1 is a flowchart illustrating a method of reducing write amplification of a storage device according to some example embodiments of the inventive concepts.
[0045] Reference Figure 1In step S110, the running state of at least one application may be monitored. According to some exemplary embodiments of the present invention, the application may be an application in an operating system such as Android, and the running state of the application may be a foreground running application, a background running application, or a switching between the foreground and background running of the application. In addition, the running state of at least one application may be monitored by monitoring a broadcast issued by the operating system. More specifically, the application name, process ID (PID) and child process ID (CPID) of the monitored application may be obtained from the broadcast.
[0046] In step S120, when it is monitored that the running state of the first application among the at least one application switches to foreground running, the historical write data of the first application can be obtained from the application history record to predict (or, for example, estimate) the (for example, expected or required) storage space of the current foreground running of the first application.
[0047] More specifically, according to some example embodiments of the present invention, the step of acquiring historical write data of the first application from the application history records to predict the storage space required for the current foreground operation of the first application may include: in the case where the historical write data of the first application is acquired from the application history records, predicting the storage space required for the current foreground operation of the first application based on the historical write data of the first application; in the case where the historical write data of the first application is not acquired from the application history records, predicting the storage space required for the current foreground operation of the first application based on the historical write data of the at least one application. The storage space may refer to the size or amount of a memory, etc. For example, the predicted or estimated storage space may refer to the predicted or estimated amount of memory that can be used (or, for example, expected or required to be used) by the current foreground operation of the first application.
[0048] For example, in the case where the historical write data of the first application is obtained from the application history, a multivariate linear regression method can be used, for example, to predict the storage space required for the current foreground operation of the first application. For example, a multivariate linear regression model (which can be a linear function) can be obtained based on the historical write data of the first application (each foreground running time of the first application and the corresponding write amount), and then the median of the foreground running time of the first application can be obtained based on the historical write data of the first application, such as, if the number of items in the sequence composed of all foreground running times of the first application (wherein the items in the sequence are arranged in order of size) is an odd number, then the foreground running time in the middle of the sequence can be taken as the median, and if the number of items in the sequence composed of all foreground running times of the first application (wherein the items in the sequence are arranged in order of size) is an even number, then the average of the two foreground running times in the middle of the sequence can be taken as the median. Subsequently, the storage space required for the current foreground operation of the first application can be predicted by substituting the median of the foreground running time into the multivariate linear regression model. In addition, when the historical write data of the first application is obtained from the application history records, the use of the above-mentioned multivariate linear regression method to predict the storage space required for the current foreground operation of the first application is only an example and not a limitation. For example, a clustering algorithm can also be used to predict the storage space required for the current foreground operation of the first application.
[0049] For example, if the historical write data of the first application is not obtained from the application history records, the median write volume per minute Wm of the at least one application may be obtained based on the historical write data of the at least one application. 0.5 and the median foreground running time Tm 0.5 , and then based on the median write volume per minute Wm 0.5 and the median foreground running time Tm 0.5 To predict the storage space APw=Wm required for the current foreground operation of the first application 0.5 ×Tm 0.5 For example, for each of the at least one application, each foreground running time and the corresponding write amount of the application may be obtained based on the historical write data of the application, and then the sum of all write amounts of the application is divided by the sum of all foreground running times of the application to obtain the average write amount per minute of the application; next, after obtaining the average write amount per minute of each of the at least one application, the median write amount per minute Wm may be obtained based on all average write amounts per minute. 0.5For example, if the number of items in the sequence consisting of all average writes per minute (where the items in the sequence are arranged in order of size) is an odd number, then the average write per minute in the middle of the sequence can be taken as the median; if the number of items in the sequence consisting of all average writes per minute (where the items in the sequence are arranged in order of size) is an even number, then the average of the two average writes per minute in the middle of the sequence can be taken as the median. In addition, the foreground running time median Tm can be obtained based on each foreground running time of each application in the at least one application 0.5 For example, if the number of items in the sequence of all foreground running times of the at least one application (where the items in the sequence are arranged in order of size) is an odd number, then the foreground running time in the middle of the sequence can be taken as the median; if the number of items in the sequence of all foreground running times of the at least one application (where the items in the sequence are arranged in order of size) is an even number, then the average of the two foreground running times in the middle of the sequence can be taken as the median. 0.5 and Tm 0.5 Multiply them to predict the storage space required for the first application currently running in the foreground.
[0050] In addition, according to some exemplary embodiments of the present invention, when it is monitored that the running state of the first application in the at least one application is switched to foreground operation, the running time and write volume of the first application can be counted and added to the application history. According to some exemplary embodiments of the present invention, the application and its processes and sub-processes can be identified based on the application name, process ID and sub-process ID of the obtained application, and then the running time and write volume of the application can be counted. More specifically, the write volume Aw per minute of the application can be counted through various applications or interfaces in the operating system (such as systrace, ftrace in the Android operating system, etc.). 1 ~Aw n (where n is the running minutes) and the foreground running time At. Subsequently, the statistical data can be encrypted and stored.
[0051] In addition, according to some exemplary embodiments of the present invention, when it is monitored that the running state of the second application in the at least one application is switched to background running, the running time of the second application can be counted; when the running time of the second application exceeds a predetermined threshold time (such as but not limited to 1 minute), the invalid data in the predetermined variable area is marked, and a data synchronization status command is generated based on the marked invalid data; based on the data synchronization status command, the data other than the invalid data in the predetermined variable area is migrated to the low-speed storage part. For example, the step of marking the invalid data in the predetermined variable area may include sending a cleanup command (such as a Trim command) to a file system (such as an F2FS file system), and marking the invalid data in the predetermined variable area through the file system.
[0052] In step S130, a storage device adjustment command may be determined based on the predicted storage space required for the current foreground operation of the first application. Here, the storage device may include a high-speed storage portion and a low-speed storage portion, and the storage device adjustment command may indicate how to adjust the storage space of a predetermined variable area in the high-speed storage portion, and the predetermined variable area may be used to store data generated when the at least one application is running. For example, the high-speed storage portion may be SLC, and the low-speed storage portion may be TLC and / or QLC. In addition, the predicted storage space required for the current foreground operation of the first application may be stored for subsequent use.
[0053] More specifically, according to some example embodiments conceived by the present invention, the step of determining a storage device adjustment command based on the predicted storage space required for the current foreground operation of the first application may include: comparing the predicted storage space required for the current foreground operation of the first application with the storage space required for the last foreground operation of the first application. For example, the step of comparing the predicted storage space required for the current foreground operation of the first application with the storage space required for the last foreground operation of the first application may include: in a case where the predicted storage space required for the current foreground operation of the first application is less than a first predetermined ratio of the storage space required for the last foreground operation of the first application or is greater than a second predetermined ratio of the storage space required for the last foreground operation of the first application, determining the storage device adjustment command to perform adjustment based on the predicted storage space required for the current foreground operation of the first application, and in a case where the predicted storage space required for the current foreground operation of the first application is not less than a first predetermined ratio of the storage space required for the last foreground operation of the first application and is not greater than a second predetermined ratio of the storage space required for the last foreground operation of the first application, determining the storage device adjustment command to not perform adjustment, wherein the first predetermined ratio is less than the second predetermined ratio. For example, as an example and not a limitation, when the predicted storage space required for the current foreground operation of the first application is less than 80% of the storage space required for the last foreground operation of the first application or greater than 110% of the storage space required for the last foreground operation of the first application, a storage device adjustment command for adjusting the storage device is determined. Here, the purpose of determining the size of the predicted storage space required for the current foreground operation of the first application and the first predetermined ratio and the second predetermined ratio and then adjusting is to avoid frequent adjustments.
[0054] In addition, according to some example embodiments conceived by the present invention, the method of reducing the write amplification of a storage device may also include: determining whether a storage device adjustment command exceeds the storage space of the storage device; if the storage device adjustment command exceeds the storage space of the storage device, determining the storage device adjustment command to not perform adjustment or to adjust the entire high-speed storage part to the predetermined variable area.
[0055] In addition, according to some example embodiments conceived by the present invention, the method of reducing write amplification of a storage device may also include: monitoring the available storage space of the predetermined variable area, and if the available storage space is less than a predetermined threshold (for example, 90% of the predetermined variable area), migrating the data in the predetermined variable area to a low-speed storage part.
[0056] After step S130, a storage device adjustment command may be sent to the storage device to adjust the storage space of the predetermined variable area.
[0057] According to some example embodiments of the present inventive concept, the storage device may include TW 2.0 UFS, but is not limited thereto, and the storage device may be any storage device that satisfies the following conditions: includes a high-speed storage part and a low-speed storage part, and the high-speed storage part includes a predetermined variable area of adjustable storage space.
[0058] Figure 2 is a block diagram illustrating an apparatus for reducing write amplification of a storage device according to some example embodiments of the inventive concept.
[0059] Reference Figure 2 In (a), the apparatus 200 for reducing write amplification of a storage device according to an exemplary embodiment of the inventive concept may include an application monitoring module 210 , a prediction module 220 , and a predetermined variable region size control module 230 .
[0060] The application monitoring module 210 may be configured to monitor the running status of at least one application.
[0061] The prediction module 220 may be configured to obtain historical write data of the first application from application history records to predict the storage space required for the current foreground operation of the first application when monitoring that the running state of the first application among the at least one application switches to foreground operation.
[0062] In addition, the prediction module 220 can be further configured to: in a case where the historical write data of the first application is obtained from the application history record, predict the storage space required for the current foreground operation of the first application based on the historical write data of the first application; in a case where the historical write data of the first application is not obtained from the application history record, predict the storage space required for the current foreground operation of the first application based on the historical write data of the at least one application.
[0063] The predetermined variable area size control module 230 may be configured to determine a storage device adjustment command based on the predicted storage space required for the current foreground operation of the first application, wherein the storage device may include a high-speed storage portion and a low-speed storage portion, and the storage device adjustment command may indicate how to adjust the storage space of the predetermined variable area in the high-speed storage portion, and the predetermined variable area may be used to store data generated when the at least one application is running. In addition, the predetermined variable area size control module 230 may also encrypt the storage device adjustment command using a predetermined public key.
[0064] In addition, the predetermined variable region size control module 230 may be further configured to compare the predicted storage space required for the current foreground running of the first application with the storage space required for the last foreground running of the first application.
[0065] In addition, the predetermined variable area size control module 230 may be further configured to: when the predicted storage space required for the current foreground operation of the first application is less than a first predetermined proportion of the storage space required for the last foreground operation of the first application or is greater than a second predetermined proportion of the storage space required for the last foreground operation of the first application, determine the storage device adjustment command to perform adjustment based on the predicted storage space required for the current foreground operation of the first application; when the predicted storage space required for the current foreground operation of the first application is not less than a first predetermined proportion of the storage space required for the last foreground operation of the first application and is not greater than a second predetermined proportion of the storage space required for the last foreground operation of the first application, determine the storage device adjustment command to not perform adjustment, wherein the first predetermined proportion is less than the second predetermined proportion.
[0066] According to some example embodiments of the present invention, the apparatus 200 for reducing write amplification of a storage device may further include: an application history module, which may be configured to count the running time and write amount of the first application and add them to the application history when monitoring that the running state of the first application in the at least one application is switched to foreground running. Here, the data counted by the application history module may be encrypted to protect user privacy.
[0067] According to some example embodiments conceived by the present invention, the apparatus 200 for reducing write amplification of a storage device may further include: a space adjustment monitoring module, which may be configured to determine whether a storage device adjustment command exceeds the storage space of the storage device; in the case where the storage device adjustment command exceeds the storage space of the storage device, determining the storage device adjustment command to not perform adjustment or to adjust the entire high-speed storage portion to the predetermined variable area.
[0068] According to some example embodiments of the present invention, the apparatus 200 for reducing storage device write amplification may further include: a space management module configured to send a storage device adjustment command to the storage device to adjust the storage space of the predetermined variable area. In addition, the space management module may also be configured to monitor the available storage space of the predetermined variable area, and if the available storage space is less than a predetermined threshold, migrate the data in the predetermined variable area to the low-speed storage part.
[0069] According to some example embodiments of the present invention, the application monitoring module 210 may also be configured to count the running time of the second application when monitoring that the running state of the second application in the at least one application is switched to background running. In this case, the apparatus 200 for reducing the write amplification of the storage device may also include: an application data cleaning module, configured to mark invalid data in the predetermined variable area when the running time of the second application exceeds a predetermined threshold time, and generate a data synchronization status command based on the marked invalid data; a cleaning control module, configured to migrate data other than the invalid data in the predetermined variable area to a low-speed storage part based on the data synchronization status command.
[0070] Thus, the improved apparatus and methods overcome the shortcomings of conventional apparatus and methods for writing or storing data, particularly those involving writing or storing target data within a storage device, while reducing resource consumption (e.g., processing power, power consumption, bandwidth) and improving data accuracy and resource allocation (e.g., latency).
[0071] According to some exemplary embodiments of the present inventive concept, referring to Figure 2 In (b), the application monitoring module 210, the prediction module 220, the predetermined variable area size control module 230, the application history module and the application data cleaning module can constitute a file system data management module (File System Data Manager, FSDM), the space adjustment monitoring module, the space management module, the cleaning state monitoring module and the cleaning control module can constitute a predetermined variable area management module (Partial SLC Manager, PSM), wherein the FSDM may also further include a cleaning state synchronization module, and the cleaning state synchronization module may be used to send and / or synchronize the data synchronization state command generated by the application data cleaning module to the PSM. The cleaning state synchronization module may also use a predetermined public key to encrypt the data synchronization state command. Therefore, the PSM may also include a command verification module for verifying the legitimacy of the data synchronization state command sent and / or synchronized by the cleaning state synchronization module and the storage device adjustment command determined by the predetermined variable area size control module 230 to ensure data security, that is, the command verification module may use a predetermined private key to decrypt the data synchronization state command and the storage device adjustment command. In addition, the PSM may also include a cleaning state monitoring module for sending the data synchronization state command verified by the command verification module to the cleaning control module for data migration.
[0072] As above Figure 1 and Figure 2 The method for reducing write amplification of a storage device according to some example embodiments of the present invention may include two processes, namely, a storage space adjustment process of a predetermined variable area and an application data cleaning process, which will be respectively referred to below. Figure 3 and Figure 4 Give a description.
[0073] Figure 3 is a schematic diagram illustrating a storage space adjustment process of a predetermined variable area according to some example embodiments of the inventive concept.
[0074] Reference Figure 3 In FSDM, the application monitoring module may monitor the running state of at least one application during the operation of at least one application (S301). The application history record module may count the running time and write amount of the first application and add them to the application history record when the application monitoring module monitors that the running state of the first application in the at least one application switches to the foreground running state (S302). The prediction module may obtain the historical write data of the first application from the application history record to predict the storage space required for the current foreground running of the first application when monitoring that the running state of the first application in the at least one application switches to the foreground running state (S303). The predetermined variable area size control module may compare the predicted storage space required for the current foreground running of the first application with the storage space required for the last foreground running of the first application. When the predicted storage space required for the current foreground running of the first application is less than a first predetermined ratio of the storage space required for the last foreground running of the first application or greater than a second predetermined ratio of the storage space required for the last foreground running of the first application, the storage device adjustment command is determined to be performed based on the predicted required storage space, and the storage device adjustment command is encrypted using a predetermined public key to be sent to the variable area management module (S304).
[0075] In PSM, the command verification module can verify the legitimacy of the storage device adjustment command determined by the predetermined variable area size control module to ensure data security, that is, the command verification module can use a predetermined private key to decrypt the storage device adjustment command (S305). The space adjustment monitoring module can determine whether the storage device adjustment command exceeds the storage space of the storage device, and if the storage device adjustment command exceeds the storage space of the storage device, the storage device adjustment command is not executed or the entire high-speed storage part is adjusted to the predetermined variable area (S306). The space management module can send a storage device adjustment command to the storage device to adjust the storage space of the predetermined variable area (S307). In addition, the space management module can also monitor the available storage space of the predetermined variable area. If the available storage space is less than a predetermined threshold, the data in the predetermined variable area is migrated to the low-speed storage part for storage (S308).
[0076] Figure 4 is a schematic diagram illustrating an application data cleaning flow process according to some example embodiments of the inventive concept.
[0077] Reference Figure 4In FSDM, during the operation of at least one application (S401), when the application monitoring module monitors that the running state of the second application in the at least one application switches to background operation, it can count the running time of the second application (S402). When the running time of the second application exceeds a predetermined threshold time, the application data cleaning module can mark the invalid data in the predetermined variable area and generate a data synchronization state command based on the marked invalid data (S403). The cleaning state synchronization module can send and / or synchronize the data synchronization state command generated by the application data cleaning module to the predetermined variable area management module, and the cleaning state synchronization module can also encrypt the data synchronization state command using a predetermined public key (S404).
[0078] In the PSM, the command verification module can verify the legitimacy of the data synchronization state command sent and / or synchronized by the clean-up state synchronization module to ensure data security, that is, the command verification module can decrypt the data synchronization state command using a predetermined private key (S405). The clean-up state monitoring module can send the data synchronization state command verified by the command verification module to the clean-up control module for data migration (S406). The clean-up control module can migrate the data other than the invalid data in the predetermined variable area to the low-speed storage part based on the data synchronization state command (S407). The clean-up control module can migrate the data to the universal flash storage device (UFS) (S408). In some example embodiments, data that is not marked as invalid data can be migrated to the UFS by the application clean-up module (S408).
[0079] Figure 5 is a schematic diagram illustrating states of an apparatus for reducing write amplification of a storage device according to some example embodiments of the inventive concept.
[0080] like Figure 5 As shown, the apparatus for reducing write amplification of a storage device according to some example embodiments of the inventive concept may exist in the following four states:
[0081] State 1: Initial state, no data in the predetermined variable area;
[0082] State 2: Run the first application and write data to the predetermined variable area;
[0083] State 3: switch application;
[0084] State 4: Application switching is complete.
[0085] More specifically, in state 1, there is no data in the predetermined variable area.
[0086] In state 2, the first application is ready to run, FSDM predicts the storage space required for the first application to run, PSM sets a predetermined variable area according to the storage space predicted by FSDM, the first application runs and writes data (e.g., adds, deletes, updates, etc.) to the predetermined variable area (e.g., through the file system).
[0087] In state 3, the first application is not used and is ready to switch to the second application. The FSDM (for example, through the file system) marks the invalid data in the predetermined variable area and generates a data synchronization status command. After the marking is completed, the FSDM notifies the PSM of the data synchronization status command. The PSM migrates the valid data in the predetermined variable area to the low-speed storage part based on the data synchronization status command.
[0088] In state 4, FSDM predicts the storage space required for the second application to run, PSM resets the predetermined variable area according to the storage space predicted by FSDM, the second application runs and writes data (for example, adds, deletes, updates, etc.) to the predetermined variable area (through the file system).
[0089] In addition, if Figure 5 As shown, the above-mentioned states can be converted according to the arrows.
[0090] Figure 6 is a schematic diagram illustrating a system 1000 to which a storage device is applied according to some example embodiments of the inventive concept.
[0091] Figure 6 The system 1000 may basically be a mobile system, such as a portable communication terminal (e.g., a mobile phone), a smart phone, a tablet personal computer (PC), a wearable device, a healthcare device, or an Internet of Things (IOT) device. However, Figure 6 The system 1000 is not necessarily limited to a mobile system, and may be a PC, a laptop computer, a server, a media player, or an automotive device (eg, a navigation device).
[0092] Reference Figure 6 , the system 1000 may include a main processor 1100, a memory (e.g., 1200a and 1200b), and a storage device (e.g., 1300a and 1300b). In addition, the system 1000 may include at least one of an image capture device 1410, a user input device 1420, a sensor 1430, a communication device 1440, a display 1450, a speaker 1460, a power supply device 1470, and a connection interface 1480.
[0093] The main processor 1100 may control all operations of the system 1000, and more specifically, may control operations of other components included in the system 1000. The main processor 1100 may be implemented as a general-purpose processor, a dedicated processor, an application processor, or the like.
[0094] The main processor 1100 may include at least one central processing unit (CPU) core 1110, and further include a controller 1120 for controlling the memories 1200a and 1200b and / or the storage devices 1300a and 1300b. In some example embodiments, the main processor 1100 may further include an accelerator 1130, which is a dedicated circuit for high-speed data operations such as artificial intelligence (AI) data operations, etc. The accelerator 1130 may include a graphics processing unit (GPU), a neural processing unit (NPU), and / or a data processing unit (DPU), etc., and is implemented as a chip physically separated from other components of the main processor 1100.
[0095] The memories 1200a and 1200b may be used as main storage devices of the system 1000. Although the memories 1200a and 1200b may include volatile memories, such as static random access memory (SRAM) and / or dynamic random access memory (DRAM), etc., the memories 1200a and 1200b may include non-volatile memories, such as flash memory, phase change random access memory (PRAM), and / or resistive random access memory (RRAM), etc. The memories 1200a and 1200b may be implemented in the same package as the main processor 1100.
[0096] The storage devices 1300a and 1300b may be used as non-volatile storage devices, which are configured to store data regardless of whether they are powered on and have a larger storage capacity than the memories 1200a and 1200b. The storage devices 1300a and 1300b may include memory controllers (STRG CTRL) 1310a and 1310b and non-volatile memories (NVM) 1320a and 1320b, respectively, which are configured to store data via the control of the memory controllers 1310a and 1310b. Although the NVMs 1320a and 1320b may include V-NAND flash memories having a two-dimensional (2D) or three-dimensional (3D) structure, the NVMs 1320a and 1320b may include other types of NVMs, such as PRAM and / or RRAM, etc.
[0097] The storage devices 1300a and 1300b may be physically separated from the main processor 1100 and included in the system 1000, or may be implemented in the same package as the main processor 1100. In addition, the storage devices 1300a and 1300b may have a type of solid-state devices (SSDs) or memory cards, and may be removably combined with other components of the system 100 through an interface such as a connection interface 1480 to be described later. The storage devices 1300a and 1300b may be devices to which a standard protocol such as Universal Flash Storage (UFS), Embedded Multimedia Card (eMMC), or NVMe is applied, but are not limited thereto.
[0098] The image capture device 1410 can capture still images or moving images. The image capture device 1410 may include a camera, a camcorder, and / or a webcam, etc.
[0099] The user input device 1420 may receive various types of data input by a user of the system 1000 and includes a touch pad, a keypad, a keyboard, a mouse, a microphone, and the like.
[0100] The sensor 1430 may detect various types of physical quantities that may be acquired from the outside of the system 1000 and convert the detected physical quantities into electrical signals. The sensor 1430 may include a temperature sensor, a pressure sensor, an illumination sensor, a position sensor, an acceleration sensor, a biosensor, and / or a gyro sensor, etc.
[0101] The communication device 1440 may transmit and receive signals between other devices outside the system 1000 according to various communication protocols. The communication device 1440 may include an antenna, a transceiver, a modem, or the like.
[0102] Display 1450 and speaker 1460 may be used as output devices configured to output visual information and auditory information, respectively, to a user of system 1000 .
[0103] The power supply device 1470 may appropriately convert power supplied from a battery (not shown) embedded in the system 1000 and / or an external power source, and supply the converted power to each component of the system 1000 .
[0104] The connection interface 1480 may provide a connection between the system 1000 and an external device that is connected to the system 1000 and is capable of transmitting and receiving data to and from the system 1000. The connection interface 1480 may be implemented by using various interface schemes, for example, Advanced Technology Attachment (ATA), Serial ATA (SATA), External Serial ATA (e-SATA), Small Computer System Interface (SCSI), Serial Attached SCSI (SAS), Peripheral Component Interconnect (PCI), PCI express (PCIe), NVMe, IEEE 1394, Universal Serial Bus (USB) interface, Secure Digital (SD) card interface, Multimedia Card (MMC) interface, Embedded Multimedia Card (eMMC) interface, UFS interface, Embedded UFS (eUFS) interface, Compact Flash (CF) card interface, and the like.
[0105] Figure 7 is a block diagram illustrating a host memory system 10 according to some example embodiments of the inventive concept.
[0106] The host storage system 10 may include a host 100 and a storage device 700. In addition, the storage device 700 may include a memory controller 710 and an NVM 720. According to some example embodiments of the inventive concept, the host 100 may include a host controller 110 and a host memory 120. The host memory 120 may be used as a buffer memory configured to temporarily store data to be transmitted to or received from the storage device 700.
[0107] The storage device 700 may include a storage medium configured to store data in response to a request from the host 100. As an example, the storage device 700 may include at least one of an SSD, an embedded memory, and a removable external memory. When the storage device 700 is an SSD, the storage device 700 may be a device that complies with the NVMe standard. When the storage device 700 is an embedded memory or an external memory, the storage device 700 may be a device that complies with the UFS standard or the eMMC standard. Both the host 100 and the storage device 700 may generate a packet and send the packet according to the adopted standard protocol.
[0108] When the NVM 720 of the storage device 700 includes a flash memory, the flash memory may include a 2D NAND memory array or a 3D (or vertical) NAND (VNAND) memory array. As another example, the storage device 700 may include various other types of NVM. For example, the storage device 700 may include a magnetic random access memory (MRAM), a spin transfer torque MRAM, a conductive bridge RAM (CBRAM), a ferroelectric RAM (FRAM), a PRAM, a RRAM, and various other types of memory.
[0109] According to an example embodiment, the host controller 110 and the host memory 120 may be implemented as separate semiconductor chips. Alternatively, in some example embodiments, the host controller 110 and the host memory 120 may be integrated in the same semiconductor chip. As an example, the host controller 110 may be any one of a plurality of modules included in an application processor (AP). The AP may be implemented as a system on chip (SoC). In addition, the host memory 120 may be an embedded memory included in the AP or a memory module external to the AP.
[0110] The host controller 110 may manage an operation of storing data (eg, write data) of the buffer area of the host memory 120 in the NVM 720 or an operation of storing data (eg, read data) of the NVM 720 in the buffer area.
[0111] The memory controller 710 may include a host interface 711, a memory interface 712, and a CPU 713. In addition, the memory controller 710 may further include a flash translation layer (FTL), a packet manager 715, a buffer memory 716, an error correction code (ECC) engine 717, and an advanced encryption standard (AES) engine 718. The memory controller 710 may further include a working memory (not shown) in which the FTL 714 is loaded. The CPU 713 may execute the FTL 714 to control data write and read operations on the NVM 720.
[0112] The host interface 711 may transmit and receive packets to and from the host 100. The packets transmitted from the host 100 to the host interface 711 may include commands or data to be written to the NVM 720, etc. The packets transmitted from the host interface 711 to the host 100 may include responses to commands or data read from the NVM 720, etc. The memory interface 712 may transmit data to be written to the NVM 720 to the NVM 720 or receive data read from the NVM 720. The memory interface 712 may be configured to comply with a standard protocol such as Toggle or Open NAND Flash Interface (ONFI).
[0113] The FTL 714 may perform various functions, such as an address mapping operation, a wear leveling operation, and a garbage collection operation. The address mapping operation may be an operation of converting a logical address received from the host 100 into a physical address for actually storing data in the NVM 720. The wear leveling operation may be a technique for preventing excessive degradation of a specific block by allowing the blocks of the NVM 720 to be used evenly. As an example, the wear leveling operation may be implemented by using a firmware technique that balances the erase counts of physical blocks. The garbage collection operation may be a technique for ensuring available capacity in the NVM 720 by erasing an existing block after copying valid data of the existing block to a new block.
[0114] The packet manager 715 may generate a packet according to a protocol agreed with an interface of the host 100, or parse various types of information from a packet received from the host 100. In addition, the buffer memory 716 may temporarily store data to be written to or read from the NVM 720. Although the buffer memory 716 may be a component included in the memory controller 710, the buffer memory 716 may be outside the memory controller 710.
[0115] The ECC engine 717 may perform error detection and correction operations on read data read from the NVM 720. More specifically, the ECC engine 717 may generate parity bits for write data to be written to the NVM 720, and the generated parity bits may be stored together with the write data in the NVM 720. During reading of data from the NVM 720, the ECC engine 717 may correct errors in the read data by using the read data and the parity bits read from the NVM 720, and output the error-corrected read data.
[0116] The AES engine 718 may perform at least one of an encryption operation and a decryption operation on data input to the memory controller 710 by using a symmetric key algorithm.
[0117] Figure 8 is a diagram illustrating a data center 3000 to which a storage device is applied according to some example embodiments of the inventive concept.
[0118] Platform part - server (application / storage)
[0119] Reference Figure 8, the data center 3000 may be a facility that collects various types of data and provides services, and is referred to as a data storage center. The data center 3000 may be a system for operating a search engine and a database, and may be a computing system used by a company (e.g., a bank) or a government agency. The data center 3000 may include application servers 3100 to 3100n and storage servers 3200 to 3200m. According to example embodiments, the number of applications 3100 to 3100n and the number of storage servers 3200 to 3200m may be selected differently. The number of application servers 3100 to 3100n and the number of storage servers 3200 to 3200m may be different from each other.
[0120] The application server 3100 or the storage server 3200 may include at least one of the processors 3110 and 3210 and the memories 3120 and 3220. Now, the storage server 3200 will be described as an example. The processor 3210 may control all operations of the storage server 3200, access the memory 3220, and execute instructions and / or data loaded into the memory 3220. The memory 3220 may be a double data rate synchronous DRAM (DDR SDRAM), a high bandwidth memory (HBM), a hybrid memory cube (HMC), a dual in-line memory module (DIMM), an Optane DIMM, or a non-volatile DIMM (NVMDIMM). In some example embodiments, the number of processors 3210 and memories 3220 included in the storage server 3200 may be selected differently. In some example embodiments, the processor 3210 and the memory 3220 may provide a processor-memory pair. In some example embodiments, the number of processors 3210 and the number of memories 3220 may be different from each other. The processor 3210 may include a single-core processor or a multi-core processor. The above description of the storage server 3200 may be similarly applied to the application server 3100. In some embodiments, the application server 3100 may not include the storage device 3150. The storage server 3200 may include at least one storage device 3250. According to the embodiment, the number of storage devices 3250 included in the storage server 3200 may be selected differently.
[0121] Platform part - Network
[0122] The application servers 3100 to 3100n can communicate with the storage servers 3200 to 3200m through the network 3300. The network 3300 can be implemented by using a fiber channel (FC) or Ethernet. In this case, FC can be a medium for relatively high-speed data transmission, and an optical switch with high performance and high availability can be used. According to the access method of the network 3300, the storage servers 3200 to 3200m can be set to file storage, block storage, or object storage.
[0123] In one embodiment, the network 3300 may be a network dedicated to storage, such as a storage area network (SAN). For example, the SAN may be an FC-SAN, which uses an FC network and is implemented according to the FC protocol (FCP). As another example, the SAN may be an Internet Protocol (IP)-SAN, which uses a transmission control protocol (TCP) / IP network and is implemented according to the SCSI or Internet SCSI (iSCSI) protocol over TCP / IP. In another embodiment, the network 3300 may be a general network, such as a TCP / IP network. For example, the network 3300 may be implemented according to protocols such as FC over Ethernet (FCoE), network attached storage (NAS), and NVMe over fabric (NVMe-oF).
[0124] Hereinafter, the application server 3100 and the storage server 3200 will be mainly described. The description of the application server 3100 may be applied to another application server 3100n, and the description of the storage server 3200 may be applied to another storage server 3200m.
[0125] The application server 3100 may store data requested to be stored by a user or client in one of the storage servers 3200 to 3200m through the network 3300. In addition, the application server 3100 may obtain data requested to be read by a user or client from one of the storage servers 3200 to 3200m through the network 3300. For example, the application server 3100 may be implemented as a network server or a database management system (DBMS).
[0126] The application server 3100 may access a memory 3120n or a storage device 3150n included in another application server 3100n through the network 3300. Alternatively, the application server 3100 may access a memory 3220 to 3220m or a storage device 3250 to 3250m included in the storage servers 3200 to 3200m through the network 3300. Therefore, the application server 3100 may perform various operations on the data stored in the application servers 3100 to 3100n and / or the storage servers 3200 to 3200m. For example, the application server 3100 may execute an instruction for moving or copying data between the application servers 3100 to 3100n and / or the storage servers 3200 to 3200m. In this case, data may be moved from the storage devices 3250 to 3250m of the storage servers 3200 to 3200m through the storage 3220 to 3220m of the storage servers 3200 to 3200m or directly to the storage 3120 to 3120n of the application servers 3100 to 3100n. The data moved through the network 3300 may be data encrypted for security or privacy.
[0127] Organic Relationship-Interface Structure / Type
[0128] The storage server 3200 will now be described as an example. The interface 3254 can provide a physical connection between the processor 3210 and the controller 3251 and a physical connection between the network interface card (NIC) 3240 and the controller 3251. For example, the interface 3254 can be implemented using a direct attached storage (DAS) solution, where the storage device 3250 is directly connected to a dedicated cable. For example, the interface 3254 can be implemented using various interface solutions, such as ATA, SATA, e-SATA, SCSI, SAS, PCI, PCIe, NVMe, IEEE 1394, USB interface, SD card interface, MMC interface, eMMC interface, UFS interface, eUFS interface, and CF card interface.
[0129] The storage server 3200 may further include a switch 3230 and a network interconnect (NIC) 3240. The switch 3230 may selectively connect the processor 3210 to the storage device 3250 or selectively connect the NIC 3240 to the storage device 3250 via the control of the processor 3210.
[0130] In one embodiment, the NIC 3240 may include a network interface card and a network adapter. The NIC 3240 may be connected to the network 3300 through a wired interface, a wireless interface, a Bluetooth interface, or an optical interface. The NIC 3240 may include an internal memory, a digital signal processor (DSP), and a host bus interface, and is connected to the processor 3210 and / or the switch 3230 through the host bus interface. The host bus interface may be implemented as one of the above examples of the interface 3254. In one embodiment, the NIC 3240 may be integrated with at least one of the processor 3210, the switch 3230, and the storage device 3250.
[0131] Organic Relationship-Interface Operation
[0132] In the storage servers 3200 to 3200m or the application servers 3100 to 3100n, the processor may send a command to the storage devices 3150 to 3150n and 3250 to 3250m or the memories 3120 to 3120n and 3220 to 3220m and program or read data. In this case, the data may be data in which an error is corrected by an ECC engine. The data may be data on which a data bus inversion (DBI) operation or a data masking (DM) operation is performed, and may include cyclic redundancy coding (CRC) information. The data may be data encrypted for security or privacy.
[0133] The storage devices 3150 to 3150n and 3250 to 3250m may send control signals and command / address signals to the NAND flash memory devices 3252 to 3252m in response to a read command received from the processor. Therefore, when data is read from the NAND flash memory devices 3252 to 3252m, a read enable (RE) signal may be input as a data output control signal, and thus, the data may be output to the DQ bus. The data strobe signal DQS may be generated using the RE signal. Depending on the rising edge or falling edge of the write enable (WE) signal, the command and address signals may be latched in the page buffer.
[0134] Product section - Basic operation of SSD
[0135] The controller 3251 may control all operations of the storage device 3250. In one embodiment, the controller 3251 may include an SRAM. The controller 3251 may write data to the NAND flash memory device 3252 in response to a write command, or read data from the NAND flash memory device 3252 in response to a read command. For example, a write command and / or a read command may be provided from a processor 3210 of the storage server 3200, a processor 3210m of another storage server 3200m, or processors 3110 and 3110n of application servers 3100 and 3100n. The DRAM 3253 may temporarily store (or buffer) data to be written to the NAND flash memory device 3252 or data to be read from the NAND flash memory device 3252. And, the DRAM 3253 may store metadata. Here, the metadata may be user data or data generated by the controller 3251 for managing the NAND flash memory device 3252. The storage device 3250 may include a secure element (SE) for security or privacy.
[0136] According to some example embodiments of the present invention, a computer-readable medium is provided, on which computer-executable instructions are stored, and when the instructions are executed, the aforementioned method is performed. Examples of computer-readable media here may include: read-only memory (ROM), random access programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, non-volatile memory, CD-ROM, CD-R, CD+R, CD-RW, CD+RW, DVD-ROM, DVD-R, DVD+R, DVD-RW, DVD+RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, Blu-ray or optical disk storage, hard disk drive (HDD), solid state drive (SSD), card storage (e.g., multimedia card, secure digital (SD) card or extreme digital (XD) card), magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid state disk and any other device, any other device configured to store computer programs and any associated data, data files and data structures in a non-transitory manner and provide the computer programs and any associated data, data files and data structures to a processor or computer so that the processor or computer can execute the computer program. The computer program in the above-mentioned computer-readable storage medium can be run in an environment deployed in a computer device such as a client, a host, an agent device, a server, etc. In addition, in one example, the computer program and any associated data, data files and data structures are distributed on a networked computer system, so that the computer program and any associated data, data files and data structures are stored, accessed and executed in a distributed manner by one or more processors or computers.
[0137] According to some example embodiments conceived by the present invention, the storage space of the predetermined variable area is adjusted by predicting in real time the storage space required for the foreground running of the application, so that the predetermined variable area can be used more efficiently; in addition, by marking invalid data in the predetermined variable area and performing data migration based on this, the write amplification and garbage collection overhead of the storage device can be reduced, the power consumption of the storage device can be reduced, and the service life of the storage device can be extended.
[0138] As described herein, the electronic device and / or its portion according to any of the embodiments in some embodiments may include, may include in and / or may be implemented as one or more instances of a processing circuit such as hardware including a logic circuit, a hardware / software combination such as a processor executing software, or any combination thereof. For example, the processing circuit may more specifically include, but is not limited to, a central processing unit (CPU), an arithmetic logic unit (ALU), a graphics processing unit (GPU), an application processor (AP), a digital signal processor (DSP), a microcomputer, a field programmable gate array (FPGA), a programmable logic unit, a microprocessor, an application specific integrated circuit (ASIC), a neural network processing unit (NPU), an electronic control unit (ECU), an image signal processor (ISP), etc. In some example embodiments, the processing circuit may include: a non-transitory computer-readable storage device (e.g., a memory) storing a program of instructions, such as a DRAM device; a processor (e.g., a CPU) configured to execute a program of instructions to implement the functions and / or methods performed by some or all of any device, system, module, unit, controller, circuit, architecture, and / or its portion according to any of the embodiments in the example embodiments; and / or any portion.
[0139] While the inventive concept has been shown and described with reference to particular example embodiments, it will be understood by those skilled in the art that various changes in form and details may be made without departing from the spirit and scope of the inventive concept as defined by the claims and their equivalents.
Claims
1. A method for reducing write amplification of a storage device, comprising: monitoring the running status of at least one application including the first application; Based on monitoring that the running state of the first application is switched to foreground running, obtaining the historical write data of the first application from the application history records to estimate the storage space of the current foreground running of the first application; Determine a storage device adjustment command based on the estimated storage space of the first application currently running in the foreground, The storage device includes a high-speed storage part and a low-speed storage part. The storage device adjustment command includes adjusting the storage space of the variable area in the high-speed storage part. The storage device is configured to store data generated in response to the execution of the at least one application in the variable area.
2. The method for reducing write amplification of a storage device according to claim 1, further comprising: In response to monitoring that the running state of the first application in the at least one application is switched to foreground running, the running time and the writing amount of the first application are counted and added to the application history record.
3. The method for reducing write amplification of a storage device according to claim 1, wherein: The step of acquiring the historical write data of the first application from the application history records to estimate the storage space of the first application currently running in the foreground includes: In response to acquiring historical write data of the first application from the application history records, estimating a storage space of the first application currently running in the foreground based on the historical write data of the first application; In response to not acquiring the historical write data of the first application from the application history records, estimating the storage space of the first application currently running in the foreground based on the historical write data of the at least one application.
4. The method for reducing write amplification of a storage device according to claim 1, wherein: The step of determining a storage device adjustment command based on the estimated storage space of the first application currently running in the foreground includes: The estimated storage space of the first application currently running in the foreground is compared with the storage space of the first application last running in the foreground.
5. The method for reducing write amplification of a storage device according to claim 4, wherein: The step of comparing the estimated storage space of the first application currently running in the foreground with the storage space of the first application last running in the foreground includes: In response to the estimated storage space of the first application currently running in the foreground being less than a first ratio of the storage space of the first application last running in the foreground or greater than a second ratio of the storage space of the first application last running in the foreground, determining the storage device adjustment command to perform adjustment based on the estimated storage space of the first application currently running in the foreground, In response to the estimated storage space of the first application currently running in the foreground being not less than a first proportion of the storage space of the first application last running in the foreground and not greater than a second proportion of the storage space of the first application last running in the foreground, determining the storage device adjustment command to not perform adjustment, The first ratio is smaller than the second ratio.
6. The method for reducing write amplification of a storage device according to claim 1, further comprising: determining whether the storage device adjustment command exceeds the storage space of the storage device; In response to the storage device adjustment command exceeding the storage space of the storage device, the storage device adjustment command is determined to not perform adjustment or to adjust the entire high-speed storage portion to the variable area.
7. The method for reducing write amplification of a storage device according to claim 1, further comprising: A storage device adjustment command is sent to the storage device to adjust the storage space of the variable area.
8. The method for reducing write amplification of a storage device according to claim 7, further comprising: The available storage space of the variable area is monitored, and based on the available storage space being less than a threshold, the data in the variable area is migrated to a low-speed storage portion.
9. The method for reducing write amplification of a storage device according to claim 1, further comprising: Based on monitoring that the running state of the second application in the at least one application is switched to background running, counting the running time of the second application; In response to the running time of the second application exceeding a threshold time, marking invalid data in the variable area, and generating a data synchronization state command based on the marked invalid data; The data except for invalid data in the variable area is migrated to the low-speed storage part based on the data synchronization state command.
10. The method for reducing write amplification of a storage device according to claim 1, wherein: The storage device includes an accelerated write 2.0 universal flash storage device TW 2.0UFS.
11. A device for reducing write amplification of a storage device, comprising: An application monitoring module, configured to monitor the running status of at least one application including the first application; A prediction module is configured to obtain historical write data of the first application from application history records to estimate the storage space of the current foreground running of the first application based on monitoring that the running state of the first application is switched to the foreground running; a variable region size control module configured to determine a storage device adjustment command based on an estimated storage space of a first application currently running in the foreground, The storage device includes a high-speed storage part and a low-speed storage part. The storage device adjustment command includes adjusting the storage space of the variable area in the high-speed storage part. The storage device is configured to store data generated in response to the execution of the at least one application in the variable area.
12. An electronic device comprising a memory and a processor, wherein the memory stores computer executable instructions, and the processor executes the method of claim 1 based on the instructions. 13 . A non-transitory computer-readable medium having computer-executable instructions stored thereon, which are executed by a processor based on the instructions to cause a device including the processor to perform the method of claim 1 .