CN111562975A - 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
CN111562975A
CN111562975A CN202010432086.0A CN202010432086A CN111562975A CN 111562975 A CN111562975 A CN 111562975A CN 202010432086 A CN202010432086 A CN 202010432086A CN 111562975 A CN111562975 A CN 111562975A
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.)
Granted
Application number
CN202010432086.0A
Other languages
Chinese (zh)
Other versions
CN111562975B (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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

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 machine 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 embodiments 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 booting 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 boot scheduling apparatus for 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 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 method for scheduling booting 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 description of the embodiments or the prior art will be briefly described below, and 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 by using 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, whether the host to which the virtual machine belongs mounts the shared storage or not and opens the same large-page memory as other hosts in the cluster is judged; 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. The remaining large pages of the host are configured as the active large pages of the host, namely DPDK (data plane development tool set with an open source).
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, determine 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 opening 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 degree of a plurality of other hosts according to the logic memory utilization rate and the real-time memory utilization rate of the other hosts, selecting a target host of the other hosts according to the memory health degree, 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 is 0.6+ 0.4, and 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 host memory health utilization rate 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:
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 utilization rate of the memory health of the host (namely the highest health degree of the memory of the host) is selected to dispatch 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, the host logical memory usage rate (host memory-host active large page memory) is the host virtualization degree/host memory, and the host real-time memory usage rate is the host real-time memory usage/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 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.
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 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 view of the above object, 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 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 method for scheduling booting 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 virtual machine paged memory according to the present invention apply equally well 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 (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link 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 (10)

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 residual 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 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 pages of the 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.
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 sizes 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 from 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 fact that the plurality of other hosts in the cluster start the same large-page memory and the size of the rest large-page memory is the same, selecting the host with the highest host memory health degree as a target host to schedule the virtual machine.
4. The method according to claim 1, wherein said responding to the consistency of the sizes 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 from the other hosts according to the memory health degrees, and scheduling the virtual machine to the destination host further comprises:
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;
and configuring the real-time memory usage rate as the real-time memory divided by the host memory.
5. The method according to claim 1, further comprising:
and responding to the fact that the sizes of the large page memories left by the plurality of other hosts in the cluster are not consistent, scheduling the virtual machine to the host with the largest large page memory left in the plurality of other hosts, and starting the virtual machine.
6. A startup scheduling device for a large-page memory of a virtual machine is characterized by 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 consistency of the sizes of the remaining large pages of the 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 target host from the other hosts according to the memory health degrees, and schedule the virtual machine to the target host.
7. The apparatus according to claim 6, 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.
8. The boot scheduling apparatus of the large page memory of the virtual machine according to claim 6, wherein the same memory scheduling module is further configured to:
and responding to the fact that the sizes of the large page memories left by the plurality of other hosts in the cluster are not consistent, scheduling the virtual machine to the host with the largest large page memory left in the plurality of other hosts, and starting the virtual machine.
9. 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-5.
10. 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 5.
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 true CN111562975A (en) 2020-08-21
CN111562975B 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113094173A (en) * 2021-04-02 2021-07-09 烽火通信科技股份有限公司 DPDK-based large-page memory dynamic migration method and device
CN117909059A (en) * 2023-12-12 2024-04-19 天翼云科技有限公司 Memory watermark optimization method

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

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113094173A (en) * 2021-04-02 2021-07-09 烽火通信科技股份有限公司 DPDK-based large-page memory dynamic migration method and device
CN113094173B (en) * 2021-04-02 2022-05-17 烽火通信科技股份有限公司 DPDK-based large-page memory dynamic migration method and device
CN117909059A (en) * 2023-12-12 2024-04-19 天翼云科技有限公司 Memory watermark optimization method

Also Published As

Publication number Publication date
CN111562975B (en) 2023-01-06

Similar Documents

Publication Publication Date Title
US7472252B2 (en) Merging identical memory pages
RU2438165C2 (en) Apparatus and method for reducing displacements in multilevel cache hierarchy
BR112019014589A2 (en) SERVICE AND APPLIANCE PROCESSING METHOD
CN109753443B (en) Data processing method and device and electronic equipment
US11675709B2 (en) Reading sequential data from memory using a pivot table
CN111562975B (en) Startup scheduling method, device, equipment and medium for large-page memory of virtual machine
CN111581126B (en) SSD-based log data storage method, SSD-based log data storage device, SSD-based log data storage equipment and SSD-based log data storage medium
CN111858025A (en) Mixed scheduling method, device, equipment and medium based on GPU card video memory
US8645667B2 (en) Operating system management of address-translation-related data structures and hardware lookasides
CN114527938A (en) Data reading method, system, medium and device based on solid state disk
CN115657946A (en) Off-chip DDR bandwidth unloading method under RAID sequential writing scene, terminal and storage medium
CN115151902A (en) Cluster capacity expansion method and device, storage medium and electronic equipment
CN110417579B (en) Method, equipment and readable medium for managing gigabit network by using gigabit network card
US7296138B1 (en) Method and apparatus to hook shared libraries across all processes on windows
CN112732427A (en) Data processing method, system and related device based on Redis cluster
US20200081869A1 (en) File storage method and storage apparatus
US10817432B2 (en) Memory address assignment method for virtual machine and apparatus
CN101441551A (en) Computer, external memory and method for processing data information in external memory
CN115714706A (en) Access acceleration system and method based on embedded H5, storage medium and electronic equipment
CN115576766A (en) Flash memory management algorithm debugging method, system, device and readable storage medium
US20220414001A1 (en) Memory inclusivity management in computing systems
CN115033551A (en) Database migration method and device, electronic equipment and storage medium
US10853085B2 (en) Adjustable performance boot system
US10216524B2 (en) System and method for providing fine-grained memory cacheability during a pre-OS operating environment
US20150370816A1 (en) Load-balancing techniques for auditing file accesses in a storage system

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