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

Virtual machine scheduling method, device and equipment and readable storage medium

A scheduling method and storage medium technology, applied in the field of virtualization, can solve problems such as cpu utilization fragmentation, vcpu blocking, virtual machine performance degradation, etc., and achieve the effects of reducing synchronization delay, improving performance, reducing fragmentation and priority inversion

Pending Publication Date: 2021-06-25
SANGFOR TECH INC
View PDF10 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In the virtualization scenario, there will be synchronization delay problems that do not exist in the physical environment. Among them, the problem of spin locks (spinlocks) is particularly prominent. The spin locks are mainly used for synchronization between threads. The kernel thread will not be preempted, but in the virtualization environment, the child thread (vcpu) of the virtual machine (VM, Virtual Machine) holding the spin lock will be preempted by other threads, because the vcpu behaves as a user in the physical environment. State threads can be preempted by other high-priority threads. Only when the preempted vcpu gets the physical cpu (pcpu, cpu hyperthreading) running again can it complete the synchronization with other vcpus. The preempted time will cause synchronization delay. At the same time, it will also cause other vcpus waiting for the spin lock to be blocked, which will lead to a serious decline in the performance of the virtual machine; in the existing case, there have been 30% decline in database performance and the blue screen of the windows virtual machine
[0003] In the prior art, the co-scheduling (cooperative scheduling) algorithm is often used to solve the synchronization delay problem of the virtual machine, and the co-scheduling algorithm will schedule all the vcpus of the virtual machine at the same time, that is, all the vcpus of the virtual machine either obtain the pcpu at the same time, or Release the pcpu at the same time; and once a vcpu cannot get the pcpu, other vcpus that have already got the pcpu will also wait, which will cause the fragmentation problem of the cpu utilization, for example, the vcpu1 and vcpu2 of the virtual machine are in the pcpu1 and pcpu2 at the same time The running queue is ready to run, but at this time only pcpu1 is idle and pcpu2 is busy, then neither vcpu1 nor vcpu2 will be run, pcpu1 will wait until pcpu2 is also free, and then run vcpu1 and vcpu2 at the same time, pcpu1 waits This period of time is cpu fragmentation, which will reduce cpu utilization, because this time slice that could have been used to run other tasks is occupied by vcpu1 busy waiting; and the waiting time of vcpu will cause the running time of high-priority tasks to be delayed. Can be scheduled in time, leading to the problem of priority inversion

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
  • Virtual machine scheduling method, device and equipment and readable storage medium
  • Virtual machine scheduling method, device and equipment and readable storage medium
  • Virtual machine scheduling method, device and equipment and readable storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0045] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0046] Please refer to figure 1 , figure 1 It is a flowchart of a virtual machine scheduling method provided by an embodiment of the present invention. The method can include:

[0047] Step 101: Obtain the pcpu utilization rate of each physical cpu.

[0048] Wherein, the physical cpu (pcpu, physical cpu) in this step can be cpu (central p...

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 virtual machine scheduling method, device and equipment, and a readable storage medium. The method comprises the steps of obtaining a pcpu utilization rate of each physical cpu; according to the pcpu utilization rate, determining a physical cpu to be adjusted in the physical cpu; determining a target sub-thread in the sub-threads according to the vcpu utilization rate of the sub-threads of the virtual machine on the physical cpu to be adjusted; and scheduling the target sub-thread from the source physical cpu to the target physical cpu; According to the method, device and equipment, the vcpu distribution and scheduling of the virtual machine are dynamically controlled by utilizing the pcpu utilization rate of each physical cpu and the vcpu utilization rate of the sub-thread of the virtual machine, so that the pcpu utilization rate of each physical cpu can be balanced, the synchronization delay of the virtual machine is reduced, and the performance of the virtual machine is improved; In addition, synchronous scheduling does not need to be carried out on all the vcpu of the virtual machine, and the situations of fragments used by the cpu and priority inversion are reduced.

Description

technical field [0001] The present invention relates to the technical field of virtualization, in particular to a virtual machine scheduling method, device, equipment and readable storage medium. Background technique [0002] With the development of science and technology in modern society, the application of virtualization technology is becoming more and more extensive. In the virtualization scenario, there will be synchronization delay problems that do not exist in the physical environment. Among them, the problem of spin locks (spinlocks) is particularly prominent. The spin locks are mainly used for synchronization between threads. The kernel thread will not be preempted, but in the virtualization environment, the child thread (vcpu) of the virtual machine (VM, Virtual Machine) holding the spin lock will be preempted by other threads, because the vcpu behaves as a user in the physical environment. State threads can be preempted by other high-priority threads. Only when t...

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/455G06F9/48G06F9/50
CPCG06F9/45558G06F9/4881G06F9/5038G06F2009/4557G06F2209/5021G06F2209/484G06F2209/5018
Inventor 陈列
Owner SANGFOR TECH INC
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