Hard disk command quota adjustment method, device, equipment, medium and product
By obtaining hard drive command quota adjustment requests from the timer scheduling task table and dynamically adjusting hard drive command quotas using multi-level downgrade rules, the problem of frequent queue full errors was solved, and the stability and efficiency of storage performance were improved.
Patent Information
- Application Number
- CN202611340118.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-31
- Publication Date
- 2026-11-20
AI Technical Summary
In existing technologies, when a storage array card manages multiple hard drives, static or simple dynamic adjustment of command quotas leads to frequent queue full errors, increases error handling overhead, and makes it difficult to adapt to dynamic changes in hard drive processing capabilities.
By obtaining the command quota adjustment request of the target hard drive from the timer scheduling task table, and using bit position information and command quota multi-level downgrade rules, the command quota of the hard drive is dynamically adjusted to ensure that the quota change matches the real-time status of the hard drive.
This reduces the probability of queue full errors, decreases error handling overhead, and improves the stability and efficiency of storage performance.
Smart Images

Figure CN123137579A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, device, medium and product for adjusting hard disk command quotas. Background Technology
[0002] In storage systems, storage array cards typically need to manage multiple hard drives, which may have significantly different performance levels. Storage array cards control the concurrency of input / output (I / O) requests by uniformly configuring command quotas for each hard drive.
[0003] In related technologies, storage array cards typically use static command quotas, response time-based or queue occupancy-based methods to control the I / O concurrency of Serial Attached SCSI (SAS) or Serial Advanced Technology Attachment (SATA) hard drives.
[0004] However, the above method is prone to causing frequent queue full errors and increases error handling overhead. Summary of the Invention
[0005] This application provides a method, apparatus, device, medium, and product for adjusting hard disk command quotas, in order to solve the technical problem of reducing the frequency of queue full errors and reducing error handling overhead.
[0006] Firstly, this application provides a method for adjusting hard disk command quotas, including:
[0007] Obtain a target command quota adjustment request from the timer scheduling task table, wherein the target command quota adjustment request includes the target hard disk whose command quota is to be adjusted;
[0008] If the bit position information of the target hard disk indicates that the target hard disk has triggered a command quota adjustment, then obtain the number of command quota adjustments to the target hard disk within the current polling period of the timer;
[0009] The command quota of the target hard drive is adjusted according to the number of command quota adjustments and the preset command quota multi-level downgrade rules. The command quota multi-level downgrade rules include multiple levels and the quota value corresponding to each level, and the quota value corresponding to each level decreases sequentially.
[0010] In this application, the storage array card obtains the command quota adjustment request for the corresponding target hard drive through a timer scheduling task table, determines whether the hard drive is in a command quota adjustment state through bit position information, obtains the number of command quota adjustments, and finally adjusts the command quota of the hard drive according to the multi-level command quota downgrade rules. This enables the storage array card to dynamically adjust the command delivery concurrency based on the processing status of the target hard drive, thereby reducing the probability of queue full errors and reducing the resource overhead of the storage array card due to error handling.
[0011] Optionally, in the method described above, adjusting the command quota of the target hard drive according to the number of command quota adjustments and the preset multi-level command quota downgrade rules includes:
[0012] The current operating level of the target hard drive is determined based on the number of times the command quota is adjusted.
[0013] Adjust the command quota of the target hard drive according to the current operating level of the target hard drive and the preset command quota multi-level downgrade rules.
[0014] In this application, the storage array card can perform multi-level downgrading of the target hard drive based on the number of command quota adjustments, so that the quota adjustment is consistent with the real-time status of the hard drive, thereby making the command quota change more flexible and making the multi-level downgrading process of command quota more in line with the actual operation of the hard drive.
[0015] Optionally, in the method described above, if the target hard drive is currently in its initial gear position, adjusting the command quota of the target hard drive according to its current operating gear position and the preset command quota multi-level downgrade rules includes:
[0016] If the current operating level of the target hard drive is the initial level in the command quota multi-level downgrade rule, then the next level corresponding to the initial level is determined as the first target level to be adjusted.
[0017] Adjust the command quota corresponding to the first target level to the command quota of the target hard drive.
[0018] In this application, when the target hard drive is in the initial level, the next level can be determined directly according to the rules and the quota replacement can be completed, so that the quota adjustment is consistent with the preset downgrade rules. This makes it easy for the storage array card to quickly complete the first downgrade of the hard drive in the initial quota state, and allows subsequent adjustments to continue along the preset level relationship.
[0019] Optionally, in the method described above, the target command quota adjustment request further includes the first trigger count of the queue full error code; if the target hard drive is currently in a non-initial gear, adjusting the command quota of the target hard drive according to the current operating gear of the target hard drive and the preset command quota multi-level downgrade rule includes:
[0020] If the target hard drive is currently running at a non-initial level in the command quota multi-level downgrade rule, then obtain the second trigger count of the current queue full error code, the current running level, and the running time of the current running level.
[0021] If the second trigger count is the same as the first trigger count, the current running gear is not the last gear in the preset command quota multi-level downgrade rule, and the running time of the current running gear meets the preset gear adjustment interval time threshold, then the next level gear corresponding to the current running gear is determined as the second target gear to be adjusted.
[0022] Adjust the command quota corresponding to the second target level to the target hard disk command quota.
[0023] In this application, the queue full error code trigger state and the duration of the tier are used as joint criteria to adjust the command quota step by step according to the preset downgrade link, so that the target hard disk is subject to graded rate limiting when it is continuously underloaded, and the quota update of the storage array card is kept consistent with the real-time processing capability of the hard disk.
[0024] Optionally, in the method described above, after adjusting the command quota for the target hard disk, the method further includes:
[0025] Detect the current number of command quota adjustments;
[0026] If the current number of command quota adjustments is equal to the preset adjustment number threshold, then the command quota of the target hard drive will be adjusted to the command quota corresponding to the initial level.
[0027] In this application, a recovery determination is introduced after the target hard drive completes a certain number of command quota adjustments, so that the command quota can return to the level corresponding to the initial level when the recovery conditions are met. By using the number of adjustments as the dividing line for recovery, the situation where the command quota changes due to occasional slow hard drive performance triggering a queue full error code and then not recovering is avoided, thereby improving the reliability and fault tolerance design of the automatic command quota adjustment process.
[0028] Optionally, in the method described above, before obtaining the target command quota adjustment request from the timer scheduling task table, the method further includes:
[0029] In response to the queue full error code returned by the target hard disk, determine whether the target command quota adjustment request exists in the timer scheduling task table based on the bit position information of the target hard disk;
[0030] If the target command quota adjustment request does not exist in the timer scheduling task table, then the current command quota of the target hard disk is recorded, and the target command quota adjustment request is generated.
[0031] The target command quota adjustment request is recorded in the timer scheduling task table, and the current number of adjustment attempts and the number of times the queue is full error code is triggered are initialized to trigger the step of obtaining the target command quota adjustment request from the timer scheduling task table.
[0032] In this application, when the hard disk returns a full queue error code, the system determines whether the target command quota adjustment request already exists in the timer scheduling task table by using bit position information. Only when the request does not exist is the hard disk's current command quota recorded, a target command quota adjustment request generated and written, and the number of command quota adjustments and queue full error code triggers initialized. This avoids the repeated generation of adjustment requests when the same hard disk reports a queue full error code, prevents quota adjustments from being repeatedly triggered in a short period of time, thereby reducing additional processing overhead and improving the orderliness of the quota adjustment process.
[0033] Secondly, this application provides a hard disk command quota adjustment device, comprising:
[0034] The acquisition module is used to acquire a target command quota adjustment request from the timer scheduling task table, wherein the target command quota adjustment request includes the target hard disk whose command quota is to be adjusted;
[0035] The acquisition module is further configured to acquire the number of times the command quota adjustment for the target hard disk has been triggered within the current polling period of the timer if the bit position information of the target hard disk indicates that the target hard disk has currently triggered the command quota adjustment.
[0036] The adjustment module is used to adjust the command quota of the target hard drive according to the number of command quota adjustments and the preset command quota multi-level downgrade rules. The command quota multi-level downgrade rules include multiple levels and the quota value corresponding to each level, and the quota value corresponding to each level decreases sequentially.
[0037] In this application, different functions are allocated to the acquisition module and the adjustment module through the hard disk command quota adjustment device. This modular design with clear division of labor enables each module to work efficiently in parallel or serially, thereby improving the processing efficiency of the entire hard disk command quota adjustment process.
[0038] Thirdly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0039] The memory stores computer-executed instructions;
[0040] The processor executes computer execution instructions stored in the memory to implement the method for adjusting hard disk command quotas as described in any of the first aspects.
[0041] In this application, an electronic device is provided to provide the hardware conditions for executing the hard disk command quota adjustment method of this application.
[0042] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method for adjusting hard disk command quotas as described in any of the first aspects.
[0043] In this application, a computer-readable storage medium is provided to provide storage medium conditions for executing the hard disk command quota adjustment method of this application.
[0044] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method for adjusting hard disk command quotas as described in any of the first aspects.
[0045] In this application, a computer program product is provided to provide program product conditions for executing the hard disk command quota adjustment method of this application.
[0046] This application provides a method, apparatus, device, medium, and product for adjusting hard disk command quotas. It obtains a command quota adjustment request containing a target hard disk from a timer scheduling task table. When the target hard disk's bit position indicates that command quota adjustment has been triggered, it obtains the number of command quota adjustments made to the target hard disk within the current polling cycle of the timer. Then, based on the number of command quota adjustments and a multi-level command quota reduction rule (including multiple levels with sequentially decreasing quota values), it adjusts the command quota of the target hard disk. This allows for more targeted dynamic adjustment of the command quota based on the target hard disk's current adjustment state, improving the match between the command quota and the actual processing capacity of the target hard disk, thereby reducing the probability of queue full errors and error handling overhead. Attached Figure Description
[0047] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0048] Figure 1This application provides a command block diagram for a hard disk return queue full of error codes;
[0049] Figure 2 This is a schematic diagram of an application scenario provided by an embodiment of this application;
[0050] Figure 3 A flowchart illustrating a method for adjusting hard disk command quotas provided in an embodiment of this application;
[0051] Figure 4 A flowchart illustrating a method for a storage array card to receive a queue full error code returned by a hard disk, provided in an embodiment of this application;
[0052] Figure 5 A schematic diagram of a timer data structure provided in an embodiment of this application;
[0053] Figure 6 This application provides a schematic diagram of a SAS hard disk command quota level.
[0054] Figure 7 This application provides a schematic diagram of a SATA hard disk command quota level.
[0055] Figure 8 This is a flowchart illustrating a method for adjusting the command quota of a target hard drive based on the number of command quota adjustments and preset multi-level command quota downgrade rules, as provided in an embodiment of this application.
[0056] Figure 9 A flowchart illustrating a method for adjusting the command quota of a target hard disk at an initial gear level, as provided in an embodiment of this application;
[0057] Figure 10 A flowchart illustrating a method for adjusting the command quota of a target hard disk in a non-initial gear position, provided in an embodiment of this application;
[0058] Figure 11 A flowchart illustrating a method for restoring command quotas provided in an embodiment of this application;
[0059] Figure 12 A flowchart illustrating a method for determining whether to adjust command quotas, provided in an embodiment of this application;
[0060] Figure 13 A flowchart illustrating another method for adjusting hard disk command quotas provided in this application embodiment;
[0061] Figure 14 A schematic diagram of a hard disk command quota adjustment device provided in an embodiment of this application;
[0062] Figure 15This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0063] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0064] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0065] In a storage system, a storage RAID card can connect to multiple SAS or SATA hard drives from different manufacturers. The RAID card configures an initial command quota for each SAS or SATA hard drive, using this quota to control the number of commands issued to each drive, thereby reducing hard drive command overload and preventing impact on I / O performance. However, the queue depth (queueDepth) of different hard drives may vary. To maximize hard drive performance, the initial command quota is typically set to be greater than the hard drive's queue depth.
[0066] Because some types of SAS / SATA hard drives process commands slowly, when a sufficient number of commands are issued, and the command queue depth is greater than or equal to the hard drive's command queue depth (i.e., the hard drive command queue is full), the hard drive will return a queue full error code, such as the Small Computer System Interface Status (scsiStatus) status code "TaskSetFULL" to the storage array card.
[0067] Therefore, when the hard drive command queue is full and can no longer receive new commands, the hard drive command quota can be reduced by adjusting the SAS / SATA hard drive command quota mechanism. This allows the number of command quotas for each hard drive in the storage system to reach a reasonable range, thereby maximizing the utilization of hard drive performance and ensuring that commands do not return an error code indicating that the queue is full.
[0068] In related technologies, storage systems typically employ static command quotas or dynamic adjustments based on simple rules. For example, a storage RAID card uniformly configures initial command quotas for each hard drive, usually based on the queue depth reported by the hard drive or a general default value. Alternatively, some solutions dynamically adjust the command issuance frequency by monitoring the hard drive's I / O response time, such as reducing the number of concurrent requests or extending the interval. Other solutions monitor the occupancy rate of the hard drive command queue, such as the overall occupancy rate of the completion queue, triggering alarms and subsequently adjusting the command issuance frequency.
[0069] However, the above methods are insufficient to reflect dynamic changes in hard drive processing capacity in a timely manner. Especially when multiple virtual disks (VDs) simultaneously submit commands to the same hard drive, the available queue space shrinks rapidly, while the original quota remains in effect, easily leading to frequent queue full error codes (scsiStatus) on the hard drive side. In cases where the queue depth of some hard drives is not reported to the storage array card, the storage array card can only use the queue depth of general-purpose disks to configure hard drive command quotas. If the queue depth of a general-purpose disk is greater than the queue depth of a hard drive, and that hard drive is a slow drive, excessive service I / O pressure will result in even more frequent return of queue full error codes (scsiStatus).
[0070] For example, such as Figure 1 As shown, Figure 1 This application provides a command block diagram for a hard disk return queue full error code. The storage array card includes a service module, a driver module, and an error handling module. The hard disk includes a command processing module and a command return module.
[0071] The business module generates a command entry (cmd_entry), which is then sent to the hard disk via the driver module as an I / O command. The cmd_entry enters the local command queue on the hard disk and is executed by the command processing module. When the internal command queue on the hard disk is full, the command return module returns a status message to the driver module indicating that the task set is full (TaskSetFull).
[0072] The driver module submits the queue full error code scsiStatus reported by the hard disk to the error handling module. The error handling module recognizes the TaskSetFull exception, returns the business layer result to the business module, and performs a retry for the cmd_entry corresponding to the exception. The cmd_entry is re-sent to the internal queue of the array card and sent to the driver module again to achieve re-deployment.
[0073] Therefore, once the queue is full and error codes continue to appear, the storage array card will repeatedly enter the error handling process, consuming additional processing resources, increasing scheduling overhead, and affecting effective input / output throughput.
[0074] Therefore, based on the above-mentioned technical problems, this application proposes a method for adjusting hard disk command quotas. By obtaining the target command quota adjustment request from the timer scheduling task table and obtaining the number of command quota adjustments within the current polling cycle, the command quota of the target hard disk is adjusted according to the preset multi-level downgrade rules, so that the quota change matches the real-time load of the hard disk, thereby reducing the probability of repeated triggering of queue full errors, alleviating the error handling pressure of the storage array card, and thus maintaining stable storage performance.
[0075] To facilitate understanding of the method in this application, an exemplary application scenario is provided below. Please refer to [link / reference]. Figure 2 , Figure 2 This is a schematic diagram of an application scenario provided by an embodiment of the present application. The application scenario diagram includes a terminal 02, which includes a storage array card 021 and at least one hard disk 022.
[0076] The storage array card 021 maintains a timer scheduling task table from which it can read target command quota adjustment requests. These requests carry information about the target hard drive from which the command quota to be adjusted. Hard drive 022 can be a SAS or SATA type backend physical hard drive. Different hard drives have different hardware processing capabilities, leading to business scenarios requiring quota reduction. The storage array card 021 establishes an I / O interaction path with hard drive 022, enabling it to collect bit position information from the corresponding hard drive to determine if hard drive 022 has triggered command quota adjustment. Once it determines that hard drive 022 has triggered quota adjustment, the storage array card 021 obtains the number of command quota adjustments for hard drive 022 within the current timer polling cycle and, combined with preset multi-level command quota reduction rules, completes the quota update.
[0077] It is understood that the above examples are for illustrative purposes only and do not limit this application. The specific details can be determined based on the actual application situation.
[0078] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0079] Please see Figure 3 , Figure 3This is a flowchart illustrating a method for adjusting hard disk command quotas according to an embodiment of this application. The executing entity of this method can be a hard disk command quota adjustment device. This hard disk command quota adjustment device can be implemented through a computer program, or through a medium storing the relevant computer program, such as a USB flash drive and / or optical disc, or through a physical device integrating or installing the relevant computer program, such as a chip or electronic device. The electronic device can be a server, server cluster, or smart terminal, etc. Figure 3 As shown, the method may include the following steps:
[0080] S301. Obtain the target command quota adjustment request from the timer scheduling task table. The target command quota adjustment request includes the target hard disk whose command quota is to be adjusted.
[0081] In this embodiment, the execution entity can be the storage array card in the smart terminal.
[0082] To better understand the method of this embodiment, before triggering the command quota adjustment, the process of the storage array card receiving the queue full error code TaskSetFull returned by the hard disk will be explained first.
[0083] Please see Figure 4 , Figure 4 A flowchart illustrating a method for a storage array card to receive a queue full error code returned by a hard disk, as provided in this application embodiment, may include the following steps:
[0084] When the service layer of the storage array card executes command delivery, the service module issues the command, performs command delivery, and checks whether the number of commands issued has reached the command quota of the hard drive. If the command quota is reached, the command is added to the storage array card's waiting queue to await delivery in the next scheduling. If the command quota is not reached, the number of commands to be issued is increased by 1, and the command is delivered to the hard drive.
[0085] After receiving the command, the hard drive checks whether the queue used to store the command is full. If it is not full, the command enters the queue for processing. After the command is processed, the number of commands in the queue is decremented by 1, and the result of the processed command is returned to the storage array card. The business module command is then complete.
[0086] If the hard drive determines that the queue used for storing commands is full, it generates a queue full error code and returns it to the storage array card. The storage array card driver receives the command, decrements the command issuance quantity by 1, and returns the command to the error handling module. The error handling module detects the queue full error code, requests a command quota adjustment request, such as a request structure (request, req), adds it to the automatic adjustment timer scheduling task table, such as the command quota detection linked list, and executes the automatic adjustment of command quota. The command will then be added to the waiting queue for retry.
[0087] In this embodiment, the timer scheduling task table, such as the command quota detection linked list, can be used to store the target command quota adjustment requests to be processed, such as req, and serve as the scheduling carrier for periodically polling and executing command quota adjustments.
[0088] The target command quota adjustment request can be used to carry the target hard drive for which the command quota is to be adjusted and the information required for subsequent adjustments. It can include at least the target hard drive identifier and status information related to the command quota adjustment. The target hard drive is the physical hard drive for which the command quota adjustment needs to be performed in this round, and can be uniquely identified by slot number, port number, device handle, or global device number.
[0089] One possible implementation is that the timer scans the timer scheduling task table according to a preset polling period, reads the request items in the pending state, and determines the associated target hard disk as the current processing object.
[0090] By establishing a timer scheduling task table on the storage array card and obtaining the target command quota adjustment request from it, the command quota adjustment processing of the target hard disk can be incorporated into the timed polling path, thus providing a basis for subsequently obtaining the adjustment count and executing the command quota adjustment on a periodic basis.
[0091] S302. If the bit position information of the target hard disk indicates that the target hard disk has triggered the command quota adjustment, then obtain the number of command quota adjustments to the target hard disk in the current polling period of the timer.
[0092] In this embodiment, bit position information can be used to indicate whether the target hard disk has entered the command quota adjustment state.
[0093] Optionally, such as Figure 5 As shown, Figure 5 This is a schematic diagram of a timer data structure provided in an embodiment of this application. When the timer polls the timer scheduling task table, if it happens to poll the bit position information of the target hard disk, it means that the bit in the bitmap corresponding to the target hard disk is set, indicating that the timer scheduling task table includes the command quota adjustment request req of the target hard disk, and the target hard disk has now triggered command quota adjustment.
[0094] After the timer retrieves the target command quota adjustment request (req), it uses the status information associated with the target hard disk in the request.
[0095] Optionally, such as Figure 5 As shown, the status information includes, but is not limited to: the target hard drive's identification information, the default command quota, the number of command quota adjustments made to the target hard drive within the current polling cycle (also known as the number of timer checks), the number of times the previous queue full error code was triggered, and the timestamp when downgrading. The number of command quota adjustments can be understood as the remaining number of adjustments that can be made.
[0096] Therefore, the storage array card can obtain the number of command quota adjustments made to the target hard drive within the current polling cycle of the timer.
[0097] S303. Adjust the command quota of the target hard drive according to the number of command quota adjustments and the preset command quota multi-level downgrade rules. The command quota multi-level downgrade rules include multiple levels and the quota value corresponding to each level, and the quota value corresponding to each level decreases sequentially.
[0098] In this embodiment, the multi-tiered command quota reduction rule is used to define the tiered adjustment method of the target hard drive's command quota. This rule includes multiple tiers and the corresponding quota value for each tier, with the quota value decreasing sequentially for each tier. The tier represents the different levels of the target hard drive's command quota, and the quota value is the upper limit of the number of concurrent commands that can be issued to the target hard drive.
[0099] For example, the SAS hard drive's preset command quota downgrade rules can be as follows: Figure 6 As shown, Figure 6 This application provides a schematic diagram of SAS hard disk command quota levels, wherein the first level command quota is 128, the second level command quota is 112, the third level command quota is 96, the fourth level command quota is 80, and the fifth level command quota is 64.
[0100] For example, the default command quota downgrade rules for SATA hard drives can be as follows: Figure 7 As shown, Figure 7 This is a schematic diagram of SATA hard drive command quota levels provided in an embodiment of this application, wherein the first level command quota is 64, the second level command quota is 56, the third level command quota is 48, the fourth level command quota is 40, and the fifth level command quota is 32.
[0101] It is understood that the above examples are for illustrative purposes only and do not limit this application. The specific details can be determined based on the actual application situation.
[0102] One possible implementation is to obtain the number of command quota adjustments within the current polling cycle, process the number of adjustments with the preset command quota multi-level downgrade rules to determine the corresponding command quota for the target hard drive, and adjust the command issuance for the target hard drive according to the determined command quota, so that the number of new commands delivered to the hard drive in the future is compatible with the adjusted command quota.
[0103] After the timer scheduling task table has been traversed, if the timer scheduling task table is not empty and still contains `req`, the timer will be woken up again to poll after a preset interval, such as 1 second. If the table is empty, waking up the timer will stop and polling will stop.
[0104] In the above embodiments of this application, a target command quota adjustment request is obtained from the timer scheduling task table. This request includes a target hard drive whose command quota is to be adjusted. If the bit position information of the target hard drive indicates that command quota adjustment has been triggered, the number of command quota adjustments to the target hard drive within the current polling cycle of the timer is obtained. Then, based on the number of command quota adjustments and a preset multi-tiered command quota reduction rule, the command quota of the target hard drive is adjusted. The multi-tiered command quota reduction rule includes multiple tiers and corresponding quota values for each tier, with the quota values for each tier decreasing sequentially. This allows for more targeted dynamic adjustment of the command quota based on the target hard drive's current adjustment state, improving the matching degree between the command quota and the actual processing capacity of the target hard drive, thereby reducing the probability of queue full errors and error handling overhead.
[0105] Furthermore, based on the above embodiments, the following embodiments illustrate the process of adjusting the command quota of the target hard drive according to the number of command quota adjustments and the preset command quota multi-level downgrade rules.
[0106] Please see Figure 8 , Figure 8 This application provides a flowchart illustrating a method for adjusting the command quota of a target hard drive based on the number of command quota adjustments and preset multi-level command quota downgrade rules. The method may include the following steps:
[0107] S801. Determine the current operating level of the target hard drive based on the number of command quota adjustments.
[0108] The storage array card reads the target command quota adjustment request (req) corresponding to the target hard disk from the timer scheduling task table and obtains the number of command quota adjustments within the current polling cycle.
[0109] If the number of quota adjustment attempts is the preset initial value, then this request is considered the first poll, indicating that the target hard drive is currently operating at the initial level. If the number of quota adjustment attempts is not the preset initial value, then the target hard drive is currently operating at a non-initial level.
[0110] S802. Adjust the command quota of the target hard drive according to the current operating level of the target hard drive and the preset command quota multi-level downgrade rules.
[0111] After determining the current operating level of the target hard drive, if the target hard drive is currently operating at the initial level, the command quota of the target hard drive is adjusted according to the initial level and the preset command quota multi-level downgrade rules. If the target hard drive is currently operating at a non-initial level, the command quota of the target hard drive is adjusted according to the non-initial level and the preset command quota multi-level downgrade rules.
[0112] Once the command quota for the target hard drive is determined, the quota value can be written into the hard drive quota management table of the storage array card, and the current quota status of the target hard drive can be updated synchronously.
[0113] This application also provides another method for adjusting command quotas: by introducing a machine learning-based error code prediction model, the hard drive quota can be proactively downgraded. Specifically, key operational features such as historical hard drive error code trigger times, I / O response times, and queue depth changes can be extracted and trained using a time series model or a classification model to accurately predict the probability of the hard drive subsequently triggering a full queue of error codes.
[0114] When the predicted probability reaches a preset threshold, the current operating level of the target hard drive is determined in advance, and the command quota of the target hard drive is adjusted in stages according to the preset command quota multi-level downgrade rules, completing the precise downgrade before the hard drive actually generates an error code. This proactive predictive downgrade method based on level matching can effectively avoid the critical condition of a full hard drive queue, significantly reducing the actual triggering frequency of error codes.
[0115] In the above embodiments of this application, the current operating level of the target hard drive is determined based on the number of command quota adjustments, and the command quota adjustment is completed in combination with the command quota multi-level downgrade rules. Based on the abnormal frequency of the hard drive in the polling cycle, the corresponding quota value is matched according to the level, reducing the direct reduction of the command quota to an excessively low value in a single operation, and preventing unnecessary loss of hard drive performance caused by an excessive one-time downgrade.
[0116] Based on any of the above embodiments, the following examples illustrate the process of adjusting the command quota of the target hard drive according to the current operating level of the target hard drive and the preset command quota multi-level downgrade rules.
[0117] One possible implementation is that if the target hard drive's current drive slot is the initial drive slot, Figure 9 This application provides a flowchart illustrating a method for adjusting the command quota of a target hard drive at an initial gear level. The method may include the following steps:
[0118] S901. If the target hard drive is currently operating at the initial level in the command quota multi-level downgrade rule, then the next level corresponding to the initial level will be determined as the first target level to be adjusted.
[0119] After the timer scheduling task table obtains the command quota adjustment request (req) for the target hard drive, it determines whether the bit position of the target hard drive is in the correct position, i.e., whether it is in the triggered adjustment state, by combining the bit position information of the target hard drive. If it is not in the correct position, the req is released, the current req execution ends, and the command quota of the target hard drive is not configured.
[0120] If in place, when it is confirmed that the current operating gear belongs to the initial gear, the next gear adjacent to the initial gear, i.e., the second gear, is read from the preset command quota multi-gear downgrade rules, and the second gear is determined as the first target gear.
[0121] S902. Adjust the command quota corresponding to the first target gear to the command quota of the target hard drive.
[0122] The storage array card writes the quota parameters corresponding to the first target level into the quota control table entry corresponding to the target hard drive, or directly updates the target hard drive command issuance threshold maintained on the storage array card side, so that the command quota of the target hard drive is synchronized with the quota value corresponding to the first target level.
[0123] At the same time, record the number of times the target hard drive's queue full error code is triggered so as to confirm that there will still be a queue full error code when the next polling occurs. Record the current timestamp and decrement the number of command quota adjustments to the target hard drive (i.e., the number of timer checks) within the current polling cycle by 1.
[0124] In the above embodiments, when the target hard drive is in the initial level, the next level can be determined and the quota replacement can be completed directly according to the command quota multi-level downgrade rules, so that the quota adjustment is consistent with the preset downgrade rules, the correspondence between the running status and the quota value is clear, and it is convenient for the storage array card to quickly complete the first downgrade of the hard drive in the initial quota state, and to allow subsequent adjustments to continue along the preset level relationship.
[0125] One possible implementation is that if the target hard drive's current drive slot is not the initial drive slot, Figure 10This application provides a flowchart illustrating a method for adjusting the command quota of a target hard drive in a non-initial gear position, which may include the following steps:
[0126] S1001. If the target hard disk is currently running at a non-initial level in the command quota multi-level downgrade rule, then obtain the second trigger count of the current queue full error code, the current running level, and the running time of the current running level.
[0127] As shown in the aforementioned embodiments, the target command quota adjustment request also includes the number of times the previous queue full error code was triggered, i.e., the first number of times the target hard drive currently records the queue full error code before this round of adjustment. The current operating level can also be determined based on the first number of triggers. Based on the timestamp of the downgrade included in the request, the running time of the target hard drive from its current operating level before adjustment can be determined.
[0128] In this embodiment, the second trigger count of the queue full error code currently recorded on the target hard disk can also be obtained by exchanging information with the target hard disk.
[0129] S1002. If the second trigger count is the same as the first trigger count, the current running gear is not the last gear in the preset command quota multi-gear downgrade rule, and the running time of the current running gear meets the preset gear adjustment interval time threshold, then the next level gear corresponding to the current running gear is determined as the second target gear to be adjusted.
[0130] The second trigger count is compared with the first trigger count. If they are inconsistent, it means that the storage array card can still receive the queue full error code returned by the target hard drive after downgrading. If they are consistent, the preset downgrading interval duration threshold is determined based on the current running level's runtime. If it is met, downgrading is allowed again. If the current running level is not the last level in the preset command quota multi-level downgrading rules, the next level corresponding to the current running level is determined as the second target level to be adjusted. Then, the next downgrading operation is executed.
[0131] S1003. Adjust the command quota corresponding to the second target level to the target hard disk command quota.
[0132] Then, the command quota corresponding to the determined second target level is adjusted to the target hard drive command quota.
[0133] In this embodiment, if the target hard disk continues to return a full queue error code, the storage array card performs a cyclic polling of req and performs a downgrade action multiple times until it is reduced to the lowest level.
[0134] In the above, when the target hard drive is not in the initial position, the command quota of the target hard drive can be adjusted step by step according to the continuous triggering of the same error state. The quota change is more in line with the current carrying capacity of the hard drive, reducing the occupation of storage array card scheduling resources by repeated queue full feedback, and making the multi-level command quota downgrade process have a time constraint to avoid frequent quota jumps.
[0135] Furthermore, after adjusting the command quota of the target hard drive, this application can also provide a hard drive command quota recovery mechanism by detecting the current number of times the command quota has been adjusted, so as to avoid the situation where the command quota changes due to occasional slow performance of the hard drive triggering a queue full error code and is not recovered later.
[0136] Please see Figure 11 , Figure 11 This application provides a flowchart illustrating a method for restoring command quotas, which may include the following steps:
[0137] S1101, Detect the current number of command quota adjustments.
[0138] After completing a command quota adjustment for a target hard drive, the storage array card reads the adjustment count value for that target hard drive and compares it with a preset adjustment count threshold, such as 0.
[0139] S1102. If the current number of adjustments is equal to the preset number of adjustments threshold, then adjust the command quota of the target hard drive to the command quota corresponding to the initial gear.
[0140] If the count value is equal to the preset adjustment number threshold of 0, the current quota of the target hard drive will be directly written back to the quota value corresponding to the initial level, i.e., the default value, so that the target hard drive returns to the initial load level.
[0141] S1103. If the current number of adjustments is greater than the preset adjustment number threshold, then continue to execute the step of obtaining the target command quota adjustment request from the timer scheduling task table.
[0142] If the count value is greater than the preset adjustment count threshold of 0, the current timed polling is maintained, the adjustment request corresponding to the target hard disk is read from the timer scheduling task table, and the subsequent quota adjustment is performed using the aforementioned command quota adjustment method.
[0143] In the above embodiments of this application, a recovery determination is introduced after the target hard disk completes a certain number of command quota adjustments, so that the command quota can return to the level corresponding to the initial level when the recovery condition is met, and the adjustment driven by the timer scheduling continues to be maintained when the recovery condition is not met, so that the command quota adjustment is consistent with the real-time carrying state of the hard disk, avoiding misadjustment caused by occasional slow performance, and improving the fault tolerance of the current adjustment method.
[0144] In this application, before triggering the command quota adjustment, that is, before obtaining the target command quota adjustment request from the timer scheduling task table, it can also be determined whether to perform command quota adjustment based on the bit position information of the target hard disk.
[0145] Please see Figure 12 , Figure 12 This application provides a flowchart illustrating a method for determining whether to adjust command quotas, which may include the following steps:
[0146] S1201, The storage array card receives the queue full error code returned by the target hard drive.
[0147] S1202. Based on the bit position information of the target hard disk, determine whether there is a target command quota adjustment request in the timer scheduling task table.
[0148] The storage array card determines whether the bits in the corresponding bitmap of the target hard drive are set based on the bit position information of the target hard drive.
[0149] S1203. If it exists, increment the number of times the target hard disk's queue is full for error codes by 1.
[0150] If set, it means that the target hard drive already has a command quota adjustment req in progress, and it has started to automatically adjust the command quota. Therefore, the current trigger is invalid. It only increments the number of times the target hard drive's queue is full error code trigger, so as to make it easier to decide whether to adjust the level.
[0151] S1204. If it does not exist, record the current command quota of the target hard disk, generate a target command quota adjustment request, record the target command quota adjustment request to the timer scheduling task table, and initialize the current number of adjustment times of the target hard disk command quota and the number of times the queue full error code is triggered.
[0152] If not set, the current command quota of the target hard disk (i.e., the default command quota) is recorded, a target command quota adjustment request (req) is generated, the number of times the target hard disk queue is full is initialized to 0, the current adjustment count of the target hard disk command quota (i.e., the number of times the timer can detect it within the initial req) is initialized to 0, and finally the req is added to the timer scheduling task table.
[0153] S1205. Wake up the timer to trigger a request to retrieve the target command quota adjustment from the timer scheduling task table to perform the command quota adjustment.
[0154] In the above embodiments of this application, when the hard disk returns a full queue error code, it is determined whether a corresponding target command quota adjustment request already exists in the timer scheduling task table based on the bit position information. Only if the request does not exist, the current command quota of the hard disk is recorded and a target command quota adjustment request is generated and written to the timer scheduling task table. At the same time, the command quota adjustment count and the queue full error code trigger count of the hard disk are initialized. This avoids the repeated generation of multiple adjustment requests when the same hard disk reports a queue full error code multiple times, prevents repeated triggering of quota adjustment operations in a short period of time, and reduces the processing overhead caused by unnecessary adjustment processes.
[0155] To facilitate a better understanding of the hard disk command quota adjustment method of this application, a brief description is provided below through a complete embodiment. Please refer to... Figure 13 , Figure 13 A flowchart illustrating another method for adjusting hard disk command quotas provided in this application embodiment, the method may include the following steps:
[0156] S1301. In response to the queue full error code returned by the target hard disk, determine whether there is a target command quota adjustment request in the timer scheduling task table based on the bit position information of the target hard disk.
[0157] S1302. If there is no target command quota adjustment request in the timer scheduling task table, record the current command quota of the target hard disk and generate a target command quota adjustment request.
[0158] S1303. Record the target command quota adjustment request to the timer scheduling task table, and initialize the current number of adjustment attempts for the target hard disk command quota and the number of times the queue is full error code is triggered.
[0159] S1304. Obtain the target command quota adjustment request from the timer scheduling task table. The target command quota adjustment request includes the target hard disk whose command quota is to be adjusted.
[0160] S1305. If the bit position information of the target hard disk indicates that the target hard disk has triggered the command quota adjustment, then obtain the number of command quota adjustments to the target hard disk in the current polling period of the timer.
[0161] S1306. Determine the current operating level of the target hard drive based on the number of command quota adjustments.
[0162] S1307. If the current operating level of the target hard drive is the initial level in the command quota multi-level downgrade rule, then the next level corresponding to the initial level will be determined as the first target level to be adjusted.
[0163] S1308. Adjust the command quota corresponding to the first target gear to the command quota of the target hard drive.
[0164] S1309. If the target hard disk is currently running at a non-initial level in the command quota multi-level downgrade rule, then obtain the second trigger count of the current queue full error code, the current running level, and the running time of the current running level.
[0165] S1310. If the second trigger count is the same as the first trigger count, the current running gear is not the last gear in the preset command quota multi-level downgrade rule, and the running time of the current running gear meets the preset gear adjustment interval time threshold, then the next level gear corresponding to the current running gear is determined as the second target gear to be adjusted.
[0166] S1311. Adjust the command quota corresponding to the second target level to the target hard disk command quota.
[0167] S1312, Detect the current number of command quota adjustments.
[0168] S1313. If the current number of command quota adjustments is equal to the preset adjustment number threshold, then adjust the command quota of the target hard drive to the command quota corresponding to the initial level.
[0169] For details on the implementation process and technical effects of each step, please refer to the above embodiments. To avoid redundancy, the descriptions will not be repeated.
[0170] This application also provides a hard disk command quota adjustment device, please refer to [link to relevant documentation]. Figure 14 , Figure 14 This application provides a schematic diagram of a hard disk command quota adjustment device, which includes:
[0171] The acquisition module 141 is used to obtain a target command quota adjustment request from the timer scheduling task table. The target command quota adjustment request includes the target hard disk whose command quota is to be adjusted.
[0172] The acquisition module 141 is also used to acquire the number of times the command quota adjustment for the target hard disk has been triggered in the current polling period if the bit position information of the target hard disk indicates that the target hard disk has triggered the command quota adjustment.
[0173] The adjustment module 142 is used to adjust the command quota of the target hard drive according to the number of command quota adjustments and the preset command quota multi-level downgrade rules. The command quota multi-level downgrade rules include multiple levels and the quota value corresponding to each level, and the quota value corresponding to each level decreases sequentially.
[0174] In one possible implementation, the adjustment module 142 is specifically used for:
[0175] The current operating level of the target hard drive is determined based on the number of command quota adjustments.
[0176] Adjust the command quota of the target hard drive according to its current operating level and the preset command quota downgrade rules.
[0177] In one possible implementation, if the target hard drive is currently in the initial gear position, the adjustment module 142 is specifically used for:
[0178] If the target hard drive is currently operating at the initial level in the command quota multi-level downgrade rule, then the next level corresponding to the initial level will be determined as the first target level to be adjusted.
[0179] Adjust the command quota corresponding to the first target level to the command quota of the target hard drive.
[0180] In one possible implementation, the target command quota adjustment request also includes the first trigger count of the queue full error code. If the target hard drive's current gear is not the initial gear, the adjustment module 142 is specifically used for:
[0181] If the target hard drive is currently running at a non-initial level in the command quota multi-level downgrade rule, then obtain the second trigger count of the current queue full error code, the current running level, and the runtime of the current running level.
[0182] If the second trigger count is the same as the first trigger count, the current running gear is not the last gear in the preset command quota multi-level downgrade rule, and the running time of the current running gear meets the preset gear adjustment interval time threshold, then the next level gear corresponding to the current running gear is determined as the second target gear to be adjusted.
[0183] Adjust the command quota corresponding to the second target level to the target hard drive command quota.
[0184] In one possible implementation, after adjusting the command quota for the target hard drive, the adjustment module 142 is specifically used for:
[0185] Detect the current number of command quota adjustments.
[0186] If the current number of command quota adjustments equals the preset adjustment threshold, then the command quota of the target hard drive will be adjusted to the command quota corresponding to the initial level.
[0187] In one possible implementation, before retrieving the target command quota adjustment request from the timer scheduling task table, the adjustment module 142 is specifically used for:
[0188] In response to the queue full error code returned by the target hard drive, determine whether there is a target command quota adjustment request in the timer scheduling task table based on the bit position information of the target hard drive.
[0189] If the target command quota adjustment request does not exist in the timer scheduling task table, the current command quota of the target hard disk is recorded, and a target command quota adjustment request is generated.
[0190] Record the target command quota adjustment request to the timer scheduling task table, and initialize the current number of adjustment attempts for the target hard disk command quota and the number of times the queue is full error code is triggered, so as to trigger the step of retrieving the target command quota adjustment request from the timer scheduling task table.
[0191] For a description of the features in the embodiment corresponding to the hard disk command quota adjustment device, please refer to the relevant description in the embodiment corresponding to the hard disk command quota adjustment method, which will not be repeated here.
[0192] Figure 15 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 15 As shown, the electronic device provided in this embodiment includes at least one processor 151 and a memory 152. Optionally, the electronic device further includes a communication component 153. The processor 151, memory 152, and communication component 153 are connected via a bus 154.
[0193] In a specific implementation, at least one processor 151 executes computer execution instructions stored in memory 152, causing at least one processor 151 to execute the above-described embodiment of the hard disk command quota adjustment method.
[0194] The specific implementation process of processor 151 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0195] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.
[0196] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0197] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0198] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above embodiments of the hard disk command quota adjustment method when running.
[0199] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0200] The embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above embodiments of the hard disk command quota adjustment method.
[0201] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described embodiments of the hard disk command quota adjustment method.
[0202] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.
[0203] It should be further noted that although the steps in the flowchart are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0204] It should be understood that the above-described device embodiments are merely illustrative, and the device of this application can also be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units, modules, or components may be combined, or integrated into another system, or some features may be ignored or not executed.
[0205] Furthermore, unless otherwise specified, the functional units / modules in the various embodiments of this application can be integrated into one unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated together. The integrated units / modules described above can be implemented in hardware or as software program modules.
[0206] If the integrated unit / module is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0207] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.
[0208] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0209] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for adjusting hard disk command quotas, characterized in that, include: Obtain a target command quota adjustment request from the timer scheduling task table, wherein the target command quota adjustment request includes the target hard disk whose command quota is to be adjusted; If the bit position information of the target hard disk indicates that the target hard disk has triggered a command quota adjustment, then obtain the number of command quota adjustments to the target hard disk within the current polling period of the timer; The command quota of the target hard drive is adjusted according to the number of command quota adjustments and the preset command quota multi-level downgrade rules. The command quota multi-level downgrade rules include multiple levels and the quota value corresponding to each level, and the quota value corresponding to each level decreases sequentially.
2. The method according to claim 1, characterized in that, The step of adjusting the command quota of the target hard drive according to the number of command quota adjustments and the preset multi-level command quota downgrade rules includes: The current operating level of the target hard drive is determined based on the number of times the command quota is adjusted. Adjust the command quota of the target hard drive according to the current operating level of the target hard drive and the preset command quota multi-level downgrade rules.
3. The method according to claim 2, characterized in that, If the target hard drive is currently in its initial gear position, adjusting the command quota of the target hard drive according to its current operating gear position and the preset command quota multi-level downgrade rules includes: If the current operating level of the target hard drive is the initial level in the command quota multi-level downgrade rule, then the next level corresponding to the initial level is determined as the first target level to be adjusted. Adjust the command quota corresponding to the first target level to the command quota of the target hard drive.
4. The method according to claim 2, characterized in that, The target command quota adjustment request also includes the first trigger count for a queue full error code. If the target hard drive is currently in a non-initial gear, the command quota of the target hard drive is adjusted according to its current operating gear and the preset command quota multi-level downgrade rules, including: If the target hard drive is currently running at a non-initial level in the command quota multi-level downgrade rule, then obtain the second trigger count of the current queue full error code, the current running level, and the running time of the current running level. If the second trigger count is the same as the first trigger count, the current running gear is not the last gear in the preset command quota multi-level downgrade rule, and the running time of the current running gear meets the preset gear adjustment interval time threshold, then the next level gear corresponding to the current running gear is determined as the second target gear to be adjusted. Adjust the command quota corresponding to the second target level to the target hard disk command quota.
5. The method according to claim 3 or 4, characterized in that, After adjusting the command quota for the target hard drive, the method further includes: Detect the current number of command quota adjustments; If the current number of command quota adjustments is equal to the preset adjustment number threshold, then the command quota of the target hard drive will be adjusted to the command quota corresponding to the initial level.
6. The method according to any one of claims 1-5, characterized in that, Before obtaining the target command quota adjustment request from the timer scheduling task table, the method further includes: In response to the queue full error code returned by the target hard disk, determine whether the target command quota adjustment request exists in the timer scheduling task table based on the bit position information of the target hard disk; If the target command quota adjustment request does not exist in the timer scheduling task table, then the current command quota of the target hard disk is recorded, and the target command quota adjustment request is generated. The target command quota adjustment request is recorded in the timer scheduling task table, and the current number of adjustment attempts and the number of times the queue is full error code is triggered are initialized to trigger the step of obtaining the target command quota adjustment request from the timer scheduling task table.
7. A hard disk command quota adjustment device, characterized in that, include: The acquisition module is used to acquire a target command quota adjustment request from the timer scheduling task table, wherein the target command quota adjustment request includes the target hard disk whose command quota is to be adjusted; The acquisition module is further configured to acquire the number of times the command quota adjustment for the target hard disk has been triggered within the current polling period of the timer if the bit position information of the target hard disk indicates that the target hard disk has currently triggered the command quota adjustment. The adjustment module is used to adjust the command quota of the target hard drive according to the number of command quota adjustments and the preset command quota multi-level downgrade rules. The command quota multi-level downgrade rules include multiple levels and the quota value corresponding to each level, and the quota value corresponding to each level decreases sequentially.
8. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 6.
10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method described in any one of claims 1-6.
