CN111562975B - Startup scheduling method, device, equipment and medium for large-page memory of virtual machine - Google Patents

Startup scheduling method, device, equipment and medium for large-page memory of virtual machine Download PDF

Info

Publication number
CN111562975B
CN111562975B CN202010432086.0A CN202010432086A CN111562975B CN 111562975 B CN111562975 B CN 111562975B CN 202010432086 A CN202010432086 A CN 202010432086A CN 111562975 B CN111562975 B CN 111562975B
Authority
CN
China
Prior art keywords
memory
virtual machine
host
page
hosts
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010432086.0A
Other languages
Chinese (zh)
Other versions
CN111562975A (en
Inventor
程秀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202010432086.0A priority Critical patent/CN111562975B/en
Publication of CN111562975A publication Critical patent/CN111562975A/en
Application granted granted Critical
Publication of CN111562975B publication Critical patent/CN111562975B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45583Memory management, e.g. access or allocation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45591Monitoring or debugging support

Abstract

The invention discloses a startup scheduling method of a large-page memory of a virtual machine, which comprises the following steps: creating a virtual machine and configuring and opening a large-page memory; when the size of the memory of the virtual machine is judged to be larger than or equal to the size of the residual large-page memory of the host machine of the virtual machine, starting a scheduling step of the virtual machine; when the host of the virtual machine mounts shared storage and opens the large-page memory of the same type as other hosts in the cluster, judging whether the sizes of the remaining large-page memories of the other hosts in the cluster are the same; and if the virtual machines are judged to be the same in size, calculating the memory health degrees of the other hosts according to the logic memory utilization rates and the real-time memory utilization rates of the other hosts, selecting a target host from the other hosts according to the memory health degrees, and scheduling the virtual machines to the target host. The invention also discloses a device, equipment and a medium. The invention can make the memory load of the host in the cluster in a balanced state.

Description

Startup scheduling method, device, equipment and medium for large-page memory of virtual machine
Technical Field
The present invention relates to the field of computer virtualization platforms, and in particular, to a method, an apparatus, a device, and a medium for scheduling a boot of a large-page memory of a virtual machine.
Background
The large-page memory is an effective way to manage the memory, which can make the application program obtain better performance. Each page frame is 2M or 1G in size. Compared with a standard page frame with the size of 4K, the number of page table entries is greatly reduced, the maintenance and loading burden of a kernel page table is reduced, more page tables can be managed by a CPU cache, the hit efficiency of the TLB is improved, and the application program finally obtains better performance. In order to improve market competitiveness, the InCloud Sphere cloud platform introduces a large-page memory function. The virtual machine is particularly important to use the large-page memory for starting scheduling, and therefore, the invention provides a starting scheduling method for the virtual machine using the large-page memory.
Disclosure of Invention
In view of this, an object of the present invention is to provide a boot scheduling method for a virtual machine using a large page memory.
Based on the above object, in one aspect, the present invention provides a method for scheduling booting of a large-page memory of a virtual machine, where the method includes:
creating a virtual machine and configuring and opening a large-page memory;
responding to the judgment that the virtual machine successfully opens the large-page memory, and acquiring the size of the memory of the virtual machine and the size of the remaining large-page memory of the host machine of the virtual machine;
starting a scheduling step of the virtual machine in response to the judgment that the size of the memory of the virtual machine is larger than or equal to the size of the residual large-page memory of the host machine to which the virtual machine belongs;
responding to the judgment that the host machine of the virtual machine is mounted with the shared storage and opens the large-page memory with the same type as other host machines in the cluster, and comparing the size of the memory of the virtual machine with the size of the rest large-page memory of the other host machines;
in response to determining that the memory of the virtual machine is smaller than the size of the remaining large-page memories of the other hosts in the cluster, determining whether the size of the remaining large-page memories of the other hosts in the cluster is the same;
and in response to the consistent size of the residual large-page memories of the other hosts in the cluster, calculating the memory health degrees of the other hosts according to the logic memory utilization rate and the real-time memory utilization rate of the other hosts, selecting a target host from the other hosts according to the memory health degrees, and scheduling the virtual machine to the target host.
In some embodiments of the method for scheduling booting of a large-page memory of a virtual machine according to the present invention, the method further includes:
the memory health degree is configured to be represented by a memory health utilization rate, the memory health utilization rate is configured to be the sum of a logical memory utilization rate multiplied by 0.6 and an actual memory utilization rate multiplied by 0.4, and the memory health degree is configured to be higher as the memory health utilization rate is lower.
In some embodiments of the method for scheduling a boot of a large-page memory of a virtual machine of the present invention, in response to a size of a remaining large-page memory of a plurality of other hosts in a cluster being consistent, calculating a memory health degree of the plurality of other hosts according to a logical memory usage rate and a real-time memory usage rate, selecting a destination host among the plurality of other hosts according to the memory health degree, and scheduling the virtual machine to the destination host further includes:
and in response to the fact that the same large-page memory is started by a plurality of other hosts in the cluster and the sizes of the rest large-page memories are the same, selecting the host with the highest memory health degree as a target host to schedule the virtual machine.
In some embodiments of the method for scheduling a boot of a large-page memory of a virtual machine of the present invention, in response to a size of a remaining large-page memory of a plurality of other hosts in a cluster being consistent, calculating a memory health degree of the plurality of other hosts according to a logical memory usage rate and a real-time memory usage rate, selecting a destination host among the plurality of other hosts according to the memory health degree, and scheduling the virtual machine to the destination host further includes:
configuring the utilization rate of the logic memory into a value obtained by subtracting the host active large-page memory from the host memory, multiplying the value by the host virtualization degree and then dividing the result by the host memory;
the real-time memory usage is configured to use memory in real-time divided by host memory.
In some embodiments of the method for scheduling a boot of a large-page memory of a virtual machine of the present invention, the method further includes:
and in response to the fact that the sizes of the large page memories left by the plurality of other hosts in the cluster are not consistent, the virtual machine is dispatched to the host with the largest large page memory left in the plurality of other hosts, and the virtual machine is started.
In another aspect of the embodiments of the present invention, a device for scheduling boot of a large page memory of a virtual machine is further provided, where the device includes:
the starting module is configured to create a virtual machine and configure and open a large-page memory;
the residual large page acquisition module is configured to respond to the judgment that the virtual machine successfully opens the large page memory, and acquire the size of the memory of the virtual machine and the size of the residual large page memory of the host machine of the virtual machine;
the scheduling judging module is configured to respond to the judgment that the size of the memory of the virtual machine is larger than or equal to the size of the residual large-page memory of the host machine of the virtual machine, and start a scheduling step of the virtual machine;
the scheduling comparison module is configured to respond to the judgment that the host to which the virtual machine belongs mounts the shared storage and opens the large-page memory of the same type as other hosts in the cluster, and compare the size of the memory of the virtual machine with the size of the remaining large-page memories of the other hosts;
the memory size judging module is configured to respond to the judgment that the memory of the virtual machine is smaller than the size of the remaining large-page memories of the other hosts in the cluster, and judge whether the sizes of the remaining large-page memories of the other hosts in the cluster are the same or not;
and the same memory scheduling module is configured to respond to the consistent size of the residual large-page memories of the plurality of other hosts in the cluster, calculate the memory health degrees of the plurality of other hosts according to the logic memory utilization rate and the real-time memory utilization rate of the plurality of other hosts, select a target host from the plurality of other hosts according to the memory health degrees and schedule the virtual machine to the target host.
In some embodiments of the apparatus for scheduling booting of a large page memory of a virtual machine according to the present invention, the apparatus further includes:
the memory health degree module is configured to configure the memory health degree as being represented by a memory health utilization rate, the memory health utilization rate is configured as the sum of a logical memory utilization rate multiplied by 0.6 and an actual memory utilization rate multiplied by 0.4, and the memory health degree is configured as being higher as the memory health utilization rate is lower.
In some embodiments of the boot scheduling apparatus for a large page memory of a virtual machine according to the present invention, the same memory scheduling module is further configured to:
and in response to the fact that the sizes of the large page memories left by the plurality of other hosts in the cluster are not consistent, the virtual machine is dispatched to the host with the largest large page memory left in the plurality of other hosts, and the virtual machine is started.
In another aspect of the embodiments of the present invention, there is also provided a computer device, including:
at least one processor; and
the memory stores a computer program which can run on the processor, and the processor executes the starting scheduling method of the virtual machine large-page memory when executing the program.
In another aspect of the embodiments of the present invention, a computer-readable storage medium is further provided, where a computer program is stored in the computer-readable storage medium, and is characterized in that when being executed by a processor, the computer program executes the foregoing startup scheduling method for a large page memory of a virtual machine.
The invention has at least the following beneficial technical effects: the virtual machine uses the large-page memory to start up and dynamically schedule, so that the memory load (the large-page memory utilization rate and the comprehensive memory utilization rate) of the host in the cluster can be in a balanced state, the deployment operation is simple and convenient, the cost is low, the flexibility and the expansibility are good, and the performance and the core competitiveness of the cloud platform are improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic block diagram illustrating an embodiment of a boot scheduling method for a large page memory of a virtual machine according to the present invention;
fig. 2 is a flowchart illustrating an embodiment of a boot scheduling method for a large page memory of a virtual machine according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it is understood that "first" and "second" are only used for convenience of description and should not be construed as limiting the embodiments of the present invention, and the descriptions thereof in the following embodiments are omitted.
In view of the foregoing, a first aspect of the embodiments of the present invention provides an embodiment of a method for scheduling a boot of a large-page memory of a virtual machine. FIG. 1 is a schematic block diagram illustrating an embodiment of a boot scheduling method for a large page memory of a virtual machine according to the present invention; fig. 2 is a flowchart illustrating an embodiment of a boot scheduling method for a large page memory of a virtual machine according to the present invention. In the embodiment shown in fig. 1 and 2, the method comprises at least the following steps:
s100, creating a virtual machine and configuring and opening a large-page memory;
s200, responding to the judgment that the virtual machine successfully opens the large-page memory, and acquiring the size of the memory of the virtual machine and the size of the residual large-page memory of the host machine of the virtual machine;
s300, in response to the fact that the size of the memory of the virtual machine is larger than or equal to the size of the residual large-page memory of the host machine of the virtual machine, starting a scheduling step of the virtual machine;
s400, responding to the judgment that the host machine of the virtual machine is mounted with the shared storage and opens the large-page memory with the same type as other host machines in the cluster, and comparing the size of the memory of the virtual machine with the size of the rest large-page memory of the other host machines;
s500, in response to the judgment that the memory of the virtual machine is smaller than the size of the remaining large-page memories of the other hosts in the cluster, judging whether the sizes of the remaining large-page memories of the other hosts in the cluster are the same;
s600, in response to the fact that the sizes of the residual large pages of the memories of the other hosts in the cluster are consistent, calculating the memory health degrees of the other hosts according to the logic memory utilization rate and the real-time memory utilization rate of the other hosts, selecting a target host from the other hosts according to the memory health degrees, and scheduling the virtual machine to the target host.
In some embodiments of the present invention, according to step S100, a virtual machine is created to check and open a large page of memory, and the virtual machine is opened; according to the step S200, judging whether the host opens the large-page memory; according to the step S300, judging the sizes of the virtual machine memory and the rest large page memory of the host; according to the step S400, judging whether the host to which the virtual machine belongs mounts the shared storage and opens the same large page of memory as other hosts in the cluster; according to the step S500, judging the sizes of the residual large pages of the memory of the virtual machine and other hosts in the cluster; according to step S600, it is determined whether the remaining large-page memories of other hosts in the cluster are consistent, and the health of the memories of the hosts in the cluster is calculated, so as to implement the startup scheduling method for the virtual machine using the large-page memories. The specific process is as follows:
and step S100, checking and opening the large-page memory when the virtual machine is created, and opening the virtual machine.
Step S200, judging whether the host of the virtual machine opens the large-page memory, if the host of the virtual machine does not open the large-page memory, judging that the virtual machine fails to start, otherwise, judging that the host of the virtual machine opens the large-page memory, and starting to judge the sizes of the virtual machine memory and the residual large-page memory of the host of the virtual machine. Where host remaining big page = host active big page-DPDK (an open source data plane development toolset) configuration big page.
Step S300, judging the sizes of the virtual machine memory and the residual large page memory of the host, if the virtual machine memory is smaller than the size of the residual large page memory of the host, starting the virtual machine successfully, otherwise, the virtual machine memory is larger than or equal to the size of the residual large page memory of the host, selecting a target host in a plurality of other hosts meeting the conditions in the cluster by the virtual machine for scheduling, and judging the scheduling conditions of the virtual machine through the following steps to realize the scheduling of the virtual machine.
Step S400, determining whether the host to which the virtual machine belongs mounts the shared storage and opens the same type of large-page memory as other hosts in the cluster, where the same type means that each page frame of the large-page memory has the same size. If any item is not satisfied, the virtual machine does not satisfy the scheduling condition, and the starting failure is judged. Otherwise (i.e., each condition is satisfied), the virtual machine memory is compared to the size of the remaining large page memory of the number of other hosts that satisfy the scheduling condition.
Step S500, determining the size of the virtual machine memory and the size of the remaining large-page memories of the other hosts in the cluster, if the virtual machine memory is larger than the size of the remaining large-page memories of the other hosts in the cluster, determining that the virtual machine fails to boot, otherwise, determining whether the remaining large-page memories of the other hosts in the cluster are consistent.
Step S600, determining whether the remaining large-page memories of the other hosts in the cluster are consistent, and if not, selecting the host with the most remaining large-page memories as the destination host for migration scheduling, so that the boot is successful. And if the two main memories are consistent, starting to calculate the memory health degrees of other hosts which start the large-page memories of the same type and have the same residual large-page memories in the cluster. The method comprises the steps of calculating the memory health degrees of a plurality of other hosts according to the logic memory utilization rates and the real-time memory utilization rates of the other hosts, selecting a target host of the other hosts according to the memory health degrees, and scheduling the virtual machine to the target host with the highest health degree.
According to some embodiments of the method for scheduling booting of a large-page memory of a virtual machine of the present invention, the method further comprises:
the memory health degree is configured to be represented by a memory health utilization rate, the memory health utilization rate is configured to be the sum of a logical memory utilization rate multiplied by 0.6 and an actual memory utilization rate multiplied by 0.4, and the memory health degree is configured to be higher as the memory health utilization rate is lower.
In some embodiments of the invention, host memory health in a cluster is calculated. The host memory health degree in the cluster is related to the host memory health utilization rate: the higher the utilization rate of the host memory health is, the lower the host memory health in the cluster is; the lower the host memory health utilization rate, the higher the host memory health in the cluster. Therefore, the host memory health degree is calculated by calculating the host memory health utilization rate, wherein the formula of the host memory health utilization rate is as follows: the host memory health utilization rate = logical memory utilization rate 0.6+ real-time memory utilization rate 0.4, and on the premise that a plurality of other hosts in the cluster start the same large-page memory and the remaining large-page memories are the same, the host with the lowest host memory health utilization rate is selected to perform scheduling of the virtual machine.
According to some embodiments of the method for scheduling a boot of a large-page memory of a virtual machine of the present invention, in response to a size of a remaining large-page memory of a plurality of other hosts in a cluster being consistent, calculating a memory health degree of the plurality of other hosts according to a logical memory usage rate and a real-time memory usage rate, selecting a destination host among the plurality of other hosts according to the memory health degree, and scheduling the virtual machine to the destination host further includes:
and in response to the fact that the same large-page memory is started by a plurality of other hosts in the cluster and the sizes of the rest large-page memories are the same, selecting the host with the highest memory health degree as a target host to schedule the virtual machine.
In some embodiments of the present invention, the host memory health in the cluster is related to the host memory health usage: the higher the utilization rate of the host memory health is, the lower the host memory health in the cluster is; the lower the host memory health utilization rate, the higher the host memory health in the cluster. On the premise that a plurality of other hosts in the cluster start the same large-page memory and the rest large-page memories are the same, the host with the lowest healthy utilization rate of the host memory (namely the highest healthy degree of the host memory) is selected to schedule the virtual machine.
According to some embodiments of the method for scheduling a boot of a large-page memory of a virtual machine of the present invention, in response to a size of a remaining large-page memory of a plurality of other hosts in a cluster being consistent, calculating a memory health degree of the plurality of other hosts according to a logical memory usage rate and a real-time memory usage rate, selecting a destination host among the plurality of other hosts according to the memory health degree, and scheduling the virtual machine to the destination host further includes:
configuring the utilization rate of the logic memory into a value obtained by subtracting the host active large-page memory from the host memory, multiplying the value by the host virtualization degree and then dividing the result by the host memory;
the real-time memory usage is configured to use memory in real-time divided by host memory.
In some embodiments of the present invention, host logical memory usage = (host memory-host active large page memory) × host virtualization degree/host memory, real-time memory usage of host = real-time memory used by host/host memory.
According to some embodiments of the method for scheduling booting of a large-page memory of a virtual machine of the present invention, the method further comprises:
and in response to the fact that the sizes of the large page memories left by the plurality of other hosts in the cluster are not consistent, the virtual machine is dispatched to the host with the largest large page memory left in the plurality of other hosts, and the virtual machine is started.
In some embodiments of the present invention, according to step S500, it is determined that the size of the memory of the virtual machine is smaller than the size of the remaining large-page memories of the other hosts in the cluster, and it is determined whether the sizes of the remaining large-page memories of the other hosts in the cluster are the same, and when it is determined that the sizes of the remaining large-page memories of the other hosts in the cluster are different, the host with the largest remaining large-page memory among the other hosts that meets the scheduling condition is directly selected to perform scheduling of the virtual machine.
On the other hand, the embodiment of the invention provides an embodiment of a boot scheduling device for a large-page memory of a virtual machine. The device comprises:
the starting module is configured to create a virtual machine and configure and open a large-page memory;
the residual large page acquisition module is configured to respond to judgment that the virtual machine successfully starts a large page memory, and acquire the size of the memory of the virtual machine and the size of the residual large page memory of the host machine of the virtual machine;
the scheduling judging module is configured to respond to the judgment that the size of the memory of the virtual machine is larger than or equal to the size of the residual large-page memory of the host machine of the virtual machine, and start a scheduling step of the virtual machine;
the scheduling comparison module is configured to respond to the judgment that the host of the virtual machine is mounted with the shared storage and opens the large-page memory of the same type as other hosts in the cluster, and compare the size of the memory of the virtual machine with the size of the remaining large-page memories of the other hosts;
the memory size judging module is configured to respond to the judgment that the memory of the virtual machine is smaller than the size of the remaining large-page memories of the other hosts in the cluster, and judge whether the sizes of the remaining large-page memories of the other hosts in the cluster are the same or not;
and the same memory scheduling module is configured to respond to the consistent size of the residual large-page memories of the plurality of other hosts in the cluster, calculate the memory health degrees of the plurality of other hosts according to the logic memory utilization rate and the real-time memory utilization rate of the plurality of other hosts, select a target host from the plurality of other hosts according to the memory health degrees and schedule the virtual machine to the target host.
According to some embodiments of the boot scheduling apparatus for a large page memory of a virtual machine of the present invention, the apparatus further includes:
the memory health degree module is configured to configure the memory health degree as being represented by a memory health utilization rate, the memory health utilization rate is configured as the sum of a logical memory utilization rate multiplied by 0.6 and an actual memory utilization rate multiplied by 0.4, and the memory health degree is configured as being higher as the memory health utilization rate is lower.
According to some embodiments of the boot scheduling apparatus for a large page memory of a virtual machine of the present invention, the same memory scheduling module is further configured to:
and responding to the inconsistent sizes of the rest large-page memories of the plurality of other hosts in the cluster, scheduling the virtual machine to the host with the most rest large-page memories of the plurality of other hosts, and starting the virtual machine.
In view of the foregoing objects, another aspect of the embodiments of the present invention further provides a computer device, including: at least one processor; and the memory stores a computer program which can run on the processor, and the processor executes the starting scheduling method of the large-page memory of the virtual machine when executing the program.
In another aspect of the embodiments of the present invention, a computer-readable storage medium is further provided, where a computer program is stored in the computer-readable storage medium, and is characterized in that when being executed by a processor, the computer program executes the foregoing startup scheduling method for a large page memory of a virtual machine.
Likewise, those skilled in the art will appreciate that all of the embodiments, features and advantages set forth above with respect to the method for power-on scheduling of a large page memory of a virtual machine according to the present invention are equally applicable to the apparatus, the computer device and the medium according to the present invention. For the sake of brevity of the present disclosure, no repeated explanation is provided herein.
It should be particularly noted that, in the foregoing method, apparatus, device and medium for scheduling a large page of a virtual machine, steps in the embodiments may be mutually intersected, replaced, added and deleted, so that the method, apparatus, device and medium for scheduling a large page of a virtual machine, which are transformed by reasonable permutation and combination, shall also belong to the protection scope of the present invention, and shall not limit the protection scope of the present invention to the embodiments.
Finally, it should be noted that, as one of ordinary skill in the art can appreciate, all or part of the processes in the methods of the embodiments described above can be implemented by instructing relevant hardware through a computer program, and the program of the power-on scheduling method for the large-page memory of the virtual machine can be stored in a computer-readable storage medium, and when executed, the program can include the processes of the embodiments of the methods described above. The storage medium of the program may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like. The embodiments of the computer program may achieve the same or similar effects as any of the above-described method embodiments.
Furthermore, the methods disclosed according to embodiments of the present invention may also be implemented as a computer program executed by a processor, which may be stored in a computer-readable storage medium. Which when executed by a processor performs the above-described functions defined in the methods disclosed in embodiments of the invention.
Further, the above method steps and system elements may also be implemented using a controller and a computer readable storage medium for storing a computer program for causing the controller to implement the functions of the above steps or elements.
Further, it should be appreciated that the computer-readable storage media (e.g., memory) herein can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. By way of example, and not limitation, nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which can act as external cache memory. By way of example and not limitation, RAM is available in a variety of forms such as synchronous RAM (DRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The storage devices of the disclosed aspects are intended to comprise, without being limited to, these and other suitable types of memory.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments of the present invention.
The various illustrative logical blocks, modules, and circuits described in connection with the disclosure herein may be implemented or performed with the following components designed to perform the functions herein: a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP, and/or any other such configuration.
The steps of a method or algorithm described in connection with the disclosure herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In the alternative, the processor and the storage medium may reside as discrete components in a user terminal.
In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, digital Versatile Disc (DVD), floppy disk, blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.

Claims (9)

1. A startup scheduling method for a large-page memory of a virtual machine is characterized by comprising the following steps:
creating a virtual machine and configuring and opening a large-page memory;
responding to the judgment that the virtual machine successfully opens the large-page memory, and acquiring the size of the memory of the virtual machine and the size of the remaining large-page memory of the host machine of the virtual machine;
responding to the judgment that the size of the memory of the virtual machine is larger than or equal to the size of the residual large-page memory of the host machine of the virtual machine, and starting a scheduling step of the virtual machine;
responding to the judgment that the host machine of the virtual machine mounts the shared storage and opens the large-page memory of the same type with other host machines in the cluster, and comparing the size of the memory of the virtual machine with the size of the rest large-page memory of the other host machines;
in response to determining that the memory of the virtual machine is smaller than the size of the remaining large-page memories of the plurality of other hosts in the cluster, determining whether the size of the remaining large-page memories of the plurality of other hosts in the cluster is the same;
and in response to the consistency of the sizes of the residual large-page memories of the other hosts in the cluster, calculating the memory health degrees of the other hosts according to the logic memory utilization rates and the real-time memory utilization rates of the other hosts, selecting a target host from the other hosts according to the memory health degrees, and scheduling the virtual machine to the target host, wherein the logic memory utilization rate is configured to divide a value obtained by subtracting the active large-page memory of the host from the memory of the host by the virtualization degree of the host, and the real-time memory utilization rate is configured to divide the real-time memory by the memory of the host.
2. The method according to claim 1, further comprising:
configuring the memory health degree to be represented by a memory health utilization rate, configuring the memory health utilization rate to be the sum of the logical memory utilization rate multiplied by 0.6 and the actual memory utilization rate multiplied by 0.4, and configuring the memory health degree to be higher as the memory health utilization rate is lower.
3. The method according to claim 1, wherein said responding to the consistency of the size of the remaining large-page memories of the other hosts in the cluster, calculating the memory health degrees of the other hosts according to the logical memory usage rate and the real-time memory usage rate, selecting a destination host among the other hosts according to the memory health degrees, and scheduling the virtual machine to the destination host further comprises:
and in response to the plurality of other hosts in the cluster starting the same large-page memory and the remaining large-page memories are the same in size, selecting the host with the highest host memory health degree as a target host to schedule the virtual machine.
4. The method for scheduling booting of a large page memory of a virtual machine according to claim 1, the method further comprising:
and responding to the fact that the sizes of the residual large-page memories of the plurality of other hosts in the cluster are not consistent, scheduling the virtual machine to the host with the largest residual large-page memory in the plurality of other hosts, and starting the virtual machine.
5. A startup scheduling device for a large page memory of a virtual machine, the device comprising:
the starting module is configured to create a virtual machine and configure and open a large-page memory;
a residual large page obtaining module configured to obtain a size of a memory of the virtual machine and a size of a residual large page memory of a host to which the virtual machine belongs in response to a determination that the virtual machine successfully opens the large page memory;
a scheduling decision module configured to start a scheduling step for the virtual machine in response to a decision that the size of the memory of the virtual machine is greater than or equal to the size of the remaining large-page memory of the host to which the virtual machine belongs;
a scheduling comparison module configured to compare the size of the memory of the virtual machine with the size of the remaining large-page memory of the other host in response to determining that the host to which the virtual machine belongs mounts shared storage and opens the same type of large-page memory as the other host in the cluster;
a memory size determination module configured to determine whether the sizes of the remaining large-page memories of the plurality of other hosts in the cluster are the same in response to determining that the memory of the virtual machine is smaller than the sizes of the remaining large-page memories of the plurality of other hosts in the cluster;
the same memory scheduling module is configured to respond to the consistent size of the remaining large-page memories of the other hosts in the cluster, calculate the memory health degrees of the other hosts according to the logical memory utilization rate and the real-time memory utilization rate of the other hosts, select a destination host from the other hosts according to the memory health degrees, and schedule the virtual machine to the destination host, wherein the logical memory utilization rate is configured to divide a value obtained by subtracting a host active large-page memory from a host memory by a host virtualization degree and then divide the value by the host memory, and the real-time memory utilization rate is configured to divide the real-time memory by the host memory.
6. The apparatus according to claim 5, further comprising:
a memory health degree module configured to configure the memory health degree as a memory health usage rate, the memory health usage rate is configured as a sum of the logical memory usage rate multiplied by 0.6 and an actual memory usage rate multiplied by 0.4, and the memory health degree is configured as the memory health degree is higher the lower the memory health usage rate is.
7. The boot scheduling apparatus for a large page memory of a virtual machine according to claim 5, wherein the same memory scheduling module is further configured to:
and responding to the fact that the sizes of the residual large-page memories of the plurality of other hosts in the cluster are not consistent, scheduling the virtual machine to the host with the largest residual large-page memory in the plurality of other hosts, and starting the virtual machine.
8. A computer device, comprising:
at least one processor; and
memory storing a computer program operable on the processor, wherein the processor, when executing the program, performs the method of any of claims 1-4.
9. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, is adapted to carry out the method of any one of claims 1 to 4.
CN202010432086.0A 2020-05-20 2020-05-20 Startup scheduling method, device, equipment and medium for large-page memory of virtual machine Active CN111562975B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010432086.0A CN111562975B (en) 2020-05-20 2020-05-20 Startup scheduling method, device, equipment and medium for large-page memory of virtual machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010432086.0A CN111562975B (en) 2020-05-20 2020-05-20 Startup scheduling method, device, equipment and medium for large-page memory of virtual machine

Publications (2)

Publication Number Publication Date
CN111562975A CN111562975A (en) 2020-08-21
CN111562975B true CN111562975B (en) 2023-01-06

Family

ID=72073392

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010432086.0A Active CN111562975B (en) 2020-05-20 2020-05-20 Startup scheduling method, device, equipment and medium for large-page memory of virtual machine

Country Status (1)

Country Link
CN (1) CN111562975B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113094173B (en) * 2021-04-02 2022-05-17 烽火通信科技股份有限公司 DPDK-based large-page memory dynamic migration method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110296411A1 (en) * 2010-05-25 2011-12-01 Transoft Kernel Bus System to Build Virtual Machine Monitor and the Performance Service Framework and Method Therefor
CN103257929A (en) * 2013-04-18 2013-08-21 中国科学院计算技术研究所 Virtual machine memory mapping method and system
CN106844010A (en) * 2017-01-20 2017-06-13 深信服科技股份有限公司 Dram big page scheduling processing method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110296411A1 (en) * 2010-05-25 2011-12-01 Transoft Kernel Bus System to Build Virtual Machine Monitor and the Performance Service Framework and Method Therefor
CN103257929A (en) * 2013-04-18 2013-08-21 中国科学院计算技术研究所 Virtual machine memory mapping method and system
CN106844010A (en) * 2017-01-20 2017-06-13 深信服科技股份有限公司 Dram big page scheduling processing method and device

Also Published As

Publication number Publication date
CN111562975A (en) 2020-08-21

Similar Documents

Publication Publication Date Title
RU2438165C2 (en) Apparatus and method for reducing displacements in multilevel cache hierarchy
US7472252B2 (en) Merging identical memory pages
US9952788B2 (en) Method and apparatus for providing a shared nonvolatile memory system using a distributed FTL scheme
US11675709B2 (en) Reading sequential data from memory using a pivot table
CN109753443B (en) Data processing method and device and electronic equipment
JP2013536505A (en) Secure readable memory area support for pre-boot and secure mode operations
CN111858025B (en) Mixed scheduling method, device, equipment and medium based on GPU card video memory
US20150363320A1 (en) Write back caching of boot disk in a uefi environment
US7600106B2 (en) System and method for enabling/disabling write-protection of a basic input output system
CN111562975B (en) Startup scheduling method, device, equipment and medium for large-page memory of virtual machine
WO2015116197A1 (en) Storing data based on a write allocation policy
CN110287131B (en) Memory management method and device
JP2005196793A5 (en)
CN112732427B (en) Data processing method, system and related device based on Redis cluster
CN111638925A (en) Interface method table generation method, function pointer query method and device
US11301436B2 (en) File storage method and storage apparatus
WO2021207923A1 (en) Cluster expansion method and apparatus, storage medium, and electronic device
CN110417579B (en) Method, equipment and readable medium for managing gigabit network by using gigabit network card
WO2024087607A1 (en) Flash memory management algorithm debugging method, system and device, and readable storage medium
CN111382179A (en) Data processing method and device and electronic equipment
CN101441551A (en) Computer, external memory and method for processing data information in external memory
US20220414001A1 (en) Memory inclusivity management in computing systems
CN115714706A (en) Access acceleration system and method based on embedded H5, storage medium and electronic equipment
CN113076086A (en) Metadata management system and method for modeling model object using the same
US8272026B1 (en) Method and apparatus for using a dynamic policy to manage a file purging process

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant