Disk load dynamic adjustment method, system and device and computer readable storage medium
By responding to the dynamic adjustment request of disk load, the optimal capacity ratio is determined according to the preset disk weight allocation rules, and the disk load is adjusted when data is written, which solves the problem of unbalanced disk usage and realizes dynamic balancing and real-time disk load Adjustment.
Patent Information
- Application Number
- CN202411164059.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-08-22
AI Technical Summary
With the development of cloud computing and big data technology, differences in disk equipment capacity lead to unbalanced disk usage, which may cause data storage interruption or loss.
By responding to the dynamic adjustment request of the disk load, the initial capacity of the disk is obtained, the optimal capacity ratio is determined according to the preset disk weight allocation rules, and the data is written to the target disk according to the optimal capacity ratio when data is written, so as to achieve disk load dynamic adjustment.
Dynamic balancing of disk usage is achieved, and the capacity ratio is dynamically adjusted by real-time monitoring of disk capacity, ensuring real-time balance and balanced use of disk load.
Smart Images

Figure CN119166047A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data storage, and in particular to a method and device for dynamically adjusting disk load, and a computer-readable medium. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the application that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
[0003] With the rapid development of cloud computing and big data technologies in modern society, the means of production data accumulated in production and life has also grown exponentially, and massive storage technology has become an increasingly indispensable part of the development of the Internet.
[0004] Storage systems are used to store large amounts of data and use a large number of disk devices. In most cases, there are large differences in the capacity of disk devices. For example, as disks become larger or older devices are used, most current storage is not aware of capacity, resulting in uneven disk usage, which may cause data storage interruptions or even data loss.
[0005] Therefore, there is an urgent need to propose a disk load dynamic adjustment method, system, device and computer-readable storage medium that can solve the above technical problems. Summary of the invention
[0006] Multiple aspects of the present application provide a disk load dynamic adjustment method, system, device and computer-readable storage medium to achieve disk load balancing.
[0007] In one aspect of the present application, a method for dynamically adjusting disk load is provided, wherein the number of the disks is at least two, and the method comprises:
[0008] In response to a disk load dynamic adjustment request, obtaining an initial disk capacity of any of the disks;
[0009] Based on the initial disk capacity of the disk, and in accordance with a preset disk weight allocation rule, determining the optimal capacity ratio of the disk;
[0010] In response to a data write request, the data is written to the target disk according to the optimal capacity ratio to achieve dynamic adjustment of the disk load.
[0011] Furthermore, based on the initial disk capacity of the disk, the optimal capacity ratio of the disk is determined according to a preset disk weight allocation rule, including: determining the initial capacity ratio of the disk based on the initial disk capacity of the disk; and rounding the least common multiple of the initial capacity ratio to determine the optimal capacity ratio of the disk.
[0012] Furthermore, based on the initial disk capacity of the disk, the optimal capacity ratio of the disk is determined according to a preset disk weight allocation rule, including: obtaining the disk traffic limit of the disk and determining the disk traffic ratio of the disk; based on the initial disk capacity of the disk, obtaining the initial capacity ratio of the disk; and determining the optimal capacity ratio of the disk based on the disk traffic ratio of the disk and the initial capacity ratio of the disk.
[0013] Furthermore, in response to a data write request, data is written to the target disk according to the optimal capacity ratio, including: in response to the data write request, obtaining the remaining disk capacity of the disk; based on the remaining capacity of the disk, updating the optimal capacity ratio of the disk according to a preset disk weight update rule; and writing data to the target disk based on the updated optimal capacity ratio to achieve dynamic adjustment of the disk load.
[0014] Furthermore, based on the remaining capacity of the disk, the optimal capacity ratio of the disk is updated according to the preset disk weight update rule, including: obtaining the remaining capacity ratio of any two of the disks; if the remaining capacity ratio of any two of the disks is greater than a preset value, updating the optimal capacity ratio of the disk according to the preset disk weight allocation rule.
[0015] Furthermore, based on the initial disk capacity of the disk and in accordance with a preset disk weight allocation rule, after determining the optimal capacity ratio of the disk, the method also includes: based on the optimal capacity ratio of the disk, expanding the capacity of each of the disks and generating a disk list; wherein, there is at least one target disk in the disk list.
[0016] Another aspect of the present application provides a disk load dynamic adjustment system, the system comprising: a response unit for obtaining the initial disk capacity of any of the disks in response to a disk load dynamic adjustment request, wherein the number of the disks is at least two; a configuration unit for determining the optimal capacity ratio of the disks based on the initial disk capacity of the disks and according to a preset disk weight allocation rule; and a data writing unit for writing data to the target disk in response to a data write request according to the optimal capacity ratio to achieve dynamic adjustment of the disk load.
[0017] Another aspect of the present application provides an electronic device, the device comprising:
[0018] at least one processor; and
[0019] a memory communicatively connected to the at least one processor; wherein,
[0020] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the disk load dynamic adjustment method as described above.
[0021] In another aspect of the present application, a computer-readable storage medium is provided, on which computer program instructions are stored. The computer program instructions can be executed by a processor to implement the method for dynamically adjusting disk congestion.
[0022] Another aspect of the present application provides a computer program product, including a computer program, wherein the computer program implements the method for dynamically adjusting the disk load when executed by a processor.
[0023] In the solution provided in the embodiment of the present application, the optimal capacity ratio of the disk is determined according to the preset disk allocation rule and the initial disk capacity of the disk, so that the usage rate of the disks with capacity differences can be dynamically balanced.
[0024] Furthermore, the method further includes: in response to a data write request, obtaining the remaining disk capacity of the disk; based on the remaining capacity of the disk, updating the optimal capacity ratio of the disk according to a preset disk weight update rule; writing data to the target disk based on the updated optimal capacity ratio to achieve dynamic adjustment of the disk load. The capacity ratio of the disk is dynamically adjusted by real-time monitoring of the disk capacity, so as to achieve dynamic real-time adjustment of the disk usage and load. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0026] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0027] Figure 1 A flowchart of a method for dynamically adjusting disk load provided in an embodiment of the present application;
[0028] Figure 2 A schematic diagram of the architecture of disk expansion and target disk selection provided in an embodiment of the present application;
[0029] Figure 3 A schematic diagram of the structure of a disk load dynamic adjustment system provided in an embodiment of the present application;
[0030] Figure 4 A schematic diagram of the structure of an electronic device suitable for implementing the solution in the embodiments of the present application;
[0031] The same or similar reference numerals in the drawings represent the same or similar components. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0033] In a typical configuration of the present application, the terminal and the equipment of the service network each include one or more processors (CPU), input / output interface, network interface and memory.
[0034] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0035] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer program instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0036] The present application embodiment provides a method for dynamically adjusting disk load, where the number of disks is at least two, and the method includes:
[0037] In response to a disk load dynamic adjustment request, obtaining an initial disk capacity of any of the disks;
[0038] Based on the initial disk capacity of the disk, and in accordance with a preset disk weight allocation rule, determining the optimal capacity ratio of the disk;
[0039] In response to a data write request, the data is written to the target disk according to the optimal capacity ratio to achieve dynamic adjustment of the disk load.
[0040] In actual scenarios, the execution subject of the method can be a user device, or a device formed by integrating a user device and a network device through a network, or an application running on the above device. The user device includes but is not limited to various terminal devices such as computers, mobile phones, tablet computers, smart watches, and bracelets. The network device includes but is not limited to network hosts, single network servers, multiple network server sets, or cloud computing-based computer sets, which can be used to implement some processing functions when setting an alarm. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing, where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computer sets.
[0041] Embodiment 1
[0042] Figure 1 The present invention provides a method for dynamically adjusting disk loads, and the method includes at least the following steps:
[0043] Step S101, in response to a disk load dynamic adjustment request, obtaining an initial disk capacity of any disk;
[0044] Step S102, based on the initial disk capacity of the disk and according to a preset disk weight allocation rule, determining the optimal capacity ratio of the disk;
[0045] Step S103, in response to the data write request, writing the data to the target disk according to the optimal capacity ratio to achieve dynamic adjustment of the disk load.
[0046] In one embodiment, based on the initial disk capacity of the disk, the optimal capacity ratio of the disk is determined according to a preset disk weight allocation rule, including: determining the initial capacity ratio of the disk based on the initial disk capacity of the disk; and rounding the least common multiple of the initial capacity ratio to determine the optimal capacity ratio of the disk.
[0047] Specifically, when there are three disks, the disk capacities of the three disks are 13T, 15T, and 7T respectively, and the initial capacity ratio is determined to be 13:15:7; according to the initial capacity ratio and the disk weight allocation rule, the optimal capacity ratio of the three disks is determined to be 7:8:4. Among them, the disk weight allocation rule is to take the lowest common multiple of the initial capacity ratio.
[0048] In one embodiment, based on the initial disk capacity of the disk and in accordance with a preset disk weight allocation rule, the optimal capacity ratio of the disk is determined, including: obtaining the disk traffic limit of the disk and determining the disk traffic ratio of the disk; based on the initial disk capacity of the disk, obtaining the initial capacity ratio of the disk; and determining the optimal capacity ratio of the disk based on the disk traffic ratio of the disk and the initial capacity ratio of the disk.
[0049] In one embodiment, in response to a data write request, data is written to the target disk according to the optimal capacity ratio, including: in response to the data write request, obtaining the remaining disk capacity of the disk; based on the remaining capacity of the disk, updating the optimal capacity ratio of the disk according to a preset disk weight update rule; writing data to the target disk based on the updated optimal capacity ratio to achieve dynamic adjustment of the disk load.
[0050] In one embodiment, based on the remaining capacity of the disk, the optimal capacity ratio of the disk is updated according to the preset disk weight update rule, including: obtaining the remaining capacity ratio of any two of the disks; if the remaining capacity ratio of any two of the disks is greater than a preset value, updating the optimal capacity ratio of the disk according to the preset disk weight allocation rule.
[0051] Specifically, when it is necessary to adjust the disk capacity or adjust the bandwidth of different machines, such as when the disk capacity of the disk is only half and the amount of data written to this disk needs to be reduced, the capacity ratio can be set to 1:2 according to the specific usage. If the load of the disk cluster (i.e., a disk containing at least two disks) is very high, the capacity ratio of 1:2 may cause pressure on the large-capacity disk. Then the capacity ratio can be modified to 3:5, 4:7, etc. according to the actual usage. The reason for the need for modification is that when the capacity ratio is determined in this application, the disk capacity unit of the disk is T. Therefore, when the ratio between the two disks is still very different, the storage pressure on the large-capacity disk will increase.
[0052] In one embodiment, after determining the optimal capacity ratio of the disk based on the initial disk capacity of the disk and in accordance with a preset disk weight allocation rule, the method further includes: based on the optimal capacity ratio of the disk, expanding the capacity of each disk and generating a disk list; wherein there is at least one target disk in the disk list.
[0053] Specifically, three disks (Disk1, Disk2, Disk3) with capacities of 13T, 15T, and 7T are used as an example for explanation; Figure 2As shown in the figure, the disk capacities of Disk1, Disk2, and Disk3 are 13T, 15T, and 7T respectively, so the initial capacity ratio of Disk1:Disk2:Disk3 is determined to be 13:15:7; according to the initial capacity ratio and the disk weight allocation rule, the optimal capacity ratio of Disk1:Disk2:Disk3 is determined to be 7:8:4; based on the optimal capacity ratio of Disk1, Disk2, and Disk3, Disk1, Disk2, and Disk3 are expanded respectively, and the following is generated: 1, disk12, disk13, disk14, disk15, disk16, disk17, disk21, disk22, disk23, disk24, disk25, disk26, disk27, disk28, disk31, disk32, disk33, disk34]; select the target disk based on the generated disk list, and determine that at least one of disk11-disk34 is the target disk. Disk11-disk17 is the expansion result of the disk (Disk1) with a disk capacity of 13T; disk21-disk28 is the expansion result of the disk (Disk2) with a disk capacity of 15T; disk31-disk34 is the expansion result of the disk (Disk3) with a disk capacity of 7T.
[0054] In one embodiment, if Figure 2 As shown, the disk load dynamic adjustment method described in the present application is applied to a disk load dynamic adjustment device, which includes a configuration center, and the initial capacity ratio, optimal capacity ratio and usage status of any disk are stored in the configuration center; when the optimal capacity ratio needs to be modified, the configuration can be modified directly in the configuration center to achieve automatic adjustment of the disk capacity ratio.
[0055] Specifically, all disk capacity ratios in this application are stored in the configuration center, and the optimal capacity ratio of the disks in the configuration center can be manually / automatically modified. In this way, only one modification is needed to make the entire disk load dynamic adjustment system automatically sensed, so as to realize the automatic monitoring of the (optimal) capacity ratio of the disk. It should be understood that the configuration center described in this application is a unit of the same management configuration, and can perceive the changes of the system configuration (such as the optimal capacity ratio of the disk) in real time during its operation.
[0056] Embodiment 2
[0057] In addition, the present application also provides a disk load dynamic adjustment system, the structure of the system is as follows: Figure 3 As shown, the system includes at least two disks, and the system includes:
[0058] A response unit, configured to obtain an initial disk capacity of any of the disks in response to a request for dynamic adjustment of the disk load;
[0059] A configuration unit, configured to determine the optimal capacity ratio of the disk based on the initial disk capacity of the disk and according to a preset disk weight allocation rule;
[0060] The data writing unit is used to respond to a data writing request and write data to the target disk according to the optimal capacity ratio to achieve dynamic adjustment of the disk load.
[0061] Embodiment 3
[0062] Based on the same inventive concept, an electronic device is also provided in an embodiment of the present application, and the method corresponding to the electronic device may be the disk load dynamic adjustment method in the aforementioned embodiment, and its principle of solving the problem is similar to that of the method. The electronic device provided in an embodiment of the present application includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the methods and / or technical solutions of the aforementioned multiple embodiments of the present application.
[0063] The electronic device may be a user device, or a device formed by integrating a user device and a network device through a network, or may be an application running on the above device. The user device includes but is not limited to various terminal devices such as computers, mobile phones, tablet computers, smart watches, and bracelets. The network device includes but is not limited to network hosts, single network servers, multiple network server sets, or cloud computing-based computer sets, which can be used to implement some processing functions when setting an alarm. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing, where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computer sets.
[0064] Figure 4The structure of a device suitable for implementing the method and / or technical solution in the embodiment of the present application is shown, and the device 400 includes a central processing unit (CPU, Central Processing Unit) 401, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM, Read Only Memory) 402 or the program loaded from the storage part 408 to the random access memory (RAM, Random Access Memory) 403. In RAM 403, various programs and data required for system operation are also stored. CPU 401, ROM 402 and RAM 403 are connected to each other through bus 404. Input / output (I / O, Input / Output) interface 405 is also connected to bus 404.
[0065] The following components are connected to the I / O interface 405: an input section 406 including a keyboard, a mouse, a touch screen, a microphone, an infrared sensor, etc.; an output section 407 including a cathode ray tube (CRT), a liquid crystal display (LCD), an LED display, an OLED display, etc., and a speaker, etc.; a storage section 408 including one or more computer-readable media such as a hard disk, an optical disk, a magnetic disk, a semiconductor memory, etc.; and a communication section 409 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 409 performs communication processing via a network such as the Internet.
[0066] In particular, the methods and / or embodiments in the embodiments of the present application may be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. When the computer program is executed by the central processing unit (CPU) 401, the above functions defined in the method of the present application are executed.
[0067] Embodiment 4
[0068] Another embodiment of the present application further provides a computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions can be executed by a processor to implement the methods and / or technical solutions of any one or more embodiments of the present application described above.
[0069] Specifically, the present embodiment may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device, or device.
[0070] Computer readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than a computer readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0071] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0072] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0073] Embodiment 5
[0074] This embodiment provides a computer program product, including a computer program, which implements the aforementioned disk load dynamic adjustment method when executed by a processor.
[0075] The flow chart or block diagram in the accompanying drawings shows the possible architecture, function and operation of the equipment, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated system for hardware that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0076] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0077] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or page components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0078] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0079] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0080] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.
[0081] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
[0082] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in a device claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
Claims
1. A method for dynamically adjusting disk load, wherein: The number of the disks is at least two, and the method comprises: In response to a disk load dynamic adjustment request, obtaining an initial disk capacity of any of the disks; Based on the initial disk capacity of the disk, and in accordance with a preset disk weight allocation rule, determining the optimal capacity ratio of the disk; In response to a data write request, the data is written to the target disk according to the optimal capacity ratio to achieve dynamic adjustment of the disk load.
2. The method for dynamically adjusting disk load according to claim 1, wherein: Based on the initial disk capacity of the disk and according to a preset disk weight allocation rule, determining the optimal capacity ratio of the disk includes: Determining an initial capacity ratio of the disk based on an initial disk capacity of the disk; The least common multiple of the initial capacity ratio is rounded to determine the optimal capacity ratio of the disk.
3. The method for dynamically adjusting disk load according to claim 1, wherein: Based on the initial disk capacity of the disk and according to a preset disk weight allocation rule, determining the optimal capacity ratio of the disk includes: Obtaining a disk flow limit value of the disk and determining a disk flow ratio of the disk; Based on the initial disk capacity of the disk, obtaining an initial capacity ratio of the disk; Based on the disk flow ratio of the disk and the initial capacity ratio of the disk, an optimal capacity ratio of the disk is determined.
4. The method for dynamically adjusting disk load according to claim 2 or 3, wherein: In response to a data write request, writing data to a target disk according to the optimal capacity ratio includes: In response to a data write request, obtaining a remaining disk capacity of the disk; Based on the remaining capacity of the disk, according to a preset disk weight update rule, updating the optimal capacity ratio of the disk; Data is written to the target disk based on the updated optimal capacity ratio to achieve dynamic adjustment of the disk load.
5. The method for dynamically adjusting disk load according to claim 4, wherein: Based on the remaining capacity of the disk, according to a preset disk weight update rule, the optimal capacity ratio of the disk is updated, including: Obtaining the remaining capacity ratio of any two disks; If the remaining capacity ratio of any two disks is greater than a preset value, the optimal capacity ratio of the disks is updated according to a preset disk weight allocation rule.
6. The method for dynamically adjusting disk load according to claim 4, wherein: After determining the optimal capacity ratio of the disk based on the initial disk capacity of the disk and according to a preset disk weight allocation rule, the method further includes: Based on the optimal capacity ratio of the disks, the capacity of each disk is expanded to generate a disk list; There is at least one target disk in the disk list.
7. A disk load dynamic adjustment system, wherein: The system comprises: A response unit, configured to obtain an initial disk capacity of any of the disks in response to a disk load dynamic adjustment request, wherein the number of the disks is at least two; A configuration unit, configured to determine the optimal capacity ratio of the disk based on the initial disk capacity of the disk and according to a preset disk weight allocation rule; The data writing unit is used to respond to a data writing request and write data to the target disk according to the optimal capacity ratio to achieve dynamic adjustment of the disk load.
8. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.
9. A computer readable medium having computer program instructions stored thereon, wherein the computer program instructions can be executed by a processor to implement the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Load balancing method and device, node and computer readable storage medium
CN110781006A
Disk allocation method and device for distributed storage cluster and distributed storage cluster
CN114816241A
Data storage method and device, nonvolatile storage medium and electronic equipment
CN117076565A
Data storage system and method of routing or assigning disk write requests among a set of disks using weighted available disk space values
US6317808B1
