Large Page Memory Dynamic Management Method, Apparatus and Computer Device
By real-time monitoring and dynamically adjusting the host's large-page memory capacity, the resource waste and insufficient caused by excessive or low large-page memory setting capacity is solved, and the reasonable allocation and balance of resources is achieved.
Patent Information
- Application Number
- CN202111355705.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-16
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2041-11-16
AI Technical Summary
In the prior art, the setting capacity of large page memory is too high and the setting capacity of large page memory is wasteful, and when it is too low, it causes the application to be unable to use normally.
By monitoring the large-page memory usage of each host in real time, dynamically adjust the real-time capacity of large-page memory of each host, converting the free large-page memory into non-large-page memory to reduce the total idle capacity, and determining the target host based on the target capacity and usage when the virtual machine is started.
It effectively reduces the total free capacity of large-page memory of multiple hosts, avoids waste of large-page memory, and realizes reasonable allocation and balance of resources.
Smart Images

Figure CN114020416B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer resource management, and in particular, to a method, apparatus, and computer device for dynamically managing large page memory. Background Art
[0002] Large page memory is an effective way to manage memory, which can enable applications to obtain better performance. The size of each page frame of large page memory is 2M or 1G. Compared with the standard 4K-sized page frame, the number of page table entries is greatly reduced, the burden of kernel page table maintenance and loading is alleviated, and the CPU cache can also manage more page tables, thereby improving the hit efficiency of the Translation Lookaside Buffer (TLB), and enabling applications using large page memory to obtain better performance.
[0003] In the prior art, memory with a fixed capacity is generally set as large page memory. In this setting method, when the set capacity of large page memory is too high, large page memory is wasted, resulting in the inability of applications using non-large page memory to be used normally. When the initial set capacity of large page memory is too low, there is insufficient large page memory, resulting in the inability of applications using large page memory to be used normally. Summary of the Invention
[0004] In view of the above problems, the present application proposes a method, apparatus, and computer device for dynamically managing large page memory to manage large page memory in real time and improve the utilization efficiency of large page memory.
[0005] In a first aspect, an embodiment of the present application proposes a method for dynamically managing large page memory, and the method includes:
[0006] Real-time monitoring of the usage of large page memory of each host;
[0007] Dynamically adjusting the real-time capacity of the large page memory of each host according to the usage of the large page memory of each host.
[0008] For the method for dynamically managing large page memory according to the embodiment of the present application, the dynamically adjusting the real-time capacity of the large page memory of each host according to the usage of the large page memory of each host includes:
[0009] Determining the i-th idle capacity of the large page memory in the i-th host in an idle state according to the usage of the large page memory of the i-th host, where 1 ≤ i ≤ I and I is the total number of hosts;
[0010] When the i-th idle capacity is greater than a preset capacity threshold, recording the i-th duration that is greater than the capacity threshold;
[0011] If the i-th duration is greater than or equal to a preset duration threshold, convert the large page memory corresponding to the difference between the i-th free capacity and the capacity threshold into non-large page memory.
[0012] The large page memory dynamic management method described in the embodiments of the present application further includes:
[0013] When a virtual machine with a large page memory function is started, determine the target capacity of the large page memory of the virtual machine;
[0014] Determine a target host from the hosts according to the target capacity and the usage of the large page memory of each host;
[0015] Start the virtual machine through the target host.
[0016] In the large page memory dynamic management method described in the embodiments of the present application, the step of determining a target host from the hosts according to the target capacity and the usage of the large page memory of each host includes:
[0017] Determine the i-th free capacity of the large page memory in the i-th host that is in an idle state according to the usage of the large page memory of the i-th host, where 1 ≤ i ≤ I and I is the total number of hosts;
[0018] Determine the maximum free capacity from the I free capacities;
[0019] Determine whether the maximum free capacity is greater than or equal to the target capacity;
[0020] In the case where the maximum free capacity is greater than or equal to the target capacity, use the host corresponding to the maximum free capacity as the target host.
[0021] The large page memory dynamic management method described in the embodiments of the present application further includes:
[0022] In the case where the maximum free capacity is less than the target capacity, obtain the current free memory of each host;
[0023] Determine the maximum current free memory from the current free memory of each host;
[0024] Use the host corresponding to the maximum current free memory as the target host.
[0025] In the large page memory dynamic management method described in the embodiments of the present application, the step of starting the virtual machine through the target host includes:
[0026] Determine the application capacity according to the target capacity and the maximum free capacity corresponding to the target host;
[0027] Apply for large page memory of the application capacity from the target host;
[0028] After the target host accepts the application and converts the non-large page memory of the application capacity into large page memory, start the virtual machine by using the target host.
[0029] In a second aspect, an embodiment of the present application further provides a large page memory dynamic management device, where the device includes:
[0030] A monitoring module, configured to monitor the usage of large page memory of each host in real time;
[0031] An adjustment module, configured to dynamically adjust the real-time capacity of the large page memory of each host according to the usage of the large page memory of each host.
[0032] For the large page memory dynamic management device described in the embodiment of the present application, dynamically adjusting the real-time capacity of the large page memory of each host according to the usage of the large page memory of each host includes:
[0033] Determine the i-th idle capacity of the large page memory in the i-th host that is in an idle state according to the usage of the large page memory of the i-th host, where 1 ≤ i ≤ I and I is the total number of hosts;
[0034] When the i-th idle capacity is greater than a preset capacity threshold, record the i-th continuous duration greater than the capacity threshold;
[0035] If the i-th continuous duration is greater than or equal to a preset duration threshold, convert the large page memory corresponding to the difference between the i-th idle capacity and the capacity threshold into non-large page memory.
[0036] In a third aspect, an embodiment of the present application further provides a computer device, including a memory and a processor, where the memory stores a computer program, and the computer program executes the large page memory dynamic management method described in the embodiment of the present application when running on the processor.
[0037] In a fourth aspect, an embodiment of the present application further provides a readable storage medium, which stores a computer program, and the computer program executes the large page memory dynamic management method described in the embodiment of the present application when running on a processor.
[0038] The present application monitors the usage of large page memory of each host in real time; dynamically adjusts the real-time capacity of the large page memory of each host according to the usage of the large page memory of each host. Dynamically adjusting the real-time capacity of the large page memory of each host according to the usage of the large page memory of each host in the present application can effectively reduce the total idle capacity of the large page memory of multiple hosts and avoid waste of large page memory. Brief Description of the Drawings
[0039] To more clearly illustrate the technical solutions of the present invention, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as limiting the protection scope of the present invention. In each drawing, similar components are denoted by similar reference numerals.
[0040] Figure 1 Shows a schematic flowchart of a method for dynamically managing large-page memory proposed in an embodiment of the present application;
[0041] Figure 2 Shows a schematic flowchart of the process of dynamically adjusting large-page memory in a method for dynamically managing large-page memory proposed in an embodiment of the present application;
[0042] Figure 3 Shows a schematic flowchart of another method for dynamically managing large-page memory proposed in an embodiment of the present application;
[0043] Figure 4 Shows a schematic flowchart of the process of determining the free capacity of large-page memory for each host in another method for dynamically managing large-page memory proposed in an embodiment of the present application;
[0044] Figure 5 Shows a schematic flowchart of the process of determining the target host in another method for dynamically managing large-page memory proposed in an embodiment of the present application;
[0045] Figure 6 Shows a schematic structural diagram of a device for dynamically managing large-page memory proposed in an embodiment of the present application. Detailed Description of the Embodiments
[0046] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments.
[0047] The components of the embodiments of the present invention generally described and illustrated in the drawings herein may be arranged and designed in a variety of different configurations. Therefore, the detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention.
[0048] In the following, the terms "comprising", "having" and their cognates that can be used in various embodiments of the present invention are only intended to represent specific features, numbers, steps, operations, elements, components or combinations of the foregoing items, and should not be construed as precluding the existence or adding the possibility of one or more other features, numbers, steps, operations, elements, components or combinations of the foregoing items first.
[0049] In addition, the terms "first", "second", "third", etc. are only used for distinguishing descriptions and cannot be construed as indicating or implying relative importance.
[0050] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art to which various embodiments of the present invention pertain. The terms (such as those defined in a commonly used dictionary) will be construed to have the same meaning as the contextual meaning in the relevant technical field and will not be construed to have an idealized meaning or an overly formal meaning unless clearly defined in various embodiments of the present invention.
[0051] In the embodiments of the present application, by centrally managing multiple hosts, on the one hand, the real-time capacity of the large page memory of each host is dynamically adjusted according to the usage of the large page memory of each host, so as to reduce the total idle capacity of the large page memory of multiple hosts and avoid waste of the large page memory; on the other hand, when starting a virtual machine with a large page memory function, a target host is determined from each host according to the target capacity of the large page memory of the virtual machine and the usage of the large page memory of each host, so as to start the virtual machine through the target host, realize the reasonable allocation of resources of each host, and thus achieve resource balance.
[0052] Next, the present application will explain the large page memory dynamic management method in detail with specific embodiments.
[0053] Embodiment 1
[0054] Please refer to Figure 1 , an embodiment of the present application, provides a large page memory dynamic management method, and the method includes the following steps:
[0055] Step S100, monitor the usage of the large page memory of each host in real time.
[0056] It can be understood that the connection between the computing device for dynamically managing large page memory and each host to be managed can be a wired connection or a wireless connection, and the computing device for dynamically managing large page memory can communicate with each host. When starting the dynamic management mode of large page memory, the computing device for dynamically managing large page memory will set the initial capacity of the large page memory of each host according to a preset setting ratio and the total memory capacity of each host.
[0057] Among them, the setting ratio can be 10%, 12%, 15%, 20%, etc. Exemplarily, if the preset setting ratio is 10%, then 10% of the total memory capacity of each host to be managed will be used as the initial capacity of the large page memory. 10% of the total memory capacity of each host can be used to form a large page memory pool, and the large page memory pool can be dynamically managed by the computing device.
[0058] It can be understood that the computer device can view the usage situation of the large page memory of each host in sequence in real time, or can also view the usage situation of the large page memory of each host at the same time to determine the free capacity of the large page memory in the idle state of each host.
[0059] Exemplarily, on the host, the usage situation of the large page memory of the host can be viewed by checking / proc / meminfo. The HugePages_Total field can know the total number of large page memories allocated by the host, the HugePages_Free field can know the number of free large page memories of the host, and the Hugepagesize field represents the size of the large page memory of the host.
[0060] Step S200, dynamically adjust the real-time capacity of the large page memory of each host according to the usage situation of the large page memory of each host.
[0061] According to the usage situation of the large page memory of each host, the free capacity of the large page memory in the idle state of each host can be determined. For example, the computer device can obtain that the free capacity of the large page memory in the idle state of a host is 12G.
[0062] According to the usage situation of the large page memory of each host, the free ratio of the large page memory in the idle state of each host can also be determined. For example, the computer device can obtain that the free ratio of the large page memory in the idle state of a host is 50%, that is, the free ratio accounts for 50% of the total large page memory capacity of this host.
[0063] Exemplarily, please refer to Figure 2 , in this embodiment, taking the determination of the free capacity of the large page memory in the idle state of each host according to the usage situation of the large page memory of each host as an example, this step S200 includes the following steps:
[0064] Step S210: Determine the i-th free capacity of the large page memory in the idle state in the i-th host according to the usage of the large page memory of the i-th host, where 1 ≤ i ≤ I and I is the total number of hosts.
[0065] Step S220: When the i-th free capacity is greater than a preset capacity threshold, record the i-th duration that is greater than the capacity threshold.
[0066] Step S230: Determine whether the i-th duration is greater than or equal to a preset duration threshold.
[0067] If the i-th duration is greater than or equal to the preset duration threshold, then execute Step S240; if the i-th duration is less than the preset duration threshold, then execute Step S250.
[0068] Step S240: Convert the large page memory corresponding to the difference between the i-th free capacity and the capacity threshold into non-large page memory.
[0069] Exemplarily, the following command can be used to recycle the idle large page memory:
[0070] sysctl -w vm.nr_hugepages = the number of large page memories.
[0071] When the i-th free capacity of the i-th host is greater than the preset capacity threshold and the i-th duration that is greater than the capacity threshold is greater than or equal to the preset duration threshold, then convert the large page memory corresponding to the difference between the i-th free capacity and the capacity threshold in the i-th host into non-large page memory to avoid waste of large page memory and affect the normal use of the application programs using non-large page memory in the i-th host.
[0072] Step S250: Keep the current capacity of the large page memory of the i-th host.
[0073] When the i-th free capacity of the i-th host is less than or equal to the preset capacity threshold or the i-th duration that the i-th free capacity of the i-th host is greater than the capacity threshold is less than the preset duration threshold, then keep the current capacity of the large page memory of the i-th host to avoid frequent conversion between large page memory and non-large page memory and affect the stability of the host.
[0074] In this embodiment, the initial capacity of the large page memory of each host is set according to a preset setting ratio and the total memory capacity of each host; the usage of the large page memory of each host is monitored in real time; and the real-time capacity of the large page memory of each host is dynamically adjusted according to the usage of the large page memory of each host. By dynamically adjusting the real-time capacity of the large page memory of each host according to the usage of the large page memory of each host in this embodiment, the total idle capacity of the large page memory of multiple hosts can be effectively reduced, and the waste of large page memory can be avoided.
[0075] Embodiment 2
[0076] Please refer to Figure 3 , for another embodiment of the present application, the proposed method for dynamically managing large page memory, after the above step S200, further includes the following steps S300 to S500:
[0077] Step S300, when a virtual machine with a large page memory function is started, determine the target capacity of the large page memory of the virtual machine.
[0078] It can be understood that virtual machines include virtual machines using large page memory and virtual machines using non-large page memory. The startup of a virtual machine using large page memory is limited by the number of large page memories set by the host used to start the virtual machine. When the number of large page memories allocated by the host is too large, it occupies too much memory of the host, resulting in the failure of the virtual machine using non-large page memory to start due to insufficient memory, wasting memory. When the number of large page memories of the host is too small, the virtual machine using large page memory fails to start due to insufficient large page memory.
[0079] In this embodiment, when a virtual machine with a large page memory function is started, determine the target capacity of the large page memory of the virtual machine, so as to determine the target host for starting the virtual machine from each host according to the target capacity.
[0080] Step S400, determine the target host from the hosts according to the target capacity and the usage of the large page memory of each host.
[0081] The free ratio or free capacity of the large page memory of each host can be determined according to the usage of the large page memory of each host, so as to determine the target host from the hosts based on the free ratio or free capacity.
[0082] Exemplarily, please refer to Figure 4 , taking the determination of the free capacity of the large page memory of each host according to the usage of the large page memory of each host as an example, this step S400 includes the following steps S210 to S470:
[0083] Step S210: Determine the i-th free capacity of the large page memory in the i-th host that is in the idle state according to the usage of the large page memory of the i-th host, where 1 ≤ i ≤ I and I is the total number of hosts.
[0084] Step S420: Determine the maximum free capacity from the I free capacities.
[0085] Step S430: Determine whether the maximum free capacity is greater than or equal to the target capacity.
[0086] In the case where the maximum free capacity is greater than or equal to the target capacity, execute Step S440; in the case where the maximum free capacity is less than the target capacity, execute Steps S450 - S470.
[0087] Step S440: Take the host corresponding to the maximum free capacity as the target host.
[0088] Step S450: Obtain the current free memory of each host.
[0089] Step S460: Determine the maximum current free memory from the current free memory of each host.
[0090] Step S470: Take the host corresponding to the maximum current free memory as the target host.
[0091] After determining the target host from the target capacity and the usage of the large page memory of each host, execute the following Step S500.
[0092] Step S500: Start the virtual machine through the target host.
[0093] Exemplarily, in the case where the maximum free capacity is greater than or equal to the target capacity, the determined target host can directly start the virtual machine.
[0094] Exemplarily, please refer to Figure 5 , in the case where the maximum free capacity is less than the target capacity, after taking the host corresponding to the maximum current free memory as the target host, this Step S500 includes the following steps:
[0095] Step S510: Determine the application capacity according to the target capacity and the maximum free capacity corresponding to the target host.
[0096] It can be understood that the application capacity can be equal to the difference between the maximum free capacity and the target capacity, or can be greater than the difference between the maximum free capacity and the target capacity.
[0097] Step S520: Apply to the target host for the large page memory with the application capacity.
[0098] Step S530: After the target host accepts the application and converts the non-large page memory of the application capacity into large page memory, start the virtual machine by using the target host.
[0099] In this embodiment, when starting a virtual machine with a large page memory function, the target host is determined from each host according to the target capacity of the large page memory of the virtual machine and the usage of the large page memory of each host, so as to start the virtual machine through the target host. After determining the target host, if the maximum free capacity corresponding to the target host is less than the target capacity, the non-large page memory of the target host is also converted into large page memory. This embodiment realizes the reasonable allocation of resources of each host, dynamically determines the target host for starting the virtual machine, and achieves flexible scheduling to the greatest extent, so as to balance resources.
[0100] Embodiment 3
[0101] Please refer to Figure 6 , the third embodiment of the present application, which proposes a large page memory dynamic management device 10. The device includes: a monitoring module 11 and an adjustment module 12.
[0102] The monitoring module 11 is used to monitor the usage of the large page memory of each host in real time; the adjustment module 12 is used to dynamically adjust the real-time capacity of the large page memory of each host according to the usage of the large page memory of each host.
[0103] Further, the dynamically adjusting the real-time capacity of the large page memory of each host according to the usage of the large page memory of each host includes: determining the i-th free capacity of the large page memory in the i-th host that is in an idle state according to the usage of the large page memory of the i-th host, 1 ≤ i ≤ I, where I is the total number of hosts; when the i-th free capacity is greater than a preset capacity threshold, recording the i-th duration that is greater than the capacity threshold; if the i-th duration is greater than or equal to a preset duration threshold, converting the large page memory corresponding to the difference between the i-th free capacity and the capacity threshold into non-large page memory.
[0104] The large page memory dynamic management device disclosed in this embodiment is used to execute the large page memory dynamic management method described in the above embodiment through the cooperation of the monitoring module 11 and the adjustment module 12. The implementation schemes and beneficial effects involved in the above embodiment are equally applicable in this embodiment and will not be elaborated here.
[0105] Embodiment 4
[0106] The fourth embodiment of the present application provides a computer device, including a memory and a processor. The memory stores a computer program, and when the computer program runs on the processor, it executes the large page memory dynamic management method described in the above embodiments of the present application.
[0107] Embodiment 5
[0108] The fifth embodiment of the present application provides a readable storage medium, which stores a computer program, and when the computer program runs on a processor, it executes the large page memory dynamic management method described in the above embodiments of the present application.
[0109] In several embodiments provided by the present application, it should be understood that the disclosed apparatus and method can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and structure diagrams in the drawings show the possible architectures, functions, and operations of the apparatus, method, and computer program products according to multiple embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in an alternative implementation, the functions marked in the blocks may occur in a different order than marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the structure diagram and / or flowchart, as well as the combination of blocks in the structure diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0110] In addition, in each embodiment of the present invention, the various functional modules or units may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0111] When the above-mentioned functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or a part of this technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned readable storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0112] The above is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered within the protection scope of the present invention.
Claims
1. A method for dynamic management of large page memory, characterized in that, the method includes: real-time monitoring of the usage of large page memory of each host; dynamically adjusting the real-time capacity of the large page memory of each host according to the usage of the large page memory of each host; wherein, the dynamically adjusting the real-time capacity of the large page memory of each host according to the usage of the large page memory of each host includes: determining the i-th free capacity of the large page memory in the i-th host in the idle state according to the usage of the large page memory of the i-th host, 1 ≤ i ≤ I, and I is the total number of hosts; when the i-th free capacity is greater than a preset capacity threshold, recording the i-th continuous duration greater than the capacity threshold; if the i-th continuous duration is greater than or equal to a preset duration threshold, converting the large page memory corresponding to the difference between the i-th free capacity and the capacity threshold into non-large page memory, otherwise maintaining the current capacity of the large page memory of the i-th host; the method for dynamic management of large page memory further includes: when a virtual machine with large page memory function is started, determining the target capacity of the large page memory of the virtual machine; determining a target host from the hosts according to the target capacity and the usage of the large page memory of each host; starting the virtual machine through the target host; wherein, the determining a target host from the hosts according to the target capacity and the usage of the large page memory of each host includes: determining the i-th free capacity of the large page memory in the i-th host in the idle state according to the usage of the large page memory of the i-th host, 1 ≤ i ≤ I, and I is the total number of hosts; determining the maximum free capacity from the I free capacities; determining whether the maximum free capacity is greater than or equal to the target capacity; when the maximum free capacity is greater than or equal to the target capacity, using the host corresponding to the maximum free capacity as the target host.
2. The method for dynamic management of large page memory according to claim 1, characterized in that, it further includes: when the maximum free capacity is less than the target capacity, obtaining the current free memory of each host; determining the maximum current free memory from the current free memory of each host; using the host corresponding to the maximum current free memory as the target host.
3. The method for dynamic management of large page memory according to claim 2, characterized in that, the starting the virtual machine through the target host includes: determining an application capacity according to the target capacity and the maximum free capacity corresponding to the target host; applying to the target host for the large page memory of the application capacity; after the target host accepts the application and converts the non-large page memory of the application capacity into large page memory, starting the virtual machine by using the target host.
4. A device for dynamic management of large page memory, characterized in that, the device includes: a monitoring module, configured to real-time monitor the usage of large page memory of each host; an adjustment module, configured to dynamically adjust the real-time capacity of the large page memory of each host according to the usage of the large page memory of each host; When a virtual machine with large page memory function is started, determine the target capacity of the large page memory of the virtual machine; Determine a target host from the hosts according to the target capacity and the usage of the large page memory of each host; Start the virtual machine through the target host; Wherein, the dynamically adjusting the real-time capacity of the large page memory of each host according to the usage of the large page memory of each host includes: Determine the i-th idle capacity of the large page memory in the i-th host that is in an idle state according to the usage of the large page memory of the i-th host, 1 ≤ i ≤ I, and I is the total number of hosts; When the i-th idle capacity is greater than a preset capacity threshold, record the i-th continuous duration greater than the capacity threshold; If the i-th continuous duration is greater than or equal to a preset duration threshold, convert the large page memory corresponding to the difference between the i-th idle capacity and the capacity threshold into non-large page memory, otherwise keep the current capacity of the large page memory of the i-th host; Wherein, the determining a target host from the hosts according to the target capacity and the usage of the large page memory of each host includes: Determine the i-th idle capacity of the large page memory in the i-th host that is in an idle state according to the usage of the large page memory of the i-th host, 1 ≤ i ≤ I, and I is the total number of hosts; Determine the maximum idle capacity from the I idle capacities; Determine whether the maximum idle capacity is greater than or equal to the target capacity; When the maximum idle capacity is greater than or equal to the target capacity, use the host corresponding to the maximum idle capacity as the target host.
5. A computer device, Characterized in that, It includes a memory and a processor, the memory stores a computer program, and when the computer program runs on the processor, it executes the large page memory dynamic management method according to any one of claims 1 to 3.
6. A readable storage medium, Characterized in that, It stores a computer program, and when the computer program runs on a processor, it executes the large page memory dynamic management method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Startup scheduling method and device for large-page memory of virtual machine, equipment and medium
CN111562975A