Method for allocating memory to virtual machine and the virtual machine

A technology for allocating memory and virtual machines. It is applied in the computer field and can solve problems such as inability to allocate memory.

Active Publication Date: 2020-05-26
CHINA MOBILE SUZHOU SOFTWARE TECH CO LTD +1
View PDF2 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] The embodiment of the present invention provides a method for allocating memory for a virtual machine and a virtual machine to solve the problem of inability to flexibly allocate memory for a virtual machine in the prior art. Technical issues to meet the diverse memory call requirements of processes

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

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for allocating memory to virtual machine and the virtual machine
  • Method for allocating memory to virtual machine and the virtual machine
  • Method for allocating memory to virtual machine and the virtual machine

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0068] In order to solve the above technical problems, the general idea of ​​the technical solutions in the embodiments of the present invention is as follows:

[0069] First, obtain the average memory size a of each of the N NUMA nodes to be allocated to the virtual machine, where the average memory size S is the size of the total memory to be allocated to the virtual machine, p is an integer multiple of the memory page size of the host machine of the virtual machine, K 1 Is the number of copies that can be distributed;

[0070] Then, obtain n of the N NUMA nodes to be allocated 1 Number of copies of the first remaining memory of each NUMA node K 2 , Wherein the number of copies of the first remaining memory K 2 =K 1 %N, n 1 Is greater than or equal to 1 and less than or equal to K 2 Integer

[0071] After that, when the size r of the second remaining memory is 0, based on the size a of the average memory and the number of copies of the first remaining memory K 2 , Allocate memory o...

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 memory to a virtual machine and the virtual machine, and the virtual machine comprises N non-uniform memory architecture NUMA nodes. The method comprises the following steps: firstly, obtaining the size of an average memory of each NUMA node in N NUMA nodes to be allocated to a virtual machine; then, obtaining the number of first remaining memories to be allocated to n1 NUMA nodes in the N NUMA nodes; and finally, when the size of the second remaining memory is 0, allocating memories with corresponding sizes to the N NMUA nodes based on the sizeof the average memory and the number of the first remaining memories. The technical effects that the memory is flexibly allocated to the virtual machine, the memory is flexibly allocated to the NUMA node of the virtual machine, and the diversified memory calling requirements of the process are met are achieved.

Description

Technical field [0001] The present invention relates to the field of computers, in particular to a method for allocating memory for a virtual machine and a virtual machine. Background technique [0002] As the foundation of cloud computing solutions, virtualization technology is getting more application scenarios with the continuous expansion of cloud computing products. The virtual machine runs on the host machine. The random access memory (RAM) of the virtual machine is allocated by the operating system (OS) of the host machine and the virtual machine manager (VMM) of the host machine. It is also part of the host's RAM. [0003] Non-Uniform Memory Access (NUMA) technology distributes memory resources and CPU resources to different NUMA nodes. In the same NUMA node, the CPU accessing the memory of the local node is called accessing the local memory, and the CPU accessing the memory of other nodes is called accessing the remote memory, and the CPU accessing the local memory is fa...

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 CHINA MOBILE SUZHOU SOFTWARE TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products