Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method for allocating memory for virtual machine, storage medium and computer program architecture

A computer program, a technology for allocating memory, applied in computing, program control design, program control devices, etc., can solve problems such as inability to meet high-performance requirements, affecting the smoothness of virtual machine running, etc., to ensure memory usage and prevent insufficient memory. Effect

Pending Publication Date: 2021-09-24
云宏信息科技股份有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Because the virtual machine needs to apply for memory from KVM and wait for it to be allocated before using the memory to run the program, this allocation method will affect the smoothness of the virtual machine running and cannot meet the high performance requirements of the virtual machine.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0016] A computer includes a processor and a computer-readable storage medium on which an executable computer program is stored. The computer program is the code of the KVM module (a computer program framework for realizing virtualization), and the processor executes the above computer program to realize the functions of the KVM module.

[0017] The above KVM module creates KVM virtual machines 1, 2, and 3 on a computer (hereinafter referred to as a host machine), and each virtual machine 1, 2, and 3 is used to run different business systems. The user establishes a database in advance, and then manually evaluates the pre-occupied memory requirements X, Y, and Z corresponding to multiple reference virtual machines 4, 5, and 6 running business systems A, B, and C based on experience. The memory requirements X, Y, and Z include the reserved memory requirements required by the reference virtual machine startup process and the reserved memory requirements required by the business s...

Embodiment 2

[0022] A computer includes a processor and a computer-readable storage medium on which an executable computer program is stored. The computer program is the code of the KVM module (a computer program framework for realizing virtualization), and the processor executes the above computer program to realize the functions of the KVM module.

[0023] The above KVM module creates KVM virtual machines 1, 2, and 3 on the computer (hereinafter referred to as the host machine). Virtual machine 1 and virtual machine 2 have started and run business systems A and B respectively.

[0024] When virtual machine 3 needs to be powered on, assuming that virtual machine 3 is about to run business system A, the KVM module queries which business systems are run by virtual machines 1 and 2 running on the host machine, and finds that virtual machine 1 runs business system A. It is the same as the business system to be run by the virtual machine 3 that needs to be powered on. Then collect the actual a...

Embodiment 3

[0028] The present embodiment is substantially the same as the second embodiment, and only the differences between the present embodiment and the second embodiment are described below, specifically as follows:

[0029]Create a shared disk on which information about each virtual machine running on each host machine is stored, including the business system running on the virtual machine, the amount of memory actually used, and the maximum amount of CPU resources and memory that can be allocated. Assuming that virtual machine 4 on another host runs business system C, if virtual machine 3 that needs to be powered on is about to run business system C, then the KVM module inquires from the shared disk that virtual machine 4 runs the business system that virtual machine 3 will run The business system C, which is the same as the business system, obtains the amount of memory actually used by the virtual machine 4 from the shared disk, and estimates the pre-occupied memory demand of the ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method for allocating a memory for a virtual machine, a storage medium and a computer program architecture. The method specifically comprises the steps that in the running process of the virtual machine, if a memory application of the virtual machine is received, corresponding idle memory is allocated to the virtual machine for use, and the method comprises the step of allocating the memory for the virtual machine for use when the virtual machine needs to be started, and in the step of allocating the memory for the virtual machine for use, the memory is allocated to the virtual machine for use when the virtual machine needs to be started; specifically, according to the demanded quantity of the pre-occupied memory required by the service system to be operated by the virtual machine, the virtual machine is allocated. According to the method, when the virtual machine needs to be started, the memory is allocated for the virtual machine according to the pre-occupied memory demand quantity needed by the service system to be operated by the virtual machine, and the high-performance requirement of the virtual machine is met to a certain extent. And after the virtual machines are started and run, a mode of on-demand dynamic allocation is adopted, so that the memory utilization rate is ensured to a certain extent, and some virtual machines are prevented from occupying excessive redundant memories while the memories of other virtual machines are prevented from being insufficient.

Description

technical field [0001] The present invention relates to the technical field of memory allocation of a virtual machine, in particular to a method for allocating memory for a virtual machine, a storage medium, and a computer program architecture. Background technique [0002] In the KVM (Kernel-Based Virtual Machine) virtualization architecture, the memory used by the virtual machine during operation is dynamically allocated on demand. When the virtual machine needs memory to run the program, a page fault exception is triggered to apply to KVM. Memory. The KVM system allocates the free memory of the host machine to the virtual machine after receiving the memory request. The above-mentioned allocation means can improve the utilization rate of the memory, and prevent some virtual machines from occupying too much surplus memory while other virtual machines have insufficient memory. Because the virtual machine needs to apply for memory from KVM and wait for it to be allocated be...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/455
CPCG06F9/45558G06F2009/45583
Inventor 黎兵邹理贤
Owner 云宏信息科技股份有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products