A disk SAS multi-path data transmission load balancing and dynamic scheduling method
By sensing link congestion and cache usage, and dynamically scheduling priorities and link selection, the problems of task backlog and cache contention in multi-path data transmission are solved, thereby improving transmission efficiency and response speed.
Patent Information
- Application Number
- CN202611132905.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-29
- Publication Date
- 2026-11-06
AI Technical Summary
Existing technologies fail to effectively detect the real-time queuing congestion level and disk cache usage of each physical link in multi-path data transmission, resulting in task backlog, cache resource contention, and suboptimal link selection, which affects transmission capacity and response latency.
By acquiring request density and access dispersion, priority levels are divided and independent cache spaces are established. Backup links with short seek distances are selected, and throughput and packet loss rates are adjusted to achieve dynamic scheduling to avoid data stream interference and resource waste.
It improves the overall throughput of multi-path data transmission, avoids data stream interference, ensures response latency for high-priority requests, and tends to balance resource consumption.
Smart Images

Figure CN123048187A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of computer distributed storage technology, specifically a disk SAS multipath data transmission load balancing and dynamic scheduling method and system. Background Technology
[0002] In distributed storage systems, multipath data transmission via serial connection to small computer system interfaces establishes multiple physical links between the storage controller and the disk array, undertaking the task of high-speed reading and writing of massive amounts of data, and is an important foundation for ensuring the stable operation of the storage system.
[0003] When allocating read / write traffic across multiple physical links, related technologies typically employ round-robin or fixed-ratio distribution methods. These methods do not consider the differences in task backlog caused by varying hardware processing rhythms across physical links during actual operation. This can easily lead to situations where some links experience task backlog while others remain idle, making it difficult to fully utilize the overall transmission capacity.
[0004] Furthermore, the number of tasks queuing in real time on each physical link is correlated with the occupancy status of the target disk's shared cache. When the system does not coordinate and detect these two factors, if a link becomes congested and the target disk's cache area for receiving data from that link is nearly full, continuing to send read / write requests will cause instructions to remain in the cache for an extended period. Data streams from different links will also compete for space in the shared cache, resulting in high-priority read / write requests waiting for extended periods, which in turn can cause critical business processes to stall.
[0005] Furthermore, the related technologies often use the same cache pool for all links when allocating cache, which lacks spatial isolation for data streams of different priorities. Once a large number of low-priority requests with large data volumes occupy the cache, high-priority requests will find it difficult to obtain enough cache space, resulting in a significant increase in the response latency of critical read and write requests. At the same time, when selecting distribution links, the related technologies often only consider single indicators such as link bandwidth or queue length, without comprehensively considering factors such as seek distance, end-to-end latency and packet loss. This means that the selected links may not have the optimal carrying capacity in actual operation.
[0006] Therefore, how to perceive the real-time queuing congestion level and disk cache usage of each physical link, reasonably classify different read and write requests, and establish mutually isolated cache spaces for each channel to avoid data flow interference are the technical problems that need to be solved to achieve load balancing and dynamic scheduling of multi-path data transmission. Summary of the Invention
[0007] To address the above issues, this application provides a disk SAS multipath data transmission load balancing and dynamic scheduling method and system, which solves the problems of how to perceive the real-time queuing congestion level and disk cache occupancy of each physical link, reasonably classify different read and write requests, and establish mutually isolated cache spaces for each channel to avoid data flow interference.
[0008] To achieve the above objectives, the technical solution adopted in this application is as follows:
[0009] According to a first aspect of this application, a method for load balancing and dynamic scheduling of multipath data transfer in disk SAS is provided, comprising:
[0010] S1, obtain the arrival time interval and data block access address of each physical link read / write request, calculate the request density and access dispersion, determine the physical link whose product of request density and access dispersion is greater than the overload threshold as the target link and extract the read / write requests of the target link.
[0011] S2, obtain access features from the read and write operation types in the read and write requests, construct a request size vector based on the single request data volume in the read and write requests, and obtain priority level division results from the access features and the request size vector;
[0012] S3, obtain the request source application identifier and hardware response latency from the priority level division result, determine the initial space ratio parameter according to the request source application identifier, and obtain the independent cache boundary address corresponding to the priority level division result after correction by the hardware response latency.
[0013] S4. Obtain the corresponding historical cache hit rate record based on the independent cache boundary address, calculate the number of bytes already occupied, predict the demand for delayed instructions based on the historical cache hit rate record, and determine read / write requests whose sum of the number of bytes already occupied and the demand for delayed instructions exceeds the space limit as delayed risk requests.
[0014] S5, based on the seek distance parameter of the target disk corresponding to the delay risk request, filter links with seek distances less than the target link as backup links, and sort them in descending order of remaining bandwidth capacity to obtain a candidate link sequence;
[0015] S6, the instantaneous throughput capacity is obtained from the current transmission rate of each link in the candidate link sequence, the instantaneous throughput capacity is corrected by a delay penalty according to the end-to-end delay, and the link with the largest throughput capacity after correction is selected as the traffic distribution target link.
[0016] S7. Determine the upper limit of the number of requests to be distributed based on the packet loss rate of the traffic distribution target link, correct the upper limit of the number of requests to be distributed based on the real-time load fluctuation coefficient of the traffic distribution target link to obtain a real-time value, and distribute the delayed risk requests according to the real-time value to obtain a load balancing state.
[0017] Preferably, S1 includes: constructing a time window for the arrival time interval, counting the number of requests within the time window and smoothing it by combining it with historical values to obtain the request density;
[0018] Spatial distribution analysis is performed on the access addresses of the data blocks to obtain a discrete index of the address distribution as the access dispersion degree;
[0019] After determining the target link, the read and write requests on the target link are rate-limited and smoothed to obtain smoothed read and write requests.
[0020] Preferably, S2 includes: extracting sequential access feature values and random access feature values from the read / write operation type, comparing the magnitudes of the sequential access feature values and random access feature values to determine the access mode label of the read / write request, which is used as the access feature;
[0021] The resource consumption weight is obtained by classifying the request size vector, and the request priority score is obtained by multiplying the resource consumption weight by the value corresponding to the access feature.
[0022] The priority score of the request is divided into levels to obtain the priority level division result.
[0023] Preferably, S3 includes: correcting the initial space ratio parameter by the difference between the hardware response latency and the standard latency threshold to obtain a target space ratio parameter, and determining the amount of buffer space based on the target space ratio parameter;
[0024] Cluster the historical access frequency sequence corresponding to the cache space to obtain access popularity categories; for those belonging to the high-frequency access category, calculate the starting offset of the independent block from the cache space to obtain the independent cache boundary address.
[0025] Preferably, step S4 includes: obtaining the number of bytes already occupied from the difference between the independent cache boundary address and the starting address;
[0026] Time series analysis is performed on the historical cache hit rate records to obtain the hit rate prediction value, and the demand for the backlogged instructions is obtained from the hit rate prediction value and the space of a single instruction.
[0027] The number of bytes already occupied is added to the number of pending instructions required, and read / write requests whose sum exceeds the space limit are identified as pending risk requests.
[0028] Preferably, S5 includes: constructing a link state matrix from the seek distance parameter and the remaining bandwidth capacity, clustering the link state matrix to obtain link clusters with different congestion levels, and extracting the backup link from the link cluster with the lowest congestion level;
[0029] Those backup links with risk values less than the risk threshold are identified as safe candidate links, and the safe candidate links are sorted in ascending order according to their seek distance to obtain a candidate link sequence.
[0030] Preferably, S6 includes: obtaining the instantaneous throughput capacity from the current transmission rate and the percentage of available bandwidth;
[0031] A latency penalty term is constructed by combining the preset maximum tolerable latency with the end-to-end latency. The instantaneous throughput capacity is then deducted from the latency penalty term to obtain the corrected throughput capacity.
[0032] After removing links whose corrected throughput capacity is less than the throughput threshold, the link with the largest corrected throughput capacity among the remaining links is selected as the target link for traffic distribution.
[0033] Preferably, step S7 includes: filtering and smoothing the packet loss rate and the real-time load fluctuation coefficient to obtain a smoothed packet loss rate and a smoothed real-time load fluctuation coefficient;
[0034] The upper limit of the number of requests to be distributed is obtained by attenuating the smoothed packet loss rate, and the real-time value is obtained by correcting the upper limit of the number of requests to be distributed by the reciprocal of the smoothed real-time load fluctuation coefficient.
[0035] Based on the real-time values, the delay risk requests are distributed to the traffic distribution target links in a weighted round-robin manner to achieve dynamic scheduling and load balancing.
[0036] Preferably, the method further includes: obtaining the load balance degree from the range of resource consumption rates of each physical link after distribution; when the load balance degree does not reach the preset balance condition, reallocating the number of physical links participating in transmission and returning to the process of filtering the candidate link sequence until the load balance degree reaches the preset balance condition.
[0037] According to a second aspect of this application, a disk SAS multipath data transmission load balancing and dynamic scheduling system is provided, comprising:
[0038] The overload detection module is configured to obtain the arrival time interval and data block access address of read and write requests for each physical link, identify physical links whose product of request density and access dispersion is greater than the overload threshold as target links and extract their read and write requests.
[0039] The priority division module is configured to obtain a request priority score and priority level division result based on the read / write operation type and single request data volume of the read / write request;
[0040] The cache allocation module is configured to determine the initial space ratio parameter based on the priority level division result and the application identifier of the request source, and obtain the independent cache boundary address after being corrected by the hardware response latency.
[0041] The lingering identification module is configured to obtain the number of bytes occupied from the independent cache boundary address, and combine it with the lingering instruction demand predicted by the historical cache hit rate record, and identify read and write requests whose sum exceeds the space limit as lingering risk requests.
[0042] The candidate filtering module is configured to filter and sort the candidate link sequence in descending order based on the seek distance parameter and remaining bandwidth capacity corresponding to the delay risk request.
[0043] The target selection module is configured to determine the link with the largest throughput capacity after delay penalty correction as the traffic distribution target link based on the current transmission rate and end-to-end delay of each link in the candidate link sequence.
[0044] The load balancing module is configured to determine the real-time distribution value based on the packet loss rate and real-time load fluctuation coefficient of the traffic distribution target link, and distribute the delay risk request accordingly to obtain the load balancing status of multi-path data transmission.
[0045] The beneficial effects of this application include:
[0046] By determining local overload by multiplying request density with access dispersion, physical links that are about to become congested can be located earlier.
[0047] By prioritizing data streams and setting independent cache boundary addresses, data streams of different priorities are queued in their respective isolated cache spaces, avoiding mutual interference.
[0048] By predicting the demand for backlogged instructions, it is possible to identify requests at risk of backlogging before the cache overflows.
[0049] By adjusting throughput capacity based on seek distance, remaining bandwidth, and latency penalty, as well as by progressively filtering and adjusting packet loss rate and load fluctuation coefficient, traffic is distributed to links with stronger carrying capacity, thereby improving the overall throughput of multi-path data transmission and balancing the resource consumption rate of each physical link. Attached Figure Description
[0050] Figure 1 This is a flowchart illustrating the steps of the disk SAS multipath data transmission load balancing and dynamic scheduling method according to an embodiment of this application.
[0051] Figure 2 This is a structural block diagram of the disk SAS multipath data transmission load balancing and dynamic scheduling system according to an embodiment of this application. Detailed Implementation
[0052] To enable those skilled in the art to better understand the technical solution, the present application will be described in detail below with reference to the embodiments. The description in this section is only exemplary and explanatory, and should not be used to limit the scope of protection of the present application in any way.
[0053] This embodiment uses a scenario in a distributed storage system where data transmission occurs between the storage controller and the disk array via multiple serially connected small computer system interface physical links to illustrate the method. Figure 1 As shown, the method executes S1 to S7 sequentially, as detailed below.
[0054] S1. Obtain the arrival time interval and data block access address of read / write requests for each physical link, determine the target link, and extract its read / write requests. Specifically, the storage controller collects the timestamps of consecutively arriving read / write requests on each physical link through kernel probes; the difference between adjacent timestamps is the arrival time interval. Simultaneously, it parses the request packets to obtain the access address of the accessed storage medium's data block. A time window is constructed based on the arrival time interval, and the number of requests arriving within the time window is counted. The request density is obtained as follows:
[0055]
[0056] Where D is the request density, M is the number of requests arriving within the time window, and T is the duration of the time window. In some embodiments, D can be exponentially smoothed by incorporating the historical density of adjacent time windows to suppress transient jitter.
[0057] The access dispersion is used to characterize the degree of dispersion of data block access addresses in the address space. In this embodiment, address variance is used as the dispersion index.
[0058]
[0059] Where σ² represents the access dispersion, a represents the data block access address, ā represents the average of all access addresses within the time window, and n represents the number of access addresses. In other embodiments, the isolated forest algorithm can also be used to perform spatial distribution analysis on the access addresses to obtain the dispersion index; both can characterize the degree of access dispersion. When the product of request density and access dispersion exceeds the overload threshold, the physical link is determined to be in a local overload state, i.e.:
[0060]
[0061] Wherein, θ is the overload threshold. The overload threshold is tuned as follows: Between system idle and rated load, the density and dispersion of each physical link at the point where queuing backlog just occurs are collected in multiple stages, and the lower quartile is taken as θ, so that it can trigger as early as possible without frequent false alarms; in this embodiment, θ is set to one million. Physical links determined to be locally overloaded are identified as target links, and read / write requests received on them within the time window are extracted into a memory queue to await scheduling. To avoid instantaneous impact after extraction, a token bucket method can be used to smooth the read / write requests on the target link.
[0062] For example, if a physical link receives 50 read / write requests within a 100-millisecond time window, the request density is 500 requests per second according to the above formula. The data block access addresses within this window vary between 10,000 and 50,000, and the access dispersion is calculated to be 2,500. The product of the two is 1.25 million, which is greater than the overload threshold of 1 million. Therefore, this physical link is identified as the target link.
[0063] In some embodiments, the time window is implemented using a sliding window approach. The window moves forward as new requests arrive, and a circular buffer records the timestamps of each request within the window, thereby maintaining real-time updates of request density with low storage overhead. When the change in request density between adjacent windows exceeds a set value, online calibration of the overload threshold is triggered to adapt to long-term drift of business traffic. For the dispersion of data block access addresses, in addition to address variance, the ratio of the number of duplicate accessed addresses to the address span within the window can be used as an auxiliary dispersion indicator, and weighted and fused with address variance to take into account both the dispersion range and distribution pattern of addresses. The rate limiting smoothing is implemented using a token bucket. The token generation rate is set according to the rated throughput capacity of the target link, and the bucket depth is set according to the tolerable number of burst requests, thereby suppressing instantaneous impacts on subsequent steps when extracting read and write requests.
[0064] S2 determines the request priority score and priority level classification result based on the read and write requests extracted from S1. Specifically, the request header of the read and write request is parsed to obtain the read and write operation type. Sequential access feature values and random access feature values are extracted from the read and write operation type, and their magnitudes are compared to determine the access mode label of the read and write request as the access feature. The data length field is read to obtain the data volume of a single request. A two-dimensional request scale vector is constructed using the ratio of the data volume of a single request to the size of the underlying base block and the number of concurrent threads of the business to which the request belongs. The request scale vector is classified to obtain the resource consumption weight, and the request priority score is calculated according to the following formula:
[0065]
[0066] Where P is the request priority score, w is the resource consumption weight, b and c are the two components of the request size vector, and δ is the dynamic penalty value determined based on the current link queuing depth. The resource consumption weight is determined as follows: using the actual resource consumption corresponding to different size vectors in historical samples as labels, a support vector machine is used for classification, and the classification results are mapped to weights, with random access having a greater weight than sequential access; in this embodiment, the random access weight is five and the sequential access weight is two. After obtaining the request priority score, a decision tree is used to hierarchically divide the score to obtain the priority level division result, and the read and write requests are sorted according to the highest priority identifier to obtain the target request execution sequence.
[0067] For example, a write request has a single request data size of 4,096 bytes, an underlying base block size of 512 bytes, a scale base of 8, and a business concurrent thread count of 4. The constructed request scale vector is (8, 4). It is determined to be a random access, with a resource consumption weight of 5 and a queuing depth penalty of 10. The request priority score obtained from the above formula is 50, and it falls into the medium priority category after hierarchical division.
[0068] In some embodiments, the sequential access feature value and the random access feature value are obtained by counting the number of consecutive hits and the number of jumps of the logical block address within the window, respectively. When the number of consecutive hits is dominant, the read / write request is marked as sequential access; otherwise, it is marked as random access. For read / write operation types, write requests usually have a higher resource consumption weight than read requests because they involve cache write-back and consistency maintenance. The training process for the resource consumption weight is as follows: collect the actual CPU usage, memory bandwidth usage, and disk queuing time corresponding to different request size vectors in historical operations, normalize them, and use them as labels. Use a support vector machine to establish a mapping from the request size vector to the resource consumption weight, and periodically update this mapping incrementally with new samples. The decision tree's partitioning threshold is derived by back-calculating the response latency upper limit required by each priority level, so that read / write requests with higher scores are classified into priority levels with stricter response latency requirements.
[0069] S3 determines the independent cache boundary address based on the priority ranking result and the application identifier of the request originating from. Specifically, the initial space ratio parameter is obtained by querying the cache space allocation table using the application identifier of the request originating from, and then adjusted based on the hardware response latency. The adjustment factor used for the adjustment is obtained by the following formula:
[0070]
[0071] Where η is the adjustment coefficient, L is the hardware response latency, L0 is the standard latency threshold, and β is the attenuation factor. The cache space allocation table represents the correspondence between application identifiers and initial space ratio parameters. Its tuning method is as follows: the initial space ratio parameter is determined based on the proportion of each application's historical peak cache usage to the total cache pool, so that applications with high peak usage receive a larger initial ratio; the standard latency threshold L0 is taken as the average hardware response latency of the system under rated load, and in this embodiment, it is taken as ten milliseconds; the attenuation factor β is used to control the amplification of the latency ratio, and its value is determined so that the ratio correction within the rated latency fluctuation range does not exceed 20%, and in this embodiment, it is taken as 0.05. The cache space amount is determined by the adjusted ratio parameters, and the independent cache boundary address is determined accordingly.
[0072]
[0073] Where C is the amount of cache space allocated to this priority level, G is the total cache pool capacity, and r0 is the initial space ratio parameter; the independent cache boundary address is obtained by adding the cache pool base address to the physical sector offset corresponding to C. Further, hierarchical clustering is used to obtain access popularity categories based on the historical access frequency sequence corresponding to the cache space amount. For items belonging to the high-frequency access category, the starting offset of the independent block is calculated based on the cache space amount. Decision tree classification is used to obtain lifecycle labels for cached data items within the independent block, and locking is performed on long-term retained items to prevent frequent replacement.
[0074] For example, the initial space ratio parameter corresponding to an application identifier is 30%, the hardware response latency is 12.5 milliseconds, the standard latency threshold is 10 milliseconds, and the attenuation factor is 0.05. The adjustment coefficient obtained from the above formula is 1.125, and the corrected ratio parameter is 33.75%. When the total cache pool capacity is 1 gigabyte, the cache space allocated to this priority level is 337.5 gigabytes, and the corresponding independent cache boundary address is determined accordingly.
[0075] An independent cache boundary address refers to the end address of a logically independent and physically isolated cache region within a shared cache pool, allocated based on a specific priority level. Its core function is to delineate dedicated cache spaces that do not interfere with each other, preventing data streams of different priorities from competing for resources. The value of this address is determined by looking up the initial space ratio parameter in a table based on the application identifier of the request source. This ratio is then dynamically adjusted based on the hardware response latency: the higher the hardware response latency relative to the standard threshold, the larger the allocated space ratio, thus alleviating backlog. The adjusted ratio parameter is multiplied by the total cache pool capacity to obtain the cache space corresponding to that priority level. This is then combined with the popularity category obtained by clustering historical access frequencies within that space to calculate the starting offset of the independent block. Finally, this address is obtained by adding the cache pool base address and the offset and written to the boundary register. This ensures that high-priority data streams obtain sufficient dedicated cache space, while low-priority high-volume requests are confined within their own boundaries, fundamentally eliminating cache resource contention.
[0076] In some embodiments, the cache space allocation table is indexed by the application identifier. In addition to the initial space ratio parameter, each entry records the application's cache hit rate baseline and peak occupancy time for subsequent dynamic adjustment. When the sum of the initial space ratio parameters of multiple applications exceeds 100%, the ratio parameter is normalized and shrunk according to the priority level of each application to ensure that independent cache areas do not overlap. The hierarchical clustering uses the Euclidean distance of historical access frequency sequences as a similarity metric, merging cache blocks with similar frequencies from bottom to top. The high-frequency access categories obtained from clustering correspond to hot data that needs to be permanently stored. When locking data items that are retained for a long time, their corresponding cache lines are marked as non-replaceable and removed from the replacement candidate set, thereby reducing the missing rate of hot data. The independent cache boundary address, once determined, is written to the cache manager's boundary register as the physical addressing range for read / write requests of that priority level, ensuring that data streams of different priorities queue within their respective isolated cache spaces, avoiding mutual contention.
[0077] S4 identifies requests at risk of being held up using the independent cache boundary address. Specifically, the number of bytes already occupied is obtained from the difference between the independent cache boundary address and the starting address of that independent cache area.
[0078]
[0079] Where U is the number of bytes already occupied, E is the independent cache boundary address corresponding to the current write pointer, and A0 is the starting address of the independent cache area. Time series analysis is performed on historical cache hit rate records to obtain predicted hit rates. This embodiment uses exponential smoothing; in other embodiments, a long short-term memory network can be used for prediction.
[0080]
[0081] Where ĥ is the predicted hit rate, h is the current hit rate, h′ is the hit rate of the previous period, and γ is a smoothing coefficient, chosen to make the predicted value more sensitive to recent changes; in this embodiment, it is set to 0.3. The demand for delayed instructions is predicted from the predicted hit rate:
[0082]
[0083] Where Q represents the demand for delayed instructions, s represents the space required for a single instruction, and m represents the concurrency request base; the space required for a single instruction is the size of the underlying base block, which is 512 bytes in this embodiment; the concurrency request base is the average number of concurrent requests within the statistical window, which is 100 in this embodiment. When the sum of the occupied bytes and the demand for delayed instructions exceeds the space limit corresponding to the independent cache boundary address, it is determined that there is a risk of instruction delay.
[0084]
[0085] Among them, U max The upper limit of the space is the capacity allocated to the independent cache area. Read and write requests identified as having a risk of being stuck are written to a risk queue; further, a risk value is extracted from the requests with a risk of being stuck, and when the risk value exceeds the risk threshold, isolation processing is performed on them to obtain a safe read and write flow.
[0086] For example, the number of bytes occupied corresponding to the difference between the starting address of a certain independent cache and the current write pointer is 20,480 bytes; the historical hit rate records are 85%, 82%, and 78%, respectively. From the above formula, the predicted hit rate is approximately 75%, corresponding to a miss rate of 25%. From the single instruction space of 512 bytes and the concurrent request base of 100, the required amount of delayed instructions is 12,800 bytes. The sum of the two, 33,280 bytes, exceeds the space limit of 32,768 bytes. Therefore, this read / write request is identified as a delayed request.
[0087] In some embodiments, in addition to exponential smoothing and long short-term memory networks, the time series analysis may also employ an autoregressive moving average model to model historical cache hit rate records, in order to capture the periodic fluctuations in the hit rate. The lower the predicted hit rate, the more reads are required from the source due to subsequent misses, and the greater the predicted demand for delayed instructions. The risk value is obtained by weighting the ratio of occupied bytes to the upper limit of space and the ratio of delayed instruction demand to remaining space, with the weights set according to the impact of cache overflow on business. When the risk value exceeds the risk threshold, the corresponding delayed risk request is migrated from the main cache path to an isolation queue to prevent it from competing with other data flows in the shared cache, thereby obtaining a safe read / write flow. The upper limit of space is determined by subtracting the reserved safety margin from the capacity allocated to the independent cache area, and the safety margin is used to absorb the hit rate prediction error.
[0088] S5 involves selecting candidate link sequences for the congestion risk request. Specifically, the seek distance parameter of the target disk corresponding to the congestion risk request and the remaining bandwidth capacity of each physical link are obtained. A link state matrix is constructed from these two parameters. K-means clustering is used to divide the physical links according to their congestion level, resulting in link clusters with different congestion levels. Backup links with seek distances shorter than the target link are extracted from the link clusters with the lowest congestion levels. The backup links are then sorted in descending order according to their remaining bandwidth capacity to obtain the candidate link sequence. Further, links with risk values less than the risk threshold in the candidate link sequence are identified as safe candidate links, and the optimal read / write links are determined by sorting them in ascending order of seek distance.
[0089] For example, the target link has a seek distance of 120 tracks. Three backup links with seek distances of 80, 90, and 100 tracks are selected, with remaining bandwidth capacities of 500, 800, and 600 megabits per second, respectively. The candidate link sequence is obtained by sorting the remaining bandwidth capacities in descending order, corresponding to links with 800, 600, and 500 megabits per second.
[0090] The seek distance parameter represents the physical distance the read / write head needs to travel from the current track to the track containing the target data. It is a core indicator for measuring the time overhead of mechanical seek operations and directly determines the physical latency of a single I / O request. In SAS multipath scheduling scenarios, this parameter is obtained in real time by parsing the difference between the current head position of the target disk and the cylinder address of the requested data block. For firmware that supports dynamic statistics, the internally maintained seek time estimate can also be read directly. This value is used as the first threshold for link screening. Only when the seek distance of the backup link is less than that of the currently overloaded target link is it eligible to enter the subsequent bandwidth sorting, ensuring that the migrated request will not incur additional latency due to a longer physical seek. Furthermore, considering that solid-state drives do not have mechanical seek operations, this parameter is replaced by the write / erase balance and queuing depth of the flash memory channel, indicating that it is essentially a proxy expression of the physical access latency of the underlying storage medium.
[0091] In some embodiments, the rows of the link state matrix correspond to each physical link, and the columns correspond to two dimensions: seek distance parameter and remaining bandwidth capacity. Before construction, each dimension is standardized to eliminate dimensional differences. The number of clusters in the K-means clustering is determined based on the total number of physical links and the expected number of congestion levels. The cluster centers are initialized using the maximum-minimum distance method to improve cluster stability. Extracting backup links from the link cluster with the lowest congestion level avoids migrating traffic to links that are also nearing congestion. After sorting the candidate link sequence in descending order of remaining bandwidth capacity, a secondary sort is performed based on seek distance to prioritize links with similar risk values, ensuring that links with smaller seek distances are selected as the optimal read / write links, thus balancing bandwidth sufficiency and seek overhead.
[0092] S6, Select the target link for traffic distribution from the candidate link sequence. Specifically, the instantaneous throughput capacity is obtained from the current transmission rate and available bandwidth ratio of each candidate link. Then, a latency penalty term is constructed using the preset maximum tolerable latency and end-to-end latency to deduct the instantaneous throughput capacity, resulting in the corrected throughput capacity, calculated using the following formula:
[0093]
[0094] Where B′ is the corrected throughput capacity, v is the current transmission rate, μ is the percentage of available bandwidth, and L max For maximum tolerable delay, L e The term refers to the end-to-end latency. The available bandwidth percentage is determined based on the statistical average of the historical available bandwidth of the link relative to the rated bandwidth; in this embodiment, it is set to 80%. The maximum tolerable latency is the upper limit of the end-to-end latency acceptable to the service; in this embodiment, it is set to 200 milliseconds. After removing links whose corrected throughput capacity is less than the throughput threshold, the link with the largest corrected throughput capacity among the remaining links is selected as the target link for traffic distribution. The throughput threshold is the minimum available throughput required by the service, and it is determined by dividing the peak service traffic by the number of available links.
[0095] The preset maximum tolerable latency is directly based on the end-to-end latency limit set by the service, i.e., the highest latency standard the service can accept. Its tuning process is closely related to the throughput threshold. Specifically, it first calculates the minimum available throughput required to support the service based on the total load during peak traffic periods and the number of currently available physical links. Then, it sets the throughput threshold based on this, thereby deriving a reasonable maximum tolerable latency. Furthermore, this value also needs to be adapted to the physical characteristics of the underlying storage media. For example, when applied to solid-state drive arrays, a lower latency limit value will be selected accordingly.
[0096] For example, Link A currently has a transmission rate of 500 megabits per second and an end-to-end delay of 50 milliseconds, while Link B currently has a transmission rate of 800 megabits per second and an end-to-end delay of 120 milliseconds. From the above formula, the corrected throughput of Link A is 300 megabits per second and that of Link B is 256 megabits per second. Therefore, Link A is selected as the target link for traffic distribution.
[0097] In some embodiments, the available bandwidth percentage is obtained by subtracting the used bandwidth from the link's rated bandwidth and then dividing by the rated bandwidth, with a moving average used to suppress jitter. The latency penalty term increases rapidly as the end-to-end latency approaches the maximum tolerable latency, significantly reducing the corrected throughput of links nearing the latency limit, thereby avoiding the selection of links with ample bandwidth but high latency. When multiple candidate links with similar corrected throughput exist, their historical packet loss rate is further used as a secondary criterion, prioritizing the link with the lower packet loss rate as the target link for traffic distribution. The throughput threshold is periodically updated according to changes in peak service traffic to ensure that the selected link always has the minimum throughput required to carry the current service.
[0098] S7 distributes the delay risk request to the traffic distribution target link and obtains the load balancing status. Specifically, Kalman filtering is applied to smooth the packet loss rate and real-time load fluctuation coefficient. The upper limit of the request distribution quantity is obtained by attenuating the smoothed packet loss rate, and then corrected by the reciprocal of the smoothed real-time load fluctuation coefficient to obtain the real-time value, calculated by the following formula:
[0099]
[0100] Where N′ is the real-time value, N0 is the initial value of the upper limit of the number of requests to be distributed, p is the smoothed packet loss rate, k is the attenuation coefficient, and f is the smoothed real-time load fluctuation coefficient. The initial value N0 is the rated distribution rate of the link when there is no packet loss, which is 5,000 times per second in this embodiment; the attenuation coefficient k is used to control the suppression strength of packet loss on the distribution rate, and the value is based on the fact that the distribution rate decreases by about two-thirds when the packet loss rate reaches 10%, which is 10 in this embodiment. The delay risk request is distributed to the traffic distribution target link in a weighted round-robin manner according to the real-time value, so that the link throughput matches the actual carrying capacity. Furthermore, the load balancing degree is obtained from the range of the resource consumption rate of each physical link after distribution:
[0101]
[0102] Where Δ represents the range of resource consumption rates, and u represents the resource consumption rate of each physical link. When the range is less than the threshold corresponding to the preset balancing condition, the load balancing state is considered to be achieved. In this embodiment, the preset balancing condition is that the range is less than 5%. When the load balancing degree does not reach the preset balancing condition, the number of physical links participating in the transmission is reallocated and execution returns to S5 until the preset balancing condition is reached, thereby forming a closed-loop scheduling.
[0103] The real-time load fluctuation coefficient quantifies the severity of load changes on a physical link within a unit of time. Its value is derived from real-time sampling sequences of link bandwidth utilization, queuing depth, and buffer utilization. It is calculated by comparing the coefficient of variation or standard deviation to the mean within a sliding window; a higher value indicates more significant load fluctuations. After Kalman filtering and smoothing, its reciprocal is used to adjust the upper limit of the request distribution quantity. This aims to proactively reduce the distribution rate during periods of severe load fluctuation to avoid increased packet loss or latency degradation due to momentary congestion. Conversely, it allows distribution at near-rated rates during periods of stable load, matching the traffic injection rhythm with the dynamic changes in the link's actual carrying capacity. During tuning, the smoothing filter parameters are adjusted based on the autocorrelation characteristics of historical load fluctuations to ensure that the correction effectively suppresses oscillations without being overly conservative and wasting bandwidth.
[0104] The preset load balancing condition is determined by the difference between the resource consumption rates of each physical link (the difference between the maximum and minimum values) being less than a certain threshold. In this embodiment, this threshold is set to 5%. The tuning method is typically determined based on the system's tolerance for load balancing and the requirements for service stability: if the service is latency-sensitive and link performance differences are small, the threshold is set more strictly (e.g., 3%~5%); if link heterogeneity is strong or some fluctuation is permissible, it can be appropriately relaxed (e.g., 10%). In practical applications, throughput and latency performance under different thresholds can be tested offline to select a critical value that balances overall performance and load balancing. Online dynamic fine-tuning based on load characteristics is also supported to ensure that closed-loop scheduling achieves a balance between convergence speed and stability.
[0105] For example, with a smoothed packet loss rate of 0.02, an attenuation coefficient of 10, and an initial distribution limit of 5,000 times per second, the attenuated distribution limit is approximately 4,093 times per second; the smoothed real-time load fluctuation coefficient is 1.15, and its reciprocal is used to correct the real-time value of approximately 3,559 times per second. Based on this, a delay risk request is distributed to link A, so that the resource consumption rate of each physical link converges to within 5%.
[0106] In some embodiments, the Kalman filter is based on a state transition model of packet loss rate and real-time load fluctuation coefficient, fusing observed and predicted values to obtain a smooth result, thereby suppressing drastic fluctuations in distribution rate caused by occasional packet loss. The weight of the weighted round-robin is obtained by normalizing the real-time values of each traffic distribution target link; links with larger real-time values are allocated more requests in the round-robin. The closed-loop scheduling calculates the range of resource consumption rates of each physical link at the end of each scheduling cycle. When the range does not converge to a preset threshold, the number of physical links participating in transmission is re-determined according to the current load distribution of each link, and the process returns to execute S5 to re-select the candidate link sequence. This process is repeated until the range converges, thereby continuously maintaining a load-balanced state for multi-path data transmission during operation. The resource consumption rate is obtained by weighting the bandwidth utilization rate, queuing depth, and buffer utilization rate of each physical link.
[0107] In a specific example of this application, the method is applied to distributed storage nodes composed of solid-state drive (SSD) arrays. The time window is set to 50 milliseconds. In S1, the isolated forest algorithm is used instead of address variance to extract access dispersion. In S4, a long short-term memory (LSTM) network is used instead of exponential smoothing to predict the hit rate. The overload threshold is set to 800,000 based on the higher concurrency capability of the SSDs. The remaining steps are executed in the same manner as in Example 1, with S1 to S7 executed sequentially to form a closed-loop schedule. Furthermore, considering the characteristic of SSDs having no seeker mechanical action, in S5, the erase / write balance of flash memory channels and channel queuing depth are used instead of seek distance parameters to construct the link state matrix. In S6, the maximum tolerable latency is set to the lower latency limit of the SSD array. Due to the high random access performance of SSDs, the difference in resource consumption weights between random access and sequential access in S2 is reduced accordingly. This embodiment shows that the specific parameters and algorithm selection of each step of this method can be adjusted according to the physical characteristics of the underlying storage medium, while the connection between the steps remains unchanged.
[0108] In another embodiment of this application, the method is applied to a cross-node distributed storage cluster, where multiple physical links are distributed across different storage nodes. In this embodiment, the total cache pool capacity of S3 is the total amount of distributed cache, and the initial space ratio parameter is determined according to the two-level correspondence between nodes and applications; the link state matrix of S5 is constructed across the cross-node scope, and K-means clustering is performed on all links in the cluster; the load balancing of S7 is measured by the range of resource consumption rates of each physical link in the entire cluster. In the cross-node scenario, the link state, cache usage, and hit rate information required for each step are reported by the local collection module of each storage node to the cluster scheduling module for aggregation. The cluster scheduling module executes S1 to S7 uniformly based on this and distributes the decision to each node for execution; to reduce the cross-node information synchronization overhead, slow variables such as resource consumption rate are reported at a longer interval, while fast variables such as packet loss rate are reported at a shorter interval. This embodiment shows that the method can still maintain the hierarchical connection and closed-loop scheduling of each step in a cross-node distributed storage cluster, and can be extended to cross-node distributed storage scenarios.
[0109] In other embodiments, when a traffic distribution target link fails during distribution or its packet loss rate suddenly increases to exceed a set limit, the scheduling process immediately removes the link from the candidate link sequence and returns to execute S5 for re-selection. Unfinished requests with potential delays are migrated to a new traffic distribution target link, thereby ensuring the continuity of multipath data transmission in the event of link anomalies. Meanwhile, the intermediate results of each step, such as target link identifiers, priority level division results, independent cache boundary addresses, candidate link sequences, and real-time values, can be recorded in the operation log for subsequent performance analysis and parameter tuning.
[0110] The method and system described in this application are not only applicable to multi-path storage transmission scenarios composed of serially connected small computer system interfaces, but can also be extended to other distributed storage environments that transmit data through multiple parallel channels, such as distributed block storage and object storage systems connected via multiple network links. In these scenarios, the physical links are replaced by the corresponding transmission channels, and the seek distance parameter is replaced by the transmission cost index of the channel, while the connection relationships and closed-loop scheduling logic between the remaining steps remain unchanged. Therefore, the load balancing scheme with hierarchical connection and closed-loop scheduling provided in this application has good versatility and scalability.
[0111] Based on the above method, this application also provides a disk SAS multipath data transmission load balancing and dynamic scheduling system, such as... Figure 2 As shown. The system includes:
[0112] The overload detection module is configured to obtain the arrival time interval and data block access address of read and write requests for each physical link, identify physical links whose product of request density and access dispersion is greater than the overload threshold as target links and extract their read and write requests.
[0113] The priority division module is configured to obtain a request priority score and priority level division result based on the read / write operation type and single request data volume of the read / write request;
[0114] The cache allocation module is configured to determine the initial space ratio parameter based on the priority level division result and the application identifier of the request source, and obtain the independent cache boundary address after being corrected by the hardware response latency.
[0115] The lingering identification module is configured to obtain the number of bytes occupied from the independent cache boundary address, and combine it with the lingering instruction demand predicted by the historical cache hit rate record, and identify read and write requests whose sum exceeds the space limit as lingering risk requests.
[0116] The candidate filtering module is configured to filter and sort the candidate link sequence in descending order based on the seek distance parameter and remaining bandwidth capacity corresponding to the delay risk request.
[0117] The target selection module is configured to determine the link with the largest throughput capacity after delay penalty correction as the traffic distribution target link based on the current transmission rate and end-to-end delay of each link in the candidate link sequence.
[0118] The load balancing module is configured to determine the real-time distribution value based on the packet loss rate and real-time load fluctuation coefficient of the traffic distribution target link, and distribute the delay risk request accordingly to obtain the load balancing status of multi-path data transmission.
[0119] The modules described above are connected sequentially, with the output of the previous module serving as the input of the next module, corresponding one-to-one with each step of the method.
[0120] It should be noted that, in this document, the terms "comprising," "including," and any other variations are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Specific examples have been used in this document to illustrate the principles and implementation methods of the technical solutions of this application. The above examples are only for the purpose of helping to understand the methods and core ideas of this application. The above descriptions are merely preferred embodiments of this application. It should be pointed out that, due to the limitations of written expression and the objective existence of infinite specific structures, those skilled in the art can make several improvements, modifications, or changes without departing from the principles of this application, and can also combine the above technical features in an appropriate manner; these improvements, modifications, changes, or combinations, or the direct application of the concept and technical solutions of this application to other situations without modification, should all be considered within the scope of protection of this application.
Claims
1. A method for load balancing and dynamic scheduling of multi-path data transmission in disk SAS, characterized in that, include: S1, obtain the arrival time interval and data block access address of each physical link read / write request, calculate the request density and access dispersion and their product, determine the physical link whose product is greater than the overload threshold as the target link and extract the read / write requests of the target link. S2, calculate access features and construct request size vectors based on the read and write operation types and word request data volume in the read and write requests, and obtain priority level division results from the access features and the request size vectors; S3, using the request source application identifier and hardware response latency obtained from the priority level division result, determine the initial space ratio parameter, and after correction by the hardware response latency, obtain the independent cache boundary address corresponding to the priority level division result; S4, obtain the corresponding historical cache hit rate record based on the independent cache boundary address, predict the demand for delayed instructions and calculate the number of bytes already occupied, and determine the delayed risk request based on the number of bytes already occupied and the demand for delayed instructions; S5, based on the seek distance parameter of the target disk corresponding to the delay risk request, filter links with seek distances less than the target link as backup links, and sort them in descending order of remaining bandwidth capacity to obtain a candidate link sequence; S6, the instantaneous throughput capacity is obtained from the current transmission rate of each link in the candidate link sequence and a delay penalty correction is applied. The link with the largest throughput capacity after correction is selected as the traffic distribution target link. S7. Determine the upper limit of the number of requests to be distributed based on the packet loss rate of the target link of the traffic distribution, and correct it according to the real-time load fluctuation coefficient to obtain a real-time value. Distribute the requests with the risk of being stuck according to the real-time value to obtain a load balancing state.
2. The disk SAS multipath data transmission load balancing and dynamic scheduling method according to claim 1, characterized in that, S1 includes: constructing a time window for the arrival time interval, counting the number of requests within the time window and smoothing it by combining it with historical values to obtain the request density; Spatial distribution analysis is performed on the access addresses of the data blocks to obtain a discrete index of the address distribution as the access dispersion degree; After determining the target link, the read and write requests on the target link are rate-limited and smoothed to obtain smoothed read and write requests.
3. The disk SAS multipath data transmission load balancing and dynamic scheduling method according to claim 1, characterized in that, S2 includes: extracting sequential access feature values and random access feature values from the read / write operation type, comparing the magnitudes of the sequential access feature values and random access feature values to determine the access mode label of the read / write request, which is used as the access feature; The resource consumption weight is obtained by classifying the request size vector, and the request priority score is obtained by multiplying the resource consumption weight by the value corresponding to the access feature. The priority score of the request is divided into levels to obtain the priority level division result.
4. The disk SAS multipath data transmission load balancing and dynamic scheduling method according to claim 1, characterized in that, The S3 includes: correcting the initial space ratio parameter by the difference between the hardware response latency and the standard latency threshold to obtain the target space ratio parameter, and determining the amount of buffer space based on the target space ratio parameter; Cluster the historical access frequency sequence corresponding to the cache space to obtain access popularity categories; for those belonging to the high-frequency access category, calculate the starting offset of the independent block from the cache space to obtain the independent cache boundary address.
5. The disk SAS multipath data transmission load balancing and dynamic scheduling method according to claim 1, characterized in that, S4 includes: obtaining the number of bytes already occupied from the difference between the independent cache boundary address and the starting address; Time series analysis is performed on the historical cache hit rate records to obtain the hit rate prediction value, and the demand for the backlogged instructions is obtained from the hit rate prediction value and the space of a single instruction. The number of bytes already occupied is added to the number of pending instructions required, and read / write requests whose sum exceeds the space limit are identified as pending risk requests.
6. The disk SAS multipath data transmission load balancing and dynamic scheduling method according to claim 1, characterized in that, S5 includes: constructing a link state matrix using the seek distance parameter and the remaining bandwidth capacity; clustering the link state matrix to obtain link clusters with different congestion levels; and extracting the backup link from the link cluster with the lowest congestion level. Those backup links with risk values less than the risk threshold are identified as safe candidate links, and the safe candidate links are sorted in ascending order according to their seek distance to obtain a candidate link sequence.
7. The disk SAS multipath data transmission load balancing and dynamic scheduling method according to claim 1, characterized in that, S6 includes: obtaining the instantaneous throughput capability from the current transmission rate and the percentage of available bandwidth; A latency penalty term is constructed by combining the preset maximum tolerable latency with the end-to-end latency. The instantaneous throughput capacity is then deducted from the latency penalty term to obtain the corrected throughput capacity. After removing links whose corrected throughput capacity is less than the throughput threshold, the link with the largest corrected throughput capacity among the remaining links is selected as the target link for traffic distribution.
8. The disk SAS multipath data transmission load balancing and dynamic scheduling method according to claim 1, characterized in that, S7 includes: filtering and smoothing the packet loss rate and the real-time load fluctuation coefficient to obtain a smoothed packet loss rate and a smoothed real-time load fluctuation coefficient; The upper limit of the number of requests to be distributed is obtained by attenuating the smoothed packet loss rate, and the real-time value is obtained by correcting the upper limit of the number of requests to be distributed by the reciprocal of the smoothed real-time load fluctuation coefficient. Based on the real-time values, the delay risk requests are distributed to the traffic distribution target links in a weighted round-robin manner to achieve dynamic scheduling and load balancing.
9. The disk SAS multipath data transmission load balancing and dynamic scheduling method according to claim 1, characterized in that, It also includes: obtaining the load balance degree from the range of resource consumption rates of each physical link after distribution; when the load balance degree does not reach the preset balance condition, reallocating the number of physical links participating in transmission and returning to the process of filtering the candidate link sequence until the load balance degree reaches the preset balance condition.
10. A disk SAS multipath data transmission load balancing and dynamic scheduling system, characterized in that, include: The overload detection module is configured to obtain the arrival time interval and data block access address of read and write requests for each physical link, identify physical links whose product of request density and access dispersion is greater than the overload threshold as target links and extract their read and write requests. The priority division module is configured to obtain a request priority score and priority level division result based on the read / write operation type and single request data volume of the read / write request; The cache allocation module is configured to determine the initial space ratio parameter based on the priority level division result and the application identifier of the request source, and obtain the independent cache boundary address after being corrected by the hardware response latency. The lingering identification module is configured to obtain the number of bytes occupied from the independent cache boundary address, and combine it with the lingering instruction demand predicted by the historical cache hit rate record, and identify read and write requests whose sum exceeds the space limit as lingering risk requests. The candidate filtering module is configured to filter and sort the candidate link sequence in descending order based on the seek distance parameter and remaining bandwidth capacity corresponding to the delay risk request. The target selection module is configured to determine the link with the largest throughput capacity after delay penalty correction as the traffic distribution target link based on the current transmission rate and end-to-end delay of each link in the candidate link sequence. The load balancing module is configured to determine the real-time distribution value based on the packet loss rate and real-time load fluctuation coefficient of the traffic distribution target link, and distribute the delay risk request accordingly to obtain the load balancing status of multi-path data transmission.
