Methods, apparatus, systems and chips for adjusting migration bandwidth of storage media

By monitoring the latency variation patterns of application access to storage media and dynamically adjusting the migration bandwidth, the problem of fixed migration bandwidth affecting access efficiency is solved, achieving more efficient data migration and access.

CN117666936BActive Publication Date: 2025-10-31HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211066383.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-31
Publication Date
2025-10-31
Estimated Expiration
2042-08-31

AI Technical Summary

Technical Problem

In the prior art, during the data migration process of electronic devices, the fixed migration bandwidth affects the access efficiency of the storage medium, resulting in a decrease in the access efficiency of the application.

Method used

By monitoring the latency changes of applications accessing storage media, migration bandwidth is dynamically adjusted to adapt to the access needs of applications and optimize the data migration process.

Benefits of technology

It improves the efficiency of applications accessing storage media, reduces the impact of migration bandwidth on access latency, and ensures that applications run stably within the maximum allowable access latency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117666936B_ABST
    Figure CN117666936B_ABST
Patent Text Reader

Abstract

A method, apparatus, system, and chip for adjusting the migration bandwidth of a storage medium are disclosed, relating to the field of storage technology. The method acquires the access latency of an application accessing the storage medium, then obtains latency change information based on the acquired access latency, and adjusts the migration bandwidth of the storage medium according to the latency change pattern indicated by the latency change information. This allows the storage medium to migrate data using the adjusted migration bandwidth, reducing the impact of a fixed migration bandwidth on the bandwidth used by the application to access the storage medium, thereby improving the efficiency of the application accessing the storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of storage technology, and in particular to a method, apparatus, system, and chip for adjusting the migration bandwidth of a storage medium. Background Technology

[0002] With the rapid development of computer hardware and software technology, higher requirements have been placed on large-scale memory computing. The hybrid memory architecture of dynamic random access memory (DRAM) / non-volatile memory (NVM) can achieve the requirements of high-performance memory access and low power consumption of computer systems.

[0003] Currently, electronic devices use data migration to store data in DRAM with access frequencies greater than a frequency threshold (i.e., cold data) in NVM, and data in NVM with access frequencies greater than or equal to the frequency threshold (i.e., hot data) in DRAM, so that subsequent electronic devices can access the hot data in DRAM.

[0004] However, for any storage medium in DRAM or NVM, electronic devices use a fixed migration bandwidth to migrate data to that medium, and applications also access the storage medium during this migration process. Since the bandwidth provided by the storage medium is limited, the fixed migration bandwidth affects the bandwidth used by applications to access the storage medium, thus impacting the efficiency of application access. Therefore, a method to adjust the migration bandwidth of the storage medium is urgently needed. Summary of the Invention

[0005] This application provides a method, apparatus, system, and chip for adjusting the migration bandwidth of a storage medium, which improves the efficiency of applications accessing the storage medium by adjusting the migration bandwidth of the storage medium.

[0006] Firstly, a method for adjusting the migration bandwidth of a storage medium is provided. This method is applied to a hybrid memory system and includes the following steps: firstly, obtaining the access latency of an application accessing a first storage medium in the hybrid memory system; then, determining the latency change information of the first storage medium based on the obtained access latency; and finally, adjusting the migration bandwidth of the first storage medium according to the change pattern of the application access latency of the first storage medium indicated by the latency change information. Here, the first storage medium is a type of storage medium in the hybrid memory system, the application access latency is the time occupied when the first storage medium is accessed by the application, and the migration bandwidth indicates the bandwidth used when migrating data to the first storage medium.

[0007] This method obtains the access latency of the application accessing the storage medium, then obtains latency change information based on the obtained access latency, and then adjusts the migration bandwidth of the storage medium according to the change pattern of the application access latency of the storage medium indicated by the latency change information. This allows the storage medium to perform data migration through the adjusted migration bandwidth, thereby reducing the impact of the fixed migration bandwidth on the bandwidth used by the application to access the storage medium and improving the efficiency of the application accessing the storage medium.

[0008] In one possible implementation, the application corresponds to at least one first latency threshold, which is less than the maximum access latency allowed by the application, and the first latency threshold corresponds to a first bandwidth adjustment parameter. Based on this, the process of adjusting the migration bandwidth of the first storage medium according to the change pattern can be as follows: if the change pattern is that the application access latency increases, and the obtained access latency is greater than or equal to the first latency threshold, the migration bandwidth of the first storage medium is reduced according to the first bandwidth adjustment parameter corresponding to the first latency threshold.

[0009] Based on the above possible implementations, when data migration and application access to the first storage medium occur simultaneously, the increase in application access latency may be caused by the migration bandwidth. Therefore, if the change pattern is an increase in application access latency, the migration bandwidth of the first storage medium should be reduced. Correspondingly, the access bandwidth of the application to the first storage medium should be increased to reduce the impact of migration bandwidth on the application access latency, thereby reducing the application access latency and improving the efficiency of the application accessing the first storage medium.

[0010] In another possible implementation, the application corresponds to at least one second latency threshold, which is less than the maximum access latency allowed by the application, and the second latency threshold corresponds to a second bandwidth adjustment parameter. Based on this, the process of adjusting the migration bandwidth of the first storage medium according to the change pattern can be as follows: if the change pattern is that the application access latency decreases, and the obtained access latency is less than or equal to the second latency threshold, the migration bandwidth of the first storage medium is increased according to the second bandwidth adjustment parameter corresponding to the second latency threshold.

[0011] Based on the above possible implementation methods, when data migration and application access to the first storage medium are carried out simultaneously, the application access latency decreases, indicating that the application access latency is decreasing. Therefore, if this change indicates that the application access latency is decreasing, the migration bandwidth of the first storage medium is increased, thereby improving the efficiency of data migration of the first storage medium while ensuring that the application accesses the first storage medium with low access latency.

[0012] In another possible implementation, if the first storage medium supports access from multiple applications, for any one of the first or second latency thresholds, the latency threshold is less than the minimum latency among the maximum access latency allowed by the multiple applications; or, if there is a target application providing the target service among the multiple applications, any latency threshold is less than the maximum access latency allowed by the target application.

[0013] Based on the above possible implementations, if any latency threshold is less than the minimum latency among the maximum allowable access latencies of the multiple applications, the migration bandwidth of the first storage medium is adjusted according to that latency. This prevents the application access latency of the first storage medium from reaching the minimum latency, thus satisfying the access latency requirements of the multiple applications and preventing application crashes. If any latency threshold is less than the maximum allowable access latency of the target application, the migration bandwidth of the first storage medium is adjusted according to that latency, ensuring that the application access latency of the first storage medium meets the requirements of the target service.

[0014] In another possible implementation, before obtaining the access latency of the application accessing the first storage medium, the method further includes the following step: if the application meets the migration bandwidth adjustment conditions, perform the step of obtaining the access latency of the application accessing the first storage medium.

[0015] Based on the above possible implementation methods, the access latency of the application will only be obtained when the application meets the migration bandwidth adjustment conditions. Then, the migration bandwidth of the first storage medium will be adjusted based on the application's access latency, which reduces the workload and the consumption of computing resources.

[0016] In another possible implementation, the application satisfies the migration bandwidth adjustment conditions by at least one of the following: receiving a migration bandwidth adjustment request from the terminal, the migration bandwidth adjustment request instructing the application to adjust the migration bandwidth according to the application's access latency; the application provides a target service; the migration process of the first storage medium accessed by the application has been running, the migration process being used to migrate data on the first storage medium; the application provides a target service; the migration process of the first storage medium accessed by the application has been running, the migration process being used to migrate data on the first storage medium.

[0017] Based on the above possible implementation methods, the application's access latency is only obtained when the application meets the migration bandwidth adjustment conditions, including receiving a migration bandwidth adjustment request from the terminal or the application providing a target service. Then, the migration bandwidth of the first storage medium is adjusted based on the application's access latency to reduce its impact on the application's access latency, thereby improving the application's efficiency in accessing the first storage medium. This ensures that the terminal or target service's access latency requirements for the application are met. Since the migration process may be a migration read process or a migration write process, unified management of the migration read bandwidth and migration write bandwidth of the first storage medium is achieved when the application meets the migration bandwidth adjustment conditions, including the migration process of the application accessing the first storage medium is already running. The management method is simple and does not require separate management mechanisms for the migration read bandwidth and migration write bandwidth of the first storage medium, avoiding asymmetrical management of the migration read bandwidth and migration write bandwidth of the same storage medium.

[0018] In another possible implementation, the access latency includes at least one of read latency and write latency, where read latency is the latency for the application to read data from the first storage medium and write latency is the latency for the application to write data to the first storage medium.

[0019] In another possible implementation, the process of obtaining the access latency of the application to the first storage medium can be as follows: if the ratio of the application's read to the first storage medium is greater than or equal to the target ratio, obtain the application's read latency; if the ratio of the application's write to the first storage medium is greater than or equal to the target ratio, obtain the application's write latency.

[0020] Based on the above possible implementation methods, depending on the application's read / write ratio to the first storage medium, the system can choose to obtain either the application's read latency or write latency, thus eliminating the need to obtain both the application's write latency and read latency, thereby reducing workload.

[0021] In another possible implementation, the migration bandwidth is either the migration read bandwidth or the migration write bandwidth. The migration read bandwidth is the bandwidth used when reading data from the first storage medium during the data migration process, and the migration write bandwidth is the bandwidth used when writing data from the second storage medium to the first storage medium during the data migration process.

[0022] In another possible implementation, if the first storage medium and the second storage medium are located on the same computing device, the first storage medium and the second storage medium are of different types; if the first storage medium and the second storage medium are located on different computing devices, the first storage medium and the second storage medium are of different types or the same type.

[0023] In a second aspect, a migration bandwidth adjustment apparatus for a storage medium is provided, the apparatus comprising modules for performing the migration bandwidth adjustment method in the first aspect or any possible implementation thereof.

[0024] Thirdly, a hybrid memory system is provided, the hybrid memory system including a controller for executing the migration bandwidth adjustment method in the first aspect or any possible implementation of the first aspect.

[0025] Fourthly, a chip is provided for use in a hybrid memory system, the chip being used to perform the migration bandwidth adjustment method in the first aspect or any possible implementation thereof.

[0026] Fifthly, a computer-readable storage medium is provided, wherein at least one piece of program code is stored therein, the program code being read by a controller of a hybrid memory system to cause a computing device in which the controller resides to perform operations as performed by the migration bandwidth adjustment method of the storage medium described above.

[0027] In a sixth aspect, a computer program product or computer program is provided, the computer program product or computer program including program code stored in a computer-readable storage medium, a controller of a hybrid memory system reading the program code from the computer-readable storage medium, the controller executing the program code, causing the computing device in which the controller is located to perform the method provided in the first aspect or various possible implementations of the first aspect.

[0028] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods. Attached Figure Description

[0029] Figure 1 This is a schematic diagram of the system architecture of a hybrid memory system 100 provided in this application;

[0030] Figure 2 This is a schematic diagram of a computing device 200 using a hybrid memory system 100 provided in this application;

[0031] Figure 3 This is a schematic diagram of a computing device cluster 300 using a hybrid memory system 100 provided in this application;

[0032] Figure 4 This is a flowchart of a method for adjusting the migration bandwidth of a storage medium provided in this application;

[0033] Figure 5 This is a flowchart of a migration bandwidth adjustment method based on migration bandwidth adjustment conditions provided in this application;

[0034] Figure 6 This is a flowchart of a migration bandwidth adjustment method based on the average access latency of an application, provided in this application;

[0035] Figure 7 This is a schematic diagram of the migration bandwidth adjustment process provided in this application for a hybrid memory system;

[0036] Figure 8 This is a schematic diagram of the structure of a migration bandwidth adjustment device 800 for a storage medium provided in this application;

[0037] Figure 9 This is a schematic diagram of the structure of a chip 900 provided in this application. Detailed Implementation

[0038] To adjust the migration bandwidth of a storage medium, this application provides a migration bandwidth adjustment method. This method adjusts the migration bandwidth of the storage medium based on the variation pattern of application access latency in a hybrid memory system. The embodiments of this application will be further described in detail below with reference to the accompanying drawings.

[0039] Figure 1 This is a schematic diagram of the system architecture of a hybrid memory system 100 provided in this application. See [link / reference]. Figure 1 The hybrid memory system 100 includes at least one processor (central processing unit, CPU) 11 and at least two storage media 12. Figure 1 The hybrid memory system 100 is illustrated by including two storage media 12: DRAM and NVM. NVM can be, for example, phase-change memory (PCM) or magnetic random access memory (MRAM). In other embodiments, the hybrid memory system 100 may also include other types of storage media besides NVM or DRAM, such as double-data-rate synchronous dynamic random access memory (DDR), static random-access memory (SRAM), and high-bandwidth memory (HBM). Here, this application embodiment does not limit the number of CPUs 11, the number of storage media 12, or their types in the hybrid memory system 100.

[0040] Storage medium 12 provides storage space for storing data. Storage medium 12 may be the memory of CPU 11 or the external storage of CPU 11 (such as a local disk).

[0041] Storage medium 12 supports access by CPU 11 in hybrid memory system 100. For example, while a CPU 11 is running an application, the CPU 11 accesses storage space in any storage medium 12 (i.e., the application accesses the storage medium) to read data from or write data to the storage space, depending on the application being run.

[0042] The hybrid memory system 100 also includes a controller 13, which is used to access data in the storage medium 12 and realize data migration function through data interaction between any two storage media 12. Here, data exchange means that data in one storage medium 12 can be stored in another storage medium 12, and data in another storage medium 12 can also be stored in this storage medium 12.

[0043] Additionally, the controller 13 is also configured to adjust the migration bandwidth of the storage medium 12, which indicates the bandwidth used when migrating data to the storage medium 12 accessed by the application. For example, for any storage medium 12, the controller 13 adjusts the migration bandwidth of the storage medium 12 accessed by the application based on the access latency of the application accessing the storage medium 12.

[0044] like Figure 1 As shown, the controller 13 includes a monitor 131, an adapter 132, and a migration engine 133. The monitor 131 monitors the access latency of the application 121 accessing the storage medium 12. For example, a CPU 11 sends an access request to a storage medium 12 based on the running application to access its storage space. The storage medium 12 then returns an access response to the CPU 11 based on the received access request. The monitor 131 obtains the access latency of the application's current access to the storage medium 12 based on the time when the CPU 11 sends the access request and the time when it receives the access response.

[0045] In this context, the access request sent by CPU11 is also called a host request, and the access response received by CPU11 is also called a host response. The access request can be a data read request or a data write request, and the access response can be a data read response or a data write response. When the access request is a data read request, the access response is a data read response; when the access request is a data write request, the access response is a data write response. A data read request indicates that data is read from the storage medium, and a data read response indicates whether the data write to the storage medium was successful. A data write request indicates that data is written to the storage medium, and a data write response indicates whether the data write to the storage medium was successful.

[0046] The adapter 132 is used to obtain the access latency or average access latency of the application from the monitor 131, and adjust the migration bandwidth of the storage medium 12 accessed by the application based on the obtained access latency or average access latency.

[0047] The migration engine 133 is used to migrate data on the storage medium 12 according to the adjusted migration bandwidth during the data migration process. The migration engine 133's process of migrating data from one storage medium 12 (referred to as the source storage medium) to another storage medium 12 (referred to as the destination storage medium) includes a migration read process and a migration write process. During the migration read process, the migration engine 133 sends a migration read request to the source storage medium, indicating that the data to be migrated should be read from the source storage medium. Then, the source storage medium returns a migration read response to the migration engine 133 according to the migration read request, carrying the data to be migrated read from the source storage medium. Upon receiving the migration read response, the migration engine 133 enters the migration write process, sending a migration write request to the destination storage medium according to the migration read response, indicating that the data to be migrated should be written to the destination storage medium. Subsequently, the destination storage medium writes the data to be migrated carried by the migration write request to the destination storage medium and returns a migration write response to the migration engine 133. The migration write response indicates whether the writing of the data to be migrated to the destination storage medium was successful, or indicates whether the data migration is complete. For ease of description, in this application, both the migration read request and the migration write request are referred to as migration requests, the migration read response is the migration response of the migration read request, and the migration write response is the migration response of the migration write request.

[0048] It should be understood that migration read requests and migration write requests are subdivisions of the data migration process. In practice, the system can also use a single migration request to trigger the aforementioned migration read requests and migration write requests respectively.

[0049] Additionally, the monitor 131 and migration engine 133 are optional components of the controller 13. In other embodiments, the monitor 131 and migration engine 133 are not located in the controller 13, but are located outside the controller 13. For example, the monitor 131 and migration engine 133 may be located within the hybrid memory system 100 and independent of the controller 13, or may be located outside the hybrid memory system 100.

[0050] The hybrid memory system 100 also includes a scheduler 14, which schedules access requests from the CPU 11 and migration requests from the migration engine 133. A migration request indicates the migration of data from one storage medium 12 to another. For example, if both the CPU 11's access request and the migration engine 133's migration request are sent to the scheduler 13, and the data to be migrated indicated by the migration request is located in the storage space accessed by the access request, the scheduler 14 schedules the received access and migration requests according to a first-in, first-out (FIFO) principle. Taking the example where the scheduler 14 receives the access request first and then the migration request, the scheduler 14 first sends the access request to the storage medium 12, then sends the access response returned by the storage medium 12 to the CPU 11, then sends the migration request to the storage medium 12 again, and finally receives the migration response returned by the storage medium 12 based on the migration request, and then sends the migration response to the migration engine 133.

[0051] At least one CPU 11 and scheduler 14 are optional components in the hybrid memory system 100. In some embodiments, at least one CPU 11 and scheduler 14 are not part of the hybrid memory system 100, but are part of the device in which the hybrid memory system 100 is located and are independent of the hybrid memory system 100.

[0052] Hybrid memory systems 100 may be deployed on a single computing device or in a cluster of computing devices. The following sections will discuss these options in conjunction with... Figure 2 and Figure 3 This paper provides a detailed introduction to these two deployment methods of the hybrid memory system 100.

[0053] Figure 2 This is a schematic diagram of a computing device 200 using a hybrid memory system 100 provided in this application. See also... Figure 2 The computing device 200 includes a hybrid memory system 100, wherein the computing device 200 is a server or a terminal device, wherein the server is, for example, a cloud server, a central server, an edge server, a remote server in a remote data center, or a local server in a local data center. The terminal device is, for example, a desktop computer, a laptop computer, or a smartphone.

[0054] When the hybrid memory system 100 is deployed on the computing device 200, at least two storage media 12 in the hybrid memory system 100 belong to different types. It is understood that the hybrid memory system 100 includes at least two types of storage media 12, both of which are local storage nodes for the CPU 11 in the hybrid memory system 100. The performance of different types of storage media 12 may differ; data migration between different types of storage media ensures efficient CPU access to local storage nodes.

[0055] Understandable, Figure 1 and Figure 2 The difference is that, Figure 1 This illustrates the system architecture of a hybrid memory system, while Figure 2 for Figure 1 This illustrates one application scenario of the system architecture. Additionally, Figure 1 The storage media 12 in the hybrid memory system shown may be of the same type, while Figure 2 The hybrid memory systems shown in the application scenarios have different types of storage media.

[0056] Figure 3 This is a schematic diagram of a computing device cluster 300 using a hybrid memory system 100, as provided in this application. See [link / reference]. Figure 3 The computing device cluster 300 includes multiple computing devices 301 and at least one hybrid memory system 100 (such as...). Figure 3 In the cluster of computing devices 300 (100a, 100b, and 100c), multiple computing devices 301 are connected wirelessly or via wired means. This cluster of computing devices 300 is a data center or a cloud computing center for providing cloud services. The computing devices 301 are servers, such as cloud servers, central servers, edge servers, remote servers in remote data centers, or local servers in local data centers.

[0057] In the computing device cluster 300, the storage medium 12 in the same hybrid memory system 100 may be located in different computing devices 301 or in the same storage medium. The CPU 11 in the same hybrid memory system 100 may be located in the same computing device 301 or in different computing devices 301. The CPU 11 and the storage medium 12 in the same hybrid memory system 100 may also be located in different computing devices 301.

[0058] by Figure 3 Taking the hybrid memory system 100a as an example, the storage medium 12 and CPU 11 in the hybrid memory system 100a are located in two computing devices 301 respectively. Let's take... Figure 3Taking the hybrid memory system 100b as an example, the storage medium 12 in the hybrid memory system 100b is located in two computing devices 301, and the CPU 11 in the hybrid memory system 100b is also located in these two computing devices 301 respectively. Let's take... Figure 3 Taking the hybrid memory system 100c as an example, the storage medium 12 in the hybrid memory system 100c is located in two computing devices 301, and the CPU 11 in the hybrid memory system 100c is located in another computing device 301.

[0059] In the hybrid memory system 100, the storage medium 12 located in the same computing device 301 as the CPU 11 serves as the local storage node for the CPU 11. The storage medium 12 located in a different computing device 301 from the CPU 11 serves as the remote storage node for the CPU 11. Migrating data from the remote storage node to the local storage node facilitates data access by the CPU from the local storage node, thus improving the CPU's data access efficiency.

[0060] In the computing device cluster 300, there is at least one storage medium 12 in the same computing device 301. If the storage medium 12 in the hybrid memory system 100 is located in different computing devices 301, the at least two storage media 12 in the hybrid memory system 100 may be different types of storage media or the same type of storage media.

[0061] In other embodiments, the computing device 301 may also be connected to... Figure 2 Similarly, computing device 200 has a hybrid memory system 100 deployed within computing device 301.

[0062] Understandable, Figure 1 and Figure 3 The difference is that, Figure 1 The diagram shows the system architecture of the hybrid memory system 100. Figure 3 for Figure 1 Another application scenario of the system architecture shown. Figure 2 and Figure 3 The difference is that, Figure 2 The hybrid memory system 100 shown is located within the same computing device, while Figure 3 The hybrid memory system 100 shown is cross-device. Additionally, Figure 2 The hybrid memory system shown has 12 different types of storage media, and Figure 3 The storage media 12 in different computing devices in the hybrid memory system shown may be of the same type.

[0063] for Figures 1 to 3The hybrid memory system described herein may have any storage medium in it as the memory of the computing device in which the storage medium resides.

[0064] For the controller 13 of the hybrid memory system 100, Figure 2 and Figure 3 The examples all illustrate the controller 13 as a component within a computing device. When the controller 13 is a component within a computing device, it may be mounted on the CPU 11 in the hybrid memory system 100 to serve as a control component of the hybrid memory system 100. Alternatively, the controller 13 may also be mounted on the storage medium 12 in the hybrid memory system 100 to serve as a memory controller for the storage medium 12. Here, the embodiments of this application do not limit the mounting method of the controller 13 within the computing device.

[0065] Figures 1 to 3 The examples all illustrate controller 13 located within hybrid memory system 100. In some embodiments, controller 13 is independent of hybrid memory system 100. Here, this application does not limit whether controller 13 belongs to hybrid memory system 100; controller 13 only needs to be able to adjust the migration bandwidth of storage medium 12 in hybrid memory system 100.

[0066] Combination Figure 1 The controller 13 is implemented through software, hardware, or a combination of both. The monitor 131, adapter 132, and migration engine 133 can all be implemented through software or hardware. For example, the implementation of adapter 132 will be described below. Similarly, the implementation of monitor 131 and migration engine 133 can be referenced from the implementation of adapter 132.

[0067] Adapter 132, as an example of a software functional unit, includes code running on a compute instance. The compute instance includes at least one of a physical host (compute device), a virtual machine, and a container. Further, the compute instance can be one or more. For example, adapter 132 includes code running on multiple hosts / virtual machines / containers. Additionally, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Further, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one or more geographically proximate data centers. Typically, a region can include multiple AZs.

[0068] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.

[0069] As an example of a hardware functional unit, adapter 132 may include at least one computing device, such as a server. Alternatively, adapter 132 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be implemented using a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof.

[0070] The multiple computing devices included in adapter 132 can be distributed in the same region or in different regions. Similarly, the multiple computing devices included in adapter 132 can be distributed in the same Availability Zone (AZ) or in different AZs. Likewise, the multiple computing devices included in adapter 132 can be distributed in the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0071] Next, we will further explain the process by which the controller in a hybrid memory system adjusts the migration bandwidth of the storage medium based on the application's access latency. See [link to documentation]. Figure 4 This application provides a flowchart of a method for adjusting the migration bandwidth of a storage medium. This method is applied to a hybrid memory system and is executed by the controller of the hybrid memory system.

[0072] Step 401: The controller obtains the access latency of the application accessing the first storage medium, which is a type of storage medium in the hybrid memory system.

[0073] Among them, the hybrid memory system is Figures 1 to 3The application is any hybrid memory system described herein. The application is any application running on any processor in a computing device. Taking the hybrid memory system deployed on the computing device as an example, the first storage medium is any type of storage medium within the hybrid memory system deployed on the computing device. Storage space in the first storage medium has been allocated to the application; therefore, the application has permission to access the first storage medium, and the application is able to access the first storage medium.

[0074] The access latency of an application accessing the first storage medium is simply referred to as the application access latency, which is the time occupied by the application to complete a single access to the first storage medium. The application accesses the first storage medium in two ways: method A1 and method A2. Method A1 involves the application reading data from the first storage medium, and method A2 involves the application writing data to the first storage medium. Accordingly, the access latency is either read latency or write latency. The read latency is the latency of the application reading data from the first storage medium, and the write latency is the latency of the application writing data to the first storage medium.

[0075] In this embodiment of the application, the access latency of the application is a parameter used by the controller to adjust the migration bandwidth of the first storage medium. Therefore, before the controller adjusts the migration bandwidth of the first storage medium, the access latency of the application is obtained first. The access latency obtained includes at least one of read latency and write latency.

[0076] With the default read latency set as the parameter used to adjust the migration bandwidth, the controller obtains the read latency of the application accessing the first storage medium. With the default write latency set as the parameter used to adjust the migration bandwidth, the controller obtains the write latency of the application accessing the first storage medium. With both read latency and write latency set as the parameters used to adjust the migration bandwidth, the controller obtains the read latency and write latency of the application accessing the first storage medium.

[0077] In another possible implementation, the parameter used by the controller to adjust the migration bandwidth—whether it's read latency or write latency—is determined by the application's read-to-write ratio and write-to-read ratio on the first storage medium. The read-to-write ratio is the ratio of the number of times the application reads data from the first storage medium to the number of times it writes data to the first storage medium during application execution. The write-to-read ratio is the reciprocal of the read-to-write ratio.

[0078] For example, if the read-to-write ratio of the application to the first storage medium is greater than or equal to the target ratio, the controller obtains the write latency of the application accessing the first storage medium; if the read-to-write ratio of the application to the first storage medium is greater than or equal to the target ratio, the controller obtains the write latency of the application accessing the first storage medium. The target ratio can be set according to the actual application scenario, for example, a target ratio of 7:3. In this embodiment, the value range of the target ratio is not limited.

[0079] The controller selects to obtain either the read latency or write latency of the application based on the read / write ratio of the application to the first storage medium, eliminating the need for the controller to obtain both read and write latency, thus reducing its workload. Furthermore, if the read / write ratio of the application to the first storage medium is greater than or equal to a target ratio, it indicates that the application frequently reads data from the first storage medium. The application's read latency accurately reflects the latency of the application's access to the first storage medium, and accordingly, the controller can accurately adjust the migration bandwidth of the first storage medium based on the application's read latency. Conversely, if the write / read ratio of the application to the first storage medium is greater than or equal to a target ratio, it indicates that the application frequently writes data to the first storage medium. The application's write latency accurately reflects the latency of the application's access to the first storage medium, and accordingly, the controller can accurately adjust the migration bandwidth of the first storage medium based on the application's write latency.

[0080] As can be seen from the above introduction, the read latency and write latency of the application are both the access latency of the application to the first storage medium. The controller obtains the access latency of the application to the first storage medium through either method B1 or method B2.

[0081] Method B1: The controller monitors the access latency of the application accessing the first storage medium and obtains the monitoring results, which include at least one access latency of the application.

[0082] For example, while running the application, the processor sends an access request to a first storage medium. This access request includes a first timestamp indicating the time the access request was sent. Subsequently, the first storage medium receives the access request and returns an access response to the processor based on it. The processor then receives the access response and uses a second timestamp to indicate the time the response was received. The controller obtains the first and second timestamps from the processor and uses the difference between the two timestamps as an access latency. The controller continuously monitors the access latency of the application's access to the first storage medium, thereby enabling the detection of multiple access latencies.

[0083] The process by which the first storage medium returns an access response to the processor based on the access request is described below:

[0084] If the access request is a data read request, the first storage medium queries the storage space to be read within itself based on the physical address of the storage space to be read carried in the data read request. Based on the first data in the queried storage space, it generates a data read response and sends it to the processor. The data read response includes the first data, which is the data requested in the data read request. The access latency monitored by the controller based on the data read request is the read latency.

[0085] If the access request is a data write request, the data write request includes second data, which is the data to be written. According to the data write request, the first storage medium queries the storage space to be written in the first storage medium, writes the second data to the queried storage space, and then sends the data write response to the processor. Based on the data write request, the access latency monitored by the controller is the write latency.

[0086] In one possible implementation, the controller includes a monitor, which is a functional module within the controller used to monitor application access latency. Mode B1 is executed by the monitor within the controller. Figure 1 Taking controller 13 as an example, mode B1 is executed by monitor 131. Each component in the controller can be implemented in software or hardware, allowing the controller to be implemented in software, hardware, or a combination of both. For example, the monitor in the controller can be implemented in software or hardware; the implementation method of the monitor can be referenced to the implementation method of adapter 132 described earlier.

[0087] Additionally, the monitor is an optional functional module in the controller. In some embodiments, the controller does not include a monitor. In this case, the controller does not have the function of monitoring the access latency of the application. The controller can obtain the access latency of the application in the following manner B2.

[0088] Method B2: The monitoring unit monitors the access latency of the application to the first storage medium, and the controller obtains the monitoring results from the monitoring unit.

[0089] The monitoring unit is a functional module outside the controller used to monitor the access latency of the application. The monitoring unit may be implemented in software or hardware; the implementation method of the monitoring unit can be referred to the implementation method of adapter 132 described above. Furthermore, the process by which the monitoring unit monitors the access latency of the application accessing the first storage medium can be referred to in method B1.

[0090] After obtaining the application's access latency, the controller adjusts the migration bandwidth of the first storage medium based on the application's access latency. For example, steps 402 and 403 are described below.

[0091] Step 402: The controller determines the latency change information based on the acquired access latency. The latency change information indicates the change pattern of the application access latency of the first storage medium. The application access latency is the time occupied when the first storage medium is accessed by the application.

[0092] The change pattern includes an increase or decrease in application access latency. Accordingly, in some embodiments, the latency change information includes a first pattern identifier or a second pattern identifier, wherein the first pattern identifier indicates an increase in application access latency, and the second pattern identifier indicates a decrease in application access latency. The representation of the first pattern identifier and the second pattern identifier is different; for example, the first pattern identifier is 1 and the second pattern identifier is 0, or the first pattern identifier is 0 and the second pattern identifier is 1. Here, the embodiments of this application do not limit the representation of the first pattern identifier and the second pattern identifier.

[0093] In one possible implementation, the controller acquires a monitoring result after each target duration. For ease of description, the monitoring result acquired at the current target duration is referred to as the first monitoring result, and the monitoring result acquired at the previous target duration is referred to as the second monitoring result. After each target duration, the controller determines the delay change information based on the first monitoring result at the current target duration and the second monitoring result at the previous target duration.

[0094] For example, the controller combines the access latency from the first monitoring result and the second monitoring result into an access latency sequence. If the access latency values ​​in the access latency sequence increase sequentially, it indicates that the application's access latency is increasing, and the controller generates latency change information including the first pattern identifier. If the access latency values ​​in the access latency sequence decrease sequentially, it indicates that the application's latency is decreasing, and the application generates latency change information including the second pattern identifier.

[0095] Step 403: The controller adjusts the migration bandwidth of the first storage medium according to the change pattern. The migration bandwidth indicates the bandwidth used when migrating data to the first storage medium.

[0096] The migration bandwidth refers to either the migration read bandwidth or the migration write bandwidth. The migration read bandwidth is the bandwidth used when reading data from the first storage medium during the data migration process, and the migration write bandwidth is the bandwidth used when writing data from the second storage medium to the first storage medium during the data migration process. The second storage medium can be any storage medium in the hybrid memory system other than the first storage medium. Taking a hybrid memory system deployed on a computing device as an example, the second storage medium and the first storage medium may be of different types.

[0097] The migration process of the first storage medium is used to migrate data between the first storage medium and the second storage medium. The migration process includes a migration read process or a migration write process. The migration read process is used to implement the migration read operation during the data migration process; for example, the migration read process generates a migration read request to read the data to be migrated from the first storage medium. The migration read write process is used to implement the migration write operation during the data migration process; for example, the migration write process generates a migration write request to write the data to be migrated read from the first storage medium to the second storage medium.

[0098] If the migration read process of the first storage medium is already running, the controller adjusts the migration read bandwidth of the first storage medium based on this change pattern. If the migration write process of the first storage medium is already running, the controller adjusts the migration write bandwidth of the first storage medium based on this change pattern. Thus, the controller can adjust both the migration read and migration write bandwidths of the first storage medium according to the access latency of the application, achieving unified management of the migration read and migration write bandwidths of the first storage medium. The management method is simple and does not require designing separate management mechanisms for the migration read and migration write bandwidths of the first storage medium, avoiding asymmetrical management of the migration read and migration write bandwidths of the same storage medium.

[0099] For either the migration read bandwidth or the migration write bandwidth, the process by which the controller adjusts the migration read bandwidth of the first storage medium based on this changing pattern, combining methods C1 and C2, is described below:

[0100] Method C1: If the change pattern indicates an increasing latency for the application access, then the controller reduces the migration bandwidth.

[0101] When data migration and application access to the first storage medium occur simultaneously, the increase in application access latency may be caused by the migration bandwidth. Therefore, if the change pattern is an increase in application access latency, the controller reduces the migration bandwidth. Correspondingly, the access bandwidth of the application to the first storage medium increases to reduce the impact of migration bandwidth on application access latency, thereby reducing application access latency and improving the efficiency of application access to the first storage medium.

[0102] In one possible implementation, the controller reduces the migration bandwidth based on the maximum allowable access latency of the application. Here, the maximum allowable access latency refers to the maximum access latency the application is permitted to experience when accessing the storage medium.

[0103] For example, the application corresponds to at least one first latency threshold, which is less than the maximum allowed access latency for the application, and this first latency threshold corresponds to a first bandwidth adjustment parameter. If the change pattern is an increasing access latency for the application, and the obtained access latency is greater than or equal to the first latency threshold, the controller reduces the migration bandwidth according to the first bandwidth adjustment parameter corresponding to the first latency threshold. The access latency obtained here may be the most recently obtained access latency, for example, the last access latency in the access latency sequence.

[0104] When an application corresponds to multiple first latency thresholds, these multiple first latency thresholds may correspond to the same first bandwidth adjustment parameter, or they may correspond to different first bandwidth adjustment parameters. When multiple first latency thresholds correspond to different first bandwidth adjustment parameters, there are multiple different first bandwidth adjustment parameters, and each first latency threshold corresponds to one of these multiple first bandwidth adjustment parameters. For example, following the ascending order of the multiple first latency thresholds, the first bandwidth adjustment parameters corresponding to the multiple first latency thresholds may increase or decrease sequentially.

[0105] If the change pattern is that the application access latency increases, and the last access latency in the access latency sequence is greater than or equal to the largest first latency threshold among multiple first latency thresholds, then the controller adjusts the parameters according to the first bandwidth corresponding to the largest first latency threshold to reduce the migration bandwidth.

[0106] In one possible implementation, the controller assembles multiple first latency thresholds into a first latency threshold sequence, and reduces migration bandwidth based on the position of each first latency threshold in the sequence. For example, if the multiple first latency thresholds are arranged in ascending order, and the pattern is that the application access latency increases, and the last access latency in the access latency sequence is greater than or equal to any first latency threshold, and this last access latency is less than the next first latency threshold in the sequence, then the controller adjusts the first bandwidth parameter corresponding to that first latency threshold to reduce the migration bandwidth.

[0107] For example, if the multiple first latency thresholds are arranged in descending order to form a first latency threshold sequence, and the change pattern is that the application access latency increases, the last access latency in the access latency sequence is greater than or equal to any first latency threshold, and the last access latency is less than the previous first latency threshold in the first latency threshold sequence, then the controller reduces the migration bandwidth based on the first bandwidth adjustment parameter corresponding to any first latency threshold.

[0108] The following example, using a set of associated first latency thresholds and first bandwidth adjustment parameters, details how to reduce migration bandwidth:

[0109] When the first bandwidth adjustment parameter is a first adjustment ratio or a first adjustment magnitude, if the first bandwidth is adjusted to the adjustment ratio, the controller reduces the migration bandwidth by the adjustment ratio based on the current migration bandwidth. If the first bandwidth is adjusted to the first adjustment magnitude, the controller reduces the first adjustment magnitude based on the current migration bandwidth.

[0110] Method C2: If the change pattern is that the application access latency decreases, then the controller increases the migration bandwidth.

[0111] When data migration and application access to the first storage medium occur simultaneously, the application access latency decreases, indicating that the application access latency is decreasing. Therefore, if this change indicates that the application access latency is decreasing, the controller increases the migration bandwidth, thereby improving the efficiency of data migration of the first storage medium while ensuring that the application accesses the first storage medium with low access latency.

[0112] In one possible implementation, the controller increases the migration bandwidth based on the maximum allowable access latency of the application. For example, the application corresponds to at least one second latency threshold, which is less than the maximum allowable access latency of the application, and this second latency threshold is adjusted by a second bandwidth adjustment parameter. Exemplarily, the at least one second latency threshold is less than the minimum latency threshold among at least one first latency threshold.

[0113] If the change pattern shows a decreasing application access latency, and the obtained access latency is less than or equal to the second latency threshold, the controller increases the migration bandwidth based on the second bandwidth adjustment parameter corresponding to the second latency threshold. The access latency obtained here may be the most recently obtained access latency, for example, the last access latency in the access latency sequence.

[0114] When an application corresponds to multiple second latency thresholds, these multiple second latency thresholds may correspond to the same second bandwidth adjustment parameter, or they may correspond to different second bandwidth adjustment parameters. When multiple second latency thresholds correspond to different second bandwidth adjustment parameters, there are multiple different second bandwidth adjustment parameters, and each second latency threshold corresponds to one of these multiple second bandwidth adjustment parameters. For example, following the order of the multiple second latency thresholds from smallest to largest, the second bandwidth adjustment parameters corresponding to the multiple second latency thresholds may increase or decrease sequentially.

[0115] If the change pattern is that the application access latency decreases, and the last access latency in the access latency sequence is less than or equal to the minimum second latency threshold among multiple second latency thresholds, then the controller increases the migration bandwidth according to the second bandwidth adjustment parameter corresponding to the minimum second latency threshold.

[0116] In one possible implementation, the controller combines multiple second delay thresholds into a second delay threshold sequence, and increases the migration bandwidth based on the position of the second delay threshold in the second delay threshold sequence.

[0117] For example, if the multiple second latency thresholds are arranged in ascending order to form a second latency threshold sequence, and the change pattern is that the application access latency decreases, the last access latency in the access latency sequence is less than or equal to any second latency threshold, and the last access latency is greater than the previous second latency threshold of any first latency threshold in the second latency threshold sequence, then the controller increases the migration bandwidth according to the second bandwidth adjustment parameter corresponding to any second latency threshold.

[0118] For example, if the multiple second latency thresholds are arranged in descending order to form a second latency threshold sequence, and the change pattern is that the application access latency decreases, the last access latency in the access latency sequence is less than or equal to any second latency threshold, and the last access latency is greater than the next second latency threshold in the first latency threshold sequence, then the controller increases the migration bandwidth based on the second bandwidth adjustment parameter corresponding to any second latency threshold.

[0119] The following example, using a set of associated second latency thresholds and second bandwidth adjustment parameters, details how to increase migration bandwidth:

[0120] When the second bandwidth adjustment parameter is a second adjustment ratio or a second adjustment magnitude, if the second bandwidth is adjusted to the adjustment ratio, the controller increases the migration bandwidth by the adjustment ratio based on the current migration bandwidth. If the second bandwidth is adjusted to the second adjustment magnitude, the controller increases the second adjustment magnitude based on the current migration bandwidth.

[0121] After each target duration, the controller determines a latency change. Based on the pattern indicated by this latency change, it adjusts the migration bandwidth of the first storage medium, thus achieving dynamic adjustment of the migration bandwidth. When the application corresponds to multiple first latency thresholds and multiple second latency thresholds, each time the application access latency of the first storage medium increases to a first latency threshold, the controller reduces the migration bandwidth of the first storage medium according to a first adjustment parameter corresponding to that first latency threshold. Conversely, each time the application access latency decreases to a second latency threshold, the controller increases the migration bandwidth of the first storage medium according to a second adjustment parameter corresponding to that second latency threshold. This achieves fine-grained and smooth dynamic adjustment of the migration bandwidth of the first storage medium, preventing large fluctuations in application access latency that would render the application unaware of such changes.

[0122] In one possible implementation, the controller includes an adapter, and step 403 is performed by the adapter within the controller. Figure 1 Taking controller 13 as an example, step 403 is performed by adapter 132 in controller 13. Adapter 132 sends the adjusted migration bandwidth to the migration engine, which then uses the adjusted migration bandwidth to migrate data on the first storage medium.

[0123] Furthermore, since the migration pattern does not show an increase or decrease in application access latency, but rather remains essentially constant, it indicates that the application latency is stable within adjacent target durations. Therefore, the controller does not need to execute step 403. The controller can also continuously acquire the application's access latency and execute steps 402-403 after each target duration, thereby dynamically adjusting the migration bandwidth.

[0124] By obtaining the access latency of the application accessing the storage medium, and then obtaining latency change information based on the obtained access latency, the migration bandwidth of the storage medium is adjusted according to the change pattern of the application access latency of the storage medium indicated by the latency change information. This allows the storage medium to perform data migration through the adjusted migration bandwidth, thereby reducing the impact of the fixed migration bandwidth on the bandwidth used by the application to access the storage medium and improving the efficiency of the application accessing the storage medium.

[0125] Regarding the process by which the controller obtains the application's access latency, in Figure 4 In the illustrated embodiment, the controller acquires the application's access latency in real time, while for example... Figure 5 In the illustrated embodiment, the controller only obtains the application's access latency when the application meets the migration bandwidth adjustment conditions. Figure 5 This is a flowchart of a migration bandwidth adjustment method based on migration bandwidth adjustment conditions provided in this application. The method is applied to a hybrid memory system and is executed by the controller of the hybrid memory system.

[0126] Step 501: If the application meets the migration bandwidth adjustment conditions, the controller obtains the access latency of the application to the first storage medium, which is a type of storage medium in the hybrid memory system.

[0127] The application meets at least one of the following migration bandwidth adjustment conditions:

[0128] Case 1: A migration bandwidth adjustment request is received from the terminal, which instructs that the migration bandwidth of the first storage medium be adjusted according to the access latency of the application.

[0129] Scenario 2: The application offers targeted services.

[0130] Scenario 3: The migration process for the first storage medium accessed by the application is already running, and this migration process is used to migrate data to the first storage medium.

[0131] Taking the case where the application meets one of the migration bandwidth adjustment conditions (including conditions 1 to 3), and the controller obtains the access latency of the application accessing the first storage medium as an example, this step 501 will be described. The process by which the controller obtains the access latency of the application accessing the first storage medium when the application meets the migration bandwidth adjustment conditions (including a combination of at least two of conditions 1 to 3) can be referenced from the process for obtaining the latency when only one condition is met.

[0132] In scenario 1, the terminal provides an option to enable the migration bandwidth adjustment mode. When the user selects this option, the terminal sends a migration bandwidth adjustment request to the controller. Upon receiving the migration bandwidth adjustment request, the controller determines that the application meets the migration bandwidth adjustment conditions. Based on this request, the controller adjusts the migration bandwidth for the application's access to the first storage medium. Therefore, before adjusting the migration bandwidth, the controller first obtains the access latency of the application to the first storage medium.

[0133] For scenario 2, the target service is one with high latency requirements for application access. For example, this target service requires the application's access latency to be less than or equal to a target latency threshold. This target latency threshold is less than the application's maximum allowable access latency. This target service includes services provided by remote dictionary servers (Redis), relational database management systems (MySQL), and computing engines (Spark).

[0134] For example, in a hybrid memory system, the CPU is allowed to run multiple applications. If any of these applications provides a target service, then that application meets the migration bandwidth adjustment conditions. The controller adjusts the migration bandwidth of the application accessing the first storage medium based on the application's access latency. Therefore, before adjusting the migration bandwidth, the controller first obtains the application's access latency to the first storage medium.

[0135] For scenario 3, the controller detects whether the migration process of the first storage medium has been running. If the migration process of the first storage medium has been running, the application meets the migration bandwidth adjustment conditions. The controller adjusts the migration bandwidth of the first storage medium according to the access latency of the application accessing the first storage medium. Therefore, before adjusting the migration bandwidth, the controller first obtains the access latency of the application accessing the first storage medium.

[0136] The controller only obtains the application's access latency when the application meets the migration bandwidth adjustment conditions. Based on this latency, the controller adjusts the migration bandwidth of the first storage medium, reducing its workload and computational resource consumption. Conversely, the controller only obtains the application's access latency when it receives a migration bandwidth adjustment request from the terminal or when the application provides a target service. Based on this latency, the controller adjusts the migration bandwidth of the first storage medium to reduce its impact on the application's access latency, thereby improving the application's efficiency in accessing the first storage medium. This ensures that the terminal or target service meets the application's access latency requirements.

[0137] In addition, the process by which the controller obtains the access latency of the application accessing the first storage medium can refer to step 401 above.

[0138] Step 502: The controller determines the latency change information based on the acquired access latency. The latency change information indicates the change pattern of the application access latency of the first storage medium. The application access latency is the time occupied when the first storage medium is accessed by the application.

[0139] Step 502 is similar to step 402, and will not be described again in this embodiment.

[0140] Step 503: The controller adjusts the migration bandwidth of the first storage medium according to the change pattern. The migration bandwidth indicates the bandwidth used when migrating data to the first storage medium.

[0141] Step 503 is similar to step 403, and therefore will not be described again in this embodiment.

[0142] By obtaining the access latency of the application accessing the storage medium, and then obtaining latency change information based on the obtained access latency, the migration bandwidth of the storage medium is adjusted according to the change pattern of the application access latency of the storage medium indicated by the latency change information. This allows the storage medium to perform data migration through the adjusted migration bandwidth, thereby reducing the impact of the fixed migration bandwidth on the bandwidth used by the application to access the storage medium and improving the efficiency of the application accessing the storage medium.

[0143] For the process of the controller determining time delay change information Figure 4 It is the latency change information determined based on the increasing or decreasing access latency in the access latency sequence, while... Figure 6 In the illustrated embodiment, the controller determines latency variation information based on the application's average access latency to determine the overall trend of application access latency variation. Wherein, Figure 6 This is a flowchart of a migration bandwidth adjustment method based on the average access latency of an application provided in this application. The method is applied to a hybrid memory system and is executed by the controller of the hybrid memory system.

[0144] Step 601: The controller obtains the average access latency of the application accessing the first storage medium, which is a type of storage medium in the hybrid memory system.

[0145] The average access latency is the average time taken for the application to access the first storage medium once within the target duration.

[0146] For example, after each target duration, the controller obtains a monitoring result, sums the access latency in the monitoring result to obtain the total latency, counts the total number of access latency events in the monitoring result, and uses the ratio between the total latency and the total number of events as the average access latency.

[0147] In another possible implementation, if the application meets the migration bandwidth adjustment conditions, the controller executes step 601. This implementation can refer to step 501 above.

[0148] Additionally, if the controller includes an adapter, this step 601 is performed by the adapter within the controller. Figure 1 Taking controller 13 as an example, step 601 is executed by adapter 132 in controller 13.

[0149] Step 602: The controller determines the latency change information based on the acquired average access latency. The latency change information indicates the change pattern of the application access latency of the first storage medium. The application access latency is the time occupied when the first storage medium is accessed by the application.

[0150] In one possible implementation, after each target duration, the controller obtains an average access latency. For ease of description, the average access latency obtained in the current target duration is referred to as the first average access latency, and the average access latency obtained in the previous target duration is referred to as the second average access latency. After each target duration, the controller determines latency change information based on the first average access latency in the current target duration and the second average access latency in the previous target duration.

[0151] For example, if the first average access latency is greater than the second average access latency, it indicates that the application's access latency is increasing, and the controller generates latency change information including the first pattern identifier. If the first average access latency is less than the second average access latency, it indicates that the application's access latency is decreasing, and the application generates latency change information including the second pattern identifier.

[0152] Step 603: The controller adjusts the migration bandwidth of the first storage medium according to the change pattern. The migration bandwidth indicates the bandwidth used when migrating data to the first storage medium.

[0153] Step 603 is similar to step 403, and will not be described again in this embodiment.

[0154] By obtaining the access latency of the application accessing the storage medium, and then obtaining latency change information based on the obtained access latency, the migration bandwidth of the storage medium is adjusted according to the change pattern of the application access latency of the storage medium indicated by the latency change information. This allows the storage medium to perform data migration through the adjusted migration bandwidth, thereby reducing the impact of the fixed migration bandwidth on the bandwidth used by the application to access the storage medium and improving the efficiency of the application accessing the storage medium.

[0155] To make it easier to understand, the following will be... Figure 7 As an example, this application further describes a migration bandwidth adjustment method in a hybrid memory system.

[0156] Among them, the hybrid memory system is Figures 1 to 3 The example shown is an example of any hybrid memory system. It is understood that... Figure 3 Although the controllers of hybrid memory systems 100a to 100c are not shown in the diagram, all hybrid memory systems 100a to 100c have controllers; therefore, in this hybrid memory system... Figure 3 In any of the hybrid memory systems shown, Figure 7 Yes Figure 3 This example illustrates bandwidth adjustment for migration in any hybrid memory system. Below, we will use a hybrid memory system controller, including a monitor, adapter, and migration engine, as an example to illustrate... Figure 7 The following is an introduction:

[0157] like Figure 7 As shown, after the controller is powered on, it initializes. The initialization process includes, for example, the adapter in the controller configuring the migration bandwidth of the storage medium in the hybrid memory system to the migration engine through the configuration interface (e.g., the migration read bandwidth is 80MB / s and the migration write bandwidth is 30MB / s). The adapter configures the application access latency, the first latency threshold, the second latency value, the first bandwidth adjustment parameter, and the second bandwidth adjustment parameter. The monitor enables the latency monitoring function to monitor the access latency of the application.

[0158] Subsequently, the monitor tracks the access latency of applications with access rights to the storage medium. While an application is running on a processor, it sends an access request to the storage medium, and the monitor detects the access latency of that application. If the storage medium meets the migration conditions, the migration engine runs the migration process for that storage medium, using the currently configured migration bandwidth to migrate data to it. The migration conditions include a memory page being a hot page, a memory page being a cold page, a storage medium failure, or other conditions requiring data migration from other storage media. For example, if a memory page is a hot page, it is migrated to another storage medium in the hybrid memory system with higher data transfer performance. If a memory page is a cold page, it is migrated to another storage medium in the hybrid memory system with lower data transfer performance. If the storage medium fails, the data from the failed storage medium is migrated to another fault-free storage medium in the hybrid memory system. Of course, the storage medium may also meet other migration conditions besides those described above. Here, this application embodiment does not limit the situation in which the storage medium meets the migration conditions.

[0159] The data migration begins when the migration process starts on the storage medium. In the case that the migration process on the storage medium and the application accesses the storage medium in parallel, the adapter polls the monitor with a target duration as a polling cycle. After each polling cycle, the adapter polls the monitor to obtain the number of access latencies and the total access latency within the target duration. If the migration process is not running, the data migration ends and the adapter no longer adjusts the migration bandwidth.

[0160] If the migration process is still running, the adapter determines whether to adjust the migration bandwidth of the storage medium based on the number of access latency instances and the total access latency. For example, the adapter determines the average access latency of the application based on the number of access latency instances and the total access latency. Based on the average access latency obtained this time and the average access latency obtained previously, the adapter determines the variation pattern of the application latency of the storage medium. If the variation pattern of the application latency is increasing, and the average access latency obtained this time reaches a first latency threshold, the adapter appropriately reduces the migration bandwidth (e.g., by adjusting parameters to reduce the migration bandwidth according to the first bandwidth threshold). If the variation pattern of the application latency is decreasing, and the average access latency obtained this time is less than or equal to a second latency threshold, the adapter appropriately increases the migration bandwidth (e.g., by adjusting parameters to increase the migration bandwidth according to the second bandwidth threshold). If the variation pattern of the application latency is basically unchanged, the adapter does not adjust the migration bandwidth.

[0161] If the adapter adjusts the migration bandwidth, the adapter configures the adjusted migration bandwidth to the migration engine via the configuration interface. The migration engine maintains the adjusted migration bandwidth unchanged for the target duration and continues data migration to the storage medium using the adjusted bandwidth. In this case, the adjusted migration bandwidth is also the current migration bandwidth for the migration engine. If the adapter does not adjust the migration bandwidth, the migration engine maintains the previously configured migration bandwidth unchanged for the target duration and continues data migration to the storage medium using the previously configured migration bandwidth. In this case, the previously configured migration bandwidth is also the current migration bandwidth for the migration engine.

[0162] With the migration engine maintaining the current migration bandwidth, the adapter waits for the next polling cycle.

[0163] Figures 4 to 7 The embodiments shown are all illustrated by adjusting the migration bandwidth of the first storage medium based on the access latency of a single application. In some embodiments, the storage space in the first storage medium may be allocated to multiple applications, so that the first storage medium supports access by these multiple applications. Accordingly, the controller can also obtain the access latency of multiple applications and adjust the migration bandwidth of the first storage medium based on the obtained access latency of multiple applications accessing the first storage medium.

[0164] The method by which the controller first obtains the access latency of multiple applications can refer to the method described above for obtaining the access latency of a single application. During the process of adjusting the migration bandwidth of the first storage medium based on the obtained access latency of multiple applications accessing the first storage medium, the controller determines latency change information based on the obtained access latency of multiple applications accessing the first storage medium, and adjusts the migration bandwidth of the first storage medium according to the change pattern indicated by the latency change information.

[0165] The process by which the controller determines latency change information based on the access latency of multiple applications accessing the first storage medium can be referred to steps 402 or 601 to 602. The controller adjusts the migration bandwidth of the first storage medium according to the change pattern indicated by the latency change information, as described in step 403. However, when referring to 403, the controller can select a second latency threshold based on the multiple applications. For example, for any one of the first or second latency thresholds, if this threshold is less than the minimum latency among the maximum allowed access latencies of the multiple applications, the migration bandwidth of the first storage medium is adjusted according to this threshold to prevent the application access latency of the first storage medium from reaching the minimum latency, thus meeting the access latency requirements of the multiple applications and preventing application crashes. Alternatively, if there is a target application providing a target service among the multiple applications, and this threshold is less than the maximum allowed access latency of the target application, the migration bandwidth of the first storage medium is adjusted according to this threshold so that the application access latency of the first storage medium meets the requirements of the target service.

[0166] The methods of the embodiments of this application have been described above, and the apparatus of the embodiments of this application will be described below. It should be understood that the apparatus described below has any of the functions of the controller of the hybrid memory system in the above methods.

[0167] See Figure 8 This application provides a schematic diagram of a migration bandwidth adjustment device 800 for a storage medium. The migration bandwidth adjustment device 800 can be a controller or part of a controller in the hybrid memory system described in the preceding embodiments, used to execute methods performed by the controller. The migration bandwidth adjustment device 800 is applied to a hybrid memory system and includes:

[0168] The acquisition module 801 is used to acquire the access latency of the application accessing the first storage medium, which is a type of storage medium in a hybrid memory system;

[0169] The determining module 802 is used to determine the latency change information based on the acquired access latency. The latency change information indicates the change pattern of the application access latency of the first storage medium. The application access latency is the time occupied when the first storage medium is accessed by the application program.

[0170] The adjustment module 803 is used to adjust the migration bandwidth of the first storage medium according to the change pattern. The migration bandwidth indicates the bandwidth used when migrating data to the first storage medium.

[0171] It should be understood that the migration bandwidth adjustment device 800 of this embodiment of the present invention can be implemented by a central processing unit (CPU), an application-specific integrated circuit (ASIC), or a programmable logic device (PLD). The PLD can be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a data processing unit (DPU), a system-on-chip (SoC), or any combination thereof. It can also be implemented in software. Figures 4 to 7 In the migration bandwidth adjustment method shown, the migration bandwidth adjustment device 800 and its various modules can also be software modules.

[0172] In one possible implementation, the application corresponds to at least one first latency threshold, which is less than the maximum allowed access latency of the application, and the first latency threshold corresponds to a first bandwidth adjustment parameter. The adjustment module 803 is used to:

[0173] If the change pattern is an increasing application access latency, and the obtained access latency is greater than or equal to the first latency threshold, the first bandwidth adjustment parameter is adjusted according to the first latency threshold to reduce the migration bandwidth.

[0174] In one possible implementation, the application corresponds to at least one second latency threshold, which is less than the maximum allowed access latency of the application, and the second latency threshold corresponds to a second bandwidth adjustment parameter; the adjustment module 803 is used for:

[0175] If the change pattern is a decrease in application access latency, and the obtained access latency is less than or equal to the second latency threshold, the migration bandwidth is increased according to the second bandwidth adjustment parameter corresponding to the second latency threshold.

[0176] In one possible implementation, if the first storage medium supports access from multiple applications, for any one of the first or second latency thresholds, the latency threshold is less than the minimum latency among the maximum access latency allowed by the multiple applications; or, if there is a target application providing the target service among the multiple applications, any latency threshold is less than the maximum access latency allowed by the target application.

[0177] In one possible implementation, the acquisition module 801 is also used for:

[0178] If the application meets the migration bandwidth adjustment conditions, execute the step of obtaining the access latency of the application to the first storage medium.

[0179] In one possible implementation, the application satisfies the migration bandwidth adjustment conditions, including at least one of the following:

[0180] A migration bandwidth adjustment request is received from the terminal, which instructs that the migration bandwidth be adjusted according to the access latency of the application; the application provides the target service; the migration process of the first storage medium accessed by the application has been running, and the migration process is used to migrate data on the first storage medium.

[0181] In one possible implementation, the access latency includes at least one of read latency and write latency, where read latency is the latency for an application to read data from the first storage medium and write latency is the latency for an application to write data to the first storage medium.

[0182] In one possible implementation, the acquisition module is used for:

[0183] If the application's read / write ratio on the first storage medium is greater than or equal to the target ratio, obtain the application's read latency;

[0184] If the application's write-to-read ratio on the first storage medium is greater than or equal to the target ratio, the application's write latency is obtained. In one possible implementation, the migration bandwidth is either the migration read bandwidth or the migration write bandwidth. The migration read bandwidth is the bandwidth used when reading data from the first storage medium during the data migration process, and the migration write bandwidth is the bandwidth used when writing data from the second storage medium to the first storage medium during the data migration process.

[0185] In one possible implementation, if the first storage medium and the second storage medium are located on the same computing device, the first storage medium and the second storage medium are of different types; if the first storage medium and the second storage medium are located on different computing devices, the first storage medium and the second storage medium are of different types or the same type.

[0186] All of the above-mentioned optional technical solutions can be combined in any way to form the optional embodiments of this application, and will not be described in detail here.

[0187] It should be understood that the migration bandwidth adjustment device 800 corresponds to the controller in the above method embodiment. The modules in the migration bandwidth adjustment device 800 and the other operations and / or functions described above are respectively for implementing various steps and methods implemented by the controller in the method embodiment. For specific details, please refer to the above method embodiment. For the sake of brevity, they will not be repeated here.

[0188] It should be understood that the migration bandwidth adjustment device 800, when adjusting the migration bandwidth of the storage medium, is only illustrated by the above-described division of functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the migration bandwidth adjustment device 800 can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the migration bandwidth adjustment device 800 provided in the above embodiments and the above method embodiments belong to the same concept, and its specific implementation process is detailed in the above method embodiments, and will not be repeated here.

[0189] It should be understood that the migration bandwidth adjustment device 800 may be equivalent to the controller 13 of the hybrid memory system 100, or equivalent to the execution unit in the controller 13. For example, the acquisition module 801 is equivalent to the monitor 131 in the controller 13, and the determination module 802 and the adjustment module 803 are equivalent to the adapter 132 in the controller 13.

[0190] Figure 9 This is a schematic diagram of the structure of a chip 900 provided in this application, as shown below. Figure 9 As shown, chip 900 is applied to a hybrid memory system as a controller for the hybrid memory system. Chip 900 includes one or more processors 901 and one or more memories 902. The one or more memories 901 are coupled to the one or more processors 902. The one or more memories 902 are used to store program code. When the one or more processors 901 execute the program code, the chip 900 performs the aforementioned related method steps to implement the storage medium migration bandwidth adjustment method in the above embodiment.

[0191] The processor 901 can be a CPU, or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0192] As one possible implementation, this application also provides a chip including a processor and a power supply circuit. The power supply circuit is used to supply power to the processor, and the processor is used to implement the above-mentioned related method steps to realize the storage medium migration bandwidth adjustment method in the above embodiments. For the sake of brevity, it will not be described in detail here.

[0193] As another possible implementation, this application also provides a computing device including the above-described chip, which is used to implement the migration bandwidth adjustment method of the storage medium in the above embodiments. For the sake of brevity, it will not be described in detail here.

[0194] As another possible implementation, this application also provides a computer-readable storage medium, such as a memory including program code, which can be read by a controller of a hybrid memory system (such as a processor 901 in chip 900) to execute and complete the migration bandwidth adjustment method of the storage medium in the above embodiments. The implementation of the computer-readable storage medium can be found in [reference needed]. Figure 9 The memory 902 shown.

[0195] This application also provides a computer program product or computer program, which includes program code stored in a computer-readable storage medium. A controller of a hybrid memory system (such as processor 901 in chip 900) reads the program code from the computer-readable storage medium and executes the program code, causing the device (such as chip 900) to perform the aforementioned migration bandwidth adjustment method for the storage medium. The above embodiments can be implemented entirely or partially by software, hardware, firmware, or any other combination. When implemented using software, the above embodiments can be implemented entirely or partially as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state disk (SSD).

[0196] The above description is merely a specific embodiment of this application. Any variations or substitutions conceived by those skilled in the art based on the specific embodiments provided in this application should be covered within the protection scope of this application.

Claims

1. A method for adjusting the migration bandwidth of a storage medium, characterized in that, The method is applied to a hybrid memory system, and the method includes: The access latency of the application to access the first storage medium is obtained, wherein the first storage medium is a type of storage medium in the hybrid memory system; Based on the acquired access latency, latency change information is determined. The latency change information indicates the change pattern of application access latency of the first storage medium. The application access latency is the time occupied when the first storage medium is accessed by the application. The migration bandwidth of the first storage medium is adjusted according to the changing pattern, wherein the migration bandwidth indicates the bandwidth used when migrating data to the first storage medium.

2. The method according to claim 1, characterized in that, The application corresponds to at least one first latency threshold, the first latency threshold being less than the maximum allowed access latency of the application, and the first latency threshold corresponding to a first bandwidth adjustment parameter; The step of adjusting the migration bandwidth of the first storage medium according to the change pattern includes: If the change pattern is that the application access latency increases, and the obtained access latency is greater than or equal to the first latency threshold, the migration bandwidth is reduced according to the first bandwidth adjustment parameter corresponding to the first latency threshold.

3. The method according to claim 1, characterized in that, The application corresponds to at least one second latency threshold, the second latency threshold being less than the maximum allowed access latency of the application, and the second latency threshold corresponding to a second bandwidth adjustment parameter; The step of adjusting the migration bandwidth of the first storage medium according to the change pattern includes: If the change pattern is that the application access latency decreases, and the obtained access latency is less than or equal to the second latency threshold, the migration bandwidth is increased according to the second bandwidth adjustment parameter corresponding to the second latency threshold.

4. The method according to claim 2 or 3, characterized in that, When the first storage medium supports access by multiple applications, for any one of the first latency threshold or the second latency threshold, the latency threshold is less than the minimum latency among the maximum access latencies allowed by the multiple applications. Alternatively, if there is a target application providing the target service among the multiple applications, any latency threshold is less than the maximum access latency allowed by the target application.

5. The method according to any one of claims 1-3, characterized in that, Before obtaining the access latency of the application accessing the first storage medium, the method further includes: If the application meets the migration bandwidth adjustment conditions, the step of obtaining the access latency of the application to the first storage medium is executed.

6. The method according to claim 5, characterized in that, The application meets at least one of the following migration bandwidth adjustment conditions: Upon receiving a migration bandwidth adjustment request from a terminal, the migration bandwidth adjustment request instructs that the migration bandwidth be adjusted according to the access latency of the application. The application provides targeted services; The migration process for the first storage medium accessed by the application has been running, and the migration process is used to migrate data on the first storage medium.

7. The method according to any one of claims 1-3 or 6, characterized in that, The access latency includes at least one of read latency and write latency, wherein the read latency is the latency for the application to read data from the first storage medium, and the write latency is the latency for the application to write data to the first storage medium.

8. The method according to claim 7, characterized in that, The method for obtaining the access latency of the application to the first storage medium includes: If the read / write ratio of the application to the first storage medium is greater than or equal to the target ratio, the read latency of the application is obtained; If the write-to-read ratio of the application to the first storage medium is greater than or equal to the target ratio, the write latency of the application is obtained.

9. The method according to any one of claims 1-3, 6 or 8, characterized in that, The migration bandwidth is either the migration read bandwidth or the migration write bandwidth. The migration read bandwidth is the bandwidth used when reading data from the first storage medium during the data migration process, and the migration write bandwidth is the bandwidth used when writing data from the second storage medium to the first storage medium during the data migration process.

10. The method according to claim 9, characterized in that, If the first storage medium and the second storage medium are located on the same computing device, and the first storage medium and the second storage medium are of different types; If the first storage medium and the second storage medium are located on different computing devices, and the first storage medium and the second storage medium are of different or the same type.

11. A migration bandwidth adjustment device for a storage medium, characterized in that, The device is used in a hybrid memory system, and the device includes: The acquisition module is used to acquire the access latency of the application accessing the first storage medium, wherein the first storage medium is a type of storage medium in the hybrid memory system; The determination module is used to determine latency change information based on the acquired access latency, wherein the latency change information indicates the change pattern of application access latency of the first storage medium, and the application access latency is the time occupied when the first storage medium is accessed by the application. An adjustment module is used to adjust the migration bandwidth of the first storage medium according to the change pattern, wherein the migration bandwidth indicates the bandwidth used when migrating data to the first storage medium.

12. A hybrid memory system, characterized in that, The hybrid memory system includes a controller for performing the method as described in any one of claims 1 to 10.

13. A chip, characterized in that, The chip is applied to a hybrid memory system and is used to perform the method as described in any one of claims 1 to 10.

14. A computer-readable storage medium, characterized in that, The storage medium stores at least one piece of program code, which is read by the controller of the hybrid memory system to cause the controller to perform the method as described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Dynamic adaptive IO load balancing method for wide-area high-performance computing environment

    CN110213351A

  • Data migration method, device and apparatus and readable storage medium

    CN111143279A