Cloud storage service timeout value optimization method adaptive to chaotic environment and related device
By introducing TB-RPS and TPV into the cloud storage system and adaptively adjusting the timeout value, the problem of incorrect timeout value configuration in the cloud storage system in chaotic environments is solved, achieving efficient and fast timeout value optimization and improving system availability and response speed.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA TELECOM CLOUD TECH CO LTD
- Filing Date
- 2021-12-27
- Publication Date
- 2026-04-21
AI Technical Summary
In chaotic environments, cloud storage systems may experience reduced availability or become unavailable due to incorrect timeout value configurations. Existing solutions struggle to provide suitable timeout values under uncertain conditions.
By introducing timeout bounded request rate (TB-RPS) and timeout probability vector (TPV), the timeout value is adaptively adjusted in the cloud storage system, optimized according to network and load changes, and dynamically adjusted using a lightweight monitoring framework.
It enables efficient and rapid adaptive timeout value optimization of cloud storage systems in chaotic environments, reducing system latency overhead, improving system availability and response speed, and reducing configuration difficulty and deployment costs.
Smart Images

Figure CN114297026B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and more specifically, to a method, apparatus, computer device, and computer-readable storage medium for optimizing timeout values in cloud storage services in an adaptive chaotic environment. Background Technology
[0002] In recent years, with the large-scale adoption of new technologies such as cloud computing, big data, and the Internet of Things, massive data storage has become a major challenge for industries such as healthcare, government, internet, and finance. Particularly in banking and insurance, ensuring high availability of core business operations requires unacceptable data interruptions, rapid response to business changes, and a certain degree of flexibility. Traditional centralized storage architectures have reached their limits and cannot meet the demands of modern business. Compared to centralized storage architectures, cloud storage architectures offer significant advantages in resource usage costs and scalability, business deployment flexibility, and system availability.
[0003] However, cloud storage architecture is far more complex than centralized storage, and cloud storage systems operate in a chaotic environment, constantly facing uncertainties such as increased load, buffer failures, and node failures. This means that managing and configuring them will be more difficult, especially configuring network transmission timeout values.
[0004] Because cloud storage systems heavily rely on unreliable network transmission, timeout mechanisms are typically required to handle network and system failures. If the network environment changes or the system load deviates from expectations, two scenarios may occur: if the preset timeout value is too large, the system will wait for the faulty node for an extended period, reducing system availability; if the preset timeout value is too small, repeated retransmissions will occur, rendering the system unavailable.
[0005] Related literature indicates that bugs caused by incorrect timeout value configurations account for 47% of all timeout bugs in cloud storage systems. In recent years, both industry and academia have proposed numerous solutions to the timeout problem. However, most of these solutions focus on finding and locating timeout configuration errors, requiring the acquisition of Happen-Before relationships between different network requests. This necessitates monitoring a large amount of network transmission rate information and modifying communication protocols to piggyback Happen-Before information, often relying on heavyweight and intrusive monitoring frameworks, resulting in reduced scalability and system performance loss. Moreover, even if these solutions locate the incorrect timeout configuration, they struggle to provide a suitable timeout value for the current chaotic environment. Summary of the Invention
[0006] This disclosure provides a method, apparatus, computer device, and computer-readable storage medium for optimizing timeout values in cloud storage services in an adaptive chaotic environment, which can solve at least some of the technical problems existing in the above-mentioned related technologies.
[0007] This disclosure provides a method for optimizing timeout values in cloud storage services in an adaptive chaotic environment. The cloud storage system includes a first node, and the method is executed by the first node. The method includes: obtaining the previous monitoring window information and its previous actual timeout value of a target communication link, as well as the current monitoring window information and its current actual timeout value; if it is determined that the target timeout value of the current monitoring window of the target communication link is greater than the current actual timeout value, then determining the target timeout value of the current monitoring window of the target communication link based on a target coefficient and the current actual timeout value; if it is determined that the target timeout value of the current monitoring window of the target communication link is less than or equal to the current actual timeout value, then obtaining the target timeout bounded request rate of the target communication link within the current monitoring window based on the current actual timeout value and the current monitoring window information, and using the timeout value corresponding to the target timeout bounded request rate as the target timeout value of the current monitoring window of the target communication link; and using the target timeout value of the current monitoring window of the target communication link as the predicted target timeout value of the next monitoring window of the target communication link.
[0008] This disclosure provides an adaptive chaotic environment cloud storage service timeout optimization device. The cloud storage system includes a first node, and the device is disposed on the first node. The device includes: an obtaining unit, configured to obtain the previous monitoring window information and its previous actual timeout value of a target communication link, and the current monitoring window information and its current actual timeout value; a processing unit, configured to, if it is determined that the target timeout value of the current monitoring window of the target communication link is greater than the current actual timeout value, determine the target timeout value of the current monitoring window of the target communication link based on a target coefficient and the current actual timeout value; the processing unit is further configured to, if it is determined that the target timeout value of the current monitoring window of the target communication link is less than or equal to the current actual timeout value, obtain the target timeout bounded request rate of the target communication link within the current monitoring window based on the current actual timeout value and the current monitoring window information, and use the timeout value corresponding to the target timeout bounded request rate as the target timeout value of the current monitoring window of the target communication link; the processing unit is further configured to use the target timeout value of the current monitoring window of the target communication link as the predicted target timeout value of the next monitoring window of the target communication link.
[0009] This disclosure provides a computer device including a processor, a memory, and an input / output interface. The processor is connected to both the memory and the input / output interface. The input / output interface is used to receive and output data. The memory is used to store a computer program. The processor is used to call the computer program to enable the computer device containing the processor to execute the cloud storage service timeout optimization method for adaptive chaotic environment according to this disclosure.
[0010] One aspect of this disclosure provides a computer-readable storage medium storing a computer program adapted to be loaded and executed by a processor, such that a computer device having the processor performs the cloud storage service timeout optimization method for an adaptive chaotic environment according to this disclosure.
[0011] This disclosure provides, in one aspect, a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in various alternative embodiments of this disclosure. Attached Figure Description
[0012] Figure 1 This is a flowchart of a cloud storage service timeout optimization method for an adaptive chaotic environment provided in this embodiment of the disclosure.
[0013] Figure 2 The diagram illustrates a system sequence of a cloud storage service timeout optimization method for an adaptive chaotic environment according to an embodiment of the present disclosure.
[0014] Figure 3 The illustration shows a schematic diagram of experimental results with an initial timeout value set to 20ms according to an embodiment of the present disclosure.
[0015] Figure 4 The illustration shows a schematic diagram of experimental results with an initial timeout value set to 200ms according to an embodiment of the present disclosure.
[0016] Figure 5 The illustration shows a schematic diagram of experimental results with an initial timeout value set to 2000ms according to an embodiment of the present disclosure.
[0017] Figure 6 This is a schematic diagram of the framework of a cloud storage service timeout value optimization device for an adaptive chaotic environment provided in an embodiment of this disclosure.
[0018] Figure 7 This is a schematic diagram of the structure of a computer device provided in an embodiment of this disclosure. Detailed Implementation
[0019] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art.
[0020] In this disclosure, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. "And / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. Furthermore, "at least one" means one or more, and "multiple" means two or more. The terms "first," "second," etc., do not limit the quantity or order of execution, and "first," "second," etc., do not necessarily imply differences.
[0021] Figure 1 This embodiment provides a method for optimizing service timeout values in an adaptive chaotic environment for a cloud storage system. The cloud storage system may include multiple nodes, each of which can be any computer or electronic device. The multiple nodes may include a first node, which can be any one of the multiple nodes. Figure 1 The method provided in the embodiment is assumed to be executed by the first node.
[0022] like Figure 1 As shown, the method provided in this disclosure embodiment may include the following steps.
[0023] In S110, the previous monitoring window information and its previous actual timeout value of the target communication link are obtained, as well as the current monitoring window information and its current actual timeout value.
[0024] In an exemplary embodiment, the cloud storage system further includes a second node, and the target communication link is the communication link between the first node and the second node.
[0025] Obtaining the current monitoring window information of the target communication link may include: receiving a user request; sending at least one request to the second node within the current monitoring window according to the user request, and recording the timestamp of each request; if a response to the request is received from the second node, recording the timestamp of the response, calculating the delay of the request based on the timestamp of sending the request and the timestamp of receiving the response, and recording the request and its delay in the current monitoring window as the current monitoring window information; if no response to the request is received within the current actual timeout value, recording the request timeout in the current monitoring window as the current monitoring window information.
[0026] The method for obtaining the previous monitoring window information of the target communication link is similar to the method for obtaining the current monitoring window information of the target communication link.
[0027] In S120, if it is determined that the target timeout value of the current monitoring window of the target communication link is greater than the current actual timeout value, then the target timeout value of the current monitoring window of the target communication link is determined according to the target coefficient and the current actual timeout value.
[0028] In an exemplary embodiment, the previous monitoring window information includes ω requests for the target communication link within the previous monitoring window, along with their latency and timeout information.
[0029] The current monitoring window information includes ω requests for the target communication link within the current monitoring window, along with their latency and timeout information, where ω is an integer greater than or equal to 1.
[0030] The method may further include: obtaining, based on ω requests and their latency and timeout information of the target communication link within the current monitoring window, the current timeout count of the target communication link under the current actual timeout value, and the current timeout bounded request rate of the target communication link under the current actual timeout value; obtaining, based on ω requests and their latency and timeout information of the target communication link within the previous monitoring window, the previous timeout count of the target communication link under the previous actual timeout value, and the previous timeout bounded request rate of the target communication link under the previous actual timeout value; if the current timeout count is greater than a timeout threshold; or, the previous timeout bounded request rate is greater than the current timeout bounded request rate, and the previous timeout count is less than the current timeout count, then determining that the target timeout value of the current monitoring window of the target communication link is greater than the current actual timeout value.
[0031] In an exemplary embodiment, obtaining the current timeout bounded request rate of the target communication link under the current actual timeout value based on ω requests and their latency and timeout information of the target communication link within the current monitoring window may include: obtaining the number of requests that did not time out under the current actual timeout value within the current monitoring window of the target communication link based on ω requests and their latency and timeout information of the target communication link within the current monitoring window; obtaining the sum of the latency of requests that did not time out and the timeout value of timeout requests within the current monitoring window of the target communication link based on ω requests and their latency and timeout information of the target communication link within the current monitoring window; and obtaining the current timeout bounded request rate of the target communication link under the current actual timeout value within the current monitoring window of the target communication link based on the number of requests that did not time out under the current actual timeout value within the current monitoring window of the target communication link, and the sum of the latency of requests that did not time out and the timeout value of timeout requests within the current monitoring window of the target communication link.
[0032] The previous timeout bounded request rate is obtained in a similar way to the current timeout bounded request rate.
[0033] In an exemplary embodiment, the target coefficient may be greater than 1.
[0034] In an exemplary embodiment, the method may further include: obtaining requests, their delays, and timeout information of the target communication link within a preset duration; clustering the requests, their delays, and timeout information of the target communication link within the preset duration, using the maximum delay value of each cluster as the timeout value of the corresponding cluster, and obtaining a timeout probability vector; and determining the target coefficient based on the current actual timeout value and the timeout probability vector.
[0035] In S130, if it is determined that the target timeout value of the current monitoring window of the target communication link is less than or equal to the current actual timeout value, then the target timeout bounded request rate of the target communication link within the current monitoring window is obtained according to the current actual timeout value and the current monitoring window information, and the timeout value corresponding to the target timeout bounded request rate is taken as the target timeout value of the current monitoring window of the target communication link.
[0036] In an exemplary embodiment, obtaining the target timeout bounded request rate of the target communication link within the current monitoring window based on the current actual timeout value and the current monitoring window information may include: calculating the timeout bounded request rate corresponding to each integer from 1 to the current actual timeout value based on the current monitoring window information; and taking the maximum timeout bounded request rate among the timeout bounded request rates corresponding to each integer from 1 to the current actual timeout value as the target timeout bounded request rate.
[0037] In an exemplary embodiment, using the timeout value corresponding to the target timeout bounded request rate as the target timeout value of the current monitoring window of the target communication link may include: if there are multiple timeout values among the integers from 1 to the current actual timeout value such that the timeout bounded request rate is the maximum timeout bounded request rate, then the minimum timeout value among the multiple timeout values shall be used as the target timeout value.
[0038] In S140, the target timeout value of the current monitoring window of the target communication link is used as the predicted target timeout value of the next monitoring window of the target communication link.
[0039] This disclosure proposes a novel technical approach: adaptively adjusting the timeout value based on changes in network and load in a chaotic environment to maintain its optimal value.
[0040] The main purpose of this disclosure is to accurately reflect the quality of the current network and system environment by introducing Timeout-bounded Requests Per Second (TB-RPS), and to obtain the optimal timeout value by calculating the maximum TB-RPS, thereby achieving dynamic adaptive adjustment with zero prior knowledge and independent of the execution environment.
[0041] Furthermore, in order to further improve the convergence rate, this embodiment of the present disclosure also creatively introduces a timeout probability vector (TPV) to predict the optimal multiplier α for the timeout value to increase when the environment deteriorates.
[0042] The embodiments disclosed herein solve the problem of timeout value optimization and setting with a lightweight and scalable solution, fundamentally avoiding bugs (faults) related to timeout value configuration in cloud storage systems.
[0043] Figure 2 This illustration shows a system sequence diagram of an adaptive chaotic environment cloud storage system service timeout optimization method proposed in an embodiment of this disclosure. The system consists of two parts: a short-term monitoring module and a long-term monitoring module, and can be deployed on any node of the cloud storage system. Figure 2To illustrate its working principle, we will take deployment on the client side (i.e., assuming the client is the first node). The client side can include a client communication module, a short-term monitoring module, and a long-term monitoring module.
[0044] like Figure 2 As shown, in a cloud storage system, a user sends a request to the client (taking the NameNode (the namespace manager of the file system, the administrator) to read a disk file (this is called a user request). The client then sends one or more requests to the server (taking the DataNode (the worker)) through the client communication module. Figure 2 This is referred to as a client request until the task is completed and returned to the user.
[0045] During this period (assuming it's the current monitoring window), requests sent by the client to the server (assuming it's the second node) may time out. When the client sends a request to the server, the short-term monitoring component (i.e., the short-term monitoring module) records the timestamp of the current time (i.e., the timestamp of the request being sent).
[0046] Afterwards, the system will encounter two situations: If a response to a request is successfully received, the short-term monitoring component will record the timestamp of the request completion (i.e., the timestamp of receiving the response to the request) and calculate the request latency; if no response is received after the timeout value (e.g., the current actual timeout value), a timeout will be triggered, and the short-term monitoring component will record the timeout period.
[0047] When the monitoring window is full (e.g., 1000 requests / timeout data have been collected, which is taken as the current monitoring window), the short-term monitoring component will calculate the timeout value that maximizes TB-RPS based on the information of the current monitoring window and the information of the previous monitoring window. This is the optimal timeout value (i.e., the target timeout value), and the short-term monitoring component will notify the client communication component (i.e., the client communication module) of this timeout value. After the client communication component confirms the update, the short-term monitoring component will update the current actual timeout value to the optimal timeout value.
[0048] If long-term monitoring is enabled (e.g., data collected for a quarter or a year), the long-term monitoring component / module can calculate the communication link (e.g., ...). Figure 1 The timeout value is calculated based on the TPV (Total Value of the Target Communication Link) between the client and server. The optimal coefficient α (target coefficient) for increasing the timeout value is then calculated based on the TPV. The short-term monitoring component calculates the optimal timeout value based on this target coefficient α. Based on this principle, the timeout value can be increased when the system environment deteriorates and decreased when the system environment improves, thus achieving an optimal timeout value relative to the current system environment.
[0049] To accurately describe the mathematical model of this disclosure, the following definition is given: Let the latency and timeout information of each read / write request be a unit, and ω units form a monitoring window (or simply window) W. Suppose that two consecutive windows are recorded along the time axis, namely the previous monitoring window W. i-1 Current monitoring window W i Based on this, predict the next monitoring window W i+1 Optimal timeout value i is an integer greater than or equal to 2. L ij Used to represent window W i The delay of the j-th request, where j is an integer greater than or equal to 0 and less than or equal to ω-1. If the request times out, the value is 0. Indicates the current monitoring window W i The current actual timeout value within the window. In actual observations, it was found that the timeout distributions of adjacent windows are basically similar. Therefore, in the prediction, it is assumed that W... i+1 The timeout distribution and W i Similarly, at this time, for the current monitoring window W i The calculated optimal timeout value is W. i+1 The predicted optimal timeout value, i.e.
[0050] To calculate the optimal timeout value, the Bounded Timeout Request Rate (TB-RPS) is introduced. TB-RPS is defined as the number of requests per unit time whose latency does not exceed a given bounded timeout value. Based on this definition, the following formula can be derived:
[0051]
[0052]
[0053] in, Indicates the timeout value as τ for window W. i TB-RPS within; The function is an indicator function; if a timeout occurs, its value is 1, otherwise it is 0. The numerator of formula (1) represents the number of requests that did not time out, and the denominator represents the sum of the delay of all requests that did not time out and the timeout value of all requests that timed out.
[0054] For window W i The goal is to find the timeout value that maximizes the TB-RPS of the window. As the optimal timeout value. Based on the optimal timeout value. Compared with the current actual timeout value The relationship between them can be divided into two cases:
[0055] 1. When When this happens, the current actual timeout value must be reduced, calculated according to formula (1) to make it so that... The maximum timeout value τ is the optimal timeout value. Since the domain is bounded and discrete, it must have an extremum. If there is more than one extremum, the smallest timeout value is taken. This helps the embodiments of this disclosure reduce the timeout value when the environment improves. Therefore, for window W... i When the optimal timeout value is less than or equal to the current actual timeout value, the objective function for finding the optimal timeout value can be expressed as:
[0056]
[0057] 2. When At this time, the current actual timeout value must be increased, because the current actual timeout value The truncation effect applies to all request delays, meaning the request delay will necessarily not exceed [a certain value]. Since the request latency after the timeout value increases cannot be predicted, and the optimal timeout value cannot be directly calculated based on the current window information, the current timeout value can only be increased probingly. In a short-term deployment environment, the embodiments of this disclosure can directly... Multiply by a fixed coefficient α (α>1) to obtain the predicted optimal timeout value. In practice, it has been found that the effect is better when α=2, but this disclosure is not limited to this.
[0058] In long-term deployment environments, embodiments of this disclosure can use TPV to calculate the target coefficient α, which will be described in subsequent sections. Therefore, for window W i When the optimal timeout value is greater than the current actual timeout value, the predicted optimal timeout value can be expressed as:
[0059]
[0060] In actual observations, it was found that for adjacent windows, when W i W i-1 When the environment deteriorates, then W i+1 The environment often continues to deteriorate, manifested as a decrease in TB-RPS. According to formula (1), the decrease in TB-RPS may be due to an increase in the non-timeout transmission delay or an excessive number of timeouts. Only the latter requires increasing the timeout value. Therefore, for window W... i ,judge The conditions are:
[0061]
[0062] In the above formula, Indicates the previous monitoring window W i-1 In the previous actual timeout value TB-RPS under This indicates the previous monitoring window W.i-1 In the previous actual timeout value The number of timeouts; Indicates the current monitoring window W i At the current actual timeout value TB-RPS under Indicates the current monitoring window W i At the current actual timeout value The number of timeouts.
[0063] To avoid excessive timeouts impacting business operations, the method proposed in this disclosure can assign a timeout threshold η based on the sensitivity of different services to timeouts, and specify the current actual timeout value. The number of timeouts T i When η is greater than η, the current actual timeout value should also be increased.
[0064] Next, the predicted next monitoring window W is given. i+1 The algorithm for predicting the optimal timeout value is described below. The input of the algorithm is the timeout distribution and actual timeout value of two adjacent windows (including the previous actual timeout value and the current actual timeout value), and the output is the predicted optimal timeout value of the next monitoring window.
[0065] Algorithm 1: Prediction Window W i+1 Optimal timeout value
[0066] Input: Window W i-1 and W i Delay timeout distribution and actual timeout value
[0067] Output: Window W i+1 Predicted optimal timeout value
[0068]
[0069] In the algorithm described above, the first line checks whether the condition is satisfied. This refers to the situation where the optimal timeout value is greater than the current actual timeout value. The criteria for this judgment are either that the number of timeouts in the current monitoring window exceeds the timeout threshold, or that the TB-RPS of the current monitoring window is smaller than the TB-RPS of the previous monitoring window, and the number of timeouts in the current monitoring window is greater than the number of timeouts in the previous monitoring window. The second line infers that the optimal timeout value is the current actual timeout value of the current monitoring window multiplied by a coefficient α, where α can initially be set to 2.
[0070] Lines 3 to 10 indicate in In this case, the optimal timeout value is calculated. Lines 4 and 5 indicate that the timeout value is initially set to the current actual timeout value. And calculate the TB-RPS at this point as the maximum value. Lines 6 to 9 indicate that the timeout value will be changed from... Continuously decrease the value until it reaches 1, then update the maximum value of TB-RPS and the current timeout value. Return on line 10. That is, the optimal timeout value for the next window of prediction.
[0071] Once the environment stabilizes, meaning the communication latency always falls within a fixed range, the algorithm will converge regardless of the initial timeout value. If the initial timeout value is set too small, the number of timeouts will be excessive, exceeding the specified threshold η or causing TB-RPS to decrease. The algorithm then determines that the environment has deteriorated and increases the timeout value. In the next window, if the number of timeouts is still too high, the timeout value continues to increase. This continues until the number of timeouts is within the timeout threshold η and TB-RPS does not decrease. At this point, the algorithm determines that the environment has not deteriorated and is considered to be within the set. The system searches for the optimal timeout value within the current window. This optimal timeout value will not exceed the current actual timeout value. If the environment does not deteriorate in subsequent windows, the system continues to search for the optimal timeout value until the optimal timeout value is always equal to the current actual timeout value, thus achieving convergence.
[0072] Similarly, the algorithm can still converge even if the initial timeout value is set too large. If the environment suddenly worsens or improves at a certain moment and eventually stabilizes, the algorithm logic is equivalent to the case where the initial timeout value is too small or too large at the moment of the abrupt change, and therefore it can still converge to the optimal timeout value. With a fixed window size ω, the complexity of this algorithm relative to the current actual timeout value... The timeout is O(N). The algorithm is only called to calculate the optimal timeout value after each window has been fully collected. Because... The smaller value of ω (typically 200ms in tests) and the larger window value of ω (typically 1000 times in tests) amortize the computational cost, so the overhead caused by this calculation is negligible for each request. In a simulated stable test environment, the overall latency overhead of the method proposed in this disclosure on the cloud storage system does not exceed 1%.
[0073] The aforementioned application scenarios primarily involve short-term deployments, where the target coefficient α for increasing the timeout value is fixed, eliminating the need to calculate TPV. However, for long-term deployments with a quarterly or even yearly cycle, TPV can be calculated to determine the optimal coefficient α, thereby accelerating the convergence rate of the timeout value under deteriorating environmental conditions. To calculate the optimal coefficient α, this disclosure innovatively designs the timeout probability vector TPV as an indicator.
[0074] TPV is defined as a cluster of latency probability vectors for a given link. Each cluster has a maximum latency value, which serves as the timeout value for that cluster. TPV reflects the statistical characteristics of latency and timeout information for a given link during long-term operation. Each cluster corresponds to a certain state or a combination of states in the cloud storage system, which are typically distinguished based on different call or execution paths. For example, the TPV of a given link might be clustered into three categories: 90% of requests have a latency of less than 10ms, corresponding to execution paths with cache hits; 9% of requests have a latency greater than or equal to 10ms but less than 100ms, corresponding to execution paths with cache failures; and 1% of requests have a latency greater than or equal to 100ms, corresponding to node failures.
[0075] Suppose that the TPV on a certain link is clustered into n classes C1, C2, ..., C n n is an integer greater than or equal to 1, and the timeout value for each cluster is M(C k ), k∈{1,2,…,n}, and satisfy M(C1)<M(C2)<…<M(C n For the current monitoring window W i If Algorithm 1 determines that the timeout value should be increased, then the increase coefficient α can be calculated using the following formula:
[0076]
[0077] Formula (6) indicates that if the current monitoring window W i Current actual timeout value Within the time delay range of a certain cluster, the optimal prediction timeout value can be directly set as the timeout value of that cluster. If the timeout value for a given cluster is reached, the optimal timeout value can be set as the timeout value for the next cluster. This adjustment method is more accurate than multiplying by 2 and can achieve faster convergence.
[0078] If the timeout value is already set to M(C) n If the value still needs to be increased, it is considered that the system has malfunctioned and cannot be resolved by adjusting the timeout value. In this case, a warning message can be sent to the operation and maintenance personnel.
[0079] In this embodiment, TPV can be used not only for adjusting timeout values in cloud storage systems, but also to assist cloud storage systems in selecting the optimal node among multiple communication nodes. For example, if node A has 5% of its requests with latency greater than or equal to 100ms, and node B has 1% of its requests with latency greater than or equal to 100ms, then node B is selected. Developers can customize rules according to actual needs and use TPV to make decisions.
[0080] This disclosure provides a monitor class for user invocation. The monitor's attributes include three parameters: window size, maximum timeout count, and communication link identifier. Users can arbitrarily assign an initial timeout value to initialize a monitor instance. After each request is completed or a timeout occurs, the user must provide the monitor instance with the request's latency or timeout information. When a window is full, the monitor instance automatically calculates the optimal timeout value for the next window in the backend. Users can directly obtain this value to set the communication link's timeout value and notify the monitor instance. Furthermore, users can directly obtain the TPV (Total Time Per View).
[0081] A series of experiments were conducted. Figure 3 , Figure 4 and Figure 5 This diagram illustrates the relationship between the reciprocal of TB-RPS (in milliseconds), the optimal timeout value, and the number of timeouts for each request within the same cloud storage system, when the initial timeout values are set to 20ms, 200ms, and 2000ms, respectively. The horizontal axis represents the monitoring window number, and the vertical axis represents 1 / TB-RPS, the optimal timeout value, or the number of timeouts (1 / TB-RPS is used with milliseconds for better comparison with the optimal timeout value).
[0082] Analysis of the experimental results shows that regardless of the initial timeout value, the optimal timeout value converges to between 200 and 300 ms after 10 cycles. This indicates that the method provided in this embodiment can effectively calculate the optimal timeout value under the current environment, independent of the initial timeout value, and the optimal timeout value converges quickly. The changes in the 1 / TB-RPS and optimal timeout value curves are basically synchronized, indicating that the optimal timeout value can be quickly adjusted according to fluctuations in environmental conditions, thereby promptly avoiding timeout bugs caused by environmental changes.
[0083] The cloud storage system service timeout optimization method for adaptive chaotic environments provided in this disclosure has the following advantages:
[0084] 1. Zero prior knowledge required. Users do not need to provide network environment, task load, or other operating parameters. Instead, the monitoring system automatically senses these parameters and can adapt to chaotic system environments, greatly reducing the configuration difficulty for users and improving deployment efficiency.
[0085] 2. Lightweight architecture: It only needs to record the current timestamp and the number of bytes transmitted before each request, without needing to change the communication protocol to piggyback information reflecting the Happen-Before relationship. The communication overhead is less than 1% of the transmission latency. By proposing the TB-RPS metric to reflect the trend of environmental changes, without needing to track the Happen-Before relationship, the monitoring framework is lightweight, reducing deployment overhead and cost, and can adapt well to chaotic environments.
[0086] 3. This method boasts strong scalability and fast convergence, allowing independent deployment on various nodes within a cloud storage system to meet diverse customer needs. It achieves transparent and rapid convergence and optimal node selection in the initial operating environment through the TPV mechanism. Specifically, it proposes TPV as an indicator to reflect the statistical characteristics of latency and timeout information of a specific link during long-term operation of a cloud storage system, and proposes a method based on TPV to improve the convergence rate of timeout values.
[0087] The method provided in this disclosure is easy to deploy and highly scalable, and is suitable for heterogeneous and complex scenarios such as distributed data centers.
[0088] The method provided in this disclosure avoids service unavailability caused by incompatibility between timeout value configuration and operating environment (including software and hardware environment) in cloud storage systems, and is applicable to high-availability scenarios such as financial data storage.
[0089] The method provided in this disclosure has extremely low system overhead and improves the response speed of the entire cloud storage system by maintaining the optimal timeout value, making it suitable for scenarios with high real-time requirements, such as data storage for autonomous driving.
[0090] The method provided in this disclosure is independent of the storage method, communication protocol, and development language of the cloud storage system. It can be deployed independently on each node in the cluster, avoiding the burden of manually configuring timeout values and reducing deployment costs. The system can be deployed and run on various types of storage media, exhibiting good universality, versatility, and portability, and has a wide range of application scenarios.
[0091] Figure 6 This is a schematic diagram of a framework for an adaptive chaotic environment cloud storage service timeout optimization device provided in this embodiment of the disclosure. The cloud storage system may include a first node. The adaptive chaotic environment cloud storage service timeout optimization device may be a computer program (including program code, etc.) running on a computer device; for example, the adaptive chaotic environment cloud storage service timeout optimization device may be an application software. The device can be used to execute the corresponding steps in the method provided in this embodiment of the disclosure. This embodiment of the disclosure provides an adaptive chaotic environment cloud storage service timeout optimization device, which can run in a first node, and the first node can be any computer device.
[0092] like Figure 6 The cloud storage service timeout value optimization device 600 for adaptive chaotic environment provided in this embodiment may include an acquisition unit 610 and a processing unit 620.
[0093] The acquisition unit 610 can be used to acquire the previous monitoring window information and its previous actual timeout value of the target communication link, as well as the current monitoring window information and its current actual timeout value.
[0094] The processing unit 620 can be used to determine the target timeout value of the current monitoring window of the target communication link based on the target coefficient and the current actual timeout value if it is determined that the target timeout value of the current monitoring window of the target communication link is greater than the current actual timeout value.
[0095] The processing unit 620 can also be used to, if it is determined that the target timeout value of the current monitoring window of the target communication link is less than or equal to the current actual timeout value, obtain the target timeout bounded request rate of the target communication link within the current monitoring window based on the current actual timeout value and the current monitoring window information, and use the timeout value corresponding to the target timeout bounded request rate as the target timeout value of the current monitoring window of the target communication link.
[0096] The processing unit 620 can also be used to use the target timeout value of the current monitoring window of the target communication link as the predicted target timeout value of the next monitoring window of the target communication link.
[0097] Figure 6 The functional implementation of each unit of the cloud storage service timeout value optimization device for the adaptive chaotic environment can be referred to the description of the above embodiment of the cloud storage service timeout value optimization method for the adaptive chaotic environment.
[0098] Figure 7 This is a schematic diagram of the structure of a computer device provided in an embodiment of this disclosure.
[0099] See Figure 7 , Figure 7 This is a schematic diagram of the structure of a computer device provided in an embodiment of this disclosure. Figure 7 As shown, the computer device in this embodiment may include one or more processors 1001, a memory 1002, and an input / output interface 1003. The processor 1001, memory 1002, and input / output interface 1003 are connected via a bus 1004. The memory 1002 stores a computer program, which includes program instructions. The input / output interface 1003 receives and outputs data, such as for data interaction between the host machine and the computer device, or for data interaction between various virtual machines within the host machine. The processor 1001 executes the program instructions stored in the memory 1002.
[0100] The processor 1001 can perform the following operations: obtain the previous monitoring window information and its previous actual timeout value of the target communication link, as well as the current monitoring window information and its current actual timeout value; if it is determined that the target timeout value of the current monitoring window of the target communication link is greater than the current actual timeout value, then determine the target timeout value of the current monitoring window of the target communication link according to the target coefficient and the current actual timeout value; if it is determined that the target timeout value of the current monitoring window of the target communication link is less than or equal to the current actual timeout value, then obtain the target timeout bounded request rate of the target communication link within the current monitoring window according to the current actual timeout value and the current monitoring window information, and use the timeout value corresponding to the target timeout bounded request rate as the target timeout value of the current monitoring window of the target communication link; use the target timeout value of the current monitoring window of the target communication link as the predicted target timeout value of the next monitoring window of the target communication link.
[0101] In some feasible implementations, the processor 1001 may be a central processing unit (CPU), but it can also 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. The general-purpose processor may be a microprocessor or any conventional processor.
[0102] The memory 1002 may include read-only memory and random access memory, and provides instructions and data to the processor 1001 and the input / output interface 1003. A portion of the memory 1002 may also include non-volatile random access memory. For example, the memory 1002 may also store device type information.
[0103] In practice, the computer device can execute the implementation methods provided by the steps in the above embodiments through its built-in functional modules. For details, please refer to the implementation methods provided by the steps in the above embodiments, which will not be repeated here.
[0104] This disclosure provides a computer device including a processor, an input / output interface, and a memory. The processor retrieves a computer program from the memory and executes the steps of the method shown in the figures of the above embodiments to perform data processing operations.
[0105] This disclosure also provides a computer-readable storage medium storing a computer program adapted for loading and executing by a processor the adaptive chaotic environment cloud storage service timeout value optimization method provided in the various steps of the figures in the above embodiments. Specific implementations of the various steps in the figures in the above embodiments are provided and will not be repeated here. Furthermore, the beneficial effects of using the same method will not be repeated here. For technical details not disclosed in the computer-readable storage medium embodiments of this disclosure, please refer to the description of the method embodiments of this disclosure. As an example, the computer program can be deployed to execute on a single computer device, or on multiple computer devices located in one location, or on multiple computer devices distributed across multiple locations and interconnected via a communication network.
[0106] The computer-readable storage medium can be the cloud storage service timeout value optimization device for adaptive chaotic environments provided in any of the foregoing embodiments, or the internal storage unit of the computer device, such as the hard drive or memory of the computer device. The computer-readable storage medium can also be an external storage device of the computer device, such as a plug-in hard drive, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device. Furthermore, the computer-readable storage medium can include both internal storage units and external storage devices of the computer device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
[0107] This disclosure also provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various alternative methods shown in the figures of the above embodiments.
[0108] The terms "first," "second," etc., used in the specification, claims, and drawings of this disclosure are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or device that includes a series of steps or units is not limited to the listed steps or modules, but may optionally include steps or modules not listed, or may optionally include other step units inherent to these processes, methods, apparatuses, products, or devices.
[0109] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described in terms of functionality. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.
[0110] The methods and related apparatuses provided in this disclosure are described with reference to the method flowcharts and / or structural diagrams provided in this disclosure. Specifically, each block of the method flowchart and / or structural diagram, as well as combinations of blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions are provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to create a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the process. Figure 1 A schematic diagram of one or more processes and / or structures. Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 A schematic diagram of one or more processes and / or structures. Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 A process or multiple processes and / or structures illustrate the steps of the functions specified in one or more boxes.
[0111] The above-disclosed embodiments are merely preferred embodiments of this disclosure and should not be construed as limiting the scope of this disclosure. Therefore, any equivalent variations made in accordance with the claims of this disclosure shall still fall within the scope of this disclosure.
Claims
1. A method for optimizing timeout values in cloud storage services in an adaptive chaotic environment, characterized in that, The cloud storage system includes a first node, and the method is executed by the first node; the method includes: Obtain the previous monitoring window information and its previous actual timeout value of the target communication link, as well as the current monitoring window information and its current actual timeout value; If it is determined that the target timeout value of the current monitoring window of the target communication link is greater than the current actual timeout value, then the target timeout value of the current monitoring window of the target communication link is determined according to the target coefficient and the current actual timeout value. If it is determined that the target timeout value of the current monitoring window of the target communication link is less than or equal to the current actual timeout value, then the target timeout bounded request rate of the target communication link within the current monitoring window is obtained according to the current actual timeout value and the current monitoring window information, and the timeout value corresponding to the target timeout bounded request rate is taken as the target timeout value of the current monitoring window of the target communication link. Here, the timeout bounded request rate refers to the number of requests whose delay does not exceed the timeout value per unit time when a bounded timeout value is given. The target timeout value of the current monitoring window of the target communication link is used as the predicted target timeout value of the next monitoring window of the target communication link.
2. The method according to claim 1, characterized in that, The cloud storage system also includes a second node, and the target communication link is the communication link between the first node and the second node; This includes obtaining the current monitoring window information of the target communication link, including: Receive user requests; Based on the user request, at least one request is sent to the second node within the current monitoring window, and the timestamp of each request is recorded. If a response to the request is received from the second node, the timestamp of receiving the response is recorded. The delay of the request is calculated based on the timestamp of sending the request and the timestamp of receiving the response. The request and its delay are recorded in the current monitoring window as information of the current monitoring window. If no response to the request is received before the current actual timeout value is reached, the request timeout is recorded in the current monitoring window as information for the current monitoring window.
3. The method according to claim 1, characterized in that, The information in the previous monitoring window includes the target communication link within the previous monitoring window. Each request and its latency and timeout information; The current monitoring window information includes the target communication link within the current monitoring window. Each request and its latency and timeout information, An integer greater than or equal to 1; The method further includes: Based on the target communication link within the current monitoring window The system obtains the current number of times the current monitoring window of the target communication link is at the current actual timeout value, and the current timeout bounded request rate of the current monitoring window of the target communication link at the current actual timeout value. Based on the target communication link described in the previous monitoring window The system obtains the previous timeout count of the previous monitoring window of the target communication link under the previous actual timeout value, and the previous timeout bounded request rate of the previous monitoring window of the target communication link under the previous actual timeout value. If the current timeout count is greater than the timeout threshold; or, the previous timeout bounded request rate is greater than the current timeout bounded request rate, and the previous timeout count is less than the current timeout count, then it is determined that the target timeout value of the current monitoring window of the target communication link is greater than the current actual timeout value.
4. The method according to claim 3, characterized in that, Based on the target communication link within the current monitoring window The system obtains the current timeout bounded request rate of the target communication link under the current actual timeout value for each request and its latency and timeout information, including: Based on the target communication link within the current monitoring window The system obtains the number of requests that did not time out within the current monitoring window of the target communication link, based on the request's latency and timeout information, and the number of requests that did not time out under the current actual timeout value. Based on the target communication link within the current monitoring window Each request and its latency and timeout information are used to obtain the sum of the latency of requests that did not time out and the timeout value of requests that timed out within the current monitoring window of the target communication link at the current actual timeout value; Based on the number of requests that did not time out within the current actual timeout value in the current monitoring window of the target communication link, and the sum of the latency of requests that did not time out and the timeout value of requests that timed out within the current monitoring window of the target communication link, the current timeout bounded request rate of the current monitoring window of the target communication link under the current actual timeout value is obtained.
5. The method according to claim 1, characterized in that, Based on the current actual timeout value and the current monitoring window information, the target timeout bounded request rate of the target communication link within the current monitoring window is obtained, including: Calculate the timeout bounded request rate corresponding to each integer from 1 to the current actual timeout value based on the current monitoring window information; The maximum timeout bounded request rate among the timeout bounded request rates corresponding to each integer from 1 to the current actual timeout value is taken as the target timeout bounded request rate.
6. The method according to claim 5, characterized in that, Using the timeout value corresponding to the target timeout bounded request rate as the target timeout value of the current monitoring window of the target communication link includes: If there are multiple timeout values among the integers from 1 to the current actual timeout value such that the timeout bounded request rate is the maximum timeout bounded request rate, then the minimum timeout value among the multiple timeout values is taken as the target timeout value.
7. The method according to claim 1, characterized in that, Also includes: Obtain the requests, delays, and timeout information of the target communication link within a preset time period; Cluster the requests, their delays, and timeout information of the target communication link within the preset time period, and use the maximum delay value of each cluster as the timeout value of the corresponding cluster to obtain a timeout probability vector; The target coefficient is determined based on the current actual timeout value and the timeout probability vector.
8. A cloud storage service timeout optimization device for adaptive chaotic environments, characterized in that, The cloud storage system includes a first node, and the device is disposed on the first node; the device includes: The acquisition unit is used to acquire the previous monitoring window information and its previous actual timeout value of the target communication link, as well as the current monitoring window information and its current actual timeout value. The processing unit is configured to determine the target timeout value of the current monitoring window of the target communication link based on the target coefficient and the current actual timeout value if it is determined that the target timeout value of the current monitoring window of the target communication link is greater than the current actual timeout value. The processing unit is further configured to, if it is determined that the target timeout value of the current monitoring window of the target communication link is less than or equal to the current actual timeout value, obtain the target timeout bounded request rate of the target communication link within the current monitoring window based on the current actual timeout value and the current monitoring window information, and use the timeout value corresponding to the target timeout bounded request rate as the target timeout value of the current monitoring window of the target communication link, wherein the timeout bounded request rate refers to the number of requests whose delay does not exceed the timeout value per unit time when a bounded timeout value is given; The processing unit is further configured to use the target timeout value of the current monitoring window of the target communication link as the predicted target timeout value of the next monitoring window of the target communication link.
9. A computer device, characterized in that, Includes processor, memory, and input / output interfaces; The processor is connected to the memory and the input / output interface respectively, wherein the input / output interface is used to receive data and output data, the memory is used to store computer programs, and the processor is used to call the computer programs so that the computer device executes the method according to any one of claims 1-7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Congestion control method and device
CN101854660A
Method and Apparatus for Waveform Independent Congestion Control
US20190058666A1