Data download speed control method, device and medium

By continuously obtaining the amount of dirty data in a distributed storage system and adjusting the brushing speed according to its incremental change trend, the problem of the brushing speed under dirty data cannot be adjusted adaptively, and the business performance and user experience of the storage system are improved.

CN115291809BActive Publication Date: 2025-08-15JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211027017.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-25
Publication Date
2025-08-15
Estimated Expiration
2042-08-25

AI Technical Summary

Technical Problem

In the prior art, the control method of brushing speed of dirty data in a distributed storage system cannot adaptively adjust according to actual business conditions, resulting in poor performance of the storage system.

Method used

By continuously obtaining the amount of dirty data in the buffer space, sampling the amount of dirty data according to the preset time period, obtaining the increment of dirty data in N continuous time periods, and adjusting the maximum brushing speed according to the change trend of the increment.

Benefits of technology

Automatic adjustment of the maximum buffer down-sweep speed based on business performance is realized, improving the service performance and user experience of the storage system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115291809B_ABST
    Figure CN115291809B_ABST
Patent Text Reader

Abstract

The present application discloses a data flushing speed control method, device and medium, which relate to the field of distributed storage. By continuously obtaining the amount of dirty data in the buffer space; sampling the amount of dirty data according to a preset time period to obtain the incremental amount of dirty data under N consecutive preset time periods; wherein N is an integer greater than 1; obtaining the changing trend of the incremental amount of dirty data; and adjusting the maximum flushing speed of the dirty data in the buffer space according to the changing trend. It can be seen that the above scheme uses the incremental change of the amount of dirty data in the buffer space as an adjustment indicator, and adjusts the maximum flushing speed with a corresponding step size according to the incremental change and the incremental trend, thereby realizing automatic adjustment of the maximum buffer flushing speed according to business performance, so that the storage system can always provide the best business performance and improve the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of distributed storage, and in particular to a method, device and medium for controlling data refresh speed. Background Art

[0002] In distributed storage, storage systems usually use buffer devices to improve business processing capabilities. Dirty data (Dirty Read) refers to data in the source system that is not within a given range or is meaningless to the actual business, or the data format is illegal, and there is non-standard coding and ambiguous business logic in the source system. Specifically, the dirty data written to the buffer space of the buffer device needs to be flushed to the main storage device in a timely manner to avoid business performance degradation after the buffer is full. Since the main storage device also carries business read requests, flushing dirty data too quickly will squeeze the performance of the main storage device, thereby causing business performance degradation. Therefore, it is necessary to flush dirty data at an appropriate speed to ensure the optimal performance of the storage system.

[0003] To control the flushing speed, a maximum flushing speed can be set to prevent the impact of large amounts of dirty data on business read and write operations. Since there's no accurate way to estimate the appropriate maximum flushing speed, common practices include: not limiting the maximum flushing speed, using a fixed empirical value as the maximum flushing speed, or setting multiple fixed maximum flushing speeds, selecting different maximum flushing speeds based on different business levels or cache levels. However, this fixed flushing speed can't be adaptively adjusted based on actual business conditions, resulting in the storage system failing to provide optimal processing performance.

[0004] In view of the above problems, designing a data refresh speed control method that can adjust the maximum refresh speed in real time according to the amount of dirty data in actual business conditions is an urgent problem to be solved by technical personnel in this field. Summary of the Invention

[0005] The purpose of this application is to provide a data refresh speed control method, device and medium, which can adjust the maximum refresh speed in real time according to the amount of dirty data in actual business conditions.

[0006] To solve the above technical problems, the present application provides a method for controlling the data refresh speed, comprising:

[0007] Continuously obtain the amount of dirty data in the buffer space;

[0008] Sampling the dirty data amount according to a preset time period to obtain dirty data amount increments in N consecutive preset time periods; wherein N is an integer greater than 1;

[0009] Obtaining a changing trend of the dirty data amount increment;

[0010] The maximum flushing speed of dirty data in the buffer space is adjusted according to the change trend.

[0011] Preferably, the continuously obtaining the amount of dirty data in the buffer space includes:

[0012] Continuously obtain the amount of dirty data written and the amount of dirty data flushed from the buffer space;

[0013] The dirty data amount is obtained according to the dirty data write amount and the dirty data flush amount.

[0014] Preferably, obtaining the changing trend of the dirty data amount increment includes:

[0015] Obtain a first average value of N dirty data amount increments;

[0016] Obtain a second average value of N-1 increments of the dirty data amount, and a third average value of the second average value and the Nth increment of the dirty data amount;

[0017] When the Nth increment of the dirty data amount is a positive value, if the third average value is greater than the first average value, the change trend is increasing; if the third average value is equal to the first average value, the change trend is constant; if the third average value is less than the first average value, the change trend is decreasing;

[0018] When the Nth increment of the amount of dirty data is a negative value, if the third average value is greater than the first average value, the change trend is decreasing; if the third average value is equal to the first average value, the change trend is constant; if the third average value is less than the first average value, the change trend is increasing.

[0019] Preferably, adjusting the maximum flushing speed of dirty data in the buffer space according to the change trend includes:

[0020] Obtaining an adjustment increment of the maximum downward brushing speed according to the change trend;

[0021] The maximum refresh rate of the dirty data is adjusted according to the adjustment increment.

[0022] Preferably, obtaining the adjustment increment of the maximum downward scrolling speed according to the change trend includes:

[0023] When the Nth dirty data amount increment is a positive value, and the change trend is increasing or constant, the adjustment increment is a preset adjustment increment;

[0024] When the Nth dirty data amount increment is a positive value and the change trend is decreasing, the adjustment increment is half of the preset adjustment increment;

[0025] When the Nth dirty data amount increment is a negative value, and the change trend is increasing or constant, the adjustment increment is a negative value of the preset adjustment increment;

[0026] When the Nth dirty data amount increment is a negative value and the change trend is decreasing, the adjustment increment is half of the negative value of the preset adjustment increment.

[0027] Preferably, when the Nth dirty data amount increment is a negative value, the method further includes:

[0028] If the Nth increment of the dirty data amount is lower than the preset adjustment trigger threshold, the maximum refresh rate is not adjusted.

[0029] Preferably, after adjusting the maximum refresh rate of the dirty data according to the adjustment increment, the method further includes:

[0030] If the adjusted maximum downward brushing speed is greater than the preset maximum speed, the maximum downward brushing speed is the preset maximum speed;

[0031] If the adjusted maximum downward brushing speed is less than the preset minimum speed, the maximum downward brushing speed is the preset minimum speed.

[0032] In order to solve the above technical problems, the present application also provides a data refresh speed control device, comprising:

[0033] A first acquisition module is used to continuously acquire the amount of dirty data in the buffer space;

[0034] a sampling module, configured to sample the dirty data amount according to a preset time period to obtain an increment of the dirty data amount in N consecutive preset time periods; wherein N is an integer greater than 1;

[0035] A second acquisition module is used to obtain a change trend of the dirty data amount increment;

[0036] The adjustment module is used to adjust the maximum flushing speed of the dirty data in the buffer space according to the change trend.

[0037] In order to solve the above technical problems, the present application also provides another data refresh speed control device, comprising:

[0038] memory for storing computer programs;

[0039] The processor is used to implement the steps of the above-mentioned data refresh speed control method when executing the computer program.

[0040] In order to solve the above technical problems, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the data refresh speed control method described above are implemented.

[0041] The data flushing speed control method provided in the present application continuously obtains the amount of dirty data in the buffer space; samples the dirty data amount according to a preset time period to obtain the incremental amount of dirty data in N consecutive preset time periods; where N is an integer greater than 1; obtains the changing trend of the incremental amount of dirty data; and adjusts the maximum flushing speed of the dirty data in the buffer space according to the changing trend. It can be seen that the above scheme uses the incremental change of the amount of dirty data in the buffer space as an adjustment indicator, and adjusts the maximum flushing speed with a corresponding step size according to the incremental change and the incremental trend, thereby achieving automatic adjustment of the maximum buffer flushing speed according to business performance, so that the storage system can always provide optimal business performance and improve user experience.

[0042] In addition, the embodiment of the present application also provides a data refresh speed control device and a computer-readable storage medium, which have the same effect as above. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0044] Figure 1 A flow chart of a data refresh speed control method provided in an embodiment of the present application;

[0045] Figure 2 A schematic diagram of the total amount of dirty data in the cache space provided in an embodiment of the present application;

[0046] Figure 3 A schematic diagram of the dirty data increment provided in an embodiment of the present application;

[0047] Figure 4 A schematic diagram of the adjustment increment of the maximum downward brushing speed provided in an embodiment of the present application;

[0048] Figure 5 A schematic diagram of the maximum downward brushing speed provided in an embodiment of the present application;

[0049] Figure 6 A schematic diagram of a data refresh speed control device provided in an embodiment of the present application;

[0050] Figure 7A schematic diagram of another data refresh speed control device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0052] The core of this application is to provide a data refresh speed control method, device and medium.

[0053] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0054] Distributed storage systems typically utilize buffers to improve service processing capabilities. Dirty data written to the buffers must be promptly flushed to the primary storage device to prevent performance degradation when the buffers are full. Since the primary storage device also handles service read requests, flushing dirty data too quickly can strain the primary storage device's performance, leading to performance degradation. Therefore, dirty data must be flushed at an appropriate rate to maintain optimal storage system performance. Flushing is typically triggered by the amount of dirty data within a certain range, which can be considered a natural rate limit. Meeting the dirty data rate limit requires a certain amount of service write time. This natural rate limit results in a small amount of flushing when the amount of dirty data is low, while a large amount of flushing occurs when the amount of dirty data is high, resulting in a large number of intervals meeting the conditions. To prevent large-scale flushing from impacting service reads and writes, a basic approach is to control the flushing rate by setting a maximum flushing rate. Since there is no accurate method to determine the appropriate maximum flushing rate, common practices include not setting a maximum flushing rate, using a fixed empirical value, or setting multiple fixed maximum flushing rates, with different maximum flushing rates selected based on different service levels or cache levels. This fixed maximum refresh rate cannot be adaptively adjusted according to actual business conditions, which results in the storage system being unable to provide the most appropriate processing performance. Therefore, an embodiment of the present application provides a method for controlling the data refresh rate. Figure 1 This is a flow chart of a data refresh speed control method provided in an embodiment of the present application. Figure 1 As shown, the data refresh speed control method includes:

[0055] S10: Continuously obtain the amount of dirty data in the buffer space.

[0056] It is understandable that the buffer space is used to cache dirty data flushed by front-end services and flush the dirty data in its own space to the main storage device. During this process, the amount of dirty data in the buffer space continues to change. Figure 2 A schematic diagram of the total amount of dirty data in the cache space provided in an embodiment of the present application. Figure 2 The horizontal axis represents time, and the vertical axis represents data volume. As the business continues to change, the total amount of dirty data in the cache space is also changing. Therefore, in order to control the speed of flushing dirty data, it is necessary to first continuously obtain the amount of dirty data. In this embodiment, there is no restriction on the method of obtaining the amount of dirty data. It can be obtained by continuously obtaining the occupancy rate of the buffer space, or by continuously obtaining the remaining space of the buffer space for indirect acquisition, or by calculating the input and output volume of dirty data in the buffer space, depending on the specific implementation situation.

[0057] S11: Sampling the dirty data amount according to a preset time period to obtain dirty data amount increments in N consecutive preset time periods, where N is an integer greater than 1.

[0058] Furthermore, the amount of dirty data is sampled in a preset time period T to obtain the amount of dirty data in each preset time period T. After obtaining the amount of dirty data in each preset time period T, the corresponding dirty data amount increment can be continuously obtained based on the dirty data amounts in two adjacent preset time periods T. Figure 3 A schematic diagram of the increase in dirty data volume provided in an embodiment of the present application. Figure 3 The horizontal axis represents time, and the vertical axis represents the increment of dirty data. It can be seen that as the total amount of dirty data changes, the increment of dirty data also changes accordingly.

[0059] It should be noted that in this embodiment, the dirty data increments for N consecutive preset time periods are obtained. N is an integer greater than 1, and the specific value of N is not limited in this embodiment and depends on the specific implementation. Furthermore, in this embodiment, the preset time period T is not limited and depends on the specific implementation. Preferably, T can be set to 5 seconds.

[0060] S12: Obtain the changing trend of the dirty data volume increment.

[0061] Furthermore, after obtaining the dirty data amount increments in N consecutive preset time periods, the changing trend of the dirty data amount increment can be obtained. The changing trend of the dirty data amount increment includes increasing, constant and decreasing. Figure 3 The rising part of the middle broken line indicates that the amount of dirty data in the buffer space is gradually increasing, and the amount of dirty data will increase at a larger increment; Figure 3 The stable part of the middle line indicates that the increase in the amount of dirty data in the buffer space remains unchanged; Figure 3 The descending part of the middle broken line indicates that the increment of dirty data in the buffer space is gradually decreasing, and the amount of dirty data will increase in a smaller increment.

[0062] It should be noted that, in this embodiment, there is no restriction on the specific process of obtaining the changing trend of the incremental amount of dirty data, which depends on the specific implementation situation.

[0063] S13: Adjust the maximum flushing speed of dirty data in the buffer space according to the change trend.

[0064] Finally, the maximum flushing rate of dirty data in the buffer space is adjusted based on the change trend. In a specific implementation, when the change trend is increasing, the maximum flushing rate of dirty data in the buffer space can be increased accordingly; when the change trend is constant, the maximum flushing rate of dirty data in the buffer space remains unchanged; when the change trend is decreasing, the maximum flushing rate of dirty data in the buffer space can be decreased accordingly. It should be noted that the specific adjustment process for the maximum flushing rate is not limited in this embodiment and depends on the specific implementation situation.

[0065] In this embodiment, the amount of dirty data in the buffer space is continuously obtained; the dirty data amount is sampled according to a preset time period to obtain the incremental amount of dirty data for N consecutive preset time periods; where N is an integer greater than 1; the changing trend of the incremental amount of dirty data is obtained; and the maximum flushing speed of the dirty data in the buffer space is adjusted according to the changing trend. It can be seen that the above scheme uses the incremental change of the amount of dirty data in the buffer space as an adjustment indicator, and adjusts the maximum flushing speed with a corresponding step size according to the incremental change and the incremental trend. This achieves automatic adjustment of the maximum buffer flushing speed based on business performance, allowing the storage system to always provide optimal business performance and improve user experience.

[0066] Based on the above embodiment:

[0067] As a preferred embodiment, continuously obtaining the amount of dirty data in the buffer space includes:

[0068] Continuously obtain the amount of dirty data written and flushed from the buffer space;

[0069] Get the amount of dirty data based on the amount of dirty data written and the amount of dirty data flushed.

[0070] It can be understood that the buffer space acts as a buffer between the front-end business and the main storage device, which can cache the dirty data written by the front-end business and flush the dirty data to the main storage device. Therefore, in order to obtain the amount of dirty data in the buffer space, the amount of dirty data written and the amount of dirty data flushed to the buffer space can be continuously obtained. Among them, the amount of dirty data written is the amount of dirty data written by the business to the buffer space, and the amount of dirty data flushed is the amount of dirty data flushed from the buffer space to the main storage device. Furthermore, the amount of dirty data written is subtracted from the amount of dirty data flushed to obtain the amount of dirty data in the buffer space.

[0071] In this embodiment, the dirty data amount in the buffer space is continuously acquired by continuously acquiring the dirty data writing amount and the dirty data flushing amount; and the dirty data amount is acquired according to the dirty data writing amount and the dirty data flushing amount, thereby achieving continuous acquisition of the dirty data amount in the buffer space.

[0072] Based on the above embodiment:

[0073] As a preferred embodiment, obtaining the changing trend of the dirty data amount increment includes:

[0074] Get the first average value of N dirty data increments;

[0075] Obtain a second average value of N-1 dirty data amount increments, and a third average value of the second average value and the Nth dirty data amount increment;

[0076] When the Nth dirty data increment is positive, if the third average value is greater than the first average value, the change trend is increasing; if the third average value is equal to the first average value, the change trend is constant; if the third average value is less than the first average value, the change trend is decreasing;

[0077] When the Nth dirty data amount increment is a negative value, if the third average value is greater than the first average value, the change trend is decreasing; if the third average value is equal to the first average value, the change trend is constant; if the third average value is less than the first average value, the change trend is increasing.

[0078] As a preferred embodiment, in order to obtain the changing trend of the dirty data volume increment, in this embodiment, the first average value of N dirty data volume increments is first obtained, and the second average value of N-1 dirty data volume increments is obtained, as well as the third average value of the second average value and the Nth dirty data volume increment.

[0079] Furthermore, the positive or negative value of the Nth dirty data increment is determined. When the Nth dirty data increment is positive, if the third average value is greater than the first average value, the trend of change is increasing, and the dirty data in the cache space will increase with the gradually increasing increment; if the third average value is equal to the first average value, the trend of change is constant, and the dirty data increment in the cache space will remain unchanged; if the third average value is less than the first average value, the trend of change is decreasing, and the dirty data in the cache space will increase with the gradually decreasing increment. When the Nth dirty data increment is negative, if the third average value is greater than the first average value, the trend of change is decreasing, and the dirty data in the cache space will increase with the gradually decreasing negative increment; if the third average value is equal to the first average value, the trend of change is constant, and the dirty data increment in the cache space will remain unchanged; if the third average value is less than the first average value, the trend of change is increasing, and the dirty data in the cache space will decrease with the gradually increasing negative increment.

[0080] In this embodiment, the first average value of N dirty data volume increments is obtained; the second average value of N-1 dirty data volume increments is obtained, and the third average value of the second average value and the Nth dirty data volume increment is obtained; and further, the positive or negative value of the Nth dirty data volume increment and the size relationship between the third average value and the first average value are judged to obtain the changing trend of the dirty data volume increment.

[0081] Based on the above embodiment:

[0082] As a preferred embodiment, adjusting the maximum flushing speed of dirty data in the buffer space according to the change trend includes:

[0083] Get the adjustment increment of the maximum downward brushing speed according to the change trend;

[0084] Adjust the maximum flush speed of dirty data based on the adjustment increment.

[0085] To adjust the maximum flush rate of dirty data, as a preferred embodiment, an adjustment increment for the maximum flush rate is obtained based on a change trend, and the maximum flush rate of dirty data is adjusted based on the adjustment increment. It should be noted that there are three types of dirty data increment change trends: increasing, constant, and decreasing, and the positive or negative state of the dirty data increment also affects its change trend. Therefore, the specific process of obtaining the adjustment increment for the maximum flush rate based on the change trend is not limited in this embodiment and is determined based on specific implementation circumstances.

[0086] In this embodiment, an adjustment increment of the maximum refresh rate is obtained according to the change trend; the maximum refresh rate of dirty data is adjusted according to the adjustment increment, thereby achieving adjustment of the maximum refresh rate.

[0087] Based on the above embodiment:

[0088] As a preferred embodiment, obtaining the adjustment increment of the maximum downward scrolling speed according to the change trend includes:

[0089] When the Nth dirty data increment is positive and the change trend is increasing or constant, the adjustment increment is the preset adjustment increment;

[0090] When the Nth dirty data increment is positive and the change trend is decreasing, the adjustment increment is half of the preset adjustment increment;

[0091] When the Nth dirty data increment is negative and the change trend is increasing or constant, the adjustment increment is the negative value of the preset adjustment increment;

[0092] When the Nth dirty data amount increment is a negative value and the change trend is decreasing, the adjustment increment is half of the negative value of the preset adjustment increment.

[0093] In order to obtain the adjustment increment of the maximum refresh rate according to the change trend, this embodiment first determines whether the Nth dirty data amount increment is positive or negative, and then determines the adjustment increment of the maximum refresh rate according to the corresponding change trend.

[0094] Specifically, when the Nth dirty data amount increment is positive and the change trend is increasing or constant, the adjustment increment is the preset adjustment increment; when the Nth dirty data amount increment is positive and the change trend is decreasing, the adjustment increment is half of the preset adjustment increment. Figure 4 Schematic diagram of the adjustment increment of the maximum downward brushing speed provided in the embodiment of the present application. Figure 4 As shown, the horizontal axis represents time and the vertical axis represents adjustment increment; Figure 4 , the preset adjustment increment is 10, and half of the preset adjustment increment is 5.

[0095] Furthermore, when the Nth dirty data amount increment is a negative value and the change trend is increasing or constant, the adjustment increment is the negative value of the preset adjustment increment; when the Nth dirty data amount increment is a negative value and the change trend is decreasing, the adjustment increment is half of the negative value of the preset adjustment increment. Figure 4 As shown, the negative value of the preset adjustment increment is -10, and half of the negative value of the preset adjustment increment is -5. Figure 5 This is a schematic diagram of the maximum downward brushing speed provided in the embodiment of the present application. Figure 5 As shown, the horizontal axis represents time and the vertical axis represents the maximum refresh rate. The maximum refresh rate is adjusted by adjusting the increment, so that the maximum refresh rate can be adaptively adjusted according to the business situation.

[0096] It should be noted that the preset adjustment increment in this embodiment is an empirical value. Figure 4The preset adjustment increment of 10 given in the figure is only a preferred embodiment and does not impose any limitation on the preset adjustment increment, which depends on the specific implementation situation.

[0097] In this embodiment, by determining whether the Nth dirty data amount increment is positive or negative and obtaining the adjustment increment of the maximum refresh rate according to the corresponding change trend, the adjustment increment of the maximum refresh rate is accurately obtained.

[0098] Based on the above embodiment:

[0099] As a preferred embodiment, when the Nth dirty data amount increment is a negative value, the method further includes:

[0100] If the Nth dirty data increment is lower than the preset adjustment trigger threshold, the maximum refresh rate is not adjusted.

[0101] Specifically, when obtaining the adjustment increment for the maximum refresh rate, if the Nth dirty data increment is negative, it indicates that the amount of dirty data in the buffer is gradually decreasing. To ensure that the normal and stable flushing of dirty data is not affected, as a preferred embodiment, if the Nth dirty data increment is lower than the preset adjustment trigger threshold, the maximum refresh rate is not adjusted.

[0102] It should be noted that the preset adjustment trigger threshold in this embodiment is an empirical value, which is not limited in this embodiment and depends on specific implementation conditions.

[0103] In this embodiment, when the Nth dirty data increment is a negative value, if the Nth dirty data increment is lower than the preset adjustment trigger threshold, the maximum refresh rate is not adjusted, thereby achieving stable refresh of dirty data.

[0104] Based on the above embodiment:

[0105] As a preferred embodiment, after adjusting the maximum flushing speed of dirty data according to the adjustment increment, the method further includes:

[0106] If the adjusted maximum brush speed is greater than the preset maximum speed, the maximum brush speed will be the preset maximum speed;

[0107] If the adjusted maximum downward brush speed is less than the preset minimum speed, the maximum downward brush speed will be the preset minimum speed.

[0108] It is understood that when the maximum refresh speed of dirty data is adjusted according to the adjustment increment, the adjusted speed may be greater than the preset maximum speed or less than the preset minimum speed. The preset maximum speed and the preset minimum speed are the maximum and minimum values that the preset refresh speed can reach, respectively. Therefore, after adjusting the maximum refresh speed of dirty data according to the adjustment increment, if the adjusted maximum refresh speed is greater than the preset maximum speed, the maximum refresh speed will be the preset maximum speed; if the adjusted maximum refresh speed is less than the preset minimum speed, the maximum refresh speed will be the preset minimum speed.

[0109] It should be noted that, in this embodiment, there is no restriction on the preset maximum speed and the preset minimum speed, which depend on the specific implementation situation.

[0110] In this embodiment, after adjusting the maximum refresh speed of dirty data according to the adjustment increment, if the adjusted maximum refresh speed is greater than the preset maximum speed, the maximum refresh speed is the preset maximum speed; if the adjusted maximum refresh speed is less than the preset minimum speed, the maximum refresh speed is the preset minimum speed, thereby achieving reasonable adjustment of the maximum refresh speed.

[0111] In the above embodiments, the data refresh rate control method is described in detail. This application also provides corresponding embodiments of a data refresh rate control device. It should be noted that this application describes the embodiments of the device from two perspectives: one is based on the functional module perspective, and the other is based on the hardware structure perspective.

[0112] Figure 6 This is a schematic diagram of a data refresh speed control device provided in an embodiment of the present application. Figure 6 As shown, the data refresh speed control device includes:

[0113] A first acquisition module 10 is used to continuously acquire the amount of dirty data in the buffer space;

[0114] The sampling module 11 is configured to sample the dirty data amount according to a preset time period to obtain an increment of the dirty data amount in N consecutive preset time periods, where N is an integer greater than 1.

[0115] The second acquisition module 12 is used to obtain the change trend of the dirty data amount increment;

[0116] Adjustment module 13, used to adjust the maximum flush speed of dirty data in the buffer space according to the change trend

[0117] In this embodiment, the data flushing speed control device includes a first acquisition module, a sampling module, a second acquisition module, and an adjustment module. By continuously acquiring the amount of dirty data in the buffer space; sampling the amount of dirty data according to a preset time period to obtain the incremental amount of dirty data under N consecutive preset time periods; wherein N is an integer greater than 1; acquiring the changing trend of the incremental amount of dirty data; and adjusting the maximum flushing speed of the dirty data in the buffer space according to the changing trend. It can be seen that the above scheme uses the incremental change of the amount of dirty data in the buffer space as an adjustment indicator, and adjusts the maximum flushing speed with a corresponding step size according to the incremental change and the incremental trend, thereby realizing automatic adjustment of the maximum buffer flushing speed according to business performance, so that the storage system can always provide the best business performance and improve the user experience.

[0118] Figure 7 This is a schematic diagram of another data refresh speed control device provided in an embodiment of the present application. Figure 7 As shown, the data refresh speed control device includes:

[0119] The memory 20 is used to store computer programs.

[0120] The processor 21 is configured to implement the steps of the data refresh speed control method mentioned in the above embodiment when executing a computer program.

[0121] The data refresh rate control device provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer, or a desktop computer.

[0122] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of a digital signal processor (DSP), a field programmable gate array (FPGA), and a programmable logic array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.

[0123] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include high-speed random access memory, and non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used to store the following computer program 201, wherein, after the computer program is loaded and executed by the processor 21, it can implement the relevant steps of the data refresh speed control method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include but is not limited to data involved in the data refresh speed control method.

[0124] In some embodiments, the data refresh speed control device may further include a display screen 22 , an input / output interface 23 , a communication interface 24 , a power supply 25 , and a communication bus 26 .

[0125] Those skilled in the art will understand that Figure 7 The structure shown in the figure does not constitute a limitation on the data refresh speed control device, and may include more or fewer components than shown in the figure.

[0126] In this embodiment, the data flushing speed control device includes a memory and a processor. The processor is used to implement the steps of the data flushing speed control method mentioned in the above embodiment when executing a computer program. By continuously obtaining the amount of dirty data in the buffer space; sampling the amount of dirty data according to a preset time period to obtain the incremental amount of dirty data under N consecutive preset time periods; wherein N is an integer greater than 1; obtaining the changing trend of the incremental amount of dirty data; and adjusting the maximum flushing speed of the dirty data in the buffer space according to the changing trend. It can be seen that the above scheme uses the incremental change of the amount of dirty data in the buffer space as an adjustment indicator, and adjusts the maximum flushing speed with a corresponding step size according to the incremental change and the incremental trend, thereby realizing automatic adjustment of the maximum buffer flushing speed according to business performance, so that the storage system can always provide the best business performance and improve the user experience.

[0127] Finally, the present application also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps described in the above method embodiment.

[0128] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and executes all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0129] In this embodiment, a computer program is stored on a computer-readable storage medium, and when the computer program is executed by a processor, the steps described in the above method embodiment are implemented. By continuously obtaining the amount of dirty data in the buffer space; sampling the amount of dirty data according to a preset time period to obtain the incremental amount of dirty data under N consecutive preset time periods; wherein N is an integer greater than 1; obtaining the changing trend of the incremental amount of dirty data; and adjusting the maximum flushing speed of dirty data in the buffer space according to the changing trend. It can be seen that the above scheme uses the incremental change of the amount of dirty data in the buffer space as an adjustment indicator, and adjusts the maximum flushing speed with a corresponding step size according to the incremental change and the incremental trend, thereby realizing automatic adjustment of the maximum buffer flushing speed according to business performance, so that the storage system can always provide the best business performance and improve the user experience.

[0130] The above is a detailed introduction to a data refresh speed control method, device and medium provided by the present application. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of this application.

[0131] It should also be noted that, in this specification, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.

Claims

1. A data refresh speed control method, characterized in that: include: Continuously obtain the amount of dirty data in the buffer space; Sampling the dirty data amount according to a preset time period to obtain dirty data amount increments in N consecutive preset time periods; wherein N is an integer greater than 1; Obtaining a changing trend of the dirty data amount increment; adjusting the maximum flushing speed of dirty data in the buffer space according to the change trend; The obtaining of the change trend of the dirty data amount increment includes: Obtain a first average value of N dirty data amount increments; Obtain a second average value of N-1 increments of the dirty data amount, and a third average value of the second average value and the Nth increment of the dirty data amount; When the Nth increment of the dirty data amount is a positive value, if the third average value is greater than the first average value, the change trend is increasing; if the third average value is equal to the first average value, the change trend is constant; if the third average value is less than the first average value, the change trend is decreasing; When the Nth increment of the amount of dirty data is a negative value, if the third average value is greater than the first average value, the change trend is decreasing; if the third average value is equal to the first average value, the change trend is constant; if the third average value is less than the first average value, the change trend is increasing.

2. The data refresh speed control method according to claim 1, characterized in that: The amount of dirty data continuously obtained from the buffer space includes: Continuously obtain the amount of dirty data written and the amount of dirty data flushed from the buffer space; The dirty data amount is obtained according to the dirty data write amount and the dirty data flush amount.

3. The data refresh speed control method according to claim 1, characterized in that: The adjusting the maximum flushing speed of dirty data in the buffer space according to the change trend includes: Obtaining an adjustment increment of the maximum downward brushing speed according to the change trend; The maximum refresh rate of the dirty data is adjusted according to the adjustment increment.

4. The data refresh speed control method according to claim 3, characterized in that: The step of obtaining the adjustment increment of the maximum downward scrolling speed according to the change trend includes: When the Nth dirty data amount increment is a positive value, and the change trend is increasing or constant, the adjustment increment is a preset adjustment increment; When the Nth dirty data amount increment is a positive value and the change trend is decreasing, the adjustment increment is half of the preset adjustment increment; When the Nth dirty data amount increment is a negative value, and the change trend is increasing or constant, the adjustment increment is a negative value of the preset adjustment increment; When the Nth dirty data amount increment is a negative value and the change trend is decreasing, the adjustment increment is half of the negative value of the preset adjustment increment.

5. The data refresh speed control method according to claim 4, characterized in that: When the Nth dirty data amount increment is a negative value, the following further includes: If the Nth increment of the dirty data amount is lower than the preset adjustment trigger threshold, the maximum refresh rate is not adjusted.

6. The data refresh speed control method according to any one of claims 3 to 5, characterized in that: After adjusting the maximum flushing speed of the dirty data according to the adjustment increment, the method further includes: If the adjusted maximum downward brushing speed is greater than the preset maximum speed, the maximum downward brushing speed is the preset maximum speed; If the adjusted maximum downward brushing speed is less than the preset minimum speed, the maximum downward brushing speed is the preset minimum speed.

7. A data refresh speed control device, characterized in that: include: A first acquisition module is used to continuously acquire the amount of dirty data in the buffer space; a sampling module, configured to sample the dirty data amount according to a preset time period to obtain an increment of the dirty data amount in N consecutive preset time periods; wherein N is an integer greater than 1; A second acquisition module is used to obtain a change trend of the dirty data amount increment; An adjusting module, configured to adjust a maximum flushing speed of dirty data in the buffer space according to the changing trend; The obtaining of the change trend of the dirty data amount increment includes: Obtain a first average value of N dirty data amount increments; Obtain a second average value of N-1 increments of the dirty data amount, and a third average value of the second average value and the Nth increment of the dirty data amount; When the Nth increment of the dirty data amount is a positive value, if the third average value is greater than the first average value, the change trend is increasing; if the third average value is equal to the first average value, the change trend is constant; if the third average value is less than the first average value, the change trend is decreasing; When the Nth increment of the amount of dirty data is a negative value, if the third average value is greater than the first average value, the change trend is decreasing; if the third average value is equal to the first average value, the change trend is constant; if the third average value is less than the first average value, the change trend is increasing.

8. A data refresh speed control device, characterized in that: include: memory for storing computer programs; A processor is configured to implement the steps of the data refresh speed control method according to any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data refresh speed control method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Cache task queue scheduling method and system, terminal and storage medium

    CN111949392A

  • Data management method and device in storage system

    WO2021068515A1