Network card-based storage optimization method, system, electronic device and storage medium
By dynamically adjusting the number of CPU core resources in the network card resource pool, the problem of unreasonable resource allocation in the existing technology is solved, the performance of the storage server is improved, resource waste and performance bottlenecks are avoided, and efficient storage optimization is achieved.
Patent Information
- Application Number
- CN202210730635.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-24
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2042-06-24
AI Technical Summary
Existing storage optimization solutions ignore the characteristics of different workloads and dynamic memory requirements, resulting in unreasonable resource allocation, unable to effectively improve the performance of all-flash servers, and unable to avoid network card performance bottlenecks.
By determining the allocation range of CPU core resources based on the physical memory location of the network card, establishing and adjusting the network card resource pool, dynamically adjusting the number of CPU core resources to adapt to changes in usage, and optimizing storage performance.
It maximizes resource utilization, avoids resource waste, improves the read and write IOPS performance of the storage server, ensures that the network card always maintains the highest performance, and saves costs.
Smart Images

Figure CN115113817B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of storage technology, and in particular to a storage optimization method, system, electronic device and storage medium based on a network card. Background Art
[0002] The tide of technology has ushered in the era of flash storage, and the widespread adoption of flash arrays is unstoppable. The implementation of technologies such as artificial intelligence, big data, cloud computing, 5G, and the Internet of Things has led to an explosion of massive amounts of data and an unprecedented demand for extreme performance. All-flash storage applications have historically focused on core transaction systems with low response latency requirements and high IOPS (Input / Output Operations Per Second) requirements, such as online transactions in traditional financial systems. These core systems typically require storage systems with performance of up to 8,000 IOPS / TB. With the increasing demand for all-flash storage, improving the performance of all-flash servers and maximizing their capabilities have become significant challenges for major storage vendors.
[0003] Existing storage optimization solutions typically statically allocate resources to computers to manage storage based on computer system settings. However, these solutions ignore the characteristics of different workloads and dynamic memory requirements. Furthermore, existing optimization strategies fail to incorporate relevant task scheduling information from the system architecture, resulting in lost optimization opportunities. Some storage optimization solutions that rely on CPU core binding simply bind network cards to a fixed number of CPU cores. This results in high optimization costs, poor utilization of existing resources, and a significant waste of resources. Furthermore, these solutions cannot avoid network card performance bottlenecks.
[0004] Therefore, there is an urgent need for a storage optimization method that can guarantee network card performance and reasonable resource allocation to solve the above technical problems of the prior art. Summary of the Invention
[0005] In order to address the deficiencies of the prior art, the main purpose of the present invention is to provide a network card-based storage optimization method, system, electronic device and storage medium to solve the above-mentioned technical problems of the prior art.
[0006] In order to achieve the above objectives, the present invention provides a first aspect of a network card-based storage optimization method, the method comprising:
[0007] Determine the allocation range of the network card CPU core resources based on the physical memory location corresponding to the network card;
[0008] Establishing a network card resource pool based on the network card CPU core resources within the allocation range;
[0009] According to the utilization rate of the network card CPU core resources and preset rules, the number of network card CPU core resources in the network card resource pool is adjusted and the network card resource pool is updated;
[0010] The network card resource pool is used to optimize the storage of the server.
[0011] In some embodiments, adjusting the number of network card CPU core resources in the network card resource pool and updating the network card resource pool according to the utilization rate of the network card CPU core resources and preset rules includes:
[0012] Comparing the utilization rate of each network card CPU core resource with an idle threshold;
[0013] If the usage rate of any network card CPU core resource is less than the idle threshold, the number of network card CPU core resources in the network card resource pool is reduced according to the step size until the usage rate of each network card CPU core resource is greater than the idle threshold.
[0014] In some embodiments, adjusting the number of network card CPU core resources in the network card resource pool and updating the network card resource pool according to the utilization rate of the network card CPU core resources and preset rules further includes:
[0015] Comparing the utilization rate of each network card CPU core resource with a busy threshold;
[0016] If the usage rate of any network card CPU core resource is greater than the busy threshold, the number of network card CPU core resources in the network card resource pool is increased according to the step size until the usage rate of each network card CPU core resource is less than the busy threshold and the number of network card CPU core resources is less than or equal to the maximum number of network card CPU core resources within the allocated range.
[0017] In some embodiments, the method further comprises:
[0018] If the usage rate of each network card CPU core resource in the network card resource pool is greater than the busy threshold and the number of allocated network card CPU core resources reaches the maximum value, an alarm message is generated to remind the user that the network card resource pool resources are tight.
[0019] In some embodiments, establishing a network card resource pool according to the network card CPU core resources within an allocation range further comprises:
[0020] When the network card resource pool is enabled, a preset number of the network card CPU core resources are selected within the range of the network card CPU core resources to construct the network card resource pool.
[0021] In some embodiments, the method further comprises:
[0022] Detect CPU usage fluctuation ratio;
[0023] The step size is determined according to the CPU usage fluctuation ratio and preset conditions.
[0024] In some embodiments, the method further comprises:
[0025] Screening the processes in the network card resource pool;
[0026] Excluding the non-network card processes in the filtered network card resource pool from the network card resource pool;
[0027] The non-network card process is taken over by the CPU core resources outside the network card resource pool.
[0028] In a second aspect, the present application provides a network card-based storage optimization system, the system comprising:
[0029] The core allocation module is used to determine the allocation range of the network card CPU core resources according to the physical memory location corresponding to the network card;
[0030] A data preparation module, configured to establish a network card resource pool according to the network card CPU core resources within an allocation range;
[0031] A core adjustment module, configured to adjust the number of network card CPU core resources in the network card resource pool and update the network card resource pool according to the utilization rate of the network card CPU core resources and preset rules;
[0032] The resource processing module is used to utilize the network card resource pool to complete the storage optimization of the server.
[0033] In a third aspect, the present application provides an electronic device, comprising:
[0034] one or more processors;
[0035] and a memory associated with the one or more processors, the memory being configured to store program instructions, wherein the program instructions, when read and executed by the one or more processors, perform the following operations:
[0036] Determine the allocation range of the network card CPU core resources based on the physical memory location corresponding to the network card;
[0037] Establishing a network card resource pool based on the network card CPU core resources within the allocation range;
[0038] According to the utilization rate of the network card CPU core resources and preset rules, the number of network card CPU core resources in the network card resource pool is adjusted and the network card resource pool is updated;
[0039] The network card resource pool is used to optimize the storage of the server.
[0040] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program causes a computer to perform the following operations:
[0041] Determine the allocation range of the network card CPU core resources based on the physical memory location corresponding to the network card;
[0042] Establishing a network card resource pool based on the network card CPU core resources within the allocation range;
[0043] According to the utilization rate of the network card CPU core resources and preset rules, the number of network card CPU core resources in the network card resource pool is adjusted and the network card resource pool is updated;
[0044] The network card resource pool is used to optimize the storage of the server.
[0045] The beneficial effects achieved by this application are:
[0046] The present application provides a storage optimization method based on a network card, including determining the allocation range of the network card CPU core resources according to the physical memory location corresponding to the network card; establishing a network card resource pool according to the network card CPU core resources within the allocation range; adjusting the number of network card CPU core resources in the network card resource pool and updating the network card resource pool according to the utilization rate of the network card CPU core resources and preset rules; and completing the storage optimization of the server using the network card resource pool. By dynamically adjusting the number of CPU core resources in the network card resource pool, the network card resource pool can be applied to storage servers with different configurations, maximizing the resource utilization of the storage server; in addition, ensuring that the network card always maintains the highest performance while avoiding the waste of resources caused by allocating too many CPU core resources to the network card; further, by rationally utilizing existing resources, without upgrading to better hardware, the performance of the storage server such as read and write IOPS can be effectively and significantly improved, which is more conducive to saving costs and maximizing the value of existing resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present application. Those skilled in the art can also derive other drawings based on these drawings without inventive work, among which:
[0048] Figure 1 This is a schematic diagram of the network card resource pool provided in an embodiment of the present application;
[0049] Figure 2This is a flow chart of a network card-based storage optimization method provided in an embodiment of the present application;
[0050] Figure 3 This is a diagram of the network card-based storage optimization system architecture provided in an embodiment of the present application;
[0051] Figure 4 This is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0052] To make the purpose, technical solutions, and advantages of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0053] It should be understood that in the description of this application, unless the context clearly requires otherwise, words such as "include", "comprises", and the like throughout the specification and claims should be interpreted as inclusive rather than exclusive or exhaustive; that is, as "including but not limited to".
[0054] It should also be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, the meaning of "plurality" is two or more.
[0055] It should be noted that the terms "S1", "S2", etc. are used only for the purpose of describing the steps and do not specifically refer to the order or sequence, nor are they used to limit this application. They are merely for the convenience of describing the method of this application and should not be understood as indicating the order of the steps. In addition, the technical solutions between the various embodiments can be combined with each other, but this must be based on the fact that ordinary technicians in this field can implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0056] As we know from the background, traditional storage optimization solutions typically statically allocate resources for computers, ignoring the computer's dynamic memory requirements and the varying loads generated by different tasks and processes. Even the subsequent storage optimization solution involving CPU core binding simply binds network cards to a fixed number of CPU cores, failing to dynamically allocate resources. This results in a certain amount of resource waste and fails to balance network card performance.
[0057] To solve the above technical problems, this application provides a network card-based storage optimization method to ensure the highest performance of the network card in the current storage server while avoiding allocating too many CPU cores to the network card, resulting in resource waste or affecting the normal acquisition of CPU resources by other services.
[0058] Example 1
[0059] like Figure 1 As shown, the embodiment of the present application provides a network card resource pool, including a pressure monitoring module, a CPU core allocation module, and a non-network card process monitoring and takeover module; specifically, the process of optimizing the allocation of server resources by applying the network card resource pool disclosed in this embodiment includes:
[0060] S1. Establish a network card resource pool.
[0061] Specifically, first obtain the physical memory location corresponding to the network card, that is, the NUMA (Non Uniform Memory Access Architecture) location; by referring to the CPU core resource distribution map of NUMA, determine the CPU core resources (that is, the network card CPU core resources) that can be used to build the network card resource pool. Secondly, when preliminarily building the network card resource pool, select a preset number of CPU core resources within the range of CPU core resources that can be used to build the network card resource pool to build the network card resource pool in the initial state. For example, the physical memory location corresponding to the network card is 6, that is, NUMA is 6. At this time, according to the relationship between NUMA and CPU core resources, it can be determined that the range of CPU core resources used to build the network card resource pool corresponding to the network card is CPU cores 48-55 and CPU cores 112-119; preferably, when preliminarily building the network card resource pool, 8 CPU cores can be selected within the range of CPU cores 48-55 and CPU cores 112-119 to build the network card resource pool. It is worth noting that the above selection of 8 CPU cores is only one selection situation, and this application does not limit the preset number of selected CPU core resources.
[0062] After initially creating the network card resource pool, you can create a systemd unit and design three modules: a pressure monitoring module, a CPU core allocation module, and a non-network card process monitoring and takeover module. These three modules can be named using the commands dynamic_pool_monitor.service, dynamic_pool_allocation.service, and dynamic_pool_nonet_monitor.service. The pressure monitoring module can also define a trigger switch to enable the dynamic resource pool as needed.
[0063] S2. Monitor the utilization rate of the CPU core resources of each network card in the network card resource pool, and dynamically adjust the number of network card CPU core resources in the network card resource pool according to preset rules.
[0064] Specifically, the network card resource pool reads the utilization rate of the network card CPU core resources through the pressure monitoring module after a preset time period and compares it with the pre-set busy threshold and idle threshold. The CPU core allocation module dynamically adjusts the number of CPU core resources in the network card according to the utilization rate of the network card CPU core resources read by the pressure monitoring module. Among them, the above-mentioned preset time period can be 1 second or 2 seconds, which is not limited in this application; preferably, the above-mentioned busy threshold can be set to 95%, and the idle threshold can be set to 50%. When applied to specific scenarios, they can be modified according to actual needs, which is not limited in this application.
[0065] If the CPU core resource usage of any NIC in the NIC resource pool is lower than the idle threshold, the CPU core resources in the NIC resource pool need to be reduced to ensure proper CPU resource allocation and avoid resource waste. Specifically, the CPU core resources in the NIC resource pool can be sequentially reduced according to a set step size until the CPU core usage of each NIC is higher than the idle threshold and lower than the busy threshold.
[0066] If the usage rate of any NIC CPU core resource in the NIC resource pool exceeds the busy threshold, in order to ensure that the NIC can work with high performance, it is necessary to increase the NIC CPU core resources in the NIC resource pool. Specifically, the NIC CPU core resources in the NIC resource pool can be increased sequentially according to the set step size, until the usage rate of each NIC CPU core resource is less than the busy threshold and the increased NIC CPU core cannot exceed the maximum number of CPU core resources that can be used to build the NIC resource pool as specified in the NUMA CPU core resource distribution map. If the number of NIC CPU core resources allocated in the NIC resource pool reaches the maximum value but there are still NIC CPU core resources with a usage rate exceeding the busy threshold, an alarm message is generated to remind the user that the storage performance of the NIC has reached its limit, and the user can add other services or devices that can perform storage.
[0067] The step size can be set based on the CPU usage fluctuation ratio. For example, if CPU usage fluctuates within 10%, the step size can be 1-2; if CPU usage fluctuates between 10% and 30%, the step size can be 3-4; and if CPU usage fluctuates above 30%, the step size can be 5-6. In other words, if CPU pressure fluctuates significantly, increasing the step size can more quickly adjust the number of CPU cores in the network card resource pool to achieve optimal resource utilization more quickly.
[0068] In addition, this application can also identify non-network card processes in the network card resource pool through the non-network card process monitoring and takeover module (whether it is a network card process can be identified through the command pwdx xxxx); when the non-network card process number is identified, the corresponding non-network card process will be taken out of the network card resource pool and taken over by other CPU core resources outside the network card to ensure that the network card can work with high performance.
[0069] This application differs from traditional storage optimization methods. Taking into account the particularity of the storage server's network card resource usage, a dynamic network card resource pool is set up. By setting the step size, busy threshold, and idle threshold, the number of CPU core resources in the network card resource pool is dynamically adjusted to suit storage servers with various configurations. This maximizes the resource utilization of the storage server and significantly improves the storage server's performance in reading and writing IPOS. At the same time, the entire adjustment process requires no human intervention, achieving automation to ensure the efficient operation of the storage server.
[0070] Example 2
[0071] Corresponding to the above embodiment 1, the embodiment of the present application also provides a storage optimization method based on a network card, such as Figure 2 As shown, the details are as follows:
[0072] 2100. Determine the allocation range of the network card CPU core resources according to the physical memory location corresponding to the network card;
[0073] 2200. Establish a network card resource pool according to the network card CPU core resources within the allocation range;
[0074] Preferably, the establishing of a network card resource pool according to the network card CPU core resources within the allocation range further comprises:
[0075] 2210 When the network card resource pool is enabled, a preset number of the network card CPU core resources are selected within the range of the network card CPU core resources to construct the network card resource pool.
[0076] 2300. According to the utilization rate of the network card CPU core resources and a preset rule, adjust the number of network card CPU core resources in the network card resource pool and update the network card resource pool;
[0077] Preferably, adjusting the number of network card CPU core resources in the network card resource pool and updating the network card resource pool according to the utilization rate of the network card CPU core resources and preset rules includes:
[0078] 2310. Compare the utilization rate of each network card CPU core resource with the idle threshold;
[0079] 2320. If the usage rate of any network card CPU core resource is less than the idle threshold, the number of network card CPU core resources in the network card resource pool is reduced according to the step size until the usage rate of each network card CPU core resource is greater than the idle threshold.
[0080] Preferably, the adjusting the number of network card CPU core resources in the network card resource pool and updating the network card resource pool according to the utilization rate of the network card CPU core resources and preset rules further includes:
[0081] 2330. Compare the usage rate of each network card CPU core resource with a busy threshold;
[0082] 2340. If the usage rate of any network card CPU core resource is greater than the busy threshold, the number of network card CPU core resources in the network card resource pool is increased according to the step size until the usage rate of each network card CPU core resource is less than the busy threshold and the number of network card CPU core resources is less than or equal to the maximum value of the number of network card CPU core resources within the allocated range.
[0083] Preferably, the method further comprises:
[0084] 2350. If the usage rate of each network card CPU core resource in the network card resource pool is greater than the busy threshold and the number of allocated network card CPU core resources reaches the maximum value, an alarm message is generated to remind the user that the network card resource pool resources are tight.
[0085] Preferably, the method further comprises:
[0086] 2360, detect CPU usage fluctuation ratio;
[0087] 2370. Determine the step size based on the CPU usage fluctuation ratio and preset conditions.
[0088] 2400. Use the network card resource pool to complete storage optimization of the server.
[0089] Preferably, the method further comprises:
[0090] 2410. Filter the processes in the network card resource pool;
[0091] 2420. Exclude the non-network card processes in the network card resource pool from the network card resource pool.
[0092] 2430. The non-network card process is taken over by CPU core resources outside the network card resource pool.
[0093] Example 3
[0094] like Figure 3As shown, corresponding to the above-mentioned embodiment 1 and embodiment 2, the embodiment of the present application provides a network card-based storage optimization system, the system comprising:
[0095] The core allocation module 310 is used to determine the allocation range of the network card CPU core resources according to the physical memory location corresponding to the network card;
[0096] A data preparation module 320 is configured to establish a network card resource pool according to the network card CPU core resources within an allocation range;
[0097] The core adjustment module 330 is used to adjust the number of network card CPU core resources in the network card resource pool and update the network card resource pool according to the utilization rate of the network card CPU core resources and preset rules;
[0098] The resource processing module 340 is used to utilize the network card resource pool to complete the storage optimization of the server.
[0099] In some embodiments, the core adjustment module 330 is also used to compare the usage rate of each network card CPU core resource with the idle threshold; the core adjustment module 330 is also used to reduce the number of network card CPU core resources in the network card resource pool according to the step size when the usage rate of any network card CPU core resource is less than the idle threshold, until the usage rate of each network card CPU core resource is greater than the idle threshold.
[0100] In some embodiments, the core adjustment module 330 is also used to compare the usage rate of each of the network card CPU core resources with the busy threshold; the core adjustment module 330 is also used to increase the number of network card CPU core resources in the network card resource pool according to the step size when the usage rate of any network card CPU core resource is greater than the busy threshold, until the usage rate of each network card CPU core resource is less than the busy threshold and the number of network card CPU core resources is less than or equal to the maximum value of the number of network card CPU core resources within the allocated range.
[0101] In some embodiments, the core adjustment module 330 is also used to generate an alarm message to remind the user that the network card resource pool resources are tight when the usage rate of each network card CPU core resource in the network card resource pool is greater than the busy threshold and the number of allocated network card CPU core resources reaches the maximum value.
[0102] In some embodiments, the data preparation module 320 is further configured to select a preset number of the network card CPU core resources within the range of the network card CPU core resources to construct the network card resource pool when the network card resource pool is enabled.
[0103] In some embodiments, the core adjustment module 330 is further configured to detect a CPU usage fluctuation ratio; the core adjustment module 330 is further configured to determine the step size according to the CPU usage fluctuation ratio and a preset condition.
[0104] In some embodiments, the storage optimization system also includes a process screening module 350 (not shown in the figure), which is used to screen the processes in the network card resource pool; the process screening module 350 is also used to exclude the non-network card processes in the network card resource pool that are screened from the network card resource pool; wherein, the non-network card processes are taken over by the CPU core resources outside the network card resource pool.
[0105] Example 4
[0106] Corresponding to all the above embodiments, an embodiment of the present application provides an electronic device, including:
[0107] One or more processors; and a memory associated with the one or more processors, the memory being configured to store program instructions, the program instructions being configured to perform the following operations when read and executed by the one or more processors:
[0108] Determine the allocation range of the network card CPU core resources based on the physical memory location corresponding to the network card;
[0109] Establishing a network card resource pool based on the network card CPU core resources within the allocation range;
[0110] According to the utilization rate of the network card CPU core resources and preset rules, the number of network card CPU core resources in the network card resource pool is adjusted and the network card resource pool is updated;
[0111] The network card resource pool is used to optimize the storage of the server.
[0112] In some implementation scenarios, the following operations are also performed:
[0113] Comparing the utilization rate of each network card CPU core resource with an idle threshold;
[0114] If the usage rate of any network card CPU core resource is less than the idle threshold, the number of network card CPU core resources in the network card resource pool is reduced according to the step size until the usage rate of each network card CPU core resource is greater than the idle threshold.
[0115] In some implementation scenarios, the following operations are also performed:
[0116] Comparing the utilization rate of each network card CPU core resource with a busy threshold;
[0117] If the usage rate of any network card CPU core resource is greater than the busy threshold, the number of network card CPU core resources in the network card resource pool is increased according to the step size until the usage rate of each network card CPU core resource is less than the busy threshold and the number of network card CPU core resources is less than or equal to the maximum number of network card CPU core resources within the allocated range.
[0118] In some implementation scenarios, the following operations are also performed:
[0119] If the usage rate of each network card CPU core resource in the network card resource pool is greater than the busy threshold and the number of allocated network card CPU core resources reaches the maximum value, an alarm message is generated to remind the user that the network card resource pool resources are tight.
[0120] In some implementation scenarios, the following operations are also performed:
[0121] When the network card resource pool is enabled, a preset number of the network card CPU core resources are selected within the range of the network card CPU core resources to construct the network card resource pool.
[0122] In some implementation scenarios, the following operations are also performed:
[0123] Detect CPU usage fluctuation ratio;
[0124] The step size is determined according to the CPU usage fluctuation ratio and preset conditions.
[0125] In some implementation scenarios, the following operations are also performed:
[0126] Screening the processes in the network card resource pool;
[0127] Excluding the non-network card processes in the filtered network card resource pool from the network card resource pool;
[0128] The non-network card process is taken over by the CPU core resources outside the network card resource pool.
[0129] in, Figure 4 The electronic device architecture is shown as an example, and may include a processor 410, a video display adapter 411, a disk drive 412, an input / output interface 413, a network interface 414, and a memory 420. The processor 410, the video display adapter 411, the disk drive 412, the input / output interface 413, the network interface 414, and the memory 420 may be communicatively connected via a bus 430.
[0130] Among them, the processor 410 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., to execute relevant programs to implement the technical solutions provided in this application.
[0131] The memory 420 can be implemented in the form of ROM (Read Only Memory, programmable memory), RAM (Random Access Memory, random access memory), static storage device, dynamic storage device, etc. The memory 420 can store an operating system 421 for controlling the execution of the electronic device 400, and a basic input and output system (BIOS) 422 for controlling the low-level operations of the electronic device 400. In addition, a web browser 423, a data storage management system 424, and an icon font processing system 425, etc. can also be stored. The above-mentioned icon font processing system 425 can be an application program that specifically implements the operations of the aforementioned steps in the embodiment of the present application. In short, when the technical solution provided by the present application is implemented by software or firmware, the relevant program code is stored in the memory 420 and is called and executed by the processor 410.
[0132] The input / output interface 413 is used to connect input / output modules to implement information input and output. The input / output modules can be configured as components in the device (not shown in the figure) or can be externally connected to the device to provide corresponding functions. Input devices may include a keyboard, mouse, touch screen, microphone, various sensors, etc., and output devices may include a display, speaker, vibrator, indicator light, etc.
[0133] The network interface 414 is used to connect to a communication module (not shown) to enable communication between the device and other devices. The communication module can communicate via a wired method (such as USB, network cable, etc.) or a wireless method (such as mobile network, WiFi, Bluetooth, etc.).
[0134] The bus 430 comprises a pathway for transmitting information between the various components of the device (eg, the processor 410 , the video display adapter 411 , the disk drive 412 , the input / output interface 413 , the network interface 414 , and the memory 420 ).
[0135] In addition, the electronic device 400 can also obtain information on specific collection conditions from the virtual resource object collection condition information database for use in condition judgment, etc.
[0136] It should be noted that although the above device only shows the processor 410, video display adapter 411, disk drive 412, input / output interface 413, network interface 414, memory 420, bus 430, etc., in the specific implementation process, the device may also include other components necessary for normal execution. In addition, those skilled in the art will understand that the above device may also include only the components necessary to implement the solution of the present application, and does not necessarily include all the components shown in the figure.
[0137] Example 6
[0138] Corresponding to all the above embodiments, an embodiment of the present application further provides a computer-readable storage medium, characterized in that it stores a computer program, and the computer program causes a computer to operate as follows:
[0139] Determine the allocation range of the network card CPU core resources based on the physical memory location corresponding to the network card;
[0140] Establishing a network card resource pool based on the network card CPU core resources within the allocation range;
[0141] According to the utilization rate of the network card CPU core resources and preset rules, the number of network card CPU core resources in the network card resource pool is adjusted and the network card resource pool is updated;
[0142] The network card resource pool is used to optimize the storage of the server.
[0143] Through the description of the above implementation methods, it can be seen that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a cloud service terminal, or a network device, etc.) to execute the methods described in various embodiments of the present application or certain parts of the embodiments.
[0144] Each embodiment in this specification is described in a progressive manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple. For relevant parts, refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without expending creative work.
[0145] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.
Claims
1. A storage optimization method based on a network card, characterized in that: The method comprises: Determine the allocation range of the network card CPU core resources according to the physical memory location corresponding to the network card; Establishing a network card resource pool according to the network card CPU core resources within the allocation range; According to the utilization rate of the network card CPU core resources and preset rules, the number of network card CPU core resources in the network card resource pool is adjusted and the network card resource pool is updated; Utilizing the network card resource pool to complete storage optimization of the server; The method of adjusting the number of network card CPU core resources in the network card resource pool and updating the network card resource pool according to the utilization rate of the network card CPU core resources and preset rules includes: Comparing the utilization rate of each of the network card CPU core resources with an idle threshold; If the utilization rate of any network card CPU core resource is less than the idle threshold, the number of network card CPU core resources in the network card resource pool is decreased according to the step size until the utilization rate of each network card CPU core resource is greater than the idle threshold; Wherein, adjusting the number of network card CPU core resources in the network card resource pool and updating the network card resource pool according to the utilization rate of the network card CPU core resources and preset rules, further includes: Comparing the utilization rate of each of the network card CPU core resources with a busy threshold; If the usage rate of any network card CPU core resource is greater than the busy threshold, the number of network card CPU core resources in the network card resource pool is increased according to the step size until the usage rate of each network card CPU core resource is less than the busy threshold and the number of network card CPU core resources is less than or equal to the maximum value of the number of network card CPU core resources within the allocation range.
2. The method according to claim 1, characterized in that The method further comprises: If the usage rate of each of the network card CPU core resources in the network card resource pool is greater than the busy threshold and the number of allocated network card CPU core resources reaches the maximum value, an alarm message is generated to remind the user that the network card resource pool resources are tight.
3. The method according to claim 1, characterized in that The establishing of a network card resource pool according to the network card CPU core resources within the allocation range further comprises: When the network card resource pool is enabled, a preset number of the network card CPU core resources are selected within the range of the network card CPU core resources to construct the network card resource pool.
4. The method according to claim 1, characterized in that: The method further comprises: Detect CPU usage fluctuation ratio; The step size is determined according to the CPU usage fluctuation ratio and preset conditions.
5. The method according to claim 1, characterized in that The method further comprises: Screening the processes in the network card resource pool; Excluding the non-network card processes in the network card resource pool from the network card resource pool; The non-network card process is taken over by the CPU core resources outside the network card resource pool.
6. A storage optimization system based on a network card, characterized in that: The system comprises: The core allocation module is used to determine the allocation range of the network card CPU core resources according to the physical memory location corresponding to the network card; A data preparation module, used for establishing a network card resource pool according to the network card CPU core resources within the allocation range; A core adjustment module, used to adjust the number of network card CPU core resources in the network card resource pool and update the network card resource pool according to the utilization rate of the network card CPU core resources and preset rules; A resource processing module, used to use the network card resource pool to complete the storage optimization of the server; The core adjustment module is further used to compare the utilization rate of each network card CPU core resource with an idle threshold; The core adjustment module is further configured to, when the utilization rate of any network card CPU core resource is less than the idle threshold, reduce the number of network card CPU core resources in the network card resource pool according to the step length until the utilization rate of each network card CPU core resource is greater than the idle threshold; The core adjustment module is further used to compare the utilization rate of each network card CPU core resource with a busy threshold; The core adjustment module is also used to increase the number of network card CPU core resources in the network card resource pool according to the step size when the usage rate of any network card CPU core resource is greater than the busy threshold, until the usage rate of each network card CPU core resource is less than the busy threshold and the number of network card CPU core resources is less than or equal to the maximum value of the number of network card CPU core resources within the allocation range.
7. An electronic device, characterized in that: The electronic device comprises: one or more processors; And a memory associated with the one or more processors, the memory is used to store program instructions, and when the program instructions are read and executed by the one or more processors, the method according to any one of claims 1-5 is executed.
8. A computer-readable storage medium, characterized in that: The computer program stores a computer program, wherein the computer program enables a computer to execute the method according to any one of claims 1 to 5.
