CN107766122B - Method and device for setting available memory space of host machine - Google Patents

Method and device for setting available memory space of host machine Download PDF

Info

Publication number
CN107766122B
CN107766122B CN201710900541.3A CN201710900541A CN107766122B CN 107766122 B CN107766122 B CN 107766122B CN 201710900541 A CN201710900541 A CN 201710900541A CN 107766122 B CN107766122 B CN 107766122B
Authority
CN
China
Prior art keywords
host
memory
memory space
space
available
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
CN201710900541.3A
Other languages
Chinese (zh)
Other versions
CN107766122A (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 CN201710900541.3A priority Critical patent/CN107766122B/en
Publication of CN107766122A publication Critical patent/CN107766122A/en
Application granted granted Critical
Publication of CN107766122B publication Critical patent/CN107766122B/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/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/45545Guest-host, i.e. hypervisor is an application program itself, e.g. VirtualBox
    • 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • 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/45562Creating, deleting, cloning virtual machine instances
    • 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

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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method and a device for setting available memory space of a host machine, wherein the method comprises the following steps: setting the available memory space of the host machine to be a physical memory space of the host machine and a switching area space of a hard disk of the host machine by setting kernel parameters of an operating system of the host machine, so that the available memory space of the host machine is larger, and more available memory spaces of virtual machines can be distributed; setting a switching area space of a hard disk of a host machine aiming at a memory space required by creating a virtual machine according to the host memory virtualization degree; setting the maximum memory space available for the virtual machine in the memory configuration file of the virtual machine according to the available memory space of the host machine so as to ensure that the virtual machine is successfully newly built on the host machine; and detecting the hot added memory when the virtual machine is operated, and adding the physical memory space of the detected hot added memory to the available memory space of the host machine to avoid memory overflow.

Description

Method and device for setting available memory space of host machine
Technical Field
The present invention relates to information technology, and more particularly, to a method and apparatus for setting an available memory space of a host.
Background
The memory is an important resource in an operating system, and the memory management is to allocate and release the memory. In virtualized applications, memory resources are the most valuable resources. Compared with the management of computing resources and hard disk storage resources of a Host (Host), the management of memory resources of a Virtual Machine (Virtual Machine) is more complex, before the Virtual Machine is created, a memory specification (the maximum memory which can be allocated to the Virtual Machine) is determined, each newly-created Virtual Machine corresponds to one QEMU simulation processor process in a Linux system installed on the Host, in the Linux system of the Host, each QEMU simulation processor process has a group of resource limitations, and the management of the memory allocation of the Virtual Machine mainly controls the allocation of the memory by adjusting kernel parameters of the Linux system installed on the Host. Because the memory resources of each host are limited, the number of virtual machines that can run on a host is also limited. How to determine the number of virtual machines which can be operated according to the memory size of a host machine relates to the problem of host machine memory resource management. In the aspect of memory resource management, the Windows system and the Linux system are greatly different: for a host machine with a Windows system, the configured memory size is the actual memory of the current system, and when a virtual machine runs on the host machine with the Windows system, the available memory of the host machine can directly reduce the corresponding memory value configured for the virtual machine. For a host machine with a Linux system, the configured memory space is a memory which can be reached by the Linux system, but actually, the occupied memory space is much smaller, and after the Linux system virtual machine is created, the memory of the host machine cannot be obviously reduced. When the virtual machines are established and started in batch, the Linux system virtual machines can be established more than the Windows system virtual machines under the condition of the same virtual machine configuration.
The Linux system kernel already supports memory hot plug, and when a Linux system runs in a physical environment or a virtual environment, as long as the host machine can provide a memory hot plug mechanism, the Linux kernel can correspondingly increase or decrease the memory. If the virtual machine starts the memory hot plug function, the host machine memory resource management is more complicated. When allocating the memory resources, not only the size of the currently configured memory resources but also the size of the memory resources available to the host and the maximum memory that can be achieved by the virtual machine through hot addition are considered. Under such conditions, a memory overflow may result when the maximum memory used by the virtual machine exceeds the host's available memory space.
Disclosure of Invention
In order to solve the above technical problem, the present invention provides a method and an apparatus for setting an available memory space of a host, which can adjust a memory space allocated to a virtual machine so that the memory space does not exceed the available memory space of the host.
In order to achieve the object of the present invention, an embodiment of the present invention provides a method for setting an available memory space of a host, where the method includes:
setting an available memory space of a host machine as a physical memory space of the host machine and a switching area space of a hard disk of the host machine by setting kernel parameters of an operating system of the host machine;
setting the exchange area space of the hard disk of the host according to the host memory virtualization degree; the host memory virtualization degree is the ratio of the exchange area space of the hard disk of the host to the physical memory space of the host;
setting the maximum memory space available for the virtual machine in the memory configuration file of the virtual machine according to the available memory space of the host machine so as to ensure that the virtual machine is successfully newly built on the host machine; the virtual machine memory configuration file is used for configuring the maximum memory space available for the virtual machine;
detecting the hot added memory while running the virtual machine, and adding the physical memory space of the detected hot added memory to the available memory space of the host.
The embodiment of the invention has the beneficial effects that: the available memory space of the host machine is set to be the physical memory space of the host machine and the exchange area space of the hard disk of the host machine, so that the available memory space of the host machine is larger, and more available memory spaces of the virtual machines can be distributed; in addition, by setting the host memory virtualization degree, the swap area space of the hard disk can be set for the memory space required by the virtual machine; and when the hot added memory is detected, adding the physical memory space of the hot added memory to the available memory space of the host machine to avoid memory overflow.
Further, in an optional embodiment, after the step of adding the physical memory space of the hot added memory to the available memory space of the host, the method further comprises:
resetting the exchange area space of the hard disk of the host according to the host memory virtualization degree; and resetting the maximum memory space available for the virtual machine in the memory configuration file of the virtual machine according to the available memory space of the host machine.
Further, in an optional embodiment, the method further comprises:
and when the virtual machine is operated, setting the virtualization degree of the host memory according to the memory occupation condition of the virtual machine.
Further, in an optional embodiment, the host includes a first number of hosts deployed in a cluster, the physical memory space of the host includes all the physical memory spaces of the first number of hosts deployed in the cluster, the swap area space of the hard disks of the host includes swap area spaces of all the hard disks of the first number of hosts deployed in the cluster, and the maximum memory space available for the virtual machine includes a sum of maximum memory spaces available for all the virtual machines on the first number of hosts deployed in the cluster.
In order to achieve the object of the present invention, an embodiment of the present invention further provides an apparatus for setting an available memory space of a host, including:
the kernel parameter setting module is set to: setting an available memory space of a host machine as a physical memory space of the host machine and a switching area space of a hard disk of the host machine by setting kernel parameters of an operating system of the host machine;
the switching zone space setting module is set to: setting the exchange area space of the hard disk of the host according to the host memory virtualization degree; the host memory virtualization degree is the ratio of the exchange area space of the hard disk of the host to the physical memory space of the host;
the virtual machine memory space setting module is set as follows: setting the maximum memory space available for the virtual machine in the memory configuration file of the virtual machine according to the available memory space of the host machine so as to ensure that the virtual machine is successfully newly built on the host machine; the virtual machine memory configuration file is used for configuring the maximum memory space available for the virtual machine;
a hot add memory module configured to: detecting the hot added memory while running the virtual machine, and adding the physical memory space of the detected hot added memory to the available memory space of the host.
The embodiment of the invention has the beneficial effects that: the available memory space of the host machine is set to be the physical memory space of the host machine and the exchange area space of the hard disk of the host machine, so that the available memory space of the host machine is larger, and more available memory spaces of the virtual machines can be distributed; in addition, by setting the host memory virtualization degree, the swap area space of the hard disk can be set for the memory space required by the virtual machine; and when the hot added memory is detected, adding the physical memory space of the hot added memory to the available memory space of the host machine to avoid memory overflow.
Further, in an optional embodiment, the apparatus for setting an available memory space of a host further includes a memory space resetting module, where the memory space resetting module is configured to: after the hot adding memory module adds the detected physical memory space of the hot adding memory to the available memory space of the host machine, the memory space resetting module resets the switching area space of the hard disk of the host machine according to the host machine memory virtualization degree, and resets the maximum memory space available to the virtual machine in the virtual machine memory configuration file according to the available memory space of the host machine.
Further, in an optional embodiment, the apparatus for setting an available memory space of a host further includes a virtualization degree setting module, where the virtualization degree setting module is configured to: and when the virtual machine is operated, setting the virtualization degree of the host memory according to the memory occupation condition of the virtual machine.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the example serve to explain the principles of the invention and not to limit the invention.
Fig. 1 illustrates a method for setting an available memory space of a host according to an embodiment of the present invention;
fig. 2 is a diagram illustrating an apparatus for setting an available memory space of a host according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
The steps illustrated in the flow charts of the figures may be performed in a computer system such as a set of computer-executable instructions. Also, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
In one aspect, an embodiment of the present invention provides a method for setting an available memory space of a host, as shown in fig. 1, the method includes steps S101 to S113.
Step S101, setting the available memory space of the host machine to be a physical memory space of the host machine and a swap area space of a hard disk of the host machine by setting kernel parameters of an operating system of the host machine.
It should be noted that, a HOST (HOST) is relative to a Virtual Machine running on an operating system of the HOST, the operating system of the HOST is a Linux system, QEMU is used to create the Virtual Machine, libvirt Virtual operating system simulator is used to call a KVM (Kernel-based Virtual Machine) virtualization interface to manage the Virtual Machine, and Kernel parameters of the operating system to be set are over _ memory and over _ ratio; the physical memory space of the host is a physical random access memory of the host, the exchange area space of a hard disk of the host is also called a Swap partition, the Swap partition is a hard disk partition independently occupied by a Linux system, and can conveniently store a part of contents (programs, data and the like) in the Swap partition under the condition of insufficient memory requirement, and continuously execute and store the contents in the Swap partition under the condition of spare physical memory of the host. After setting the kernel parameters of the operating system, the available memory space of the host is not limited to the physical memory space of the host, but also includes the swap area space of the hard disk of the host.
Step S105, setting the exchange area space of the hard disk of the host according to the host memory virtualization degree; the host memory virtualization degree is the ratio of the swap area space of the hard disk of the host to the physical memory space of the host.
The host memory virtualization degree is a parameter specifically defined for setting an exchange area space of a hard disk, and is a ratio of the exchange area space of the hard disk of a host to a physical memory space of the host, that is, the exchange area space of the hard disk can be determined according to the physical memory space of the host and the host memory virtualization degree, the exchange area space of the hard disk is equivalent to a virtual memory of the host and is mapped to an address space of the physical memory of the host, and the mapped address space cannot exceed the available physical memory of the host. The host memory virtualization degree may be automatically set according to a preset program or may be from outside the host, for example, the host memory virtualization degree is set by a user through a virtualization product management interface of an existing Linux operating system of the host.
Step S109, according to the available memory space of the host machine, setting the maximum memory space available for the virtual machine in the memory configuration file of the virtual machine, so as to ensure that the virtual machine is successfully newly built on the host machine; the virtual machine memory configuration file is used for configuring the maximum memory space available for the virtual machine.
Here, the virtual machine memory configuration file may be a file in xml (Extensible Markup Language) format; optionally, this virtual machine memory configuration file may be used not only to set the maximum memory space available to the virtual machine, but also to set various aspects required to create the virtual machine and to run the virtual machine. By setting the maximum memory space available to the virtual machine, the maximum memory space available to the virtual machine can be limited to the available memory space of the host, and in this way, it is ensured that the virtual machine can be successfully newly built on the host.
Step S113, when the virtual machine is running, detecting the hot added memory, and adding the physical memory space of the detected hot added memory to the available memory space of the host.
Once the virtual machine is established on the host machine, when the virtual machine is operated, detecting whether the physical memory is hot-added on the host machine in real time (that is, the physical memory can be added without closing and restarting the host machine), and once the physical memory is detected to be hot-added, adding the hot-added physical memory space to the available memory space of the host machine, at this time, the available memory space of the host machine is increased, because the memory spaces used when the virtual machine is established and operated are different, the memory space used when the virtual machine is operated is possibly obviously larger than the memory space used when the virtual machine is established, therefore, when the available memory space of the host machine is increased by optionally hot-adding the physical memory, the maximum memory space available for the virtual machine is set again in the memory configuration file of the virtual machine, thereby improving the operating efficiency of the virtual machine.
The embodiment of the invention has the beneficial effects that: the available memory space of the host machine is set to be the physical memory space of the host machine and the exchange area space of the hard disk of the host machine, so that the available memory space of the host machine is larger, and more available memory spaces of the virtual machines can be distributed; in addition, by setting the host memory virtualization degree, the swap area space of the hard disk can be set for the memory space required by the virtual machine; and when the hot added memory is detected, adding the physical memory space of the hot added memory to the available memory space of the host machine to avoid memory overflow.
Because the memory spaces used by the virtual machines during the establishment and the operation are different, and the memory space used by the virtual machines during the operation is possibly obviously larger than the memory space used by the virtual machines during the establishment, when the physical memory is added to increase the available memory space of the host machine, the maximum memory space available to the virtual machines can be set again in the memory configuration file of the virtual machines, so that the available memory space of the virtual machines is enlarged, and the operation efficiency of the virtual machines is improved.
Further, in an optional embodiment, after step S113, the method for setting the available memory space of the host may further include:
resetting the exchange area space of the hard disk of the host according to the host memory virtualization degree; and resetting the maximum memory space available for the virtual machine in the memory configuration file of the virtual machine according to the available memory space of the host machine.
After the memory is added in a hot mode, the available memory space of the host machine is increased due to the increase of the physical memory of the host machine, at this time, the exchange area space of the hard disk of the host machine can be reset according to the existing host machine memory virtualization degree, so that the exchange area space of the hard disk of the host machine is increased, the available memory space of the host machine is further increased, and at this time, the maximum memory space available for the virtual machine can be reset in the virtual machine memory configuration file, so that the maximum memory space available for the virtual machine is increased.
Further, in an optional embodiment, the method for setting the available memory space of the host further includes:
and when the virtual machine is operated, setting the virtualization degree of the host memory according to the memory occupation condition of the virtual machine.
The host memory virtualization degree may be automatically set according to a preset program or may be from outside the host, for example, the host memory virtualization degree is set by a user through a virtualization product management interface of an existing Linux operating system of the host. Therefore, the swap area space of the hard disk is adjusted by setting the virtualization degree of the host memory according to the running condition of the virtual machine (for example, the memory used by the virtual machine) and the available memory space of the host, so that the available memory space of the host is changed.
Further, in an optional embodiment, the host includes a first number of hosts deployed in a cluster, the physical memory space of the host includes all the physical memory spaces of the first number of hosts deployed in the cluster, the swap area space of the hard disks of the host includes swap area spaces of all the hard disks of the first number of hosts deployed in the cluster, and the maximum memory space available to the virtual machine includes a sum of maximum memory spaces available to all the virtual machines on the first number of hosts deployed in the cluster.
In this alternative embodiment, the hosts may be implemented as a first number of hosts deployed in the form of a cluster; correspondingly, the physical memory space of the host includes all physical memory spaces of the first number of hosts deployed in the form of a cluster, the swap area space of the hard disks of the hosts includes swap area spaces of all hard disks of the first number of hosts deployed in the form of a cluster, and the maximum memory space available to the virtual machines includes a sum of maximum memory spaces available to all virtual machines on the first number of hosts deployed in the form of a cluster.
On the other hand, the embodiment of the present invention further provides an apparatus for setting an available memory space of a host, as shown in fig. 2, the apparatus includes a kernel parameter setting module 201, a swap area space setting module 205, a virtual machine memory space setting module 209, and a hot add memory module 213.
The kernel parameter setting module 201 is arranged to: setting the available memory space of the host machine as a physical memory space of the host machine and a switching area space of a hard disk of the host machine by setting the kernel parameters of the operating system of the host machine.
The switching zone space setting module 205 is configured to: setting the exchange area space of the hard disk of the host according to the host memory virtualization degree; the host memory virtualization degree is the ratio of the swap area space of the hard disk of the host to the physical memory space of the host.
The virtual machine memory space setting module 209 is configured to: setting the maximum memory space available for the virtual machine in the memory configuration file of the virtual machine according to the available memory space of the host machine so as to ensure that the virtual machine is successfully newly built on the host machine; the virtual machine memory configuration file is used for configuring the maximum memory space available for the virtual machine.
Hot add memory module 213 is configured to: detecting the hot added memory while running the virtual machine, and adding the physical memory space of the detected hot added memory to the available memory space of the host.
The embodiment of the invention has the beneficial effects that: the available memory space of the host machine is set to be the physical memory space of the host machine and the exchange area space of the hard disk of the host machine, so that the available memory space of the host machine is larger, and more available memory spaces of the virtual machines can be distributed; in addition, by setting the host memory virtualization degree, the swap area space of the hard disk can be set for the memory space required by the virtual machine; and when the hot added memory is detected, adding the physical memory space of the hot added memory to the available memory space of the host machine to avoid memory overflow.
Further, in an optional embodiment, the apparatus for setting an available memory space of a host further includes a memory space resetting module. The memory space resetting module is set as follows: after the hot adding memory module adds the detected physical memory space of the hot adding memory to the available memory space of the host machine, the memory space resetting module resets the switching area space of the hard disk of the host machine according to the host machine memory virtualization degree, and resets the maximum memory space available to the virtual machine in the virtual machine memory configuration file according to the available memory space of the host machine.
Further, in an optional embodiment, the virtualization degree setting module is configured to: and when the virtual machine is operated, setting the virtualization degree of the host memory according to the memory occupation condition of the virtual machine.
Although the embodiments of the present invention have been described above, the above description is only for the convenience of understanding the present invention, and is not intended to limit the present invention. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (5)

1. A method for setting available memory space of a host is characterized by comprising the following steps:
setting an available memory space of a host machine as a physical memory space of the host machine and a switching area space of a hard disk of the host machine by setting kernel parameters of an operating system of the host machine;
setting the exchange area space of the hard disk of the host according to the host memory virtualization degree; the host memory virtualization degree is the ratio of the exchange area space of the hard disk of the host machine to the physical memory space of the host machine;
setting the maximum memory space available for the virtual machine in a virtual machine memory configuration file according to the available memory space of the host machine so as to ensure that the virtual machine is successfully newly built on the host machine; the virtual machine memory configuration file is used for configuring the maximum memory space available for the virtual machine;
detecting a hot added memory when a virtual machine is operated, and adding a physical memory space of the detected hot added memory to an available memory space of the host machine;
after the adding of the physical memory space of the detected hot added memory to the available memory space of the host,
resetting the exchange area space of the hard disk of the host according to the host memory virtualization degree; and resetting the maximum memory space available for the virtual machine in the memory configuration file of the virtual machine according to the available memory space of the host machine.
2. The method of claim 1, further comprising:
and when the virtual machine is operated, setting the host memory virtualization degree according to the memory occupation condition of the virtual machine.
3. The method of claim 1, wherein the hosts comprise a first number of hosts deployed in a cluster, the host's physical memory space comprises all of the physical memory space of the first number of hosts deployed in a cluster, the swap area space for the host's hard disks comprises the swap area space for all of the hard disks of the first number of hosts deployed in a cluster, and the maximum memory space available to the virtual machines comprises a sum of the maximum memory space available to all virtual machines on the first number of hosts deployed in a cluster.
4. An available memory space setting device of a host, comprising:
a kernel parameter setting module configured to: setting an available memory space of a host machine as a physical memory space of the host machine and a switching area space of a hard disk of the host machine by setting kernel parameters of an operating system of the host machine;
a switching zone space setting module configured to: setting the exchange area space of the hard disk of the host according to the host memory virtualization degree; the host memory virtualization degree is the ratio of the exchange area space of the hard disk of the host machine to the physical memory space of the host machine;
a virtual machine memory space setting module, the virtual machine memory space setting module being configured to: setting the maximum memory space available for the virtual machine in a virtual machine memory configuration file according to the available memory space of the host machine so as to ensure that the virtual machine is successfully newly built on the host machine; the virtual machine memory configuration file is used for configuring the maximum memory space available for the virtual machine;
a hot-add memory module configured to: detecting a hot added memory when a virtual machine is operated, and adding a physical memory space of the detected hot added memory to an available memory space of the host machine;
a memory space resetting module configured to: after the hot-adding memory module adds the detected physical memory space of the hot-adding memory to the available memory space of the host, the memory space resetting module resets the swap area space of the hard disk of the host according to the host memory virtualization degree, and resets the maximum memory space available to the virtual machine in the virtual machine memory configuration file according to the available memory space of the host.
5. The apparatus of claim 4, further comprising a virtualization degree setting module configured to: and when the virtual machine is operated, setting the host memory virtualization degree according to the memory occupation condition of the virtual machine.
CN201710900541.3A 2017-09-28 2017-09-28 Method and device for setting available memory space of host machine Active CN107766122B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710900541.3A CN107766122B (en) 2017-09-28 2017-09-28 Method and device for setting available memory space of host machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710900541.3A CN107766122B (en) 2017-09-28 2017-09-28 Method and device for setting available memory space of host machine

Publications (2)

Publication Number Publication Date
CN107766122A CN107766122A (en) 2018-03-06
CN107766122B true CN107766122B (en) 2021-01-15

Family

ID=61267381

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710900541.3A Active CN107766122B (en) 2017-09-28 2017-09-28 Method and device for setting available memory space of host machine

Country Status (1)

Country Link
CN (1) CN107766122B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108984270B (en) * 2018-07-18 2020-12-01 苏州浪潮智能科技有限公司 Memory allocation method and device for virtual machine
CN113377490A (en) * 2020-03-10 2021-09-10 阿里巴巴集团控股有限公司 Memory allocation method, device and system of virtual machine

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103324516A (en) * 2013-07-04 2013-09-25 曙光信息产业(北京)有限公司 Virtualization-driven hardware management method and device
CN103365700A (en) * 2013-06-28 2013-10-23 福建师范大学 Cloud computing virtualization environment-oriented resource monitoring and adjustment system
WO2014000779A1 (en) * 2012-06-27 2014-01-03 Qatar Foundation An arrangement configured to allocate resources of a plurality of data storage media to a plurality virtual machines and associated method
CN105677444A (en) * 2015-12-31 2016-06-15 联想(北京)有限公司 Method and device for starting virtual machine
US9436496B1 (en) * 2011-07-19 2016-09-06 Open Invention Network Llc Dynamic virtual storage creation and provisioning of virtual machine resources
CN106339250A (en) * 2016-08-19 2017-01-18 郭笃刚 Management method of virtual memory of computer
CN106648827A (en) * 2016-09-20 2017-05-10 国云科技股份有限公司 Method for online adding virtual machine resources

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100077128A1 (en) * 2008-09-22 2010-03-25 International Business Machines Corporation Memory management in a virtual machine based on page fault performance workload criteria
CN105049257A (en) * 2015-08-12 2015-11-11 北京因特信安软件科技有限公司 Cloud platform scheduling method based on trusted geographical location information
CN106548262B (en) * 2015-09-21 2020-11-06 阿里巴巴集团控股有限公司 Scheduling method, device and system for resources for processing tasks

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9436496B1 (en) * 2011-07-19 2016-09-06 Open Invention Network Llc Dynamic virtual storage creation and provisioning of virtual machine resources
WO2014000779A1 (en) * 2012-06-27 2014-01-03 Qatar Foundation An arrangement configured to allocate resources of a plurality of data storage media to a plurality virtual machines and associated method
CN103365700A (en) * 2013-06-28 2013-10-23 福建师范大学 Cloud computing virtualization environment-oriented resource monitoring and adjustment system
CN103324516A (en) * 2013-07-04 2013-09-25 曙光信息产业(北京)有限公司 Virtualization-driven hardware management method and device
CN105677444A (en) * 2015-12-31 2016-06-15 联想(北京)有限公司 Method and device for starting virtual machine
CN106339250A (en) * 2016-08-19 2017-01-18 郭笃刚 Management method of virtual memory of computer
CN106648827A (en) * 2016-09-20 2017-05-10 国云科技股份有限公司 Method for online adding virtual machine resources

Also Published As

Publication number Publication date
CN107766122A (en) 2018-03-06

Similar Documents

Publication Publication Date Title
US10191759B2 (en) Apparatus and method for scheduling graphics processing unit workloads from virtual machines
US8281303B2 (en) Dynamic ejection of virtual devices on ejection request from virtual device resource object within the virtual firmware to virtual resource driver executing in virtual machine
US8762999B2 (en) Guest-initiated resource allocation request based on comparison of host hardware information and projected workload requirement
US8959512B2 (en) System and method to improve memory usage in virtual machines running as hypervisor guests
CN106537340B (en) Input/output acceleration apparatus and method of virtualized information handling system
US10152409B2 (en) Hybrid in-heap out-of-heap ballooning for java virtual machines
US9798565B2 (en) Data processing system and method having an operating system that communicates with an accelerator independently of a hypervisor
US9697024B2 (en) Interrupt management method, and computer implementing the interrupt management method
US20060184938A1 (en) Method, apparatus and system for dynamically reassigning memory from one virtual machine to another
US20130219391A1 (en) Server and method for deploying virtual machines in network cluster
CN106844007A (en) A kind of virtual method and system based on spatial reuse
KR20210095690A (en) Resource management method and apparatus, electronic device and recording medium
CN107977251B (en) Exclusive access to shared registers in virtualized systems
CN107368353B (en) Method and device for realizing hot addition of virtual machine memory
WO2022041507A1 (en) 3d rendering method and system
JP2013120552A (en) Virtual computer system, virtual computer management program, and mac address management method
CN110162397B (en) Resource allocation method, device and system
CN109656675B (en) Bus equipment, computer equipment and method for realizing physical host cloud storage
CN107766122B (en) Method and device for setting available memory space of host machine
CN114090171A (en) Virtual machine creation method, migration method and computer readable medium
WO2018103372A1 (en) Driver management method and host machine
US11893407B2 (en) Overlay container storage driver for microservice workloads
US10789082B2 (en) Execution of multiple operating systems without rebooting
CN113791873B (en) Virtual machine creating method, computing device and storage medium
US20240143377A1 (en) Overlay container storage driver for microservice workloads

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20201203

Address after: 215100 No. 1 Guanpu Road, Guoxiang Street, Wuzhong Economic Development Zone, Suzhou City, Jiangsu Province

Applicant after: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd.

Address before: 450018 Henan province Zheng Dong New District of Zhengzhou City Xinyi Road No. 278 16 floor room 1601

Applicant before: ZHENGZHOU YUNHAI INFORMATION TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant