Systems, methods, and media for optimizing solid state drive performance
By using reinforcement learning and machine learning techniques to dynamically adjust SSD parameters, the performance problem of SSDs when workloads are mismatched is solved, and more efficient input/output operations and power management are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SK HYNIX NAND PRODUCT SOLUTIONS CORP
- Filing Date
- 2026-02-28
- Publication Date
- 2026-06-30
AI Technical Summary
Existing solid-state drives (SSDs) cannot achieve optimal performance when the workload does not match the intended parameter settings.
By employing reinforcement learning, parameter scanning techniques, and Monte Carlo techniques, SSD parameters are dynamically adjusted to optimize performance. A machine learning classifier is used to determine the workload type, and parameter settings are optimized based on the reward function.
It achieves dynamic optimization of SSD performance, improves the efficiency of input/output operations and average power consumption, reduces power consumption, and enhances the overall performance of SSD.
Smart Images

Figure CN122309301A_ABST
Abstract
Description
Background Technology
[0001] Solid-state drives (SSDs) are widely used in computing platforms to store programs and data. To self-configure for a given workload, many SSDs find and set themselves using pre-defined parameter settings based on that workload. However, such settings are often not optimal for a given workload because the workload does not perfectly match the types of workloads for which pre-defined parameter settings are provided.
[0002] Therefore, new mechanisms for optimizing solid-state drive performance are needed. Summary of the Invention
[0003] According to some embodiments, novel mechanisms, methods, and media are provided for optimizing the performance of solid-state drives.
[0004] In some embodiments, a system for optimizing the performance of a solid-state drive (SSD) is provided, the system comprising: a memory; and at least one hardware processor coupled to the memory and configured to at least: determine a current workload type of the SSD; select SSD parameters to be optimized based on the current workload type; set current values of the SSD parameters; test the performance of the SSD using the current values of the SSD parameters; change one or more of the current values of the SSD parameters; retest the performance of the SSD after changing the current values; and set the current values of the SSD parameters to a determined optimal value for the SSD parameters. In some embodiments of these embodiments, setting the current values of the SSD parameters includes setting the current values to random or pseudo-random values. In some embodiments of these embodiments, testing the performance of the SSD using the current values of the SSD parameters is performed using a test workload. In some embodiments of these embodiments, changing one or more of the current values of the SSD parameters is based on the output of a reinforcement learning agent. In some embodiments of these examples, the output of the reinforcement learning agent is based on a reward function that is based on measurements of the input-output operations performed by the SSD during the test and measurements of the average power, burst power, and peak power used by the SSD during the test. In some embodiments of these examples, changing one or more of the current values of the SSD parameters includes incrementing or decrementing the current values. In some embodiments of these examples, changing one or more of the current values of the SSD parameters includes changing the current values to random or pseudo-random values.
[0005] In some embodiments, a method for optimizing solid-state drive (SSD) performance is provided, the method comprising: using a hardware processor to determine a current workload type of the SSD; selecting SSD parameters to be optimized based on the current workload type; setting current values of the SSD parameters; testing the performance of the SSD using the current values of the SSD parameters; changing one or more of the current values of the SSD parameters; retesting the performance of the SSD after changing the current values; and setting the current values of the SSD parameters to a determined optimal value for the SSD parameters. In some embodiments of these embodiments, setting the current values of the SSD parameters includes setting the current values to random or pseudo-random values. In some embodiments of these embodiments, testing the performance of the SSD using the current values of the SSD parameters is performed using a test workload. In some embodiments of these embodiments, changing one or more of the current values of the SSD parameters is based on the output of a reinforcement learning agent. In some embodiments of these examples, the output of the reinforcement learning agent is based on a reward function that is based on measurements of the input-output operations performed by the SSD during the test and measurements of the average power, burst power, and peak power used by the SSD during the test. In some embodiments of these examples, changing one or more of the current values of the SSD parameters includes incrementing or decrementing the current values. In some embodiments of these examples, changing one or more of the current values of the SSD parameters includes changing the current values to random or pseudo-random values.
[0006] In some embodiments, a non-transitory computer-readable medium is provided, containing computer-executable instructions that, when executed by a processor, cause the processor to perform a method for optimizing the performance of a solid-state drive (SSD), the method comprising: determining a current workload type of the SSD; selecting SSD parameters to optimize based on the current workload type; setting current values of the SSD parameters; testing the performance of the SSD using the current values of the SSD parameters; changing one or more of the current values of the SSD parameters; retesting the performance of the SSD after changing the current values; and setting the current values of the SSD parameters to a determined optimal value for the SSD parameters. In some embodiments of these embodiments, setting the current values of the SSD parameters includes setting the current values to random or pseudo-random values. In some embodiments of these embodiments, testing the performance of the SSD using the current values of the SSD parameters is performed using a test workload. In some embodiments of these embodiments, changing one or more of the current values of the SSD parameters is based on the output of a reinforcement learning agent. In some embodiments of these examples, the output of the reinforcement learning agent is based on a reward function that is based on measurements of the input-output operations performed by the SSD during the test and measurements of the average power, burst power, and peak power used by the SSD during the test. In some embodiments of these examples, changing one or more of the current values of the SSD parameters includes incrementing or decrementing the current values. In some embodiments of these examples, changing one or more of the current values of the SSD parameters includes changing the current values to random or pseudo-random values. Attached Figure Description
[0007] Figure 1 This is a block diagram of an example solid-state drive (SSD) according to some embodiments.
[0008] Figure 2 This is a flowchart of an example process for optimizing SSD parameters according to some embodiments.
[0009] Figure 3 This is a flowchart of an example process for optimizing SSD parameters using reinforcement learning, according to some embodiments.
[0010] Figure 4 This is a flowchart of an example process for optimizing SSD parameters using parameter scanning techniques, according to some embodiments.
[0011] Figure 5 This is a flowchart of an example process for optimizing SSD parameters using Monte Carlo techniques, according to some embodiments.
[0012] Figure 6A and Figure 6B This is a flowchart of an example process, according to some embodiments, that can be used to train a machine learning classifier to determine the type of workload.
[0013] Figure 7 This is a flowchart of an example process for determining the type of workload using a machine learning classifier, according to some embodiments. Detailed Implementation
[0014] According to some embodiments, new mechanisms, including systems, methods, and media, are provided for optimizing the performance of solid-state drives (SSDs).
[0015] In some of these embodiments, reinforcement learning, parameter scanning techniques, and / or Monte Carlo techniques may be used to configure SSD parameters.
[0016] Turning Figure 1 This diagram illustrates an example block diagram of a solid-state drive 102 coupled to a host device 124 via a bus 132, according to some embodiments.
[0017] As shown, in some embodiments, the solid-state drive 102 may include a controller 104, physical media (e.g., NAND devices) 106, 108, and 110, channels 112, 114, and 116, random access memory (RAM) 118, firmware 120, and cache 122. In some embodiments, it may include a... Figure 1 The components shown may include more or fewer components. In some embodiments, Figure 1 Two or more components shown can be contained in one component.
[0018] In some embodiments, controller 104 may be any suitable controller for a solid-state drive. In some embodiments, controller 104 may include any suitable hardware processor(s) (e.g., microprocessor, digital signal processor, microcontroller, programmable gate array, etc.). In some embodiments, controller 104 may also include any suitable memory(e.g., RAM, firmware, cache, buffer, latch, etc.), (e.g., one or more) interface controllers, interface logic, drivers, etc. In some embodiments, controller 104 may be coupled to or include (as shown) channel queues 140, 142, and 144 for transmitting commands (which may include command data) to physical media 106, 108, and 110 via channels 140, 142, and 144, respectively.
[0019] In some embodiments, physical media 106, 108, and 110 can be any suitable physical medium for storing information, which may include data, programs, and / or any other suitable information that can be stored in a solid-state drive. For example, in some embodiments, the physical medium can be a NAND device.
[0020] In some embodiments, the physical medium may include any suitable memory cell, one or more hardware processors (e.g., microprocessors, digital signal processors, microcontrollers, programmable gate arrays, etc.), one or more interface controllers, interface logic, driving devices, etc. Although Figure 1 Three physical media (106, 108, and 110) are shown, but in some embodiments any suitable number of physical media (including only one) may be used. In some embodiments, any suitable type of physical media may be used (e.g., single-cell (SLC) NAND devices, multi-cell (MLC) NAND devices, three-cell (TLC) NAND devices, four-cell (QLC) NAND devices, five-cell (PLC) NAND, NAND with a suitable number of cells, 2D NAND devices, 3D NAND devices, NOR flash memory, any other suitable flash memory technology, phase-change memory technology, and / or any other suitable volatile and / or non-volatile memory storage technology). In some embodiments, each physical media may have any suitable size. While physical media 106, 108, and 110 may be implemented using NAND devices, these devices may additionally or alternatively use any other suitable storage technology, such as NOR flash memory or any other suitable flash memory technology, phase-change memory technology, and / or any other suitable non-volatile memory storage technology.
[0021] In some embodiments, channels 112, 114, and 116 can be any suitable mechanism for transmitting information between controller 104 and physical media 106, 108, and 110. For example, in some embodiments, channels can be implemented using conductors (pads) on a circuit board. Although Figure 1 Three channels (112, 114, and 116) are shown, but in some embodiments any suitable number of channels C can be used.
[0022] In some embodiments, the random access memory (RAM) 118 may include any suitable type of RAM, such as dynamic RAM, static RAM, etc. In some embodiments, any suitable number of RAMs 118 may be included, and each RAM 118 may have any suitable size.
[0023] In some embodiments, firmware 120 may include any suitable combination of software and hardware. For example, in some embodiments, firmware 120 may include software programmed in any suitable programmable read-only memory (PROM). In some embodiments, any suitable number of firmware 120s may be used, each firmware having any suitable size.
[0024] In some embodiments, cache 122 can be any suitable means for temporarily storing information (which may include data and programs in some embodiments). In some embodiments, cache 122 can be implemented using any suitable type of means, such as RAM (e.g., static RAM, dynamic RAM, etc.). In some embodiments, any suitable number of caches 122 can be used, each cache having any suitable size.
[0025] In some embodiments, the host device 124 can be any suitable device for accessing the stored information. For example, in some embodiments, the host device 124 can be a general-purpose computer, a special-purpose computer, a desktop computer, a laptop computer, a tablet computer, a server, a database, a router, a gateway, a switch, a mobile phone, a communication device, an entertainment system (e.g., a car entertainment system, a television, a set-top box, a music player, etc.), a navigation system, etc. Although Figure 1 Only one host device 124 is shown, but in some embodiments any suitable number of host devices may be included.
[0026] In some embodiments, the host device 124 may include workers 126, 128, and 130. Although Figure 1 Three workers (126, 128, and 130) are generated, but in some embodiments, any suitable number of workers W may be included. In some embodiments, at least two workers may be included. Workers can be any suitable hardware and / or software that reads data from and / or writes data to the solid-state drive 102.
[0027] In some embodiments, bus 132 can be any suitable bus for transmitting information (which in some embodiments may include data and / or programs). For example, in some embodiments, bus 132 can be a PCIe bus, a SATA bus, or any other suitable bus.
[0028] As described above, according to some embodiments, the workload type can be determined by a machine learning classifier. In order for the machine learning classifier to determine the workload type, the machine learning classifier can be trained to do so, and / or can be configured to do so based on another machine learning classifier trained to do so.
[0029] Turning Figure 2A flowchart of an example process 200 for controlling SSD parameter optimization according to some embodiments is shown. In some embodiments, process 200 may be provided by Figure 1 The controller 104 executes.
[0030] As shown, after process 200 begins, at point 202, the process determines the current workload of the SSD. In some embodiments, this determination can be performed in any suitable manner. For example, it can be done as follows: Figure 5 This determination can be performed as described below. As another example, this determination can be made by using a heuristic-based algorithm to determine workload characteristics, such as by determining the moving average effectiveness (MAV) value of a band for garbage collection and using this value to identify workload types that typically have this or similar values. As yet another example, this determination can be made by determining the read / write I / O mix (e.g., 75% reads, 25% writes), workload queue depth (e.g., queue depth 1 or 128), and I / O size (e.g., 4 KB or 128 KB) and using these values to identify workload types that typically have these or similar values.
[0031] Next, at 204, the process determines a baseline where the SSD's performance is worse than the current workload. In some embodiments, this determination can be made in any suitable manner. For example, in some embodiments, this determination can compare any suitable one or more metrics of the SSD to one or more baseline metrics of the current workload. More specifically, for example, in some embodiments, process 200 may determine the baseline where the SSD's performance is worse than the current workload based on determining that the current input / output operation (IOP) quantity is less than the corresponding baseline value of the determined workload. As another more specific example, in some embodiments, process 200 may additionally or alternatively determine the baseline where the SSD's performance is worse than the current workload based on determining that the current average power (AvP) quantity is greater than the corresponding baseline value of the determined workload.
[0032] If it is determined at point 204 that the SSD's performance is not worse than the baseline of the current workload, then process 200 loops back to 202. Otherwise, process 200 proceeds to 206.
[0033] Then at 206, process 200 selects a set of parameters to be adjusted based on the current workload. In some embodiments, any suitable parameters and any suitable number can be selected in any suitable manner. For example, in some embodiments, parameters can be selected by identifying (e.g., from a lookup table) the parameters that have the greatest impact on SSD performance for a given workload. Example parameters that can be selected according to some embodiments are shown in Table 1 below: Table 1 parameter Affected workload SEQ_READ_CMD_CNT Sequential reading RND_READ_CMD_CNT Random Read PGM_CMD_CNT Sequential and random writes ERASE_CMD_CNT Sequential and random writes GC_BUFF_LIMIT Random write MIXED_GC_BUFF_LIMIT Mixed random reads and writes At point 208, process 200 then attempts to optimize the SSD's performance by adjusting one or more selected parameters. In some embodiments, process 200 may attempt to optimize the SSD's performance by adjusting one or more selected parameters in any suitable manner. For example, in some embodiments, the process may attempt to optimize the SSD's IOP by adjusting the selected parameters. As another example, in some embodiments, the process may nearby or alternatively attempt to optimize the SSD's AvP by adjusting the selected parameters. The following is combined with... Figure 3-5 Examples of procedures that may be performed at 208 according to some embodiments are described.
[0034] Next, at 210, process 200 may determine whether the SSD's performance is still worse than the baseline of the current workload (e.g., the SSD's AvP and / or IOP are still worse than the baseline). In some embodiments, this determination may be made in any suitable manner. For example, in some embodiments, this determination may be made as described above with respect to box 204. If it is determined at 210 that the SSD's performance is still worse than the baseline, the process may loop back to 208. Otherwise, the process may loop back to 202.
[0035] Turn Figure 3 The diagram illustrates a flowchart of an example process 300 for optimizing selected SSD parameters using reinforcement learning (RL) according to some embodiments. In some embodiments, process 300 may use any suitable reinforcement learning algorithm. In some embodiments, process 300 may be... Figure 1 The controller 104 executes.
[0036] As shown, after process 300 begins, at 302, the process selects an initial value for the selected parameter as the current value. In some embodiments, any suitable initial value for the selected parameter can be selected. For example, in some embodiments, the initial value can be selected based on a previously used value, a random value, and / or a predetermined value.
[0037] Next, at 304, process 300 tests the SSD's performance using the current value (i.e., the initial value selected at 302 when 304 is executed immediately following 302). In some embodiments, process 300 can test the SSD's performance in any suitable manner. For example, in some embodiments, process 300 can execute a portion of the current workload or a test workload corresponding to the current workload and determine the SSD's performance in doing so. As a more specific example, in some embodiments, process 300 can execute a test workload corresponding to the current workload and determine IOP and / or AvP in doing so.
[0038] Then at 306, process 300 determines whether optimization of the selected SSD parameters has been completed. In some embodiments, this determination can be made in any suitable manner. For example, in some embodiments, process 300 may determine that it has completed optimization of the selected SSD parameters by checking whether the power is better than the starting state, or (better than the starting state and at least a given number of reinforcement learning cycles (e.g., 250-500 times) has been performed).
[0039] If it is determined at 306 that process 300 has not yet completed, the process continues to 308, where it calculates a reward value based on the determined performance. In some embodiments, any suitable reward function can be used to determine the reward value. For example, in some embodiments, process 300 may use the following reward function: Reward value = β1*c1 + α*IOP + β2*(c2+c3), in: β1 is the weight of the first component of the reward function and can have any suitable value, such as 0.5; α is the weight of the second component of the reward function and can have any suitable value, such as 0.4; β2 is the weight of the third component of the reward function and can have any suitable value, such as 0.1; c1 = -|ExP-AvP| Y If |ExP-AvP| <Th; c1 = -M, if |ExP-AvP|>= Th; c2 = -10*M, when burst power >= kc2 * ExP; c2 = 0, when burst power <kc2 *exp时; kc2是c2阈值的缩放因子,并且可以设置为任何合适的值,例如1.4; c3="-10*M,当峰值功率">= kc3 * ExP when; c3 = 0 when the peak power < kc3 * ExP; kc3 is a scaling factor for the c3 threshold and can be set to any suitable value, such as 1.4; ExP is the expected average power usage of the SSD; M can be, for example, any suitable large value, such as 10 9 ; Y can be any suitable real or integer value greater than 1 (e.g., for example, 3); Th is the threshold and can have any suitable threshold amount, such as Exp or approximately Exp (e.g., within 10% of Exp); AvP is the average power usage of the SSD during the past maximum fixed - size window (e.g., 10000 μs); The burst power is the average power usage of the SSD during the past medium fixed - size window (e.g., 500 μs); and The peak power is the average power usage of the SSD during the past minimum fixed - size window (e.g., 100 μs).
[0040] At 310, the process next provides the current values of the selected parameters as a state input to the reinforcement learning agent and the reward value as a reward input to the reinforcement learning agent. In some embodiments, the current values of the selected parameters and the reward value can be provided in any suitable manner.
[0041] Next, process 300 receives an action as an output from the RL agent and, at 312, adjusts the current values of the selected parameters based on the received action, and then loops back to 304. In some embodiments, process 300 can receive an action as an output from the RL agent in any suitable manner and can adjust the current values of the selected parameters based on the received action. For example, in some embodiments, the action can indicate increasing one or more of the selected parameters, and in response, process 300 can increment the value of one or more of the selected parameters by a given amount. As another example, in some embodiments, the action can indicate decreasing one or more of the selected parameters, and in response, process 300 can decrement the value of one or more of the selected parameters by a given amount.
[0042] If it is determined at 310 that process 300 has completed, the process can end at 314.
[0043] Turning Figure 4 , shows a flowchart of an example process 400 for optimizing SSD parameters using a scanning process. In some embodiments, process 400 can be performed by Figure 1 The controller 104 executes.
[0044] As shown, after process 400 begins, at 402, the process sets the initial current value of the selected parameter, sets the optimal value of the selected parameter to the current value, and sets one or more optimal SSD performance metrics to the worst possible value based on the metrics to be considered. In some embodiments, the initial current value of the selected parameter can be selected in any suitable manner. For example, in some embodiments, the initial current value can be set to the minimum value of each parameter. As another example, in some embodiments, the initial current value can be set to the maximum value of each parameter. As yet another example, in some embodiments, the initial value can be selected based on previously used values, based on random values, and / or based on predetermined values.
[0045] Next, at 404, process 400 tests the SSD's performance using the current value (i.e., the initial value selected at 402 when 404 is executed immediately following 402). In some embodiments, process 400 can test the SSD's performance in any suitable manner. For example, in some embodiments, process 400 can execute a portion of the current workload or a test workload corresponding to the current workload, and determine one or more current performance metrics in doing so. As a more specific example, in some embodiments, process 400 can execute a test workload corresponding to the current workload, and determine IOP and / or AvP as current SSD metrics in doing so.
[0046] Then at 406, process 400 determines whether the current SSD performance is better than the optimal SSD performance. In some embodiments, this determination can be made in any suitable manner. For example, in some embodiments, this determination can be made by comparing(s) of the current performance metric(s) determined at 404 with(s) of the optimal performance metric(s) (whose first instance at 406 has been set to the worst possible value). More specifically, for example, if the current metrics are IOP and AvP, then the SSD performance can be considered better than the optimal SSD performance when IOP is higher than the optimal IOP and AvP is lower than the optimal AvP.
[0047] If it is determined that the current SSD performance is better than the optimal SSD performance, then process 400 can proceed to 408. Otherwise, process 400 can branch to 410.
[0048] At point 408, the process then sets the optimal parameter values to the current parameter values and the optimal performance metric to the current performance metric. For example, when the current metrics are IOP and AvP, the optimal IOP metric can be set to the current IOP metric, and the optimal AvP metric can be set to the current AvP metric.
[0049] Next, at 410, procedure 400 determines whether to try more values for the selected parameter. If so, procedure 400 can branch to 412. Otherwise, procedure 400 can proceed to 414.
[0050] At 412, process 400 sets one or more current parameter values to previously unchecked values and loops back to 404. In some embodiments, previously unchecked values can be selected in any suitable manner. For example, in some embodiments, the next combination of current parameter values can be selected by incrementing one or more current values (when the initial current value of each selected parameter is at its minimum) or decrementing one or more current values (when the initial current value of each selected parameter is at its maximum). In some embodiments, when one or more selected SSD parameters appear to have reached their optimal values for a given workload, process 400 can determine not to change that / those parameters. In such cases, one or more selected SSD parameters can be kept at their optimal values.
[0051] After determining at 410 that all possible combinations of selected parameter values have been tried, process 400 sets the current value of the selected parameter of the SSD to the optimal value at 414, and then ends at 416.
[0052] Turning Figure 5 The diagram illustrates a flowchart of an example process 500 for optimizing SSD parameters using Monte Carlo techniques. In some embodiments, process 500 may be... Figure 1 The controller 104 executes.
[0053] As shown, after process 500 begins, at 502, the process sets the initial current value of the selected parameter, sets the best value of the selected parameter to the current value, and sets one or more best SSD performance metrics to the worst possible value based on the metrics to be considered. In some embodiments, the initial current value of the selected parameter can be selected in any suitable manner. For example, in some embodiments, the initial current value can be set to a random value for each parameter. As another example, in some embodiments, the initial value can be selected based on previously used values, based on random values, and / or based on predetermined values.
[0054] Next, at 504, process 500 tests the SSD's performance using the current value (i.e., the initial value selected at 502 when 504 is executed immediately following 502). In some embodiments, process 500 can test the SSD's performance in any suitable manner. For example, in some embodiments, process 500 can execute a portion of the current workload or a test workload corresponding to the current workload, and determine one or more current performance metrics in doing so. As a more specific example, in some embodiments, process 500 can execute a test workload corresponding to the current workload, and determine IOP and / or AvP as current SSD metrics in doing so.
[0055] Then at 506, process 500 determines whether the current SSD performance is better than the optimal SSD performance. In some embodiments, this determination can be made in any suitable manner. For example, in some embodiments, this determination can be made by comparing(s) of the current performance metric(s) determined at 504 with(s) of the optimal performance metric(s) (which were set to the worst possible value in the first instance at 506). More specifically, for example, if the current metrics are IOP and AvP, then the SSD performance can be considered better than the optimal SSD performance when IOP is higher than the optimal IOP and when AvP is lower than the optimal AvP.
[0056] If it is determined that the current SSD performance is better than the optimal SSD performance, then process 500 can proceed to 508. Otherwise, process 500 can branch to 510.
[0057] At point 508, the process then sets the optimal parameter values to the current parameter values and the optimal performance metric to the current performance metric. For example, when the current metrics are IOP and AvP, the optimal IOP metric can be set to the current IOP metric, and the optimal AvP metric can be set to the current AvP metric.
[0058] Next, at 510, process 500 determines whether the process has completed trying different combinations of values for the selected parameter. This determination can be made in any suitable manner. For example, it can be made by determining that a given number of value combinations have been tried or by determining that the SSD's performance has not improved after a certain number of tests at 504. If it is determined that the process has not completed trying different combinations of values for the selected parameter, process 500 can branch to 512. Otherwise, process 500 can proceed to 514.
[0059] Then, at 512, process 500 sets the current value of one or more selected parameters to an untried, randomly (or pseudo-randomly) selected set of parameter values and loops back to 504. In some embodiments, when one or more selected SSD parameters appear to have reached their optimal values for a given workload, process 500 may determine not to change that / those parameters. In such cases, one or more selected SSD parameters can be kept at their optimal values(s).
[0060] After determining at 510 that the process has completed trying different combinations of values for the selected parameter, process 500 sets the current value of the selected parameter to the optimal value at 514, and then ends at 516.
[0061] The following describes examples of mechanisms, including systems, methods, and media, that can be used to determine workload types according to some embodiments. In some embodiments, these mechanisms can be used in... Figure 2 The workload type is determined at point 202 of process 200.
[0062] In some embodiments, a machine learning classifier (hereinafter referred to as the "classifier") is used to determine the type of workload. In some embodiments, any suitable type of machine learning-based classifier can be used. For example, in some embodiments, the classifier can be implemented using a neural network. As a more specific example, in some embodiments, the classifier can be implemented using a deep neural network. In some embodiments, when the classifier is implemented as a neural network, any suitable activation function can be used in the neural network, such as leaky ReLU and sigmoid activation functions. In some embodiments, when the classifier is implemented as a neural network, the neural network can have any suitable number and size of hidden layers, use any suitable learning rate (e.g., 0.001), use any suitable loss function (e.g., mean squared error (MSE) loss function), be trained using an adaptive moment estimation ("Adam") optimizer, and / or use loss-based techniques such that training stops when a loss threshold is reached (e.g., <10%) to prevent overfitting.
[0063] In some embodiments, the classifier used to determine the type of workload can make this determination based on any suitable input. For example, in some embodiments, the classifier used to determine the type of workload can make this determination based on the moving average effectiveness (MAV) in the SSD used for garbage collection when processing the workload, the read / write input / output mix of the workload, the queue depth of the workload, the input / output size of the workload, the read type of the workload (e.g., system or host), the number of pending commands of the workload, the starting logical block address (LBA), the input / output source (e.g., host, system, garbage collection, media policy, etc.), and / or any other suitable input.
[0064] In some embodiments, the classifier used to determine the workload type can produce any suitable output. For example, in some embodiments, the classifier used to determine the workload type can produce an indicator indicating whether the workload is in a steady state, the currently presented workload type, the probability that the current workload is of each of a plurality of workload types, and / or any other suitable output.
[0065] In order for a machine learning classifier to determine the type of workload, the machine learning classifier can be trained to do so, and / or can be configured to do so based on another trained machine learning classifier.
[0066] Turning Figure 6A Example 600 of a process for training a machine learning classifier that can be used to determine the type of SSD workload, according to some embodiments, is shown. As shown, in some embodiments, process 600 includes a portion 601 executed by the host and a portion 650 executed by the SSD controller.
[0067] As shown, after process 601 begins at 602, the process puts the SSD into training mode 604. In some embodiments, the SSD can be put into training mode in any suitable manner. For example, in some embodiments, process 601 may send a command to the SSD at 604 to put the SSD into training mode.
[0068] After process 650 begins at 652, and in response to process 601 placing the SSD into training mode, process 650 may enter training mode at 654. The process may enter training mode in any suitable manner. For example, upon entering training mode, process 650 may configure the SSD's classifier to be trained. As another example, in some embodiments, the classifier may be initialized. More specifically, for example, when implemented with a neural network, the classifier may be initialized with normal Xavier initialization and zero bias.
[0069] Next, at 606, process 601 can select one or more workload types based on which the classifier in the SSD is to be trained. At 606, any suitable workload type and a suitable number can be selected, and the workload types can be selected based on any suitable criteria or one or more. For example, in some embodiments, process 601 can select certain workload types applicable to a specific type of SSD, a specific SSD application, a specific industry in which the SSD is intended, one or more specific customers, etc.
[0070] Then, at 608, process 601 may select a training dataset based on the selected workload(s) type(s). Any suitable training dataset may be selected in any suitable manner, and the training dataset may have any suitable size. For example, in some embodiments, the training dataset may be selected to have workload examples corresponding to the selected workload type.
[0071] In some embodiments, the training dataset can contain any suitable content. For example, in some embodiments, the training dataset may include workload commands and data, as well as indicators that indicate the type of workload corresponding to each part of the training dataset.
[0072] Next, at 610, process 601 may send a portion of a training dataset, which is part of one or more workloads, to the SSD for training. This portion may be sent in any suitable manner. For example, in some embodiments, the portion may be sent in the same manner as sending a corresponding non-training workload to the SSD. More specifically, the portion may be sent from the host to the SSD as a series of commands along with corresponding data (if applicable). In some embodiments, an indicator of the workload type may be sent along with the commands and corresponding data (if applicable), while in other embodiments, the indicator of the workload type may be sent separately from the commands and corresponding data (if applicable).
[0073] At 656, process 650 may receive one or more workloads along with one or more indicators of workload type, and execute one or more workloads.
[0074] Process 650 may generate a workload metric at 657. Any suitable workload metric may be generated in any suitable manner. For example, in some embodiments, the generated workload metric may include the moving average effectiveness (MAV) carried in the SSD for garbage collection while processing the workload, the read / write I / O mix of the workload, the queue depth of the workload, the I / O size of the workload, the read type of the workload (e.g., system or host), the number of outstanding commands of the workload, the starting logical block address (LBA), the I / O source (e.g., host, system, garbage collection, media policy, etc.), and / or any other suitable metric.
[0075] Next, at 658, process 650 can train a classifier using the received workload(s). In some embodiments, the received workload(s) can be used to train the classifier in any suitable manner. For example, in some embodiments, process 650 can provide the classifier with a workload metric from a given number of intervals (as described below). Figure 7 As described in 706), the classifier receives output and modifies the classifier via backpropagation based on the workload(s) and output indicated by the training dataset. In some embodiments, an adaptive moment estimation ("Adam") optimizer may be used to train the classifier.
[0076] After training is complete, at 612, process 601 can put the SSD into test mode. In some embodiments, the SSD can be put into test mode in any suitable manner. For example, in some embodiments, process 601 can send a command to the SSD at 612 to put the SSD into test mode.
[0077] In response to process 601 placing the SSD into test mode, process 650 may enter test mode at 660. In some embodiments, process 650 may enter test mode in any suitable manner. For example, upon entering test mode, process 650 may configure the SSD's classifier to evaluate the presented workload to determine its workload type, and monitor the accuracy of those determinations based on indicators of the workload type(s) provided with the workload.
[0078] Next, at 614, process 601 may send another portion of the training dataset as one or more test workloads to the SSD. In some embodiments, this other portion may be sent to the SSD in any suitable manner. For example, in some embodiments, the portion may be sent in the same manner as the corresponding non-training workload is sent to the SSD. More specifically, the portion may be sent from the host to the SSD as a series of commands along with corresponding data (if applicable). In some embodiments, an indicator of the workload type may be sent along with the commands and corresponding data (if applicable), while in other embodiments, the indicator of the workload type may be sent separately from the commands and corresponding data (if applicable).
[0079] At 662, process 650 may receive one or more workloads along with one or more indicators of workload type, and execute one or more workloads.
[0080] Then, at 664, process 650 can test the trained classifier based on the received workload. In some embodiments, process 650 can test the trained classifier in any suitable manner based on the received workload. For example, in some embodiments, in testing the trained classifier, process 650 can evaluate the presented workload to determine its workload type (e.g., as described below regarding...). Figure 7 (as described in 704, 705, 706, 708 and 712), and to monitor the accuracy of those determinations based on indicators of (one or more) workload types provided with the workload.
[0081] Next, at 666, process 650 may send test performance data to process 601. In some embodiments, this performance data may be sent in any suitable manner. For example, in some embodiments, the performance data may include accuracy data.
[0082] Process 601 can receive test performance data at 616.
[0083] At 618, process 601 can then determine whether the classifier has been adequately trained based on performance data and / or any other suitable metric or combination of metrics. In some embodiments, any suitable performance data can be used to determine whether the classifier has been adequately trained. For example, in some embodiments, process 601 can determine that the classifier has been adequately trained when the accuracy of the classifier is within one standard deviation or other statistical distance (e.g., 10%) of a known workload type indicated in the training data.
[0084] If process 601 determines at 618 that the classifier has not been sufficiently trained, the process can loop back to 606.
[0085] Otherwise, the process can end at 620.
[0086] At 668, process 650 can then determine whether the classifier has been adequately trained based on performance data and / or any other suitable metric or combination of metrics, and / or based on an indicator sent from process 601 at 618. In some embodiments, any suitable performance data can be used to determine whether the classifier has been adequately trained. For example, in some embodiments, process 601 can determine that the classifier has been adequately trained when the accuracy of the classifier is within one standard deviation or other statistical distance (e.g., 10%) of a known workload type indicated in the training data.
[0087] If process 650 determines at 668 that the classifier has been sufficiently trained, then process 650 can loop back to 656.
[0088] Alternatively, the process can save the trained classifier at 670 and then end at 672. The trained classifier can be saved for later use on this SSD and / or one or more other SSDs separate from this SSD.
[0089] Turning Figure 6B Example 680 of a process for training a machine learning classifier that can be used to determine workload types is shown according to some embodiments. In some embodiments, process 680 may be performed by any suitable computing device (e.g., a host).
[0090] As shown, after process 680 begins at 681, the process can enter training mode at 682. In some embodiments, the process can enter training mode in any suitable manner. For example, upon entering training mode, process 680 can configure a classifier to be trained. As another example, in some embodiments, the classifier can be initialized. More specifically, for example, when implemented with a neural network, the classifier can be initialized with normal Xavier initialization and zero bias.
[0091] Next, at 683, process 680 can select one or more workload types based on which the classifier will be trained. At 683, any suitable workload type and a suitable number can be selected, and the workload types can be selected based on any suitable criteria. For example, in some embodiments, process 680 can select certain workload types applicable to a specific type of SSD, a specific SSD application, a specific industry in which the SSD is intended, one or more specific customers, etc.
[0092] Then, at 684, process 680 can select a training dataset based on the selected workload(s) type(s). Any suitable training dataset can be selected in any suitable manner, and the training dataset can have any suitable size. For example, in some embodiments, the training dataset can be selected to have workload examples corresponding to the selected workload type.
[0093] In some embodiments, the training dataset can contain any suitable content. For example, in some embodiments, the training dataset may include workload commands and data, as well as indicators that indicate the type of workload corresponding to each part of the training dataset.
[0094] Next, at 685, process 680 may execute a portion of the training dataset as one or more workloads for training. This portion may be executed in any suitable manner. For example, in some embodiments, this portion may be executed in the same manner as the corresponding non-training workload would be executed on the SSD. As another example, in some embodiments, process 680 may simulate the execution of the training dataset as one or more workloads. As yet another example, in some embodiments, when training a classifier for one or more given SSDs, workloads executed on one or more given SSDs may be simulated using workload metrics / information corresponding to workloads executed on one or more other SSDs. This allows the SSD classifier to be trained based on past data from different SSDs and different host configurations.
[0095] Process 680 may generate a workload metric at 686. In some embodiments, any suitable workload metric may be generated in any suitable manner. For example, in some embodiments, the generated workload metric may include the moving average effectiveness (MAV) carried in the SSD for garbage collection while processing the workload, the read / write input / output mix of the workload, the queue depth of the workload, the input / output size of the workload, the read type of the workload (e.g., system or host), the number of outstanding commands of the workload, the starting logical block address (LBA), the input / output source (e.g., host, system, garbage collection, media policy, etc.), and / or any other suitable metric.
[0096] Next, at 687, process 680 may train a classifier based on one or more known workload types and one or more workload metrics of the executed workload(s). In some embodiments, the received workload(s) may be used to train the classifier in any suitable manner. For example, in some embodiments, process 680 may provide the classifier with a given number of intervals (as described below). Figure 7 The workload metric described in section 706 receives output from the classifier and modifies the classifier via backpropagation based on the workload(s) and output indicated by the training dataset. In some embodiments, an adaptive moment estimate ("Adam") optimizer may be used to train the classifier.
[0097] After training is complete, at point 688, process 680 may enter test mode. In some embodiments, process 680 may enter test mode in any suitable manner. For example, upon entering test mode, process 680 may configure the SSD's classifier to evaluate the presented workload to determine its workload type, and to monitor the accuracy of those determined based on indicators of the workload type(s) provided with the workload.
[0098] Next, at 689, process 680 may execute another portion of the training dataset as one or more test workloads. For example, in some embodiments, this other portion may be executed in the same manner as the corresponding non-training workload would be executed in the SSD. As another example, in some embodiments, process 680 may simulate the execution of the training dataset as one or more workloads.
[0099] Then, at 690, process 680 can generate test performance data. In some embodiments, this performance data can be generated in any suitable manner, and any suitable performance data can be generated. For example, in some embodiments, in generating the performance data, process 680 can evaluate the presented workload to determine its workload type (e.g., as described below regarding...). Figure 7 (as described in 704, 705, 706, 708 and 712), and monitor the accuracy of those determinations based on indicators of workload type(s) provided with the workload.
[0100] At 691, process 680 can then determine whether the classifier has been adequately trained based on performance data and / or any other suitable metric or combination of metrics. In some embodiments, any suitable performance data can be used to determine whether the classifier has been adequately trained. For example, in some embodiments, process 601 can determine that the classifier has been adequately trained when the accuracy of the classifier is within one standard deviation or other statistical distance (e.g., 10%) of a known workload type indicated in the training data.
[0101] If process 680 determines at 691 that the classifier has not been sufficiently trained, the process can loop back to 683.
[0102] Alternatively, the process can save the trained classifier at position 692 and then end at position 693. The trained classifier can be saved for later use in one or more SSDs.
[0103] Turning Figure 7 Example 700 of a process for determining workload type using a machine learning classifier, according to some embodiments, is shown. In some embodiments, process 700 may be executed by an SSD controller. In some embodiments, process 700 may be performed at... Figure 2 The process is executed during the 202nd period of 200.
[0104] After process 700 begins at 702, the process may determine a current workload metric for the current workload within the current time interval at 704. In some embodiments, process 700 may determine any suitable current workload metric in any suitable manner. For example, in some embodiments, process 700 may determine one or more of the following: the moving average effectiveness (MAV) of the SSD being garbage collected while processing the workload, the read / write input / output mix of the workload, the queue depth of the workload, the input / output size of the workload, the read type of the workload (e.g., system or host), the number of pending commands of the workload, the starting logical block address (LBA), the input / output source (e.g., host, system, garbage collection, media policy, etc.), and / or any other suitable input. In some embodiments, the current time interval may have any suitable duration. For example, in some embodiments, the current time interval may have a duration of 1-25 ms. In some embodiments, as shown by the dashed lines around box 705 and the dashed lines between box 705 and box 704, when process 700 first begins, 704 and 705 can be repeated over N+1 intervals before proceeding to 706 (at 705, process 700 can wait for the next interval).
[0105] Next, at 706, process 700 can provide workload metrics over the current time interval and N past time intervals as input to the classifier. In some embodiments, N can have any suitable value. For example, in some embodiments, N can be two, such that the classifier is provided with workload metrics over a total of three time intervals. In some embodiments, these inputs can be provided in any suitable manner.
[0106] Then, at 708, process 700 may receive from the classifier a steady-state indicator, one or more workload type indicators, for each of the plurality of workload type indicators, the probability that the current workload is of that workload type, and / or any other suitable output. In some embodiments, one or more such outputs may be received in any suitable manner.
[0107] At 710, process 700 may then determine the workload type based on a steady-state indicator, one or more workload indicators, the probability that the current workload is of each of a plurality of workload type indicators, and / or any other suitable output of the classifier, and output the determined workload type. In some embodiments, this determination may be performed in any suitable manner. For example, in some embodiments, process 700 may determine the workload type by determining which of the indicated output types has the highest probability of being the current workload type.
[0108] The process can end at point 712 after step 700.
[0109] It should be understood that the above Figure 2-7 At least some of the blocks of the process can be executed or performed in any order or sequence, not limited to the order and sequence shown and described in the figures. Furthermore, where appropriate, the above... Figure 2-7 Some blocks of the process can be executed or implemented substantially simultaneously or in parallel to reduce latency and processing time. Additionally or alternatively, they can be omitted. Figure 2-7 The process is described in some of the boxes in the above box.
[0110] In some implementations, any suitable computer-readable medium may be used to store instructions for performing the functions and / or processes described herein. For example, in some implementations, the computer-readable medium may be transient or non-transitory. For example, non-transitory computer-readable media may include non-transitory magnetic media (e.g., hard disks, floppy disks, etc.), non-transitory optical media (e.g., optical discs, digital video discs, Blu-ray discs, etc.), non-transitory semiconductor media (e.g., flash memory, electrically programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.), any suitable medium that is not transient or without any permanent trace during transmission, and / or any suitable tangible medium. As another example, transient computer-readable media may include signals on a network, wires, conductors, optical fibers, circuits, any suitable medium that is transient and without any permanent trace during transmission, and / or signals in any suitable intangible medium.
[0111] Although the invention has been described and illustrated in the foregoing illustrative embodiments, it is understood that this disclosure is merely illustrative and that numerous changes can be made to the implementation details of the invention without departing from the spirit and scope of the invention, the scope of which is defined only by the following claims. The features of the disclosed embodiments can be combined and rearranged in various ways.
Claims
1. A system for optimizing the performance of a solid-state drive (SSD), comprising: Memory; as well as At least one hardware processor coupled to the memory, and collectively configured to at least: Determine the current workload type of the SSD; Select the SSD parameters to be optimized based on the current workload type; Set the current value of the SSD parameter; The performance of the SSD is tested using the current values of the SSD parameters; Change one or more of the current values of the SSD parameters; The performance of the SSD was retested after the current value was changed; as well as Set the current value of the SSD parameter to the determined optimal value of the SSD parameter.
2. The system as claimed in claim 1, wherein, Setting the current value of the SSD parameter includes setting the current value to a random value or a pseudo-random value.
3. The system as described in claim 1, wherein, Testing the SSD's performance using the current values of the SSD parameters is performed using a test workload.
4. The system as claimed in claim 1, wherein, Changing one or more of the current values of the SSD parameters is based on the output of the reinforcement learning agent.
5. The system as described in claim 4, wherein, The output of the reinforcement learning agent is based on a reward function, which is based on measurements of the input-output operations performed by the SSD during the test and measurements of the average power, burst power, and peak power used by the SSD during the test.
6. The system of claim 1, wherein, Changing one or more of the current values of the SSD parameters includes incrementing or decrementing the current value.
7. The system as claimed in claim 1, wherein, Changing one or more of the current values of the SSD parameters includes changing the current value to a random value or a pseudo-random value.
8. A method for optimizing the performance of a solid-state drive (SSD), comprising: Use the hardware processor to determine the current workload type of the SSD; Select the SSD parameters to be optimized based on the current workload type; Set the current value of the SSD parameter; The performance of the SSD is tested using the current values of the SSD parameters; Change one or more of the current values of the SSD parameters; The performance of the SSD was retested after the current value was changed; as well as Set the current value of the SSD parameter to the determined optimal value of the SSD parameter.
9. The method of claim 8, wherein, Setting the current value of the SSD parameter includes setting the current value to a random value or a pseudo-random value.
10. The method of claim 8, wherein, Testing the SSD's performance using the current values of the SSD parameters is performed using a test workload.
11. The method of claim 8, wherein, Changing one or more of the current values of the SSD parameters is based on the output of the reinforcement learning agent.
12. The method of claim 11, wherein, The output of the reinforcement learning agent is based on a reward function, which is based on measurements of the input-output operations performed by the SSD during the test and measurements of the average power, burst power, and peak power used by the SSD during the test.
13. The method of claim 8, wherein, Changing one or more of the current values of the SSD parameters includes incrementing or decrementing the current value.
14. The method of claim 8, wherein, Changing one or more of the current values of the SSD parameters includes changing the current value to a random value or a pseudo-random value.
15. A non-transitory computer-readable medium comprising computer-executable instructions, which, when executed by a processor, cause the processor to perform a method for optimizing the performance of a solid-state drive (SSD), the method comprising: Determine the current workload type of the SSD; Select the SSD parameters to be optimized based on the current workload type; Set the current value of the SSD parameter; The performance of the SSD is tested using the current values of the SSD parameters; Change one or more of the current values of the SSD parameters; The performance of the SSD was retested after the current value was changed; as well as Set the current value of the SSD parameter to the determined optimal value of the SSD parameter.
16. The non-transitory computer-readable medium of claim 15, wherein, Setting the current value of the SSD parameter includes setting the current value to a random value or a pseudo-random value.
17. The non-transitory computer-readable medium of claim 15, wherein, Testing the SSD's performance using the current values of the SSD parameters is performed using a test workload.
18. The non-transitory computer-readable medium of claim 15, wherein, Changing one or more of the current values of the SSD parameters is based on the output of the reinforcement learning agent.
19. The non-transitory computer-readable medium of claim 18, wherein, The output of the reinforcement learning agent is based on a reward function, which is based on measurements of the input-output operations performed by the SSD during the test and measurements of the average power, burst power, and peak power used by the SSD during the test.
20. The non-transitory computer-readable medium of claim 15, wherein, Changing one or more of the current values of the SSD parameters includes incrementing or decrementing the current value.