Snapshot deletion method, apparatus and device, and readable storage medium
By monitoring the stacking capacity and business pressure of snapshot data, dynamically adjusting the hardware performance resources of snapshot deletion tasks, solving the problem of increasing storage capacity and fixed deletion speed in timed snapshot scenarios, realizing the reasonable management of storage space and guaranteeing business performance.
Patent Information
- Application Number
- CN202411187103.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-12-20
AI Technical Summary
The prior art leads to a significant increase in storage capacity in timed snapshot scenarios, and fixed snapshot deletion speed leads to excessively filled storage space or performance impacts, making it difficult to predict storage space usage, affecting system stability and business performance.
By monitoring the snapshot data stacking capacity and storing system business pressure parameters, dynamically adjusting the hardware performance resources of the snapshot delete task queue, improving the number of tasks concurrency to speed up the deletion speed, and initiating alarms when business pressure is high, ensuring reasonable management of storage space.
Effectively prevent excessive consumption of storage space, ensure that business performance is not affected, dynamically adjust the snapshot deletion speed to adapt to business needs, and reduce waste of storage resources and performance impacts.
Smart Images

Figure CN119166050A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a snapshot deletion method, device, equipment and readable storage medium. Background Art
[0002] With the rapid development of modern information technology, data storage and management have become key technical areas. In order to protect the original data from accidental damage, snapshot technology has emerged and has become one of the important means of data protection. Snapshot technology allows the system to create a copy of data at a certain moment without affecting the use and integrity of the original data. Among the many snapshot technologies, redirect on write (ROW) and copy on write (COW) are two common implementation methods.
[0003] The Redirect on Write (ROW) technology redirects write requests to the snapshot volume when they arrive, and updates the data address mapping so that the snapshot volume stores the latest data. The advantage of this method is that it can provide instant access to data, but the disadvantage is that each write operation requires updating the mapping table, which may affect performance.
[0004] The Copy-on-Write (COW) technology first copies the original data to the snapshot volume when a write request comes, and then writes the new data to the original volume. The advantage of COW technology is that it does not affect the performance of the original data volume, but the disadvantage is that it requires additional storage space to store the copied data, which may become a problem when storage resources are limited.
[0005] Although both technologies have their own advantages, they can both lead to a significant increase in storage capacity in the scenario of timed snapshots. Timed snapshots are a mechanism for periodically creating data copies, which can be automatically executed according to a predetermined policy. However, when snapshot operations are performed frequently, the increase in storage capacity is particularly obvious. In addition, the speed of snapshot deletion is also a key factor. If snapshots are deleted too slowly, the cluster capacity may be quickly filled, affecting the stability and availability of the system; if snapshots are deleted too quickly, it may have a negative impact on business performance.
[0006] The existing scheduled snapshot mechanism usually deletes some snapshots according to the scheduled snapshot policy. In the process of deleting a ROW snapshot, the data of the snapshot volume needs to be copied to the original volume first, and then the snapshot volume needs to be deleted and unmapped; while in the process of deleting a COW snapshot, only the snapshot volume needs to be deleted and unmapped. These operations have a significant impact on the performance of the storage system, especially ROW snapshot deletion. Due to its long processing time, the snapshot deletion speed usually needs to be set to a lower fixed value. This requires users to plan the use of capacity in advance when using the scheduled snapshot function to avoid wasting storage space and performance degradation.
[0007] However, as user business grows, the number of created user volumes increases, and all of them require snapshot support, the limitations of existing technologies become particularly obvious. In a certain period, a large number of snapshot deletion actions may be generated. If the speed at which the scheduled snapshot policy deletes snapshots is faster than the speed at which the background storage system processes these snapshot data, especially when the snapshot deletion speed of the storage system is set to a low level, the snapshot data will continue to accumulate, which may eventually cause the cluster storage space to fill up. In addition, in some distributed storage systems with garbage collection functions, although the deleted snapshot data cannot be used by users, it cannot be immediately marked and recycled by the garbage collection mechanism, resulting in a waste of storage space. At the same time, when the storage capacity is too high, the garbage collection work rate will be forced to increase, which not only increases the consumption of computing resources, but may also affect the performance of other businesses. Summary of the invention
[0008] In view of this, the present specification provides a snapshot deletion method, device, electronic device, and readable storage medium to improve the above-mentioned problem of storage resource waste.
[0009] The specific technical solutions are as follows:
[0010] The present specification provides a snapshot deletion method, which is applied to a storage system. The method includes: obtaining the snapshot data accumulation capacity based on the snapshot data associated with each snapshot deletion task in the snapshot deletion task queue, and executing the next step if the snapshot data accumulation capacity is greater than a preset capacity threshold; detecting the current local storage system business pressure parameter, and executing the next step if the current local storage system business pressure parameter is less than the preset pressure threshold; and improving the hardware performance resources allocated to the snapshot deletion task queue.
[0011] As a technical solution, the snapshot data accumulation capacity is obtained based on the snapshot data associated with each snapshot deletion task in the snapshot deletion task queue. If the snapshot data accumulation capacity is greater than a preset capacity threshold, the next step is executed, including: traversing the snapshot deletion task queue, accumulating the snapshot data associated with each snapshot deletion task, and obtaining the snapshot data accumulation capacity; or, when the snapshot deletion task joins or exits the snapshot deletion task queue, the corresponding value is added to or subtracted from the value of the snapshot data accumulation capacity to obtain an updated snapshot data accumulation capacity.
[0012] As a technical solution, the business pressure parameter of the current local storage system is detected. If the business pressure parameter of the current local storage system is less than a preset pressure threshold, the next step is executed, including: the business pressure parameter is the average hard disk load of the current local storage system, the preset pressure threshold is the preset hard disk load threshold, and if the average hard disk load of the current local storage system is less than the preset hard disk load threshold, the next step is executed.
[0013] As a technical solution, the improvement of the hardware performance resources allocated to the snapshot deletion task queue includes: increasing the number of concurrent tasks allowed for the snapshot deletion task queue.
[0014] As a technical solution, the preset pressure threshold includes several sub-preset pressure thresholds, each sub-preset pressure threshold corresponds to a different task concurrency parameter, and the task concurrency number allowed for the snapshot deletion task queue is increased according to the task concurrency parameter corresponding to the lowest sub-preset pressure threshold among the sub-preset pressure thresholds that are higher than the business pressure parameter.
[0015] As a technical solution, the current local storage system business pressure parameter is detected. If the current local storage system business pressure parameter is less than the preset pressure threshold, the next step is executed, which also includes: if the current local storage system business pressure parameter is greater than or equal to the preset pressure threshold, a snapshot data accumulation alarm is initiated.
[0016] This specification also provides a snapshot deletion device, which is applied to a storage system, and the device includes: a first module, which is used to obtain the snapshot data accumulation capacity based on the snapshot data associated with each snapshot deletion task in the snapshot deletion task queue, and if the snapshot data accumulation capacity is greater than a preset capacity threshold, the next module is called; a second module, which is used to detect the current local storage system business pressure parameter, and if the current local storage system business pressure parameter is less than the preset pressure threshold, the next module is called; a third module, which is used to improve the hardware performance resources allocated to the snapshot deletion task queue.
[0017] As a technical solution, the snapshot data accumulation capacity is obtained based on the snapshot data associated with each snapshot deletion task in the snapshot deletion task queue. If the snapshot data accumulation capacity is greater than a preset capacity threshold, the next module is called, including: traversing the snapshot deletion task queue, accumulating the snapshot data associated with each snapshot deletion task, and obtaining the snapshot data accumulation capacity; or, when the snapshot deletion task joins or exits the snapshot deletion task queue, the corresponding value is added to or subtracted from the value of the snapshot data accumulation capacity to obtain an updated snapshot data accumulation capacity.
[0018] As a technical solution, the business pressure parameter of the current local storage system is detected. If the business pressure parameter of the current local storage system is less than a preset pressure threshold, the next module is called, including: the business pressure parameter is the average hard disk load of the current local storage system, the preset pressure threshold is the preset hard disk load threshold, and if the average hard disk load of the current local storage system is less than the preset hard disk load threshold, the next module is called.
[0019] As a technical solution, the improvement of the hardware performance resources allocated to the snapshot deletion task queue includes: increasing the number of concurrent tasks allowed for the snapshot deletion task queue.
[0020] As a technical solution, the preset pressure threshold includes several sub-preset pressure thresholds, each sub-preset pressure threshold corresponds to a different task concurrency parameter, and the task concurrency number allowed for the snapshot deletion task queue is increased according to the task concurrency parameter corresponding to the lowest sub-preset pressure threshold among the sub-preset pressure thresholds that are higher than the business pressure parameter.
[0021] As a technical solution, the current local storage system business pressure parameter is detected. If the current local storage system business pressure parameter is less than the preset pressure threshold, the next module is called, and it also includes: if the current local storage system business pressure parameter is greater than or equal to the preset pressure threshold, a snapshot data accumulation alarm is initiated.
[0022] This specification also provides an electronic device, including a processor and a readable storage medium, wherein the readable storage medium stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the aforementioned snapshot deletion method.
[0023] This specification also provides a readable storage medium, which stores machine executable instructions. When the machine executable instructions are called and executed by a processor, the machine executable instructions prompt the processor to implement the aforementioned snapshot deletion method.
[0024] The above technical solution provided in this specification brings at least the following beneficial effects:
[0025] This snapshot deletion method can dynamically adjust the snapshot deletion speed according to the snapshot data accumulation situation and the current business pressure, effectively preventing excessive consumption of storage space while ensuring that business performance is not affected. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the implementation methods of this specification or the technical solutions in the prior art, the drawings required for use in the implementation methods of this specification or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some implementation methods recorded in this specification. For ordinary technicians in this field, other drawings can also be obtained based on these drawings of the implementation methods of this specification.
[0027] Figure 1 is a flowchart of a snapshot deletion method in one implementation of this specification;
[0028] Figure 2 is an alarm flow chart of a snapshot deletion method in one implementation of this specification;
[0029] Figure 3is a structural diagram of a snapshot deletion device in one implementation mode of this specification;
[0030] Figure 4 It is a hardware structure diagram of an electronic device in one implementation mode of this specification.
[0031] Reference numerals: first module 21 , second module 22 , third module 23 . DETAILED DESCRIPTION
[0032] The terms used in the embodiments of this specification are only for the purpose of describing specific embodiments, rather than limiting this specification. The singular forms of "a", "said" and "the" used in this specification and claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to any or all possible combinations of one or more associated listed items.
[0033] It should be understood that although the terms first, second, third, etc. may be used to describe various information in the embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, in addition, the word "if" used may be interpreted as "at the time of" or "when" or "in response to determining".
[0034] The background technology section is a very important part of the patent application document. It is used to introduce the technical field involved in the invention and the problems existing in the prior art. Below is a more detailed description of the background technology based on the provided document content:
[0035] In modern data storage systems, snapshot technology is usually used to back up data to ensure data security and availability. Snapshot is an efficient way to back up data. It can record the state of data at a certain point in time without affecting the source data. There are two main snapshot technologies commonly used: Copy on Write (COW) and Redirect on Write (ROW).
[0036] Copy on Write (COW): When a snapshot is created, the original data is not copied. Only when the original data is modified will the old data be copied to the snapshot and the new data will be written to the original location.
[0037] Redirect on Write (ROW): When creating a snapshot, the write request is redirected to the snapshot volume and the data address mapping is updated. The snapshot volume stores the latest data version.
[0038] Although these two snapshot technologies have different implementation mechanisms, they can both effectively save the state of data at a specific moment. However, snapshot technology also brings some problems, especially in the timed snapshot scenario, these problems are particularly prominent.
[0039] In a timed snapshot scenario, the storage system automatically creates snapshots at preset intervals. Frequent creation of snapshots will increase storage capacity. When there are too many snapshots, you need to delete some old snapshots regularly to free up storage space. However, the snapshot deletion process itself consumes storage system resources and may affect normal business operations.
[0040] A timed snapshot deletion mechanism is to delete some snapshots regularly according to a predetermined policy. For ROW snapshots, deleting snapshots requires copying the data of the snapshot volume back to the original volume, and then deleting the snapshot volume and unmapping it; for COW snapshots, you only need to delete the snapshot volume and unmap it. Regardless of the snapshot type, snapshot deletion will have a certain impact on business performance, especially ROW snapshot deletion takes a long time. Therefore, the snapshot deletion speed is usually set lower to reduce the impact on the business. This fixed deletion speed setting may cause the following problems:
[0041] As user business grows, the number of user volumes created increases, and the frequency of snapshots required also increases. When the snapshot deletion rate is lower than the storage system's processing rate of snapshot data, snapshot data will accumulate, eventually filling up the storage space;
[0042] In some distributed storage systems with garbage collection functions, data after snapshot deletion will be garbage marked and recycled. However, if the snapshot deletion speed is slow, the data of these deleted snapshots still occupy storage space and cannot be effectively used or recycled, resulting in a waste of storage resources;
[0043] When the storage system capacity is high, the garbage collection work rate will be adjusted to the highest, which will occupy a large amount of computing resources and thus affect business performance;
[0044] Since snapshot deletion speed is fixed, it is difficult for users to predict storage space usage, which makes storage capacity planning difficult.
[0045] In summary, the timing snapshot deletion mechanism is prone to the problem of snapshot data accumulation when facing the growth of user business, which leads to waste of storage resources and degradation of business performance. Therefore, it is necessary to develop a new method of intelligent regulation of timing snapshot deletion to solve the above problem.
[0046] The specific technical solution is described below.
[0047] In one embodiment, the present specification provides a snapshot deletion method, which is applied to a storage system, and the method includes: obtaining the snapshot data accumulation capacity based on the snapshot data associated with each snapshot deletion task in the snapshot deletion task queue, and if the snapshot data accumulation capacity is greater than a preset capacity threshold, executing the next step; detecting the current local storage system business pressure parameter, and if the current local storage system business pressure parameter is less than the preset pressure threshold, executing the next step; and increasing the hardware performance resources allocated to the snapshot deletion task queue.
[0048] Specifically, Figure 1 , including the following steps:
[0049] Step S11, obtaining the snapshot data accumulation capacity according to the snapshot data associated with each snapshot deletion task in the snapshot deletion task queue, and executing the next step if the snapshot data accumulation capacity is greater than a preset capacity threshold.
[0050] In this step, the system will first count the snapshot data associated with each snapshot deletion task in the snapshot deletion task queue to obtain the current snapshot data accumulation capacity. This process can be achieved by accumulating the capacity information of the snapshot volume. For example, every time a snapshot deletion task is triggered and added to the queue, the system will record the capacity of the snapshot volume and add it to the total snapshot data accumulation capacity. This step is the basis for determining whether subsequent operations are required.
[0051] Step S12, detecting the current local storage system business pressure parameter, if the current local storage system business pressure parameter is less than a preset pressure threshold, executing the next step.
[0052] After confirming that the snapshot data accumulation capacity exceeds the preset threshold, the system will proceed to the next step, which is to detect the business pressure parameters of the current local storage system. This parameter can be the I / O operation rate, CPU usage, memory usage, etc. of the storage system, which is used to reflect the current workload of the system. For example, if the current I / O operation rate of the system is lower than the preset threshold, this indicates that the current business pressure of the system is not high and there is extra processing capacity available for snapshot deletion tasks.
[0053] Step S13, increasing the hardware performance resources allocated to the snapshot deletion task queue.
[0054] When it is confirmed that the snapshot data accumulation capacity is too large and the business pressure is low, the system will perform this step, that is, increase the hardware performance resources allocated to the snapshot deletion task queue. Specifically, the system can increase the number of CPU cores for processing snapshot deletion tasks, increase memory allocation quotas, or increase I / O bandwidth. For example, if the system detects that the snapshot data accumulation capacity has reached 30% of the storage volume capacity, and the current CPU usage is only 40%, which is far below the preset 60% pressure threshold, the system can automatically increase the number of CPU cores for processing snapshot deletion tasks from 4 cores to 8 cores to speed up snapshot deletion.
[0055] Assume that a storage system accumulates a large amount of snapshot data after the peak business period of the day. The system detects through step S11 that the snapshot data accumulation capacity has reached 35% of the storage volume capacity, exceeding the preset 30% threshold. Subsequently, the system detects the current business pressure parameters in step S12, such as CPU usage of 50% and memory usage of 60%, both of which are lower than the preset pressure threshold. Based on this information, the system decides to take action in step S13 to increase the resources originally allocated to the snapshot deletion task from 2 CPU cores and 4GB of memory to 4 CPU cores and 8GB of memory, and at the same time increase the network bandwidth to speed up the deletion process of snapshot data.
[0056] In a timed snapshot scenario, the storage system creates snapshots periodically to ensure data security. As time goes by, the number of snapshots will continue to increase, resulting in storage space being occupied. In order to properly manage and free up storage space, old snapshots need to be deleted periodically. However, if the snapshot deletion speed is not set properly, snapshot data may accumulate, thereby occupying too much storage space.
[0057] There is a snapshot deletion task queue in the storage system, which contains snapshot tasks to be deleted. Each snapshot task is associated with corresponding snapshot data. Whenever a snapshot deletion task is added to the queue, the snapshot data capacity corresponding to the task is added to the total snapshot data accumulation capacity. When the snapshot deletion task is completed, the capacity of the corresponding snapshot data is deducted from the total snapshot data accumulation capacity. The total snapshot data accumulation capacity is compared with the preset capacity threshold. If the total snapshot data accumulation capacity exceeds the preset capacity threshold, the next step is triggered.
[0058] Assume that the preset capacity threshold is 20% of the storage volume capacity, that is, if the total capacity of snapshot data accumulation reaches 20% of the storage volume capacity, the system will consider that the snapshot data has accumulated too much. For example, if the total capacity of the storage volume is 1TB, then the 20% threshold is 200GB. Once the total capacity of snapshot data accumulation exceeds 200GB, it will proceed to the next step.
[0059] Snapshot deletion not only takes up storage space, but also consumes computing resources. If snapshot deletion is performed during business peak hours, it may have a negative impact on business performance. Therefore, it is necessary to detect the business pressure of the current storage system to determine whether the speed of snapshot deletion can be increased.
[0060] The current business pressure is assessed by monitoring the average load of all hard disks in the storage system. The average load reflects the current busyness of the system. If the current business pressure is lower than the preset pressure threshold, the system believes that there are sufficient resources to increase the snapshot deletion speed.
[0061] Assume that the preset pressure threshold is 60%, that is, if the current business pressure is lower than 60%, the system is considered to have sufficient resources to perform more snapshot deletion tasks. For example, if the current business pressure is 50%, the system is considered to be able to proceed to the next step.
[0062] When the snapshot data accumulation capacity exceeds the threshold and the current business pressure is lower than the threshold, the snapshot deletion speed can be increased. This step is mainly achieved by increasing the hardware performance resources allocated to the snapshot deletion task queue.
[0063] You can increase the number of concurrent tasks assigned to the snapshot deletion task queue to speed up snapshot deletion. For example, you can speed up the processing of snapshot deletion tasks by increasing resources such as the number of CPU cores and memory.
[0064] The snapshot deletion speed can also be increased by setting the upper limit of the number of concurrent tasks, and adjusted according to different gears. For example, three gears can be set, namely 1, 2, and 3, and the corresponding concurrent task numbers are 4, 7, and 10. When the snapshot deletion speed needs to be increased, it can be gradually increased from gear 1 to a higher gear.
[0065] Assuming that the current number of concurrent tasks in the snapshot deletion task queue is 4 (level 1), when the system detects that the total capacity of snapshot data accumulation exceeds the threshold and the business pressure is lower than the threshold, the number of concurrent tasks can be increased to 7 (level 2). If the snapshot data accumulation situation is still serious, it can be further increased to 10 (level 3).
[0066] In one embodiment, the snapshot data accumulation capacity is obtained based on the snapshot data associated with each snapshot deletion task in the snapshot deletion task queue. If the snapshot data accumulation capacity is greater than a preset capacity threshold, the next step is executed, including: traversing the snapshot deletion task queue, accumulating the snapshot data associated with each snapshot deletion task, and obtaining the snapshot data accumulation capacity; or, when the snapshot deletion task joins or exits the snapshot deletion task queue, the corresponding value is added to or subtracted from the value of the snapshot data accumulation capacity to obtain an updated snapshot data accumulation capacity.
[0067] In one embodiment, the business pressure parameter of the current local storage system is detected. If the business pressure parameter of the current local storage system is less than a preset pressure threshold, the next step is executed, including: the business pressure parameter is the average hard disk load of the current local storage system, the preset pressure threshold is the preset hard disk load threshold, and if the average hard disk load of the current local storage system is less than the preset hard disk load threshold, the next step is executed.
[0068] In one implementation, increasing the hardware performance resources allocated to the snapshot deletion task queue includes: increasing the number of concurrent tasks allowed for the snapshot deletion task queue.
[0069] In one embodiment, the preset pressure threshold includes several sub-preset pressure thresholds, each sub-preset pressure threshold corresponds to a different task concurrency parameter, and the number of task concurrencies allowed for the snapshot deletion task queue is increased according to the task concurrency parameter corresponding to the lowest sub-preset pressure threshold among the sub-preset pressure thresholds that are higher than the business pressure parameter.
[0070] In one embodiment, the current local storage system business pressure parameter is detected. If the current local storage system business pressure parameter is less than a preset pressure threshold, the next step is executed, which also includes: if the current local storage system business pressure parameter is greater than or equal to the preset pressure threshold, a snapshot data accumulation alarm is initiated.
[0071] When the storage system detects that the current business pressure parameter is greater than or equal to the preset pressure threshold, the system will not immediately increase the hardware performance resources of the snapshot deletion task, but will first initiate a snapshot data accumulation alarm. The purpose of this alarm mechanism is to remind the system administrator or automatic control system to pay attention to the current storage system status so that appropriate measures can be taken.
[0072] The alarm information will include key information such as current business pressure parameters, snapshot data accumulation capacity, and possible impact on system performance. This information can be delivered to administrators or monitoring systems through system logs, emails, SMS or other notification methods.
[0073] After receiving the alarm information, the system administrator can decide whether to intervene manually to adjust the snapshot deletion policy or increase system resources based on the current system status and business needs. At the same time, the system can provide decision support, such as recommended resource adjustment plans, estimated storage space recovery, etc., to help administrators make more reasonable decisions.
[0074] If the system administrator decides to intervene manually, the system will dynamically adjust resource allocation according to the administrator's instructions, or in automatic mode, automatically optimize resources according to preset policies. This may include reallocating CPU resources, adjusting memory allocation, optimizing I / O request processing, etc., to speed up the deletion of snapshot data as much as possible while ensuring business performance.
[0075] Assume that at the end of a workday with high business pressure, the CPU usage of the storage system soars to 80%, and the memory usage also reaches 85%, both exceeding the preset 60% pressure threshold. In this case, the system will not automatically increase the hardware performance resources for the snapshot deletion task, but will issue an alarm through channels such as the console and email system. The alarm information will detail the current system pressure status and prompt the administrator to consider manual intervention or wait until the business pressure is reduced before executing the snapshot deletion task.
[0076] After receiving the alarm, the administrator can log in to the system to view the detailed performance report and decide whether to temporarily increase resources or adjust the snapshot deletion strategy based on the current business needs and system resource status. If the administrator decides to intervene manually, he can adjust the number of CPU cores, memory allocation or optimize storage I / O through the interface provided by the system to alleviate the current business pressure and gradually clean up the snapshot data accumulation.
[0077] Through this progressive technical solution, the present invention can not only automatically optimize the snapshot deletion process when the business pressure is low, but also provide effective alarms and decision support when the business pressure is high, ensuring that the storage system can operate stably under various circumstances while minimizing the impact on business performance.
[0078] In one embodiment, an intelligent adjustment control mechanism is implemented: when there is a scheduled snapshot deletion action and the snapshot data accumulation is greater than a set threshold, it will trigger the detection of business pressure. When the business pressure is less than the threshold, the speed of deleting snapshots will be dynamically increased to prevent the effective hard disk resources from being amplified and consumed; when the business pressure is high, the cluster capacity detection will also be triggered, and in the high-capacity scenario, an alarm will be issued to remind the user to intervene to determine whether the snapshot deletion speed needs to be increased.
[0079] In the existing periodic snapshot deletion mechanism, this implementation newly defines a process for determining whether snapshot data is excessively accumulated; newly defines a detection threshold for the total capacity of snapshot data accumulation; and exemplifies a strategy for controlling the snapshot deletion speed, which is as follows:
[0080] The calculation of the total capacity of the snapshot data accumulation can be triggered by a scheduled snapshot deletion task. When entering the snapshot deletion task queue, the capacity information of the snapshot volume is added to the total capacity of the snapshot data accumulation. When the snapshot deletion task is completed, the capacity of this part of the snapshot volume is subtracted from the total capacity of the snapshot data accumulation.
[0081] The detection threshold of the total capacity of snapshot data accumulation is not a fixed value. It can be set by the user and a default value can be set. For example, the threshold for triggering detection of the total capacity of snapshot data accumulation is x% of the storage volume capacity. The default value is 20%. This value represents the user's tolerance for capacity waste.
[0082] The control of the snapshot deletion speed can set the existing fixed snapshot deletion speed to the default value and set multiple speed gears. Each time the process reaches the point where the snapshot deletion speed is increased, the gear is increased. For example, the number of concurrent tasks represents the level of the gear, that is, the higher the gear, the higher the number of concurrent tasks, and the faster the snapshot deletion speed.
[0083] When the total capacity of snapshot data accumulation is greater than the threshold, business pressure detection will be performed. When the average load of all hard disks in the storage system is less than the set threshold, the snapshot deletion speed will be increased; when the business pressure is greater than the set threshold, the original process of the scheduled snapshot can be used, that is, the default snapshot deletion speed is adopted.
[0084] The threshold for business pressure detection is not fixed, but can be set by the user (the system can set a default value), and the user can set it according to the characteristics of their own business. For example, if the user does not set it, the default value is 60%, then the snapshot deletion speed will be increased by one gear only when the business pressure detects that the hard disk load is less than 60%.
[0085] If the total capacity detection result of snapshot data accumulation is always greater than the threshold, and the business pressure detection result shows that the cluster is always under high load, the dynamic control mechanism does not have a suitable time to intervene, and there is a risk of capacity waste and cluster fullness.
[0086] In the above scenario, when the cluster capacity detection threshold is reached, the threshold can refer to the existing cluster capacity alarm threshold of the storage system. After the capacity alarm is triggered, a snapshot data accumulation alarm will be triggered simultaneously, such as Figure 2 , remind users to handle it, and set an entry for users to actively handle it. Users can choose whether to actively increase the snapshot deletion speed.
[0087] In one embodiment, if Figure 3This specification also provides a snapshot deletion device, which is applied to a storage system. The device includes: a first module, which is used to obtain the snapshot data accumulation capacity based on the snapshot data associated with each snapshot deletion task in the snapshot deletion task queue. If the snapshot data accumulation capacity is greater than a preset capacity threshold, the next module is called; a second module, which is used to detect the current local storage system business pressure parameter. If the current local storage system business pressure parameter is less than the preset pressure threshold, the next module is called; a third module, which is used to improve the hardware performance resources allocated to the snapshot deletion task queue.
[0088] In one embodiment, the snapshot data accumulation capacity is obtained based on the snapshot data associated with each snapshot deletion task in the snapshot deletion task queue. If the snapshot data accumulation capacity is greater than a preset capacity threshold, the next module is called, including: traversing the snapshot deletion task queue, accumulating the snapshot data associated with each snapshot deletion task, and obtaining the snapshot data accumulation capacity; or, when the snapshot deletion task joins or exits the snapshot deletion task queue, the corresponding value is added to or subtracted from the value of the snapshot data accumulation capacity to obtain an updated snapshot data accumulation capacity.
[0089] In one embodiment, the business pressure parameter of the current local storage system is detected. If the business pressure parameter of the current local storage system is less than a preset pressure threshold, the next module is called, including: the business pressure parameter is the average hard disk load of the current local storage system, the preset pressure threshold is a preset hard disk load threshold, and if the average hard disk load of the current local storage system is less than the preset hard disk load threshold, the next module is called.
[0090] In one implementation, increasing the hardware performance resources allocated to the snapshot deletion task queue includes: increasing the number of concurrent tasks allowed for the snapshot deletion task queue.
[0091] In one embodiment, the preset pressure threshold includes several sub-preset pressure thresholds, each sub-preset pressure threshold corresponds to a different task concurrency parameter, and the number of task concurrencies allowed for the snapshot deletion task queue is increased according to the task concurrency parameter corresponding to the lowest sub-preset pressure threshold among the sub-preset pressure thresholds that are higher than the business pressure parameter.
[0092] In one embodiment, the current local storage system business pressure parameter is detected. If the current local storage system business pressure parameter is less than a preset pressure threshold, the next module is called, and it also includes: if the current local storage system business pressure parameter is greater than or equal to the preset pressure threshold, a snapshot data accumulation alarm is initiated.
[0093] The device implementation is the same as or similar to the corresponding method implementation, and will not be described in detail here.
[0094] In one embodiment, the present specification provides an electronic device, including a processor and a readable storage medium, wherein the readable storage medium stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the aforementioned snapshot deletion method. From a hardware level, the hardware architecture diagram can be seen in Figure 4 shown.
[0095] In one embodiment, the present specification provides a readable storage medium, wherein the readable storage medium stores machine executable instructions, and when the machine executable instructions are called and executed by a processor, the machine executable instructions prompt the processor to implement the aforementioned snapshot deletion method.
[0096] Here, the readable storage medium can be any electronic, magnetic, optical or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, the readable storage medium can be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as CD, DVD, etc.), or similar storage medium, or a combination thereof.
[0097] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.
[0098] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0099] It will be appreciated by those skilled in the art that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may be in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of this specification may be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0100] This specification is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0101] Moreover, these computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0102] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0103] It will be appreciated by those skilled in the art that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may be in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may be in the form of a computer program product implemented on one or more computer-usable storage media (which may include but are not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0104] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.
Claims
1. A snapshot deletion method, characterized in that: Applied to a storage system, the method comprises: According to the snapshot data associated with each snapshot deletion task in the snapshot deletion task queue, the snapshot data accumulation capacity is obtained, and if the snapshot data accumulation capacity is greater than a preset capacity threshold, the next step is executed; Detect the current local storage system business pressure parameter, if the current local storage system business pressure parameter is less than the preset pressure threshold, execute the next step; Improve the hardware performance resources allocated to the snapshot deletion task queue.
2. The method according to claim 1, characterized in that The step of obtaining the snapshot data accumulation capacity according to the snapshot data associated with each snapshot deletion task in the snapshot deletion task queue, and executing the next step if the snapshot data accumulation capacity is greater than a preset capacity threshold, includes: Traverse the snapshot deletion task queue, accumulate the snapshot data associated with each snapshot deletion task, and obtain the snapshot data accumulation capacity; Or, when the snapshot deletion task joins or exits the snapshot deletion task queue, a corresponding value is added to or subtracted from the value of the snapshot data accumulation capacity to obtain an updated snapshot data accumulation capacity.
3. The method according to claim 1, characterized in that The detecting the current local storage system business pressure parameter, if the current local storage system business pressure parameter is less than a preset pressure threshold, executing the next step, including: The business pressure parameter is the average hard disk load of the current local storage system, and the preset pressure threshold is the preset hard disk load threshold. If the average hard disk load of the current local storage system is less than the preset hard disk load threshold, the next step is executed.
4. The method according to claim 1, characterized in that: The step of improving the hardware performance resources allocated to the snapshot deletion task queue includes: Increase the number of concurrent tasks allowed in the snapshot deletion task queue.
5. The method according to claim 4, characterized in that The preset pressure threshold includes several sub-preset pressure thresholds, each sub-preset pressure threshold corresponds to a different task concurrency parameter, and the number of task concurrencies allowed for the snapshot deletion task queue is increased according to the task concurrency parameter corresponding to the lowest sub-preset pressure threshold among the sub-preset pressure thresholds that are higher than the business pressure parameter.
6. The method according to claim 1, characterized in that The detecting the current local storage system business pressure parameter, if the current local storage system business pressure parameter is less than a preset pressure threshold, executing the next step, further includes: If the current local storage system business pressure parameter is greater than or equal to the preset pressure threshold, a snapshot data accumulation alarm is initiated.
7. A snapshot deletion device, characterized in that: Applied to a storage system, the device comprises: The first module is used to obtain the snapshot data accumulation capacity according to the snapshot data associated with each snapshot deletion task in the snapshot deletion task queue, and if the snapshot data accumulation capacity is greater than a preset capacity threshold, call the next module; The second module is used to detect the current local storage system business pressure parameter. If the current local storage system business pressure parameter is less than a preset pressure threshold, the next module is called; The third module is used to improve the hardware performance resources allocated to the snapshot deletion task queue.
8. The device according to claim 7, characterized in that The method of obtaining the snapshot data accumulation capacity according to the snapshot data associated with each snapshot deletion task in the snapshot deletion task queue, and calling the next module if the snapshot data accumulation capacity is greater than a preset capacity threshold, includes: Traverse the snapshot deletion task queue, accumulate the snapshot data associated with each snapshot deletion task, and obtain the snapshot data accumulation capacity; Or, when the snapshot deletion task joins or exits the snapshot deletion task queue, a corresponding value is added to or subtracted from the value of the snapshot data accumulation capacity to obtain an updated snapshot data accumulation capacity.
9. The device according to claim 7, characterized in that The detecting the current local storage system business pressure parameter, if the current local storage system business pressure parameter is less than the preset pressure threshold, calling the next module includes: The business pressure parameter is the average hard disk load of the current local storage system, and the preset pressure threshold is the preset hard disk load threshold. If the average hard disk load of the current local storage system is less than the preset hard disk load threshold, the next module is called.
10. The device according to claim 7, characterized in that The step of improving the hardware performance resources allocated to the snapshot deletion task queue includes: Increase the number of concurrent tasks allowed in the snapshot deletion task queue.
11. The device according to claim 10, characterized in that The preset pressure threshold includes several sub-preset pressure thresholds, each sub-preset pressure threshold corresponds to a different task concurrency parameter, and the number of task concurrencies allowed for the snapshot deletion task queue is increased according to the task concurrency parameter corresponding to the lowest sub-preset pressure threshold among the sub-preset pressure thresholds that are higher than the business pressure parameter.
12. The device according to claim 7, characterized in that The detecting the current local storage system business pressure parameter, if the current local storage system business pressure parameter is less than a preset pressure threshold, calling the next module, also includes: If the current local storage system business pressure parameter is greater than or equal to the preset pressure threshold, a snapshot data accumulation alarm is initiated.
13. An electronic device, characterized in that: include: A processor and a readable storage medium, wherein the readable storage medium stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement any method described in claims 1-6.
14. A readable storage medium, characterized in that: The readable storage medium stores machine executable instructions, and when the machine executable instructions are called and executed by a processor, the machine executable instructions prompt the processor to implement any one of the methods of claims 1-6.
