Data destruction throttling method and electronic device
Patent Information
- Application Number
- CN202611495475.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-23
- Publication Date
- 2026-10-30
AI Technical Summary
[0005]本申请提供了一种数据销毁限流方法及电子设备,以至少解决相关技术中在大规模同时销毁LUN时,销毁过程的不稳定的问题
[0011]本申请通过从目标受管磁盘配置的性能监测结构体中读取最大输入输出并发数及当前正在处理的销毁任务数,且该性能监测结构体可维护对应销毁任务队列以缓存针对目标受管磁盘中逻辑卷的数据销毁任务,基于两类参数的对比结果动态决定是否从队列中调取任务下发至执行端,当最大输入输出并发数满足承载条件时执行下发操作,不满足时则让任务保持等待状态,能够实现数据销毁任务下发与目标受管磁盘处理能力的精准匹配,有效避免了多逻辑卷同时销毁时海量销毁IO叠加主机业务IO导致的IO堆积、超时及系统宕机风险,同时减少了销毁任务对主机业务资源的占用,保障了服务器读写性能的稳定性,提升了数据销毁过程的稳定性与高效性。
Smart Images

Figure CN123011154A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data destruction technology, and in particular to a data destruction rate limiting method and electronic device. Background Technology
[0002] With the development of information technology, the large amount of sensitive data accumulated in storage servers needs to be securely destroyed after being discarded to avoid data leakage. Currently, centralized storage servers generally use data overwrite technology to achieve data destruction, which usually follows a three-overwrite standard. The logical volume (LUN) is used as the basic unit, and the LUN is divided into 256kb data blocks (Sections). Each Section is overwritten sequentially, and the destruction ends after the specified number of overwrites is completed.
[0003] In current data destruction methods, the destruction tasks of multiple LUNs are independent of each other. Each LUN destruction task is executed by a destruction IO (input / output) thread. When hundreds to thousands of LUNs execute destruction tasks simultaneously, a large number of destruction IOs are generated. When combined with host business IOs, this can easily exceed the IO processing capacity of the underlying managed disks, leading to IO backlog, timeouts, and even system crashes. At the same time, a large number of destruction IOs will preempt host business resources, significantly reduce server read and write performance, and affect the user experience.
[0004] Therefore, improving the stability of the destruction process when large-scale LUNs are destroyed simultaneously has become an urgent problem to be solved. Summary of the Invention
[0005] This application provides a data destruction rate limiting method and electronic device to at least solve the problem of instability in the destruction process when destroying LUNs on a large scale simultaneously in related technologies.
[0006] Firstly, this application provides a data destruction rate limiting method, including: Read the maximum number of concurrent inputs and outputs corresponding to the target managed disk and the number of destruction tasks currently being processed by the target managed disk from the performance monitoring structure configured on the target managed disk; The performance monitoring structure is used to maintain the destruction task queue corresponding to the target managed disk; the destruction task queue is used to cache data destruction tasks for logical volumes in the target managed disk. When the maximum input / output concurrency is greater than or equal to the number of destruction tasks currently being processed, a data destruction task is retrieved from the destruction task queue and sent to the destruction task execution terminal. When the maximum number of concurrent inputs and outputs is less than the number of destruction tasks currently being processed, the operation of retrieving data destruction tasks from the destruction task queue and sending them to the destruction task execution end is stopped, so that the data destruction tasks remain in a waiting state in the destruction task queue.
[0007] Secondly, this application provides a data destruction rate limiting device, comprising: The reading unit is used to read the maximum input / output concurrency of the target managed disk and the number of destruction tasks currently being processed by the target managed disk from the performance monitoring structure configured on the target managed disk; The performance monitoring structure is used to maintain the destruction task queue corresponding to the target managed disk; the destruction task queue is used to cache data destruction tasks for logical volumes in the target managed disk. The retrieval unit is used to retrieve a data destruction task from the destruction task queue and send it to the destruction task execution end when the maximum input / output concurrency is greater than or equal to the number of destruction tasks currently being processed. The retrieval unit is also used to stop retrieving data destruction tasks from the destruction task queue and sending them to the destruction task execution end when the maximum input / output concurrency is less than the number of destruction tasks currently being processed, so that the data destruction tasks remain in a waiting state in the destruction task queue.
[0008] Thirdly, this application also provides an electronic device, including: a memory for storing a computer program; and a processor for implementing the steps of any of the above-described data destruction and flow limiting methods when executing the computer program.
[0009] Fourthly, this application also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the steps of any of the above-described data destruction and flow limiting methods.
[0010] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described data destruction rate limiting methods.
[0011] This application reads the maximum concurrent input / output (I / O) count and the number of currently processed destruction tasks from the performance monitoring structure configured on the target managed disk. This performance monitoring structure can maintain a corresponding destruction task queue to cache data destruction tasks for logical volumes on the target managed disk. Based on the comparison results of the two types of parameters, it dynamically decides whether to retrieve tasks from the queue and send them to the execution end. When the maximum I / O concurrency count meets the carrying capacity, the sending operation is executed; otherwise, the task remains in a waiting state. This enables precise matching between data destruction task sending and the processing capacity of the target managed disk, effectively avoiding the risks of IO accumulation, timeouts, and system crashes caused by the massive destruction IO superimposed on host business IO when multiple logical volumes are destroyed simultaneously. At the same time, it reduces the occupation of host business resources by destruction tasks, ensures the stability of server read / write performance, and improves the stability and efficiency of the data destruction process. Attached Figure Description
[0012] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0013] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0014] Figure 1 This is one of the flowcharts illustrating a data destruction rate limiting method provided in an embodiment of this application; Figure 2 A second schematic flowchart illustrating a data destruction rate limiting method provided in this application embodiment; Figure 3 The third flowchart illustrates a data destruction rate limiting method provided in this application embodiment; Figure 4 A fourth flowchart illustrating a data destruction rate limiting method provided in this application embodiment; Figure 5 The fifth flowchart illustrates a data destruction rate limiting method provided in this application embodiment; Figure 6 This is a schematic diagram of a data destruction rate limiting device provided in an embodiment of this application. Detailed Implementation
[0015] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0016] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof 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. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0017] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0018] In some embodiments, such as Figure 1 As shown, this application embodiment provides a data destruction rate limiting method, including the following steps S11-S14: S11. Read the maximum number of concurrent inputs and outputs corresponding to the target managed disk and the number of destruction tasks currently being processed by the target managed disk from the performance monitoring structure configured on the target managed disk.
[0019] The performance monitoring structure is used to maintain the destruction task queue corresponding to the target managed disk; the destruction task queue is used to cache data destruction tasks for logical volumes in the target managed disk.
[0020] In this embodiment, the performance monitoring structure is a core data structure pre-defined in the target managed disk (MDISK), specifically used for centralized management and status monitoring of data destruction tasks. This structure corresponds one-to-one with the target managed disk; that is, each managed disk is independently configured with a performance monitoring structure, ensuring that the destruction task management of different disks does not interfere with each other, thus adapting to the architecture requirements of multi-disk parallel operation in centralized storage servers (such as MCS systems).
[0021] Specifically, the performance monitoring structure maintains a destruction task queue, which is an ordered storage container specifically used to cache data destruction tasks for each logical volume (LUN) in the current target managed disk. When the system receives a data destruction instruction for any logical volume in the target managed disk, it does not send it directly to the execution end. Instead, it first adds the corresponding destruction task to the queue in the order of receipt for temporary storage. This avoids request congestion caused by multiple logical volume destruction tasks being initiated simultaneously, and provides a basis for subsequent rate limiting scheduling.
[0022] It should be noted that the destruction task queue is a doubly linked list, and the data destruction tasks are arranged sequentially according to the order in which they are added to the queue. When retrieving the data destruction tasks, the first-in, first-out principle is followed.
[0023] This is to ensure the orderly and efficient scheduling of data destruction tasks. On the one hand, it enables rapid enqueueing, dequeueing, and precise management of tasks, adapting to the needs of scenarios where multiple LUNs submit destruction tasks concurrently. On the other hand, it ensures that tasks are executed in the order they are received, avoiding some tasks from being delayed for a long time. At the same time, it works with rate limiting logic to precisely control the number of tasks issued, making full use of the target managed disk processing resources while avoiding IO overload caused by scheduling chaos, thus providing basic support for the stable operation of the dynamic rate limiting mechanism.
[0024] The maximum concurrent input / output (I / O) count refers to the upper limit of the I / O (IO) tasks that the target managed disk can stably handle while destroying data under its current performance state. The maximum concurrent input / output count is not a fixed value, but is dynamically adjusted based on the real-time performance feedback information of the target managed disk and stored in the performance monitoring structure to ensure that it matches the actual processing capacity of the disk.
[0025] The number of destruction tasks currently being processed refers to the total number of destruction tasks being executed by the destruction task execution terminal corresponding to the target managed disk at the current moment. This value is updated in real time as tasks are issued and completed, and is also stored in the performance monitoring structure to accurately reflect the current task load status of the disk.
[0026] In this embodiment of the application, the two types of parameters stored in the performance monitoring structure are called through a preset interface. The reading process is a real-time synchronous operation to ensure that the obtained parameters can truly reflect the current status of the target managed disk and avoid scheduling decision errors caused by parameter lag.
[0027] It should be noted that the data destruction status parameter set also includes the total number of incomplete destruction tasks on the target managed disk, the number of completed destruction tasks, the current latency of the target managed disk, the total latency of completed tasks, and a dynamic adjustment gradient value used to adjust the maximum input / output concurrency.
[0028] The total number of uncompleted destruction tasks, the number of completed destruction tasks, the current latency of the target managed disk, the total latency of the completed tasks, and the dynamically adjusted gradient value are obtained by the performance monitoring structure.
[0029] In this embodiment, the performance monitoring structure serves as the data carrier for the dynamic rate limiting of data destruction in this method. Besides maintaining the destruction task queue, storing the maximum concurrent input / output and the number of currently processed destruction tasks, it also specifically monitors the total number of incomplete destruction tasks, the number of completed destruction tasks, the current latency of the target managed disk, the total latency of completed tasks, and dynamically adjusts the gradient value. The monitoring purpose, data source, and function of each parameter are as follows: The total number of incomplete data destruction tasks is automatically incremented by 1 when a data destruction task is initially added to the queue; it is automatically decremented by 1 after the lower-level module returns a notification that a single task has been completed, ensuring that the overall task load of the target managed disk is reflected in real time. As an auxiliary basis for the system to judge the congestion level of the target managed disk, it works in conjunction with the maximum number of concurrent input / output operations and the number of currently being processed destruction tasks to support the rationality of task scheduling decisions and avoid scheduling misjudgments caused by focusing only on the number of tasks being processed while ignoring the backlog of tasks in the queue.
[0030] The number of completed destruction tasks is the cumulative number of destruction tasks that the lower-level modules have successfully processed and returned results for since the target managed disk started up or the last parameter initialization. It is a key indicator for quantifying the data destruction execution progress and performance statistics cycle. It serves as the trigger condition for dynamically adjusting the maximum input / output concurrency. That is, when this parameter accumulates to a preset statistical threshold (such as 1000 times), the average latency calculation and concurrency adjustment process will be initiated.
[0031] The current latency of the target managed disk is a real-time record of the time interval from when a single destruction task is issued to the lower-level MDISK to when the processing result is returned. This is the actual execution latency of a single destruction I / O operation, directly reflecting the real-time processing efficiency of the target managed disk under the current load. In this embodiment, when each destruction task is issued, the system records its execution start time. When a completion notification for that task is received, the single task processing latency is calculated using the "current system time and execution start time." This latency is the real-time data for the current latency, dynamically updated as each task completes. It serves as the basic data source for the total latency of completed tasks, providing initial support for subsequent average latency calculations. Simultaneously, it can serve as a temporary reference for the system to quickly determine whether the disk is under high load. If the current latency is significantly higher than the preset latency, an early warning of abnormal disk processing pressure can be issued.
[0032] The total latency of completed tasks is the sum of the current latencies of all completed destruction tasks. That is, the total latency of completed tasks equals the sum of the current latencies of each individual destruction task. It is a cumulative indicator reflecting the overall processing time of the target managed disk within the statistical period. This data is updated synchronously with the number of completed destruction tasks. Whenever the number of completed destruction tasks increases by 1, the current latency of the corresponding individual task is added to this parameter in real time, ensuring complete consistency between the total latency and the statistical dimension of the number of completed tasks, with no data discrepancies. It is the core data foundation for calculating the average processing latency. When the number of completed destruction tasks reaches a preset statistical threshold, the system obtains the average latency by "total latency of completed tasks ÷ number of completed destruction tasks," providing crucial performance feedback for adjusting concurrency.
[0033] The dynamic adjustment gradient value is the core coefficient used to calculate the maximum input-output concurrency. Its value changes dynamically with the real-time performance status of the target managed disk. By working with a fixed conversion factor (such as 1024), the concurrency can be adjusted in a gradient manner.
[0034] Specifically, the dynamically adjusted gradient value is configured with upper and lower limits; these limits are used to restrict the adjustment range of the maximum input / output concurrency, preventing the maximum input / output concurrency from exceeding the hardware capability boundary of the target managed disk. This is because during the adjustment process of increasing or decreasing the gradient value, the upper and lower limits are checked to ensure that the adjusted dynamically adjusted gradient value does not exceed the boundary, indirectly ensuring that the calculated maximum input / output concurrency always falls within the range that the disk hardware can bear, avoiding the problem of disk overload caused by setting the concurrency too high, or disk resource waste caused by setting the concurrency too low.
[0035] This parameter can be initialized to a default value (e.g., 100); after the average latency calculation is completed, it is adjusted according to the "comparison result between average latency and preset latency"; specifically, if the average latency is greater than the preset latency, it indicates that the disk processing pressure is too high, and the preset step size of this parameter is reduced (e.g., 10); if the average latency is less than or equal to the preset latency, it indicates that the disk still has remaining processing capacity, and the preset step size of this parameter is increased (e.g., 10).
[0036] For example, the structure of the performance monitoring structure is as follows: { int cur_recommendation; / / Concurrency of destruction I / O that this MDISK can execute int total_task_cnt; / / Unfinished destruction tasks (including those already issued but not yet returned, and those still waiting in the linked list). int in_flight_task_cnt; / / Number of destruction tasks currently being processed (tasks submitted to lower levels but not yet returned). int done_task_cnt; / / The number of tasks destroyed returned after the lower-level processing is complete. int default_clks; / / The default latency for this MDISK, which varies depending on the MDISK type. int total_clks; / / Calculate the sum of delays for a batch of destruction tasks int last_ratio; / / Dynamically adjust the gradient slist task_list / / A doubly linked list of tasks to be destroyed and awaiting processing. } In this embodiment, the total number of incomplete destruction tasks monitored by the performance monitoring structure and the number of destruction tasks currently being processed jointly reflect the task load. The number of completed destruction tasks and the total latency of completed tasks support the average performance calculation. The gradient value is dynamically adjusted to convert performance feedback into concurrency adjustment instructions, ensuring that the execution of data destruction tasks always matches the processing capacity of the target managed disk, thereby avoiding IO overload and system crash risks from the root.
[0037] S12. When the maximum number of concurrent input / output operations is greater than or equal to the number of currently processed destruction tasks, a data destruction task is retrieved from the destruction task queue and sent to the destruction task execution terminal.
[0038] Furthermore, when the maximum concurrent input / output count read in step S11 is greater than or equal to the number of currently processed destruction tasks, it indicates that the target managed disk still has remaining IO processing capacity and has not reached its load limit. At this time, it is allowed to issue new destruction tasks, which ensures that disk resources are fully utilized and prevents IO backlog or timeout issues caused by task overload.
[0039] At this time, when the system retrieves tasks from the task destruction queue, it follows the first-in, first-out principle, that is, it prioritizes retrieving the earliest task to be executed for destruction that was added to the queue, to ensure the orderly scheduling of tasks and avoid some tasks from remaining in the queue for a long time.
[0040] It's important to note that the number of tasks retrieved is not unlimited. Instead, it's based on the difference between the maximum concurrent input / output and the number of tasks currently being processed and destroyed. For example, if the maximum concurrency is 102,400 and the number of tasks currently being processed is 80,000, then a maximum of 22,400 tasks will be retrieved this time, ensuring that the total number of tasks after distribution does not exceed the disk's capacity limit.
[0041] Then, the retrieved destruction task will be directly sent to the preset destruction task execution terminal (such as the AGENT module in the storage system). After receiving the task, the execution terminal will perform the specific destruction operation in units of 256kb data blocks (Sections) according to the data overwrite standard (such as the 3-overwrite standard).
[0042] Furthermore, in this embodiment, the above-mentioned S12 (when the maximum input / output concurrency is greater than or equal to the number of currently processed destruction tasks, retrieve data destruction tasks from the destruction task queue and send them to the destruction task execution end) can be further refined into the following S121 and S122: S121. Retrieve the target number of data destruction tasks from the head of the destruction task queue.
[0043] The target number is the difference between the maximum input / output concurrency and the number of currently processed destruction tasks.
[0044] In this embodiment, data destruction tasks are retrieved from the head of the destruction task queue, following the first-in-first-out principle. The queue then caches tasks to be executed in the order they are received. Prioritizing the retrieval of tasks from the head ensures the orderliness of task scheduling, avoids long-term stagnation of tasks added to the queue early, and guarantees the fairness and timeliness of the data destruction process. This meets the requirements of parallel processing of multiple logical volume destruction tasks in a centralized storage server.
[0045] Specifically, the target number refers to the maximum number of tasks that can be retrieved from the queue and sent to the execution end. Its value is strictly constrained by the current processing capacity of the target managed disk to ensure that the total number of tasks being processed after being sent does not exceed the maximum input / output concurrency, thus avoiding IO overload from the root.
[0046] The target number is equal to the difference between the maximum concurrent input / output and the number of currently processed destruction tasks. This is because the maximum concurrent input / output is the upper limit of the destruction I / O that the disk can currently stably handle, and the number of currently processed destruction tasks is the load resources that the disk has occupied. The difference between the two is the disk's remaining available processing capacity. Using this as the upper limit for the number of tasks to be retrieved can achieve precise matching between task distribution and disk capacity.
[0047] For example, assuming the maximum concurrent input / output of the target managed disk is 1000 and the number of currently processed destruction tasks is 800, then the target quantity for this operation is 1000 - 800 = 200. That is, 200 tasks are retrieved from the head of the queue and distributed to ensure that the total number of tasks being processed after distribution is exactly equal to the maximum concurrent operation, thus making full use of the remaining disk resources without exceeding its processing limit.
[0048] Furthermore, during the retrieval process, the task queue is accessed and destroyed through the interface of the performance monitoring structure. After extracting the target number of tasks from the head, the queue automatically removes the retrieved tasks, and the remaining tasks are moved forward sequentially, maintaining the integrity of the queue structure and providing a clear order for subsequent task retrieval. Simultaneously, the retrieval operation is synchronized in real time with the parameters in the performance monitoring structure to ensure the accuracy of subsequent status updates.
[0049] S122. Record the start time of each retrieved data destruction task and send it to the execution terminal.
[0050] It is important to note that the start time of each retrieval task also needs to be recorded to provide the original basis for calculating the processing latency of a single task. Specifically, when the execution end completes the task and returns the result, the processing latency of the task can be accurately calculated by subtracting the execution start time from the task completion time, and then added to the total latency of the completed tasks.
[0051] Furthermore, each task independently records its start time, ensuring that the calculation of the latency of a single task is not affected by the execution status of other tasks, providing a reliable data foundation for the subsequent calculation of average latency, and supporting the dynamic adjustment of the maximum input / output concurrency.
[0052] Then, after the task is sent to the corresponding destruction task execution end, namely the AGENT module in the MCS system, the AGENT module is the actual execution unit that organizes the destruction of data blocks and sends IO to the lower-level MDISK. The CSM module is only responsible for controlling the destruction progress.
[0053] It should be noted that the task data sent out contains complete execution parameters, including the corresponding LUN identifier, data block range (256kb as the basic unit), overwrite mode (such as all 0s, all 1s, random data), execution start time, etc., to ensure that the execution end can directly organize the destruction IO based on the sent information without having to request data from other modules, thus improving execution efficiency.
[0054] After the task is issued, the system immediately updates the number of currently processed destruction tasks in the performance monitoring structure and adds its value to the target number retrieved this time. This ensures that the parameter reflects the current disk load status in real time and provides accurate basic data for the next task scheduling decision.
[0055] This application embodiment retrieves a target number of data destruction tasks (i.e., the difference between the maximum concurrent input / output and the number of destruction tasks currently being processed) from the head of the destruction task queue. Simultaneously, it records the start time of each retrieved task and sends it to the execution end. This adheres to the principle of orderly task scheduling, ensuring that early-queued tasks are executed first. Furthermore, by precisely matching the number of tasks retrieved to the remaining processing capacity of the target managed disk, it avoids IO overload caused by excessive task distribution. It also provides reliable raw data support for subsequent individual task processing latency statistics, total latency accumulation, and average latency calculation, ensuring the accuracy of dynamic adjustments to the maximum concurrent input / output. This achieves dynamic adaptation between data destruction tasks and the processing capacity of the target managed disk, improving the stability and efficiency of the data destruction process and reducing the occupation of host service resources.
[0056] S13. When the maximum number of concurrent inputs and outputs is less than the number of destruction tasks currently being processed, stop the operation of retrieving data destruction tasks from the destruction task queue and sending them to the destruction task execution end, so that the data destruction tasks remain in a waiting state in the destruction task queue.
[0057] When the maximum concurrent input / output count read in step S11 is less than the number of currently processed destruction tasks, it indicates that the target managed disk is already at full load or overload. If new tasks are continued to be issued at this time, the new destruction IO will overlap with existing task IO and host service IO, exceeding the disk's processing capacity and causing risks such as IO accumulation, processing timeouts, or even system crashes.
[0058] At this point, the operation of retrieving new tasks from the destruction task queue will be immediately terminated, and no more destruction tasks will be sent to the execution end to avoid further increasing the disk load.
[0059] Consequently, unretrieved destruction tasks will remain in the queue, waiting, and their storage order will not change, still following the "first-in, first-out" principle. The queue will continuously maintain complete task information, such as the corresponding logical volume identifier, overwrite count requirements, and data block range, to ensure that tasks can be executed normally when subsequently restored and redeployed.
[0060] Simultaneously, the system monitors the status of currently processed destruction tasks in real time. When the execution end completes part of the task and sends a completion notification, the number of currently processed destruction tasks will decrease accordingly. Once this number drops below the maximum input / output concurrency, the system will re-trigger the task retrieval and distribution process, achieving dynamic matching between load and task distribution.
[0061] This application embodiment reads the maximum input / output concurrency and the number of currently processed destruction tasks from the performance monitoring structure configured on the target managed disk. This performance monitoring structure can maintain a corresponding destruction task queue to cache data destruction tasks for logical volumes in the target managed disk. Based on the comparison results of the two types of parameters, it dynamically decides whether to retrieve tasks from the queue and send them to the execution end. When the maximum input / output concurrency meets the carrying capacity, the sending operation is executed; otherwise, the task remains in a waiting state. This can achieve precise matching between data destruction task sending and the processing capacity of the target managed disk, effectively avoiding the risks of IO accumulation, timeouts, and system crashes caused by the superposition of massive destruction IO and host business IO when multiple logical volumes are destroyed simultaneously. At the same time, it reduces the occupation of host business resources by destruction tasks, ensures the stability of server read and write performance, and improves the security and efficiency of the data destruction process.
[0062] It should be noted that the destruction tasks in the destruction task queue mentioned in the above embodiments are added through the following steps: Step 1: Receive the data destruction task for the logical volume in the target managed disk.
[0063] It should be noted that the receiving entity of the data destruction task is the AGENT execution state machine in the MCS system. The triggering scenario is that the user initiates a data destruction operation for a specific logical volume in the target managed disk. That is, after the user submits a destruction request through the system interface, the CSM execution state machine first obtains the core information of the destruction task (such as LUN capacity, preset overwrite count, etc.), saves the information, rotates the state machine, and then sends a start event notification to the AGENT. The AGENT receiving this notification is considered as triggering the data destruction task receiving process.
[0064] When the agent receives a task, it needs to perform basic checks based on the MDISK performance structure to ensure that the task can be executed normally. This includes correlation checks and validity checks. Correlation checks confirm that the LUN corresponding to the received destruction task belongs to the target MDISK associated with the current agent, avoiding cross-MDISK task allocation errors. Validity checks verify that the parameters carried by the task, such as the number of overwrites and the range of data blocks, conform to the system's preset rules (such as the number of overwrites not less than 3 times and data blocks in 256kb units), eliminating execution anomalies caused by illegal parameters.
[0065] Step 2: Add the data destruction task to the destruction task queue associated with the target managed disk.
[0066] Specifically, the destruction task queue is a doubly linked list (slisttask_list) maintained in the MDISK performance structure, which corresponds one-to-one with the target MDISK and is specifically used to cache all pending data destruction tasks associated with that MDISK.
[0067] Furthermore, after the AGENT receives and verifies the task, it creates a linked list node for the task, which encapsulates execution parameters such as the task's unique identifier, data block information, and overwrite mode.
[0068] Then, the tail pointer of the doubly linked list is used to locate the current tail node, the predecessor pointer of the new task node is set to the tail node, and the successor pointer of the tail node is updated to point to the new task node. Finally, the tail pointer of the linked list is updated to the new task node, and the task is enqueued.
[0069] After a task is added to the queue, the total number of unfinished and destroyed tasks in the MDISK performance structure is immediately incremented by 1 to ensure that this parameter reflects the overall task load scale of the target MDISK in real time.
[0070] As an extension and refinement of the above embodiments, refer to Figure 2 As shown, Figure 2 This is a flowchart illustrating a data destruction rate limiting method provided in an embodiment of this disclosure. The data destruction rate limiting method provided in this application also includes the following steps: S21. Receive the data destruction completion notification sent by the execution terminal.
[0071] The data destruction completion notification is issued after each data destruction task is completed on the execution end.
[0072] It should be noted that the data destruction completion notification is sent proactively by the destruction task execution end. The trigger condition is that the execution end successfully completes the entire process of a single data destruction task. Specifically, the execution end completes the overwrite operation on the corresponding data blocks of the target logical volume according to the preset overwrite standard, on a data block-by-data block basis, and immediately triggers the notification after receiving the task processing success feedback from the lower-level managed disk.
[0073] Specifically, the data destruction completion notification includes key information to ensure subsequent parameter updates and task location, including the following: Unique task identifier: such as task ID, corresponding LUN identifier, data block range, etc., used to accurately associate the relevant records of the task in the performance monitoring structure and avoid parameter update misalignment.
[0074] Task execution status: Clearly marked as data destruction successful, excluding abnormal scenarios such as task failure and timeout, ensuring that parameter statistics are only performed on validly completed tasks.
[0075] Auxiliary information related to task execution time, such as the actual completion time of the task (or the difference between the completion time and the start time), provides a direct basis for calculating the processing delay of a single task.
[0076] The receiving entity is the processing module corresponding to the performance monitoring structure bound to the target MDISK in the AGENT end. After receiving the data, it needs to be verified, namely, the legality verification and the integrity verification. The legality verification verifies the identity of the sender (ensuring it is the target execution end) and the validity of the task identifier (avoiding illegal or duplicate notifications). The integrity verification confirms that the notification contains the above core data content. If key information is missing, an exception handling process is triggered (such as discarding the notification and logging it) to ensure the reliability of the data for subsequent parameter updates.
[0077] Therefore, in this embodiment of the application, after receiving the data destruction completion notification, and before updating the data destruction status parameter set in response to the data destruction completion notification, it is also necessary to perform legality verification and integrity verification on the data destruction completion notification.
[0078] The legitimacy check verifies whether the sender is the target execution end and whether the task identifier is valid, in order to avoid illegal or duplicate notifications; the integrity check confirms whether the data destruction completion notification contains core data content such as the unique task identifier, task execution status, and auxiliary information related to task execution time.
[0079] If the verification fails, the notification can be discarded and logged; if the verification passes, the step of updating the data destruction status parameter set is executed.
[0080] S22. In response to the data destruction completion notification, update the data destruction status parameter set.
[0081] Furthermore, in response to the notification that data destruction has been completed and verified, the data destruction status parameter set maintained in the performance monitoring structure is updated in real time, providing accurate and real-time data basis for the dynamic adjustment of the maximum input / output concurrency and the decision-making on task distribution.
[0082] It should be noted that the parameter set update process is initiated when the system receives a valid data destruction completion notification from the data destruction task execution end (i.e., a single data destruction task has been successfully executed and the result has been reported). This ensures that parameter statistics only apply to validly completed tasks and avoids data deviations caused by abnormal scenarios.
[0083] Furthermore, by accurately synchronizing the real-time load changes of MDISK (such as the number of tasks being processed decreasing as tasks are completed, and the number of completed tasks accumulating as tasks are successfully completed), real-time load data is provided for subsequent judgments on whether to issue new tasks. At the same time, the accumulated task execution latency data (such as accumulating the latency of a single task to the total latency, and calculating the average latency based on the total latency and the number of completed tasks) provides quantitative performance data for subsequent dynamic adjustment of the concurrency based on the actual performance of MDISK.
[0084] In the embodiments of this application, reference is made to Figure 3 As shown, the above-mentioned S22 (updating the data destruction status parameter set in response to the data destruction completion notification) can be further refined as follows: S221. Decrement the value of the number of currently processed destruction tasks in the data destruction status parameter set by one, increment the value of the number of completed destruction tasks by one, and decrement the value of the total number of incomplete destruction tasks by one.
[0085] The number of currently processed destruction tasks (corresponding to in_flight_task_cnt in the structure) is decremented by one: This parameter specifically records the total number of destruction tasks that have been sent to the lower-level MDISK but have not yet returned processing results. It is a core indicator reflecting the real-time execution load of MDISK. When a single task is completed and returns a result, the immediate load of MDISK decreases. This state is synchronized in real time through the "decrease by one" operation, ensuring that subsequent task issuance decisions (determining whether the concurrency condition is met) are based on real load data and avoiding misjudgments.
[0086] Increment one for the number of completed destruction tasks (corresponding to done_task_cnt in the structure): This parameter is a cumulative statistical indicator that records the total number of destruction tasks successfully completed since the system started or the last parameter initialization; the "increment one" operation is directly related to the adjustment trigger mechanism of the subsequent maximum input and output concurrency, that is, when this parameter accumulates to the preset statistical threshold, the average latency calculation and concurrency dynamic adjustment process will be started.
[0087] The total number of unfinished destruction tasks (corresponding to the total_task_cnt in the structure) is reduced by one: This parameter covers "the number of destruction tasks currently being processed + the number of tasks waiting to be issued in the destruction task queue", comprehensively reflecting the overall scale of unfinished tasks in the target MDISK; after a task is completed, it is "decremented by one" to ensure that the parameter is synchronized with the overall task load changes in real time, complementing other task quantity parameters and avoiding scheduling deviations caused by focusing only on a single load dimension.
[0088] S222. Retrieve the execution start time of the completed data destruction task corresponding to the data destruction completion notification, obtain the first processing delay of the completed data destruction task, and add the first processing delay to the total delay of the completed task in the data destruction status parameter set.
[0089] Specifically, the execution start time is data recorded and stored when the step "task is sent to the execution end," and it is precisely associated with the currently completed destruction task through a unique task identifier. The system uses the key identifier in the data destruction completion notification to retrieve the execution start time of the task from the task record in the performance monitoring structure, ensuring that the time data corresponds one-to-one with the task, avoiding confusion between cross-task times, and laying the foundation for single-time latency calculation.
[0090] The first processing latency refers to the actual execution time of a single completed data destruction task. Its calculation logic is "first processing latency = task execution end time in the data destruction completion notification - execution start time retrieved". The execution end time is recorded in real time by the execution end after the task is completed and sent with the notification, ensuring the accuracy of the latency calculation. This directly reflects the actual processing efficiency of MDISK during the task execution and is the fundamental data for quantifying disk performance.
[0091] After the first processing latency calculation is completed, it is added in real time to the total latency of completed tasks in the data destruction status parameter set (corresponding to total_clks in the structure), that is, "total latency of completed tasks = original total latency + first processing latency". This accumulation operation is performed synchronously with the increment of the number of completed destruction tasks in step S221, ensuring that the total latency is completely consistent with the statistical dimension of the number of completed tasks (for each completed task, the total latency is synchronously added to the corresponding time), providing complete and accurate cumulative data for subsequent average latency calculation.
[0092] S223. Calculate the average latency of the target managed disk based on the updated number of completed destruction tasks and the total latency of the completed tasks, and update it to the data destruction status parameter set.
[0093] Specifically, average latency is an indicator reflecting the overall processing performance of the target MDISK within the current statistical period. The calculation formula is "average latency = total latency of completed tasks after the update ÷ number of completed and destroyed tasks after the update". This calculation is based on the latest parameters updated in steps S221 and S222. By accumulating the latency of multiple tasks and taking the average value, it can effectively smooth out the latency anomalies caused by accidental factors such as instantaneous load and hardware fluctuations in a single task, and objectively reflect the continuous processing capability of MDISK.
[0094] The calculated average latency will directly overwrite the original average latency data in the data destruction status parameter set, achieving real-time updates. The updated data is stored in the MDISK performance structure on the AGENT side. On the one hand, it provides key performance feedback for subsequent "concurrency adjustment when the number of completed destruction tasks reaches the preset statistical threshold" (by comparing the average latency with the preset MDISK latency, the increase or decrease in concurrency is determined); on the other hand, it can serve as a reference indicator for the system to quickly judge the disk performance status. If the average latency continues to be higher than the preset latency, an early warning of abnormal disk load can be issued.
[0095] The average latency updated in this step is the core bridge connecting "task completion statistics" and "dynamic adjustment of concurrency". When the number of completed and destroyed tasks reaches the preset statistical threshold, such as 1000, the system will directly call this average latency data and compare it with the preset latency of the target MDISK (25ms for SSD type and 150ms for HDD type), and then adjust the dynamic adjustment gradient value (last_ratio).
[0096] It should be noted that parameter updates can also employ atomic operation mechanisms to ensure that the updates of all the aforementioned related parameters are either completed simultaneously or none of them are executed, thus avoiding inconsistencies in the parameter set data due to system anomalies. At the same time, the update results are synchronized to the storage unit of the performance monitoring structure in real time, ensuring that the latest status data can be obtained when subsequent task scheduling and concurrency adjustment are performed, thereby guaranteeing the accuracy of decision-making.
[0097] This embodiment of the application ensures accurate reflection of the real-time load changes of the target managed disk (MDISK) by synchronously updating the number of currently processed destruction tasks, the number of completed destruction tasks, and the total number of incomplete destruction tasks in the data destruction status parameter set in step S221. Step S222 retrieves the execution start time of completed tasks to calculate the first processing latency and adds it to the total latency of completed tasks, constructing a complete performance statistics foundation. Step S223 calculates and updates the average latency based on the updated number of completed destruction tasks and the total latency, achieving a quantitative perception of the target managed disk's processing performance. These steps work synergistically to provide accurate and real-time load data and performance basis for the subsequent dynamic adjustment of the maximum input / output concurrency, ensuring that the concurrency adjustment matches the actual disk processing capacity and effectively avoiding IO overload or resource waste. Furthermore, the atomic and synchronized update of parameters ensures the orderliness and controllability of the data destruction process, further improving the stability and efficiency of the data destruction process, while reducing the occupation of host business resources by destruction tasks and ensuring the overall read / write performance of the server.
[0098] S23. When the number of completed destruction tasks in the latest data destruction status parameter set reaches a preset statistical threshold, the maximum input / output concurrency is updated.
[0099] Specifically, the preset statistical threshold is the statistical threshold for completed tasks set during system initialization. Its core function is to define the statistical period for concurrency adjustment. That is, by accumulating a certain number of effective tasks, it ensures that the average latency can objectively reflect the true processing capacity of MDISK, avoids misjudgment of concurrency adjustment due to occasional latency fluctuations of a single task, and balances adjustment sensitivity with system stability.
[0100] Furthermore, when the number of completed destruction tasks after the update is detected to reach the preset statistical threshold, the update process of the maximum input / output concurrency will be triggered immediately; if the threshold is not reached, only the above parameter set will be updated, and the concurrency adjustment will not be performed to ensure the periodicity and targeting of the concurrency adjustment.
[0101] In this embodiment of the application, referring to S23 (updating the maximum input / output concurrency when the number of completed destruction tasks in the latest data destruction status parameter set reaches a preset statistical threshold) as shown in 4, it can be further refined as follows: S231. When the number of completed destruction tasks in the latest data destruction status parameter set reaches a preset statistical threshold, the average latency of the target managed disk is calculated based on the total latency of the completed tasks in the data destruction status parameter set and the preset statistical threshold.
[0102] Specifically, when the number of completed destruction tasks in the latest data destruction status parameter set reaches a preset statistical threshold, the average processing latency is calculated based on the total latency (total_clks) of completed tasks updated in real time in the data destruction status parameter set and the preset statistical threshold, such as 1000, using the formula: Average latency = Total latency of completed tasks ÷ Preset statistical threshold.
[0103] The average latency is a core indicator reflecting the overall efficiency of MDISK in processing and destroying I / O within the current statistical period. Compared with the latency of a single task, it can better eliminate the interference of accidental factors and objectively reflect the disk load status.
[0104] S232. Update the maximum input / output concurrency based on the average latency.
[0105] After calculating the average disk latency for the current statistical period, the average latency is compared with the preset latency corresponding to the disk. The maximum input / output concurrency is adaptively adjusted according to the dynamically adjustable gradient coefficient. At the same time, the range of gradient coefficient values is limited to ensure system operation safety. Finally, the concurrency update and periodic statistical parameters are reset, realizing the dynamic adaptation of the disk destruction task concurrency capability.
[0106] Based on S231-S232, when the number of completed destruction tasks reaches a preset statistical threshold, the average latency of the target managed disk is calculated using the total latency of completed tasks within the period and the preset statistical threshold. The maximum input / output concurrency is then updated based on this average latency. This allows for the periodic sampling of the overall processing latency of disk destruction I / O, reducing the interference from occasional fluctuations in latency of a single task and objectively reflecting the true disk load. Using this as the basis for concurrency adjustment, the maximum input / output concurrency can be adaptively adjusted to follow the real-time disk load. This prevents excessively high concurrency from causing I / O backlog and task timeouts, while also avoiding excessively low concurrency from wasting hardware resources, ensuring the stable and efficient operation of the data destruction business.
[0107] Furthermore, when S232 is executed, it can be further refined into the following steps a-c: Step a: If the average latency is greater than the corresponding preset latency, then based on the dynamically adjusted gradient value, the maximum input / output concurrency is reduced to obtain the latest maximum input / output concurrency.
[0108] Specifically, dynamically adjusting the gradient value is a key coefficient that relates disk performance to concurrency. Its initial value is 100 (initialized when the system creates the target managed disk), and the adjustment logic is strictly based on the comparison between the average latency and the preset latency of the target managed disk.
[0109] The preset latency is pre-configured according to the hardware type of the target managed disk. Specifically, solid-state drives (SSDs) are configured with a first preset latency, while hard disk drives (HDDs) are configured with a second preset latency, which is greater than the first preset latency. This is because SSDs and HDDs have inherent differences in physical read / write performance. HDDs are affected by platter rotation and seek time, resulting in inherently higher processing latency. SSDs have faster read / write response and inherently lower processing latency. Therefore, setting different preset latencies for the two types of disks allows the concurrency threshold to be aligned with the performance benchmarks of different hardware, avoiding misjudgments caused by using a uniform latency threshold.
[0110] Specifically, if the average latency is greater than the preset latency, it indicates that the current MDISK is under too much pressure to process and destroy IO, and the existing concurrency exceeds its actual carrying capacity. The concurrency needs to be reduced to alleviate the load. At this time, the gradient value will be dynamically adjusted to reduce the preset step size.
[0111] If the average latency is less than or equal to the preset latency, it indicates that the current MDISK still has remaining processing capacity. The existing concurrency is not fully utilizing disk resources. The concurrency can be increased to improve the destruction efficiency. At this time, the gradient value will be dynamically adjusted to increase the preset step size.
[0112] It should be noted that, in order to avoid system anomalies caused by excessively high or low concurrency, the dynamically adjusted gradient value must be kept within a reasonable range (such as not less than 0 and not exceeding the maximum gradient value supported by the system hardware) to ensure that the adjusted concurrency is always within a safe and controllable range.
[0113] Step b: If the average latency is less than or equal to the corresponding preset latency, then based on the dynamically adjusted gradient value, increase the maximum input / output concurrency to obtain the latest maximum input / output concurrency.
[0114] Specifically, the latest concurrency threshold can be calculated according to the conversion rule: maximum input / output concurrency (cur_recommendation) = 1024 × adjusted dynamic gradient value.
[0115] Among them, 1024 is the standard binary conversion factor in the storage field, which is adapted to the underlying logic of the basic unit of data destruction (256kb data block) to ensure that the calculated concurrency can accurately match the IO processing capability of MDISK. After the update, the "maximum input and output concurrency" in the data destruction status parameter set is replaced with the latest threshold to complete the dynamic adaptation of the concurrency.
[0116] Step c: Update the maximum input / output concurrency in the data destruction status parameter set to the latest maximum input / output concurrency, and initialize the number of completed destruction tasks and the total latency of the completed tasks.
[0117] Furthermore, to ensure the accuracy of parameter statistics for the next statistical period, after the concurrency number is updated, the number of completed and destroyed tasks and the total latency of completed tasks need to be reset to their initial values. This ensures that the latency statistics and concurrency adjustments for subsequent tasks are not affected by the data in this period, thus guaranteeing the independence and data purity of each statistical period.
[0118] It should be noted that the preset latency is pre-configured according to the hardware type of the target managed disk; wherein, the solid-state drive is configured with a first preset latency, and the hard disk is configured with a second preset latency, the second preset latency being greater than the first preset latency.
[0119] Based on steps a-c, by dynamically adjusting gradient values to adaptively reduce or increase the maximum concurrent input / output of the disk according to the relationship between the average latency and the preset latency, the optimal concurrent processing specifications can be accurately matched according to the real-time disk load status. When the disk load is high, the concurrency is actively reduced to alleviate IO pressure and avoid the risks of task timeouts and system anomalies. When the disk load is low, the concurrency is increased to fully exploit disk processing performance and improve the overall throughput efficiency of data destruction. After the concurrency parameters are updated, the number of periodic statistical tasks and latency data are initialized to ensure that the data of each statistical period are independent and do not interfere with each other, continuously ensuring the accuracy and stability of subsequent dynamic adjustments to concurrency, achieving load balancing, efficient resource utilization, and continuous, accurate, and reliable control logic in the data destruction process.
[0120] As an extension and refinement of the above embodiments, such as Figure 2 As shown, after step c (updating the maximum input / output concurrency in the data destruction state parameter set to the latest maximum input / output concurrency) in the above embodiment, the data destruction rate limiting method further includes: S51. Based on the updated maximum input / output concurrency and the latest number of currently processed destroyed tasks, re-determine whether the task issuance conditions are met.
[0121] Based on the updated disk performance adaptation parameters, the current load capacity of the target managed disk is reassessed to ensure that the task distribution strategy is synchronized with the real-time disk processing performance.
[0122] Then, the updated maximum input / output concurrency is compared with the latest number of currently processed destroyed tasks: If the updated maximum input / output concurrency is greater than or equal to the latest number of currently processed destroyed tasks, it indicates that the dynamically adjusted concurrency limit can handle the current and newly added task loads and meets the task distribution conditions.
[0123] If the updated maximum concurrent input / output count is less than the latest number of currently processed destroyed tasks, it indicates that the disk is still under full load and does not meet the conditions for issuing new tasks. The task must remain in a waiting state.
[0124] This ensures the consistency of the rate limiting rules. At the same time, since the maximum number of concurrent inputs and outputs has been dynamically optimized based on the actual disk latency, the judgment result is more in line with the real-time performance of the disk, avoiding scheduling misjudgments under a fixed number of concurrent connections.
[0125] S52. If so, the data destruction task to be executed is retrieved from the destruction task queue and sent to the target managed disk.
[0126] When the deployment conditions are met, data destruction tasks are retrieved from the destruction task queue, adhering to the "first-in, first-out" principle. This prioritizes tasks added to the queue earliest, ensuring orderly task scheduling and preventing some tasks from remaining indefinitely. The number of tasks retrieved is strictly controlled within the range of "updated maximum I / O concurrency - latest number of currently processed destruction tasks." This difference represents the upper limit of new tasks the disk can currently accept, ensuring that the total number of tasks being processed after deployment does not exceed the dynamically adjusted concurrency threshold. This fully utilizes the remaining disk processing capacity without causing I / O overload.
[0127] Specifically, the tasks to be executed are directly sent to the target managed disk to ensure that the task execution is implemented; the sent task data contains complete execution parameters, such as the corresponding logical volume identifier, data block range, overwrite mode, etc., to ensure that MDISK can directly perform data overwrite operations based on this information. After the task is issued, the system immediately updates the "Number of currently processed destruction tasks" in the MDISK performance structure, increasing its value by the number of tasks retrieved this time. This ensures that the parameter reflects the latest disk load status in real time, providing an accurate basis for the next judgment.
[0128] By dynamically optimizing the maximum input / output concurrency and synchronously adjusting the task distribution strategy, the concurrency of data destruction IO is always precisely matched with the real-time disk processing capacity. This solves the problems of IO backlog and timeout under high load and avoids resource waste under low load. At the same time, the task distribution judgment is triggered in time after the concurrency is updated, ensuring that waiting tasks can be quickly scheduled when there is spare disk processing capacity, avoiding queue backlog and improving the overall data destruction efficiency.
[0129] It should be noted that after re-evaluating whether the task issuance conditions are met, if the task issuance conditions are not met, the task to be destroyed will remain in the task to be destroyed queue. The task issuance judgment will be re-triggered when the number of currently processed tasks to be destroyed drops to less than or equal to the maximum input-output concurrency.
[0130] Specifically, when the task issuance judgment is retried, if the maximum input / output concurrency is greater than or equal to the latest number of currently processed destruction tasks, then the data destruction task to be executed is retrieved from the destruction task queue and issued to the target managed disk; if it is still not satisfied, then the waiting state continues until the task issuance condition is met.
[0131] This embodiment of the application updates the maximum input / output concurrency and then re-determines the task delivery conditions based on the updated concurrency and the latest number of currently processed destruction tasks. When the conditions are met, tasks to be executed are retrieved from the destruction task queue and delivered to the target managed disk. This enables dynamic adaptation between the task delivery strategy and the real-time processing capability of the target managed disk, ensuring that the number of tasks delivered is always within the disk's capacity. This avoids IO overload or resource waste caused by failure to adjust task delivery in a timely manner after the concurrency update, and ensures the continuity and efficiency of data destruction by orderly retrieval of tasks from the queue. It further reduces the occupation of host business resources by destruction tasks and effectively guarantees the overall read / write performance of the server and the stability of the data destruction process.
[0132] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0133] In some embodiments, refer to Figure 6 As shown, embodiments of this application also provide a data destruction rate limiting device 600, comprising: The reading unit 61 is used to read the maximum number of concurrent inputs and outputs corresponding to the target managed disk and the number of destruction tasks currently being processed by the target managed disk from the performance monitoring structure configured on the target managed disk; The performance monitoring structure is used to maintain the destruction task queue corresponding to the target managed disk; the destruction task queue is used to cache data destruction tasks for logical volumes in the target managed disk. The retrieval unit 62 is used to retrieve a data destruction task from the destruction task queue and send it to the destruction task execution end when the maximum input / output concurrency is greater than or equal to the number of destruction tasks currently being processed. The retrieval unit 62 is also used to stop retrieving data destruction tasks from the destruction task queue and sending them to the destruction task execution end when the maximum input / output concurrency is less than the number of destruction tasks currently being processed, so that the data destruction tasks remain in a waiting state in the destruction task queue.
[0134] As an optional implementation of this disclosure, the data destruction status parameter set further includes the total number of incomplete destruction tasks on the target managed disk, the number of completed destruction tasks, the current latency of the target managed disk, the total latency of completed tasks, and a dynamic adjustment gradient value for adjusting the maximum input / output concurrency; wherein the total number of incomplete destruction tasks, the number of completed destruction tasks, the current latency of the target managed disk, the total latency of completed tasks, and the dynamic adjustment gradient value are obtained by the performance monitoring structure.
[0135] As an optional implementation of this disclosure, the data destruction rate limiting device further includes a receiving unit, specifically configured to: receive a data destruction completion notification sent by the execution terminal; the data destruction completion notification is sent after the execution terminal completes each data destruction task; in response to the data destruction completion notification, update the data destruction status parameter set; when the number of completed destruction tasks in the latest data destruction status parameter set reaches a preset statistical threshold, update the maximum input / output concurrency.
[0136] As an optional implementation of this disclosure, the receiving unit is specifically configured to: decrement the value of the number of currently processed destruction tasks by one, increment the value of the number of completed destruction tasks by one, and decrement the value of the total number of incomplete destruction tasks by one in the data destruction status parameter set; retrieve the execution start time of the corresponding completed data destruction task in the data destruction completion notification to obtain the first processing delay of the completed data destruction task, and add the first processing delay to the total delay of the completed tasks in the data destruction status parameter set; calculate the average delay of the target managed disk based on the updated number of completed destruction tasks and the total delay of the completed tasks, and update it to the data destruction status parameter set.
[0137] As an optional implementation of this disclosure, the receiving unit is specifically configured to calculate the average latency of the target managed disk based on the total latency of the completed tasks in the data destruction status parameter set and the preset statistical threshold when the number of completed destruction tasks in the latest data destruction status parameter set reaches a preset statistical threshold; and update the maximum input / output concurrency based on the average latency.
[0138] As an optional implementation of this disclosure, the receiving unit is specifically configured to: if the average latency is greater than the corresponding preset latency, reduce the maximum input / output concurrency based on a dynamically adjusted gradient value to obtain the latest maximum input / output concurrency; if the average latency is less than or equal to the corresponding preset latency, increase the maximum input / output concurrency based on the dynamically adjusted gradient value to obtain the latest maximum input / output concurrency; update the maximum input / output concurrency in the data destruction status parameter set to the latest maximum input / output concurrency; and initialize the number of completed destruction tasks and the total latency of the completed tasks.
[0139] As an optional implementation of this disclosure, the retrieval unit 62 is specifically used to retrieve a target number of data destruction tasks from the head of the destruction task queue; the target number is the difference between the maximum input / output concurrency and the number of destruction tasks currently being processed; record the execution start time of each retrieved data destruction task, and send it to the execution terminal.
[0140] As an optional implementation of this disclosure, the data destruction tasks are arranged sequentially according to the order in which they are added to the queue, and the data destruction tasks are retrieved according to the first-in, first-out principle.
[0141] As an optional implementation of this disclosure, the receiving unit is further configured to receive a data destruction task for a logical volume in the target managed disk; and add the data destruction task to a destruction task queue associated with the target managed disk.
[0142] As an optional implementation of this disclosure, the receiving unit is further configured to re-determine whether the task delivery conditions are met based on the updated maximum input / output concurrency and the latest number of currently processed destruction tasks; if so, the data destruction task to be executed is retrieved from the destruction task queue and delivered to the target managed disk.
[0143] As an optional implementation of this disclosure, the dynamically adjusted gradient value is configured with upper and lower limits; the upper and lower limits are used to limit the adjustment range of the maximum input-output concurrency.
[0144] As an optional implementation of this disclosure, the preset latency is pre-configured according to the hardware type of the target managed disk; wherein, the solid-state drive is configured with a first preset latency, the hard disk is configured with a second preset latency, and the second preset latency is greater than the first preset latency.
[0145] As an optional implementation of this disclosure, the receiving unit is further configured to perform legality and integrity verification on the data destruction completion notification; and if the data destruction completion notification passes the verification, to perform the step of updating the data destruction status parameter set.
[0146] As an optional implementation of this disclosure, the receiving unit is further configured to keep the destruction task waiting in the destruction task queue if the task issuance conditions are not met; and to re-trigger the task issuance judgment when the number of currently processed destruction tasks drops to less than or equal to the maximum input / output concurrency.
[0147] For a description of the features in the embodiment corresponding to the data destruction rate limiting device, please refer to the relevant description of the embodiment corresponding to the data destruction rate limiting method, which will not be repeated here.
[0148] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above-described data destruction and flow limiting method embodiments.
[0149] 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-described data destruction rate limiting method embodiments or the steps of any of the above-described data destruction rate limiting methods when running.
[0150] 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 a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0151] 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-described data destruction rate limiting method embodiments or the steps of any of the above-described data destruction rate limiting methods.
[0152] 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 data destruction rate limiting method embodiments or the steps of any of the above-described data destruction rate limiting methods.
[0153] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0154] The data destruction and flow limiting method and electronic device provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make several improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A data destruction rate limiting method, characterized in that, include: Read the data destruction status parameter set corresponding to the target managed disk from the performance monitoring structure configured on the target managed disk; the data destruction status parameter set includes the maximum number of concurrent input / output operations and the number of destruction tasks currently being processed by the target managed disk; The performance monitoring structure is used to maintain the destruction task queue corresponding to the target managed disk; the destruction task queue is used to cache data destruction tasks for logical volumes in the target managed disk. When the maximum input / output concurrency is greater than or equal to the number of destruction tasks currently being processed, a data destruction task is retrieved from the destruction task queue and sent to the destruction task execution terminal. When the maximum number of concurrent inputs and outputs is less than the number of destruction tasks currently being processed, the operation of retrieving data destruction tasks from the destruction task queue and sending them to the destruction task execution end is stopped, so that the data destruction tasks remain in a waiting state in the destruction task queue.
2. The method according to claim 1, characterized in that, The data destruction status parameter set also includes the total number of incomplete destruction tasks on the target managed disk, the number of completed destruction tasks, the current latency of the target managed disk, the total latency of completed tasks, and a dynamic adjustment gradient value for adjusting the maximum input / output concurrency. The total number of uncompleted destruction tasks, the number of completed destruction tasks, the current latency of the target managed disk, the total latency of the completed tasks, and the dynamically adjusted gradient value are obtained by the performance monitoring structure.
3. The method according to claim 2, characterized in that, The method further includes: Receive a data destruction completion notification sent by the execution terminal; the data destruction completion notification is sent after the execution terminal completes each data destruction task; In response to the data destruction completion notification, update the data destruction status parameter set; When the number of completed destruction tasks in the latest data destruction status parameter set reaches a preset statistical threshold, the maximum input / output concurrency is updated.
4. The method according to claim 3, characterized in that, The step of updating the data destruction status parameter set in response to the data destruction completion notification includes: Decrement the value of the number of currently processed destruction tasks by one, increment the value of the number of completed destruction tasks by one, and decrement the value of the total number of incomplete destruction tasks by one in the data destruction status parameter set. Retrieve the execution start time of the completed data destruction task corresponding to the data destruction completion notification to obtain the first processing delay of the completed data destruction task, and add the first processing delay to the total delay of the completed task in the data destruction status parameter set; Based on the updated number of completed destruction tasks and the total latency of the completed tasks, the average latency of the target managed disk is calculated and updated to the data destruction status parameter set.
5. The method according to claim 3, characterized in that, When the number of completed destruction tasks in the latest data destruction status parameter set reaches a preset statistical threshold, the maximum input / output concurrency is updated, including: When the number of completed destruction tasks in the latest data destruction status parameter set reaches a preset statistical threshold, the average latency of the target managed disk is calculated based on the total latency of the completed tasks in the data destruction status parameter set and the preset statistical threshold. The maximum input / output concurrency is updated based on the average latency.
6. The method according to claim 5, characterized in that, The step of updating the maximum input / output concurrency based on the average latency includes: If the average latency is greater than the corresponding preset latency, the maximum input / output concurrency is reduced based on the dynamically adjusted gradient value to obtain the latest maximum input / output concurrency. If the average latency is less than or equal to the corresponding preset latency, then based on the dynamically adjusted gradient value, the maximum input / output concurrency is increased to obtain the latest maximum input / output concurrency. Update the maximum input / output concurrency in the data destruction status parameter set to the latest maximum input / output concurrency, and initialize the number of completed destruction tasks and the total latency of the completed tasks.
7. The method according to claim 1, characterized in that, The step of retrieving data destruction tasks from the destruction task queue and sending them to the target managed disk includes: The target number of data destruction tasks are retrieved from the head of the destruction task queue; the target number is the difference between the maximum input / output concurrency and the number of destruction tasks currently being processed. Record the start time of each data destruction task that is invoked, and send it to the execution terminal.
8. The method according to claim 1, characterized in that, The data destruction task queue is a doubly linked list. The data destruction tasks are arranged sequentially according to the order in which they are added to the queue. When a data destruction task is retrieved, it is retrieved according to the first-in, first-out principle.
9. The method according to claim 1, characterized in that, The method further includes: Receive data destruction tasks for logical volumes in the target managed disk; The data destruction task is added to the destruction task queue associated with the target managed disk.
10. The method according to claim 6, characterized in that, After updating the maximum input / output concurrency in the data destruction state parameter set to the latest maximum input / output concurrency, the method further includes: Based on the updated maximum input / output concurrency and the latest number of currently processed destroyed tasks, re-determine whether the task issuance conditions are met. If so, the data destruction task to be executed is retrieved from the destruction task queue and sent to the target managed disk.
11. The method according to claim 6, characterized in that, The dynamically adjusted gradient value is configured with upper and lower limits; these upper and lower limits are used to restrict the adjustment range of the maximum input-output concurrency.
12. The method according to claim 6, characterized in that, The preset latency is pre-configured according to the hardware type of the target managed disk; wherein, the solid-state drive is configured with a first preset latency, the hard disk is configured with a second preset latency, and the second preset latency is greater than the first preset latency.
13. The method according to claim 3, characterized in that, Before updating the data destruction status parameter set in response to the data destruction completion notification, the method further includes: The data destruction completion notification is subject to legality and integrity verification. If the data destruction completion notification passes verification, the step of updating the data destruction status parameter set is executed.
14. The method according to claim 10, characterized in that, After re-evaluating whether the task issuance conditions are met, the method further includes: If the conditions for task assignment are not met, the task will remain in the task destruction queue. When the number of currently processed destruction tasks drops to less than or equal to the maximum input / output concurrency, the task issuance judgment is retried.
15. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the data destruction rate limiting method as described in any one of claims 1 to 14 when executing the computer program.
