CN105094945A - Method, equipment and system for virtualization platform thread control - Google Patents
Method, equipment and system for virtualization platform thread control Download PDFInfo
- Publication number
- CN105094945A CN105094945A CN201510379915.2A CN201510379915A CN105094945A CN 105094945 A CN105094945 A CN 105094945A CN 201510379915 A CN201510379915 A CN 201510379915A CN 105094945 A CN105094945 A CN 105094945A
- Authority
- CN
- China
- Prior art keywords
- virtual machine
- thread
- control center
- occupied
- control
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 73
- 238000012544 monitoring process Methods 0.000 claims abstract description 75
- 230000007958 sleep Effects 0.000 claims abstract description 35
- 238000004891 communication Methods 0.000 claims description 3
- 230000003993 interaction Effects 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 14
- 230000005059 dormancy Effects 0.000 description 12
- 238000012545 processing Methods 0.000 description 12
- 230000000694 effects Effects 0.000 description 10
- 230000006870 function Effects 0.000 description 7
- 230000007423 decrease Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 2
- 230000006266 hibernation Effects 0.000 description 2
- 229920006395 saturated elastomer Polymers 0.000 description 2
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000008439 repair process Effects 0.000 description 1
- 238000013468 resource allocation Methods 0.000 description 1
- 230000002618 waking effect Effects 0.000 description 1
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明实施例提供一种虚拟化平台线程控制方法、设备和系统,当虚拟机上的客户端针对控制中心下发的多个任务开启多线程运行时,开启监控线程,监控所有线程占用的虚拟机的资源,若判断获知所述占用的资源大于等于与虚拟机对应的第一限制阈值,则根据控制中心下发的线程优先级信息,控制低级别的线程休眠。实现了根据虚拟机的资源占用情况动态控制线程的工作状态,对客户端线程执行粒度更精细化的控制,防止对虚拟机的资源占用过多,降低虚拟机的整体性能,影响正常业务。
Embodiments of the present invention provide a thread control method, device, and system for a virtualization platform. When a client on a virtual machine starts multi-threaded operation for multiple tasks issued by the control center, it starts a monitoring thread and monitors the virtual threads occupied by all threads. If it is determined that the occupied resources are greater than or equal to the first limit threshold corresponding to the virtual machine, then the low-level thread is controlled to sleep according to the thread priority information issued by the control center. Realize the dynamic control of the working state of the thread according to the resource occupation of the virtual machine, and implement finer-grained control of the client thread to prevent excessive resource occupation of the virtual machine, reduce the overall performance of the virtual machine, and affect normal business.
Description
技术领域technical field
本发明涉及通信技术领域,尤其涉及一种虚拟化平台线程控制方法、设备和系统。The present invention relates to the technical field of communications, in particular to a virtualization platform thread control method, device and system.
背景技术Background technique
虚拟化平台上包括一个控制中心和至少一个物理机,通过虚拟化技术可将一台物理机虚拟成多台虚拟机,每个虚拟机可运行不同的操作系统和应用。The virtualization platform includes a control center and at least one physical machine. Through virtualization technology, one physical machine can be virtualized into multiple virtual machines. Each virtual machine can run different operating systems and applications.
虚拟机中安装有网络应用的客户端,控制中心可以控制部署在虚拟机上的客户端。也就是说,客户端针对控制平台下发的任务开启一个或者多个线程执行任务。比如:针对控制中心下发的扫描任务,客户端开启多线程执行。The client of the network application is installed in the virtual machine, and the control center can control the client deployed on the virtual machine. That is to say, the client starts one or more threads to execute the tasks for the tasks delivered by the control platform. For example: for the scanning tasks issued by the control center, the client starts multi-threaded execution.
但是,过多的扫描会导致虚拟机和/或虚拟机所在的物理机资源消耗过大,最终导致虚拟机和/或虚拟机所在的物理机的整体性能降低,影响其他正常业务。However, excessive scanning will lead to excessive consumption of resources of the virtual machine and/or the physical machine where the virtual machine is located, and eventually lead to a decrease in the overall performance of the virtual machine and/or the physical machine where the virtual machine is located, affecting other normal services.
发明内容Contents of the invention
本发明实施例提供一种虚拟化平台线程控制方法、设备和系统。技术方案如下:Embodiments of the present invention provide a virtualization platform thread control method, device and system. The technical solution is as follows:
根据本发明实施例的第一方面,提供一种虚拟化平台线程控制方法,该方法包括:According to a first aspect of an embodiment of the present invention, a virtualization platform thread control method is provided, the method comprising:
当虚拟机上的客户端针对控制中心下发的多个任务开启多线程运行时,开启监控线程,监控所有线程占用的虚拟机的资源;When the client on the virtual machine starts multi-threaded operation for multiple tasks issued by the control center, it starts the monitoring thread to monitor the resources of the virtual machine occupied by all threads;
判断所述占用的资源是否小于预设的、与所述虚拟机对应的第一限制阈值;judging whether the occupied resource is smaller than a preset first limit threshold corresponding to the virtual machine;
若判断获知所述占用的资源大于等于所述第一限制阈值,则根据所述控制中心下发的线程优先级信息,控制低级别的线程休眠。If it is determined that the occupied resource is greater than or equal to the first limit threshold, then according to the thread priority information issued by the control center, the low-level thread is controlled to sleep.
根据本发明实施例的第二方面,提供一种虚拟化平台线程控制方法,该方法包括:According to a second aspect of the embodiments of the present invention, a virtualization platform thread control method is provided, the method comprising:
接收虚拟机发送的启动消息;Receive the startup message sent by the virtual machine;
向所述虚拟机上的客户端发送至少一个任务,以及线程优先级信息,以使所述客户端针对所述任务开启多线程运行时,监控所有线程占用的虚拟机的资源,当所述占用的资源大于等于与所述虚拟机对应的第一限制阈值时,根据所述线程优先级信息,控制低级别的线程休眠。Send at least one task and thread priority information to the client on the virtual machine, so that when the client starts multi-threaded execution for the task, monitor the resources of the virtual machine occupied by all threads, when the occupied When the resource is greater than or equal to the first limit threshold corresponding to the virtual machine, control low-level threads to sleep according to the thread priority information.
根据本发明实施例的第三方面,提供了一种虚拟机,包括:According to a third aspect of the embodiments of the present invention, a virtual machine is provided, including:
监控模块,用于当所述虚拟机上的客户端针对控制中心下发的多个任务开启多线程运行时,开启监控线程,监控所有线程占用的虚拟机的资源;A monitoring module, configured to enable a monitoring thread to monitor resources of the virtual machine occupied by all threads when the client on the virtual machine starts multi-threaded operation for a plurality of tasks issued by the control center;
第一判断模块,用于判断所述占用的资源是否小于预设的、与所述虚拟机对应的第一限制阈值;A first judging module, configured to judge whether the occupied resource is smaller than a preset first limit threshold corresponding to the virtual machine;
第一第一控制模块,用于当所述第一判断模块获知所述占用的资源大于等于所述第一限制阈值时,根据所述控制中心下发的线程优先级信息,控制低级别的线程休眠。A first first control module, configured to control low-level threads according to thread priority information issued by the control center when the first judging module learns that the occupied resource is greater than or equal to the first limit threshold sleep.
根据本发明实施例的第四方面,提供了一种控制中心,包括:According to a fourth aspect of the embodiments of the present invention, a control center is provided, including:
第三接收模块,用于接收虚拟机发送的启动消息;The third receiving module is configured to receive the startup message sent by the virtual machine;
第二发送模块,用于向所述虚拟机上的客户端发送至少一个任务,以及线程优先级信息,以使所述客户端针对所述任务开启多线程运行时,监控所有线程占用的虚拟机的资源,当所述占用的资源大于等于与所述虚拟机对应的第一限制阈值时,根据所述线程优先级信息,控制低级别的线程休眠。The second sending module is configured to send at least one task and thread priority information to the client on the virtual machine, so that when the client starts multi-threaded execution for the task, monitors the virtual machine occupied by all threads resources, and when the occupied resources are greater than or equal to the first limit threshold corresponding to the virtual machine, control low-level threads to sleep according to the thread priority information.
根据本发明实施例的第五方面,提供了一种虚拟化平台线程控制系统,所述系统包括:控制中心、所述控制中心控制至少一个物理机。每个物理机上至少部署一个虚拟机,所述控制中心与所有虚拟机进行通信交互,并控制部署在所述虚拟机上的客户端,其中,所述虚拟机为如上所述的虚拟机,所述控制中心为如上所述的控制中心。According to a fifth aspect of the embodiments of the present invention, a virtualization platform thread control system is provided, and the system includes: a control center, and the control center controls at least one physical machine. At least one virtual machine is deployed on each physical machine, and the control center communicates and interacts with all the virtual machines, and controls the client deployed on the virtual machine, wherein the virtual machine is a virtual machine as described above, and The control center is the control center as described above.
本发明实施例提供的虚拟化平台线程控制方法、设备和系统,当虚拟机上的客户端针对控制中心下发的多个任务开启多线程运行时,开启监控线程,监控所有线程占用的虚拟机的资源,若判断获知所述占用的资源大于等于与虚拟机对应的第一限制阈值,则根据控制中心下发的线程优先级信息,控制低级别的线程休眠。实现了根据虚拟机的资源占用情况动态控制线程的工作状态,对客户端线程执行粒度更精细化的控制,防止对虚拟机的资源占用过多,降低虚拟机的整体性能,影响正常业务。In the virtualization platform thread control method, device and system provided by the embodiments of the present invention, when the client on the virtual machine starts multi-threaded operation for multiple tasks issued by the control center, the monitoring thread is started to monitor the virtual machines occupied by all threads resources, and if it is determined that the occupied resources are greater than or equal to the first limit threshold corresponding to the virtual machine, control low-level threads to sleep according to the thread priority information issued by the control center. It realizes the dynamic control of the working state of the thread according to the resource occupation of the virtual machine, and executes finer-grained control of the client thread to prevent excessive resource occupation of the virtual machine, reduce the overall performance of the virtual machine, and affect normal business.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本发明。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description These are some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained according to these drawings without any creative effort.
图1是本发明实施例提供的一种虚拟化平台线程控制方法的流程图;FIG. 1 is a flow chart of a virtualization platform thread control method provided by an embodiment of the present invention;
图2是本发明实施例提供的另一种虚拟化平台线程控制方法的流程图;FIG. 2 is a flow chart of another virtualization platform thread control method provided by an embodiment of the present invention;
图3是本发明实施例提供的另一种虚拟化平台线程控制方法的流程图;FIG. 3 is a flow chart of another virtualization platform thread control method provided by an embodiment of the present invention;
图4是本发明实施例提供的另一种虚拟化平台线程控制方法的流程图;FIG. 4 is a flow chart of another virtualization platform thread control method provided by an embodiment of the present invention;
图5是本发明实施例提供的另一种虚拟化平台线程控制方法的流程图;FIG. 5 is a flow chart of another virtualization platform thread control method provided by an embodiment of the present invention;
图6是本发明实施例提供的一种虚拟机的结构示意图;FIG. 6 is a schematic structural diagram of a virtual machine provided by an embodiment of the present invention;
图7是本发明实施例提供的另一种虚拟机的结构示意图;FIG. 7 is a schematic structural diagram of another virtual machine provided by an embodiment of the present invention;
图8是本发明实施例提供的另一种虚拟机的结构示意图;FIG. 8 is a schematic structural diagram of another virtual machine provided by an embodiment of the present invention;
图9是本发明实施例提供的一种控制中心的结构示意图;Fig. 9 is a schematic structural diagram of a control center provided by an embodiment of the present invention;
图10是本发明实施例提供的另一种控制中心的结构示意图;Fig. 10 is a schematic structural diagram of another control center provided by an embodiment of the present invention;
图11是本发明实施例提供的另一种控制中心的结构示意图;Fig. 11 is a schematic structural diagram of another control center provided by an embodiment of the present invention;
图12是本发明实施例提供的一种虚拟化平台线程控制系统的结构示意图。FIG. 12 is a schematic structural diagram of a virtualization platform thread control system provided by an embodiment of the present invention.
通过上述附图,已示出本发明明确的实施例,后文中将有更详细的描述。这些附图和文字描述并不是为了通过任何方式限制本发明构思的范围,而是通过参考特定实施例为本领域技术人员说明本发明的概念。By way of the above drawings, specific embodiments of the invention have been shown and will be described in more detail hereinafter. These drawings and written descriptions are not intended to limit the scope of the inventive concept in any way, but to illustrate the inventive concept for those skilled in the art by referring to specific embodiments.
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。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 creative efforts fall within the protection scope of the present invention.
图1是本发明实施例提供的一种虚拟化平台线程控制方法的流程图,本实施例提供的方法被配置在虚拟机中执行,如图1所示,该方法具体包括:Fig. 1 is a flowchart of a virtualization platform thread control method provided by an embodiment of the present invention. The method provided by this embodiment is configured to be executed in a virtual machine. As shown in Fig. 1, the method specifically includes:
步骤101,当虚拟机上的客户端针对控制中心下发的多个任务开启多线程运行时,开启监控线程,监控所有线程占用的虚拟机的资源;Step 101, when the client on the virtual machine starts multi-threaded operation for multiple tasks issued by the control center, starts the monitoring thread, and monitors the resources of the virtual machine occupied by all threads;
虚拟化平台上包括一个控制中心和至少一个物理机,通过虚拟化技术可将一台物理机虚拟成多台虚拟机,每个虚拟机可运行不同的操作系统和应用,用于运行操作系统及应用或者进行数据通讯。该控制中心与所有虚拟机可以进行通信交互。The virtualization platform includes a control center and at least one physical machine. Through virtualization technology, one physical machine can be virtualized into multiple virtual machines. Each virtual machine can run different operating systems and applications, and is used to run operating systems and application or data communication. The control center can communicate and interact with all virtual machines.
虚拟机中安装有网络应用的客户端,控制中心可以控制部署在虚拟机上的客户端。具体来说,控制中心会下发很多任务给客户端,客户端针对不同任务会创建一个或多个线程来完成。举例说明如下:在虚拟机上安装安全客户端,控制中心对虚拟机中的客户端下发全盘扫描或者局部扫描的任务,从而客户端根据控制中心下发的任务创建一个或多个线程来完成扫描。The client of the network application is installed in the virtual machine, and the control center can control the client deployed on the virtual machine. Specifically, the control center will send many tasks to the client, and the client will create one or more threads to complete different tasks. An example is as follows: install a security client on a virtual machine, and the control center issues a full scan or partial scan task to the client in the virtual machine, so that the client creates one or more threads to complete the task according to the task issued by the control center scanning.
当虚拟机上的客户端针对控制中心下发的多个任务开启多线程运行时,开启监控线程,监控客户端上运行的所有线程占用的虚拟机的资源。When the client on the virtual machine starts multi-threaded operation for multiple tasks issued by the control center, the monitoring thread is started to monitor the resources of the virtual machine occupied by all the threads running on the client.
步骤102,判断所述占用的资源是否小于预设的、与所述虚拟机对应的第一限制阈值;Step 102, judging whether the occupied resource is smaller than a preset first limit threshold corresponding to the virtual machine;
虚拟机上的客户端开的线程越多,占用的虚拟机的资源越大。为了避免虚拟机的资源消耗过大,影响虚拟机整体的工作性能,预先为该虚拟机设置资源占用的第一限制阈值。The more threads opened by the client on the virtual machine, the more resources of the virtual machine are occupied. In order to prevent the resource consumption of the virtual machine from being too large and affecting the overall working performance of the virtual machine, a first resource occupation threshold is set in advance for the virtual machine.
该第一限制阈值用于标记虚拟机资源占用的上线,第一限制阈值的内容根据所消耗的资源类型而定,资源类型具体包括:中央处理单元CPU、内存、输入输出接口IO和网络。由于不同的虚拟机的资源配比和运行性能不同,因此,对占用资源的限制也不完全相同,因此,第一限制阈值的具体内容根据实际应用需要进行设定,本实施例对此不做限制,举例说明如下:The first limit threshold is used to mark the online usage of virtual machine resources. The content of the first limit threshold depends on the type of resource consumed. The resource type specifically includes: central processing unit CPU, memory, input and output interface IO and network. Since the resource allocation and operating performance of different virtual machines are different, the restrictions on occupied resources are not completely the same. Therefore, the specific content of the first limit threshold is set according to actual application needs, and this embodiment does not Limitations, for example as follows:
与该虚拟机对应的第一限制阈值包括:客户端消耗的CPU资源占用整个虚拟机CPU资源的占比限制为5%,客户端消耗的内存资源占用整个虚拟机内存资源的占比限制为5%,客户端消耗的网络资源占用整个虚拟机网络资源的占比限制为5%。The first limit threshold corresponding to the virtual machine includes: the CPU resources consumed by the client account for 5% of the entire virtual machine's CPU resources, and the memory resources consumed by the client account for 5% of the entire virtual machine's memory resources. %, the network resources consumed by the client are limited to 5% of the entire network resources of the virtual machine.
第一限制阈值是虚拟机工作性能的分界点,当客户端运行的所有线程占用的虚拟机的资源大于等于预设的第一限制阈值,则说明虚拟机工作性能整体开始下降;当客户端运行的所有线程占用的虚拟机的资源小于预设的第一限制阈值,则说明虚拟机工作性能良好。The first limit threshold is the cut-off point of the virtual machine’s work performance. When the resources of the virtual machine occupied by all the threads running on the client are greater than or equal to the preset first limit threshold, it indicates that the overall work performance of the virtual machine begins to decline; when the client runs If the resources of the virtual machine occupied by all the threads are less than the preset first limit threshold, it indicates that the virtual machine has good working performance.
步骤103,若判断获知所述占用的资源大于等于所述第一限制阈值,则根据所述控制中心下发的线程优先级信息,控制低级别的线程休眠。Step 103, if it is determined that the occupied resource is greater than or equal to the first limit threshold, control low-level threads to sleep according to the thread priority information issued by the control center.
虚拟机将当前所有线程占用的虚拟机的资源与预设的第一限制阈值进行比较后,若判断获知占用的资源大于等于该第一限制阈值,则说明虚拟机工作性能整体开始下降。需要注意的是,当第一限制阈值中的占比限制为多项资源时,虚拟机上当前运行的线程占用的资源大于等于其中一项,即为大于等于预设的第一限制阈值。从而虚拟机根据控制中心预先下发的线程优先级信息,控制低级别的线程休眠。以防止对虚拟机的资源占用过多,降低虚拟机的整体性能,影响正常业务。After the virtual machine compares the resources of the virtual machine currently occupied by all threads with the preset first limit threshold, if it determines that the occupied resources are greater than or equal to the first limit threshold, it indicates that the overall performance of the virtual machine begins to decline. It should be noted that when the proportion of the first limit threshold is limited to multiple resources, the resource occupied by the thread currently running on the virtual machine is greater than or equal to one of them, that is, greater than or equal to the preset first limit threshold. Therefore, the virtual machine controls low-level thread sleep according to the thread priority information issued by the control center in advance. In order to prevent excessive occupation of virtual machine resources, reduce the overall performance of the virtual machine, and affect normal business.
需要说明的是,控制中心下发的线程优先级信息是控制中心根据线程类型在客户端的重要性设定的优先级,可以根据具体的应用场景进行调整,本实施例对此不做限制,比如,低级别的线程包括:扫描线程和漏洞修复线程。It should be noted that the thread priority information issued by the control center is the priority set by the control center according to the importance of the thread type on the client, and can be adjusted according to specific application scenarios. This embodiment does not limit this, for example , low-level threads include: scanning threads and vulnerability repair threads.
本实施例提供的虚拟化平台线程控制方法,当虚拟机上的客户端针对控制中心下发的多个任务开启多线程运行时,开启监控线程,监控所有线程占用的虚拟机的资源,若判断获知所述占用的资源大于等于与虚拟机对应的第一限制阈值,则根据控制中心下发的线程优先级信息,控制低级别的线程休眠。实现了根据虚拟机的资源占用情况动态控制线程的工作状态,对客户端线程执行粒度更精细化的控制,防止对虚拟机的资源占用过多,降低虚拟机的整体性能,影响正常业务。In the virtualization platform thread control method provided in this embodiment, when the client on the virtual machine starts multi-threaded operation for multiple tasks issued by the control center, the monitoring thread is started to monitor the resources of the virtual machine occupied by all threads. Knowing that the occupied resources are greater than or equal to the first limit threshold corresponding to the virtual machine, control low-level threads to sleep according to the thread priority information issued by the control center. It realizes the dynamic control of the working state of the thread according to the resource occupation of the virtual machine, and executes finer-grained control of the client thread to prevent excessive resource occupation of the virtual machine, reduce the overall performance of the virtual machine, and affect normal business.
图2是本发明实施例提供的另一种虚拟化平台线程控制方法的流程图,本实施例提供的方法被配置在虚拟机中执行,如图2所示,该方法具体包括:Fig. 2 is a flow chart of another virtualization platform thread control method provided by an embodiment of the present invention. The method provided by this embodiment is configured to be executed in a virtual machine. As shown in Fig. 2, the method specifically includes:
步骤201,当虚拟机上的客户端针对控制中心下发的多个任务开启多线程运行时,向所述控制中心发送资源控制请求;Step 201, when the client on the virtual machine starts multi-threaded execution for multiple tasks issued by the control center, send a resource control request to the control center;
当虚拟机上的客户端针对控制中心下发的多个任务开启多线程运行时,向所述控制中心发送资源控制请求。其中,虚拟机可以将客户端针对控制中心下发的多个任务开启的线程数量,和/或,线程类型与预设的阈值信息进行比较,以判断是否向所述控制中心发送资源控制请求。举例说明如下:When the client on the virtual machine starts multi-threaded execution for multiple tasks issued by the control center, it sends a resource control request to the control center. Wherein, the virtual machine can compare the number of threads opened by the client for multiple tasks issued by the control center, and/or the thread type with preset threshold information, to determine whether to send a resource control request to the control center. Examples are as follows:
预设的阈值信息中线程数量的上线为5,当虚拟机判断获知客户端针对控制中心下发的多个任务开启的线程数量大于等于5时,向控制中心发送资源控制请求。The upper limit of the number of threads in the preset threshold information is 5. When the virtual machine determines that the number of threads opened by the client for multiple tasks issued by the control center is greater than or equal to 5, it sends a resource control request to the control center.
步骤202,接收所述控制中心分配的与所述虚拟机对应的第一限制阈值,所述第一限制阈值是所述控制中心根据下发给所述虚拟机的任务类型进行分配的;Step 202, receiving a first limit threshold corresponding to the virtual machine allocated by the control center, the first limit threshold is allocated by the control center according to the task type issued to the virtual machine;
控制中心接收到虚拟机发送的资源控制请求后,根据下发给该虚拟机的任务类型为该虚拟机分配与其对应的第一限制阈值,举例来说,当控制中心下发给该虚拟机的任务类型属于对虚拟机性能要求比较高的任务,比如即时通信的实时性较高等,则为该虚拟机分配的第一限制阈值较低,当控制中心下发给该虚拟机的任务类型属于对虚拟机性能要求比较低的任务,比如传输文件等,则为该虚拟机分配的第一限制阈值较高。After receiving the resource control request sent by the virtual machine, the control center assigns the virtual machine the corresponding first limit threshold according to the task type issued to the virtual machine. For example, when the control center sends the virtual machine the If the task type is a task that requires relatively high performance of the virtual machine, such as the high real-time performance of instant messaging, etc., the first limit threshold assigned to the virtual machine is low. When the task type issued by the control center to the virtual machine belongs to the For tasks with relatively low performance requirements of the virtual machine, such as transferring files, the first limit threshold allocated to the virtual machine is relatively high.
虚拟机接收控制中心分配的与虚拟机对应的第一限制阈值。The virtual machine receives the first limit threshold assigned by the control center and corresponding to the virtual machine.
步骤203,开启监控线程,根据预设的监控触发策略获取监控频率;Step 203, start the monitoring thread, and obtain the monitoring frequency according to the preset monitoring trigger strategy;
开启监控线程,根据预设的监控触发策略获取监控频率,其中,监控触发策略根据实际应用需要进行设置,比如:Start the monitoring thread and obtain the monitoring frequency according to the preset monitoring trigger strategy. The monitoring trigger strategy is set according to the actual application needs, for example:
根据预设的时间监控策略获取与当前时间对应的监控频率,或者,Obtain the monitoring frequency corresponding to the current time according to the preset time monitoring strategy, or,
根据预设的任务监控策略获取与当前所接收的任务数量对应的监控频率。Obtain the monitoring frequency corresponding to the currently received task quantity according to the preset task monitoring policy.
步骤204,采用所述监控频率监控所有线程占用的虚拟机的资源;Step 204, using the monitoring frequency to monitor the resources of the virtual machine occupied by all threads;
步骤205,判断所述占用的资源是否小于预设的、与所述虚拟机对应的第一限制阈值;Step 205, judging whether the occupied resource is smaller than a preset first limit threshold corresponding to the virtual machine;
步骤206,若判断获知所述占用的资源大于等于所述第一限制阈值,则根据所述控制中心下发的线程优先级信息,控制低级别的线程休眠;Step 206, if it is determined that the occupied resource is greater than or equal to the first limit threshold, control low-level threads to sleep according to the thread priority information issued by the control center;
步骤204-步骤206的具体实施过程参见图1所示实施例中的步骤101-步骤103,其实现原理类似,For the specific implementation process of step 204-step 206, refer to step 101-step 103 in the embodiment shown in Figure 1, and its implementation principle is similar,
步骤207,若判断获知所述占用的资源小于所述第一限制阈值,则唤醒处于休眠状态的线程。Step 207, if it is determined that the occupied resource is less than the first limit threshold, wake up the thread in the dormant state.
随着虚拟机上其它线程的结束,线程占用的虚拟机资源慢慢低于第一限制阈值,则说明在保证虚拟机工作性能的前提下,虚拟机当前执行的线程不饱和,从而唤醒之前处于休眠状态的线程继续执行任务,比如扫描线程继续扫描。从而根据虚拟机的资源占用情况动态控制线程的工作状态,在保证虚拟机工作性能的前提下,执行更多的任务。With the end of other threads on the virtual machine, the virtual machine resources occupied by the thread gradually fall below the first limit threshold, which means that under the premise of ensuring the working performance of the virtual machine, the currently executing thread of the virtual machine is not saturated, so it is in the The thread in the sleep state continues to perform tasks, such as the scanning thread continues to scan. In this way, the working state of the thread is dynamically controlled according to the resource occupation of the virtual machine, and more tasks are performed on the premise of ensuring the working performance of the virtual machine.
本实施例提供的虚拟化平台线程控制方法,当虚拟机上的客户端针对控制中心下发的多个任务开启多线程运行时,开启监控线程,采用与监控触发策略对应的监控频率监控所有线程占用的虚拟机的资源,若判断获知所述占用的资源大于等于与虚拟机对应的第一限制阈值,则根据控制中心下发的线程优先级信息,控制低级别的线程休眠,若判断获知所述占用的资源小于所述第一限制阈值,则唤醒处于休眠状态的线程。实现了根据虚拟机的资源占用情况动态控制线程的工作状态,在保证虚拟机工作性能的前提下,执行更多的任务。In the virtualization platform thread control method provided in this embodiment, when the client on the virtual machine starts multi-threaded operation for multiple tasks issued by the control center, the monitoring thread is started, and all threads are monitored using the monitoring frequency corresponding to the monitoring trigger strategy The resources of the virtual machine occupied, if it is determined that the occupied resources are greater than or equal to the first limit threshold corresponding to the virtual machine, then according to the thread priority information issued by the control center, the low-level thread is controlled to sleep; If the occupied resource is less than the first limiting threshold, wake up the thread in the dormant state. Realize the dynamic control of the working state of the thread according to the resource occupation of the virtual machine, and perform more tasks on the premise of ensuring the working performance of the virtual machine.
图1和图2是针对客户端上开启线程过多导致虚拟机资源消耗过大的场景,图3所示实施例为物理机上的至少一台虚拟机的消耗过大导致所在的物理机资源消耗过大的场景,具体说明如下:Figure 1 and Figure 2 are aimed at the scenario where too many threads on the client lead to excessive resource consumption of the virtual machine, and the embodiment shown in Figure 3 shows that the excessive consumption of at least one virtual machine on the physical machine causes the resource consumption of the physical machine where it resides Excessive scenarios are described in detail as follows:
图3是本发明实施例提供的另一种虚拟化平台线程控制方法的流程图,本实施例提供的方法被配置在虚拟机中执行,如图3所示,基于上述实施例,该方法还具体包括:Fig. 3 is a flow chart of another virtualization platform thread control method provided by an embodiment of the present invention. The method provided by this embodiment is configured to be executed in a virtual machine, as shown in Fig. 3 , based on the above embodiment, the method also Specifically include:
步骤301,将所述虚拟机的资源占用信息发送给所述控制中心;Step 301, sending resource occupation information of the virtual machine to the control center;
当虚拟机上的客户端针对控制中心下发的多个任务开启多线程运行时,开启监控线程,监控所有线程占用的虚拟机的资源,将获取的虚拟机的资源占用信息发送给控制中心。虚拟机的资源占用信息的具体表现形式包括:百分比形式,比如百分之二十,控制中心为虚拟机预先划分所有资源,因此控制中心通过获知百分之二十就知道当前消耗的具体资源数量,或者,虚拟机直接上传当前消耗的具体资源数量比如1G。When the client on the virtual machine starts multi-threaded operation for multiple tasks issued by the control center, it starts the monitoring thread, monitors the resources of the virtual machine occupied by all threads, and sends the obtained resource occupation information of the virtual machine to the control center. The specific manifestations of the resource occupation information of the virtual machine include: percentage form, such as 20%, the control center pre-allocates all resources for the virtual machine, so the control center can know the specific amount of resources currently consumed by knowing the 20% , or, the virtual machine directly uploads the specific amount of resources currently consumed, such as 1G.
步骤302,接收所述控制中心根据所述线程优先级信息发送的、携带线程标识的休眠控制指令,所述休眠控制指令是所述控制中心获取所述虚拟机所属的物理机上、所有虚拟机的资源占用信息后,判断获知所有虚拟机占用的所述物理机的资源大于等于预设的、与所述物理机对应的第二限制阈值后发送的;Step 302: Receive a dormancy control instruction carrying a thread identifier sent by the control center according to the thread priority information, the dormancy control instruction is obtained by the control center for all virtual machines on the physical machine to which the virtual machine belongs After the resource occupation information is determined, it is sent after it is determined that the resources of the physical machine occupied by all virtual machines are greater than or equal to a preset second limit threshold corresponding to the physical machine;
虚拟机上的客户端开的线程越多,占用的虚拟机的资源越大,同时占用物理机的资源也就越大。为了避免物理机的资源消耗过大,影响物理机整体的工作性能,预先为该物理机设置资源占用的第二限制阈值。The more threads opened by the client on the virtual machine, the larger the resources of the virtual machine are occupied, and the resources of the physical machine are also occupied. In order to prevent excessive resource consumption of the physical machine from affecting the overall performance of the physical machine, a second limit threshold of resource occupation is set in advance for the physical machine.
该第二限制阈值用于标记物理机资源占用的上线,第二限制阈值的内容根据所消耗的资源类型而定,资源类型具体包括:中央处理单元CPU、内存、输入输出接口IO和网络。由于不同的物理机的资源配比和运行性能不同,因此,对占用资源的限制也不完全相同,因此,第二限制阈值的具体内容根据实际应用需要进行设定,本实施例对此不做限制,举例说明如下:The second limit threshold is used to mark the online usage of physical machine resources. The content of the second limit threshold depends on the type of resource consumed. The resource type specifically includes: central processing unit CPU, memory, input and output interface IO and network. Since different physical machines have different resource ratios and operating performances, the restrictions on occupied resources are not exactly the same. Therefore, the specific content of the second limit threshold is set according to actual application needs, and this embodiment does not Limitations, for example as follows:
与该物理机对应的第二限制阈值包括:客户端消耗的CPU资源占用整个物理机CPU资源的占比限制为5%,客户端消耗的内存资源占用整个物理机内存资源的占比限制为5%,客户端消耗的网络资源占用整个物理机网络资源的占比限制为5%。The second limit threshold corresponding to the physical machine includes: the CPU resources consumed by the client account for 5% of the entire physical machine's CPU resources, and the memory resources consumed by the client account for 5% of the entire physical machine's memory resources. %, the network resources consumed by the client are limited to 5% of the entire network resources of the physical machine.
第二限制阈值是物理机工作性能的分界点,当物理机上所有虚拟机的客户端运行的所有线程占用的物理机的资源大于等于预设的第二限制阈值,则说明物理机工作性能整体开始下降;当物理机上所有虚拟机的客户端运行的所有线程占用的物理机的资源小于预设的第二限制阈值,则说明物理机工作性能良好。The second limit threshold is the cut-off point for the performance of the physical machine. When the resources of the physical machine occupied by all the threads run by the clients of all virtual machines on the physical machine are greater than or equal to the preset second limit threshold, it means that the overall performance of the physical machine starts decrease; when the resources of the physical machine occupied by all the threads run by the clients of all the virtual machines on the physical machine are less than the preset second limit threshold, it indicates that the physical machine has good performance.
当控制中心接收部署在物理机上的至少一个虚拟机发送的资源占用信息,然后判断所有虚拟机占用的所述物理机的资源是否小于预设的、与所述物理机对应的第二限制阈值;若判断获知所述占用的资源大于等于所述第二限制阈值,则根据线程优先级信息向具有低级别线程的虚拟机上发送携带线程标识的休眠控制指令。When the control center receives the resource occupation information sent by at least one virtual machine deployed on the physical machine, and then judges whether the resources of the physical machine occupied by all the virtual machines are smaller than a preset second limit threshold corresponding to the physical machine; If it is determined that the occupied resource is greater than or equal to the second limit threshold, then according to the thread priority information, send the sleep control instruction carrying the thread identifier to the virtual machine with the low-level thread.
步骤303,控制与所述线程标识对应的线程休眠;Step 303, controlling the thread corresponding to the thread identifier to sleep;
具有低级别线程的虚拟机根据控制中心的指示控制与该线程标识对应的线程休眠。The virtual machine with the low-level thread controls the thread corresponding to the thread identifier to sleep according to the instruction of the control center.
步骤304,接收所述控制中心发送的携带线程标识的唤醒控制指令,所述唤醒控制指令是所述控制中心判断获知所有虚拟机占用的所述物理机的资源小于所述第二限制阈值后发送的;Step 304: Receive a wake-up control instruction carrying a thread identifier sent by the control center, where the wake-up control instruction is sent after the control center determines that the resources of the physical machine occupied by all virtual machines are less than the second limit threshold of;
随着虚拟机上其它线程的结束,虚拟机占用的物理机资源慢慢低于第二限制阈值,则说明在保证物理机工作性能的前提下,虚拟机当前执行的线程不饱和,从而唤醒之前处于休眠状态的线程继续执行任务,比如扫描线程继续扫描。因此,向之前具有低级别线程的虚拟机上发送携带线程标识的唤醒控制指令。With the end of other threads on the virtual machine, the physical machine resources occupied by the virtual machine are gradually lower than the second limit threshold, which means that under the premise of ensuring the performance of the physical machine, the currently executing threads of the virtual machine are not saturated, so that before waking up A thread in a dormant state continues to perform tasks, such as a scanning thread continuing to scan. Therefore, a wake-up control instruction carrying a thread ID is sent to the virtual machine that previously had a low-level thread.
步骤305,唤醒与所述线程标识对应的处于休眠状态的线程。Step 305, wake up the thread in the dormant state corresponding to the thread identifier.
虚拟机根据线程标识唤醒之前处于休眠状态的线程继续执行任务,比如扫描线程继续扫描。从而根据物理机机的资源占用情况动态控制线程的工作状态,在保证虚拟机工作性能的前提下,执行更多的任务。The virtual machine wakes up the previously dormant thread according to the thread ID to continue executing the task, for example, the scanning thread continues to scan. In this way, the working state of the thread can be dynamically controlled according to the resource occupation of the physical machine, and more tasks can be performed on the premise of ensuring the working performance of the virtual machine.
本实施例提供的虚拟化平台线程控制方法,当控制中心获取虚拟机所属的物理机上、所有虚拟机的资源占用信息后,判断获知所有虚拟机占用的所述物理机的资源是否小于预设的、与物理机对应的第二限制阈值后发送,则根据线程优先级信息,以控制具有低级别线程的虚拟机上的对应线程休眠以及唤醒。实现了根据虚拟机的资源占用情况动态控制线程的工作状态,对客户端线程执行粒度更精细化的控制,防止对虚拟机的资源占用过多,降低虚拟机的整体性能,影响正常业务。In the virtualization platform thread control method provided in this embodiment, after the control center obtains the resource occupation information of all virtual machines on the physical machine to which the virtual machine belongs, it determines whether the resources of the physical machines occupied by all virtual machines are less than the preset 1. Sending after the second limit threshold corresponding to the physical machine, according to the thread priority information, the corresponding thread on the virtual machine with low-level threads is controlled to sleep and wake up. Realize the dynamic control of the working state of the thread according to the resource occupation of the virtual machine, and implement finer-grained control of the client thread to prevent excessive resource occupation of the virtual machine, reduce the overall performance of the virtual machine, and affect normal business.
图4是本发明实施例提供的另一种虚拟化平台线程控制方法的流程图,本实施例提供的方法被配置在控制中心中执行,如图4所示,该方法具体包括:Fig. 4 is a flow chart of another virtualization platform thread control method provided by an embodiment of the present invention. The method provided by this embodiment is configured to be executed in a control center, as shown in Fig. 4 , the method specifically includes:
步骤401,接收虚拟机发送的启动消息;Step 401, receiving the startup message sent by the virtual machine;
步骤402,向所述虚拟机上的客户端发送至少一个任务,以及线程优先级信息,以使所述客户端针对所述任务开启多线程运行时,监控所有线程占用的虚拟机的资源,当所述占用的资源大于等于与所述虚拟机对应的第一限制阈值时,根据所述线程优先级信息,控制低级别的线程休眠。Step 402, sending at least one task and thread priority information to the client on the virtual machine, so that when the client enables multi-threaded execution for the task, monitor the resources of the virtual machine occupied by all threads, when When the occupied resource is greater than or equal to the first limit threshold corresponding to the virtual machine, control low-level threads to sleep according to the thread priority information.
本实施例提供的虚拟化平台线程控制方法的处理流程,可以参见上述图1所示的方法实施例,其实现原理和技术效果类似,此处不再赘述。For the processing flow of the virtualization platform thread control method provided in this embodiment, refer to the method embodiment shown in FIG. 1 above. The implementation principle and technical effect are similar, and will not be repeated here.
基于上述实施例,还包括:Based on the foregoing embodiments, it also includes:
接收所述虚拟机发送的资源控制请求;receiving a resource control request sent by the virtual machine;
根据下发给所述虚拟机的任务类型为所述虚拟机分配第一限制阈值,并将所述第一限制阈值发送给所述虚拟机。Allocating a first limit threshold to the virtual machine according to the task type issued to the virtual machine, and sending the first limit threshold to the virtual machine.
本实施例提供的虚拟化平台线程控制方法的处理流程,可以参见上述图2所示的方法实施例,其实现原理和技术效果类似,此处不再赘述。For the processing flow of the virtualization platform thread control method provided in this embodiment, refer to the method embodiment shown in FIG. 2 above. The implementation principle and technical effect are similar, and will not be repeated here.
图5是本发明实施例提供的另一种虚拟化平台线程控制方法的流程图,本实施例提供的方法被配置在控制中心中执行,如图5所示,该方法具体包括:Fig. 5 is a flow chart of another virtualization platform thread control method provided by an embodiment of the present invention. The method provided by this embodiment is configured to be executed in a control center, as shown in Fig. 5 , the method specifically includes:
步骤501,接收部署在物理机上的至少一个虚拟机发送的资源占用信息;Step 501, receiving resource occupation information sent by at least one virtual machine deployed on a physical machine;
步骤502,判断所有虚拟机占用的所述物理机的资源是否小于预设的、与所述物理机对应的第二限制阈值;Step 502, judging whether the resources of the physical machine occupied by all the virtual machines are smaller than a preset second limit threshold corresponding to the physical machine;
步骤503,若判断获知所述占用的资源大于等于所述第二限制阈值,则根据所述线程优先级信息向所述虚拟机发送携带线程标识的休眠控制指令,以使所述虚拟机控制与所述线程标识对应的线程休眠;Step 503: If it is determined that the occupied resource is greater than or equal to the second limit threshold, send a sleep control instruction carrying a thread identifier to the virtual machine according to the thread priority information, so that the virtual machine control and The thread corresponding to the thread identifier sleeps;
步骤504,若判断获知所述占用的资源小于所述第二限制阈值,则向所述虚拟机发送携带线程标识的唤醒控制指令,以使所述虚拟机唤醒与所述线程标识对应的处于休眠状态的线程。Step 504: If it is determined that the occupied resource is less than the second limit threshold, send a wake-up control instruction carrying a thread ID to the virtual machine, so that the virtual machine wakes up the dormant server corresponding to the thread ID. state of the thread.
本实施例提供的虚拟化平台线程控制方法的处理流程,可以参见上述图3所示的方法实施例,其实现原理和技术效果类似,此处不再赘述。For the processing flow of the virtualization platform thread control method provided in this embodiment, refer to the method embodiment shown in FIG. 3 above. The implementation principles and technical effects are similar, and will not be repeated here.
图6是本发明实施例提供的一种虚拟机的结构示意图,如图6所示,该虚拟机包括:监控模块11、第一判断模块12和第一控制模块13,其中,FIG. 6 is a schematic structural diagram of a virtual machine provided by an embodiment of the present invention. As shown in FIG. 6, the virtual machine includes: a monitoring module 11, a first judgment module 12, and a first control module 13, wherein,
监控模块11,用于当所述虚拟机上的客户端针对控制中心下发的多个任务开启多线程运行时,开启监控线程,监控所有线程占用的虚拟机的资源;The monitoring module 11 is used for when the client on the virtual machine starts multi-threaded operation for a plurality of tasks issued by the control center, starts the monitoring thread, and monitors the resources of the virtual machine occupied by all threads;
第一判断模块12,用于判断所述占用的资源是否小于预设的、与所述虚拟机对应的第一限制阈值;A first judging module 12, configured to judge whether the occupied resource is smaller than a preset first limit threshold corresponding to the virtual machine;
第一控制模块13,用于当所述第一判断模块获知所述占用的资源大于等于所述第一限制阈值时,根据所述控制中心下发的线程优先级信息,控制低级别的线程休眠。The first control module 13 is configured to control low-level threads to sleep according to the thread priority information issued by the control center when the first judging module learns that the occupied resource is greater than or equal to the first limit threshold .
本实施例提供的虚拟机中各模块的功能和处理流程,可以参见上述图1所示的方法实施例,其实现原理和技术效果类似,此处不再赘述。For the functions and processing flow of each module in the virtual machine provided by this embodiment, refer to the method embodiment shown in FIG. 1 above. The implementation principles and technical effects are similar, and will not be repeated here.
图7是本发明实施例提供的另一种虚拟机的结构示意图,如图7所示,基于图6所示实施例,该虚拟机还包括:FIG. 7 is a schematic structural diagram of another virtual machine provided by an embodiment of the present invention. As shown in FIG. 7, based on the embodiment shown in FIG. 6, the virtual machine further includes:
第一控制模块13还用于:The first control module 13 is also used for:
当所述第一判断模块获知所述占用的资源小于所述第一限制阈值时,唤醒处于休眠状态的线程。When the first judging module learns that the occupied resource is less than the first limit threshold, wake up the thread in the dormant state.
进一步地,所述监控模块11包括:Further, the monitoring module 11 includes:
开启单元111,用于当所述虚拟机上的客户端针对控制中心下发的多个任务开启多线程运行时,开启监控线程;The opening unit 111 is used to open the monitoring thread when the client on the virtual machine starts multi-threaded operation for multiple tasks issued by the control center;
获取单元112,用于根据预设的监控触发策略获取监控频率;An acquisition unit 112, configured to acquire a monitoring frequency according to a preset monitoring trigger strategy;
监测单元113,用于采用所述监控频率监控所有线程占用的虚拟机的资源。The monitoring unit 113 is configured to monitor resources of the virtual machine occupied by all threads by using the monitoring frequency.
进一步地,所述获取单元112,具体用于:Further, the acquiring unit 112 is specifically configured to:
根据预设的时间监控策略获取与当前时间对应的监控频率,Obtain the monitoring frequency corresponding to the current time according to the preset time monitoring strategy,
或者,or,
根据预设的任务监控策略获取与当前所接收的任务数量对应的监控频率。Obtain the monitoring frequency corresponding to the currently received task quantity according to the preset task monitoring policy.
进一步地,还包括:Further, it also includes:
请求模块14,用于向所述控制中心发送资源控制请求;A request module 14, configured to send a resource control request to the control center;
第一接收模块15,用于接收所述控制中心分配的与所述虚拟机对应的第一限制阈值,所述第一限制阈值是所述控制中心根据下发给所述虚拟机的任务类型进行分配的。The first receiving module 15 is configured to receive the first limit threshold assigned by the control center and corresponding to the virtual machine, the first limit threshold is performed by the control center according to the task type issued to the virtual machine distributed.
本实施例提供的虚拟机中各模块的功能和处理流程,可以参见上述图2所示的方法实施例,其实现原理和技术效果类似,此处不再赘述。For the functions and processing flow of each module in the virtual machine provided by this embodiment, refer to the method embodiment shown in FIG. 2 above. The implementation principles and technical effects are similar, and will not be repeated here.
图8是本发明实施例提供的另一种虚拟机的结构示意图,如图8所示,基于图6或图7所示实施例,以图7为例,该虚拟机还包括:FIG. 8 is a schematic structural diagram of another virtual machine provided by an embodiment of the present invention. As shown in FIG. 8, based on the embodiment shown in FIG. 6 or FIG. 7, taking FIG. 7 as an example, the virtual machine also includes:
第一发送模块16,用于将所述虚拟机的资源占用信息发送给所述控制中心;The first sending module 16 is configured to send the resource occupation information of the virtual machine to the control center;
第二接收模块17,用于接收所述控制中心根据所述线程优先级信息发送的、携带线程标识的休眠控制指令,所述休眠控制指令是所述控制中心获取所述虚拟机所属的物理机上、所有虚拟机的资源占用信息后,判断获知所有虚拟机占用的所述物理机的资源大于等于预设的、与所述物理机对应的第二限制阈值后发送的;The second receiving module 17 is configured to receive the dormancy control instruction carrying the thread identifier sent by the control center according to the thread priority information, the dormancy control instruction is obtained by the control center on the physical machine to which the virtual machine belongs . After the resource occupancy information of all virtual machines is determined, it is determined that the resources of the physical machine occupied by all virtual machines are greater than or equal to a preset second limit threshold corresponding to the physical machine;
所述第一控制模块13,还用于控制与所述线程标识对应的线程休眠。The first control module 13 is further configured to control the sleep of the thread corresponding to the thread identifier.
所述第二接收模块17,还用于接收所述控制中心发送的携带线程标识的唤醒控制指令,所述唤醒控制指令是所述控制中心判断获知所有虚拟机占用的所述物理机的资源小于所述第二限制阈值后发送的;The second receiving module 17 is further configured to receive a wake-up control instruction carrying a thread identifier sent by the control center, the wake-up control instruction is determined by the control center and knows that the resources of the physical machine occupied by all virtual machines are less than sent after said second restriction threshold;
所述第一控制模块13,还用于唤醒与所述线程标识对应的处于休眠状态的线程。The first control module 13 is further configured to wake up the thread corresponding to the thread identifier that is in a dormant state.
本实施例提供的虚拟机中各模块的功能和处理流程,可以参见上述图3所示的方法实施例,其实现原理和技术效果类似,此处不再赘述。For the functions and processing flow of each module in the virtual machine provided by this embodiment, refer to the method embodiment shown in FIG. 3 above. The implementation principles and technical effects are similar, and will not be repeated here.
图9是本发明实施例提供的一种控制中心的结构示意图,如图9所示,该控制中心包括:第三接收模块21和第二发送模块22,其中,Fig. 9 is a schematic structural diagram of a control center provided by an embodiment of the present invention. As shown in Fig. 9, the control center includes: a third receiving module 21 and a second sending module 22, wherein,
第三接收模块21,用于接收虚拟机发送的启动消息;The third receiving module 21 is configured to receive the startup message sent by the virtual machine;
第二发送模块22,用于向所述虚拟机上的客户端发送至少一个任务,以及线程优先级信息,以使所述客户端针对所述任务开启多线程运行时,监控所有线程占用的虚拟机的资源,当所述占用的资源大于等于与所述虚拟机对应的第一限制阈值时,根据所述线程优先级信息,控制低级别的线程休眠。The second sending module 22 is configured to send at least one task and thread priority information to the client on the virtual machine, so that when the client starts multi-threaded execution for the task, it monitors the virtual resources occupied by all threads. resources of the virtual machine, and when the occupied resources are greater than or equal to the first limit threshold corresponding to the virtual machine, control low-level threads to sleep according to the thread priority information.
本实施例提供的控制中心中各模块的功能和处理流程,可以参见上述图1所示的方法实施例,其实现原理和技术效果类似,此处不再赘述。The function and processing flow of each module in the control center provided by this embodiment can refer to the method embodiment shown in FIG. 1 above, and its implementation principle and technical effect are similar, and will not be repeated here.
图10是本发明实施例提供的另一种控制中心的结构示意图,如图10所示,基于图9所示实施例,该控制中心还包括:分配模块23,Fig. 10 is a schematic structural diagram of another control center provided by an embodiment of the present invention. As shown in Fig. 10, based on the embodiment shown in Fig. 9, the control center further includes: a distribution module 23,
所述第三接收模,21,还用于接收所述虚拟机发送的资源控制请求;The third receiving module, 21, is further configured to receive a resource control request sent by the virtual machine;
所述分配模块23,用于根据下发给所述虚拟机的任务类型为所述虚拟机分配第一限制阈值,并将所述第一限制阈值发送给所述虚拟机。The allocating module 23 is configured to allocate a first limit threshold to the virtual machine according to the task type delivered to the virtual machine, and send the first limit threshold to the virtual machine.
本实施例提供的控制中心中各模块的功能和处理流程,可以参见上述图2所示的方法实施例,其实现原理和技术效果类似,此处不再赘述。The function and processing flow of each module in the control center provided in this embodiment can refer to the method embodiment shown in FIG. 2 above, and its implementation principle and technical effect are similar, and will not be repeated here.
图11是本发明实施例提供的另一种控制中心的结构示意图,如图11所示,基于图9或图10所示实施例,以图10为例,该控制中心还包括:第二判断模块24和第二控制模块25,Fig. 11 is a schematic structural diagram of another control center provided by an embodiment of the present invention. As shown in Fig. 11, based on the embodiment shown in Fig. 9 or Fig. 10, taking Fig. 10 as an example, the control center also includes: a second judgment module 24 and a second control module 25,
所述第三接收模块21,还用于接收部署在物理机上的至少一个虚拟机发送的资源占用信息;The third receiving module 21 is further configured to receive resource occupation information sent by at least one virtual machine deployed on the physical machine;
所述第二判断模块24,用于判断所有虚拟机占用的所述物理机的资源是否小于预设的、与所述物理机对应的第二限制阈值;The second judging module 24 is configured to judge whether the resources of the physical machine occupied by all virtual machines are smaller than a preset second limit threshold corresponding to the physical machine;
所述第二控制模块25,用于当所述第二判断模块获知所述占用的资源大于等于所述第二限制阈值时,根据所述线程优先级信息向所述虚拟机发送携带线程标识的休眠控制指令,以使所述虚拟机控制与所述线程标识对应的线程休眠。The second control module 25 is configured to send a message carrying a thread ID to the virtual machine according to the thread priority information when the second judging module learns that the occupied resource is greater than or equal to the second limit threshold. A hibernation control instruction, so that the virtual machine controls the hibernation of the thread corresponding to the thread identifier.
进一步地,further,
所述第二控制模块25,用于当所述第二判断模块获知所述占用的资源小于所述第二限制阈值,则向所述虚拟机发送携带线程标识的唤醒控制指令,以使所述虚拟机唤醒与所述线程标识对应的处于休眠状态的线程。The second control module 25 is configured to send a wake-up control instruction carrying a thread identifier to the virtual machine when the second judging module learns that the occupied resource is less than the second limit threshold, so that the The virtual machine wakes up the thread in the dormant state corresponding to the thread identifier.
本实施例提供的控制中心中各模块的功能和处理流程,可以参见上述图4所示的方法实施例,其实现原理和技术效果类似,此处不再赘述。The function and processing flow of each module in the control center provided in this embodiment can refer to the method embodiment shown in FIG. 4 above, and its implementation principle and technical effect are similar, and will not be repeated here.
图12是本发明实施例提供的一种虚拟化平台线程控制系统的结构示意图,如图12所示,该系统包括:控制中心1、所述控制中心1控制至少一个物理机2,每个物理机2上至少部署一个虚拟机3,所述控制中心1与所有虚拟机3进行通信交互,并控制部署在所述虚拟机3上的客户端4,其中,所述虚拟机3和控制中心1为本发明提供的虚拟机和控制中心,物理机2和客户端4为本发明提供的实施例中涉及的虚拟机和控制中心。Fig. 12 is a schematic structural diagram of a virtualization platform thread control system provided by an embodiment of the present invention. As shown in Fig. 12, the system includes: a control center 1, the control center 1 controls at least one physical machine 2, and each physical machine At least one virtual machine 3 is deployed on the machine 2, and the control center 1 communicates and interacts with all virtual machines 3, and controls the client 4 deployed on the virtual machine 3, wherein the virtual machine 3 and the control center 1 The virtual machine and the control center provided by the present invention, the physical machine 2 and the client 4 are the virtual machine and the control center involved in the embodiment provided by the present invention.
本实施例提供的虚拟化平台线程控制系统中各模块的功能和处理流程,可以参见上述所示的方法实施例,其实现原理和技术效果类似,此处不再赘述。For the functions and processing flow of each module in the virtualization platform thread control system provided by this embodiment, refer to the method embodiment shown above, and its implementation principle and technical effect are similar, and will not be repeated here.
本发明的实施例公开了:Embodiments of the invention disclose:
A1、一种虚拟化平台线程控制方法,其特征在于,所述方法包括:A1, a virtualization platform thread control method, is characterized in that, described method comprises:
当虚拟机上的客户端针对控制中心下发的多个任务开启多线程运行时,开启监控线程,监控所有线程占用的虚拟机的资源;When the client on the virtual machine starts multi-threaded operation for multiple tasks issued by the control center, it starts the monitoring thread to monitor the resources of the virtual machine occupied by all threads;
判断所述占用的资源是否小于预设的、与所述虚拟机对应的第一限制阈值;judging whether the occupied resource is smaller than a preset first limit threshold corresponding to the virtual machine;
若判断获知所述占用的资源大于等于所述第一限制阈值,则根据所述控制中心下发的线程优先级信息,控制低级别的线程休眠。If it is determined that the occupied resource is greater than or equal to the first limit threshold, then according to the thread priority information issued by the control center, the low-level thread is controlled to sleep.
A2、根据权利要求A1所述的方法,其特征在于,所述低级别的线程包括:A2, the method according to claim A1, is characterized in that, described low-level thread comprises:
扫描线程和漏洞修复线程。Scan threads and bug fix threads.
A3、根据权利要求A1所述的方法,其特征在于,所述控制低级别的线程休眠之后,还包括:A3. The method according to claim A1, characterized in that, after said controlling the low-level thread dormancy, further comprising:
若判断获知所述占用的资源小于所述第一限制阈值,则唤醒处于休眠状态的线程。If it is determined that the occupied resource is less than the first limit threshold, wake up the thread in the dormant state.
A4、根据权利要求A1所述的方法,其特征在于,所述监控所有线程占用的虚拟机的资源,包括:A4. The method according to claim A1, wherein said monitoring the resources of the virtual machine occupied by all threads comprises:
根据预设的监控触发策略获取监控频率;Obtain the monitoring frequency according to the preset monitoring trigger strategy;
采用所述监控频率监控所有线程占用的虚拟机的资源。The resources of the virtual machine occupied by all threads are monitored by using the monitoring frequency.
A5、根据权利要求A4所述的方法,其特征在于,所述根据预设的监控触发策略获取监控频率,包括:A5. The method according to claim A4, wherein said acquiring the monitoring frequency according to a preset monitoring trigger strategy comprises:
根据预设的时间监控策略获取与当前时间对应的监控频率,Obtain the monitoring frequency corresponding to the current time according to the preset time monitoring strategy,
或者,or,
根据预设的任务监控策略获取与当前所接收的任务数量对应的监控频率。Obtain the monitoring frequency corresponding to the currently received task quantity according to the preset task monitoring policy.
A6、根据权利要求A1所述的方法,其特征在于,所述开启监控线程之前,还包括:A6, the method according to claim A1, is characterized in that, before the described start monitoring thread, also comprises:
向所述控制中心发送资源控制请求;sending a resource control request to the control center;
接收所述控制中心分配的与所述虚拟机对应的第一限制阈值,所述第一限制阈值是所述控制中心根据下发给所述虚拟机的任务类型进行分配的。receiving a first limit threshold assigned by the control center and corresponding to the virtual machine, where the first limit threshold is assigned by the control center according to the task type delivered to the virtual machine.
A7、根据权利要求A1-A6任一所述的方法,其特征在于,所述方法还包括:A7. The method according to any one of claims A1-A6, wherein the method further comprises:
将所述虚拟机的资源占用信息发送给所述控制中心;sending the resource occupation information of the virtual machine to the control center;
接收所述控制中心根据所述线程优先级信息发送的、携带线程标识的休眠控制指令,所述休眠控制指令是所述控制中心获取所述虚拟机所属的物理机上、所有虚拟机的资源占用信息后,判断获知所有虚拟机占用的所述物理机的资源大于等于预设的、与所述物理机对应的第二限制阈值后发送的;receiving the dormancy control instruction carrying the thread identifier sent by the control center according to the thread priority information, the dormancy control instruction is that the control center acquires resource occupation information of all virtual machines on the physical machine to which the virtual machine belongs Afterwards, it is determined that the resources of the physical machine occupied by all virtual machines are greater than or equal to the preset second limit threshold corresponding to the physical machine and then sent;
控制与所述线程标识对应的线程休眠。controlling the sleep of the thread corresponding to the thread identifier.
A8、根据权利要求A7所述的方法,其特征在于,所述控制与所述线程标识对应的线程休眠之后,还包括:A8. The method according to claim A7, wherein after said controlling the thread corresponding to the thread identifier to sleep, further comprising:
接收所述控制中心发送的携带线程标识的唤醒控制指令,所述唤醒控制指令是所述控制中心判断获知所有虚拟机占用的所述物理机的资源小于所述第二限制阈值后发送的;receiving a wake-up control instruction carrying a thread identifier sent by the control center, where the wake-up control instruction is sent after the control center determines that resources of the physical machine occupied by all virtual machines are less than the second limit threshold;
唤醒与所述线程标识对应的处于休眠状态的线程。Awaking the thread corresponding to the thread identifier in the dormant state.
B9、一种虚拟化平台线程控制方法,其特征在于,所述方法包括:B9, a virtualization platform thread control method, is characterized in that, described method comprises:
接收虚拟机发送的启动消息;Receive the startup message sent by the virtual machine;
向所述虚拟机上的客户端发送至少一个任务,以及线程优先级信息,以使所述客户端针对所述任务开启多线程运行时,监控所有线程占用的虚拟机的资源,当所述占用的资源大于等于与所述虚拟机对应的第一限制阈值时,根据所述线程优先级信息,控制低级别的线程休眠。Send at least one task and thread priority information to the client on the virtual machine, so that when the client starts multi-threaded execution for the task, monitor the resources of the virtual machine occupied by all threads, when the occupied When the resource is greater than or equal to the first limit threshold corresponding to the virtual machine, control low-level threads to sleep according to the thread priority information.
B10、根据权利要求B9所述的方法,其特征在于,所述向所述虚拟机上的客户端发送至少一个任务之前,还包括:B10. The method according to claim B9, wherein before sending at least one task to the client on the virtual machine, further comprising:
接收所述虚拟机发送的资源控制请求;receiving a resource control request sent by the virtual machine;
根据下发给所述虚拟机的任务类型为所述虚拟机分配第一限制阈值,并将所述第一限制阈值发送给所述虚拟机。Allocating a first limit threshold to the virtual machine according to the task type issued to the virtual machine, and sending the first limit threshold to the virtual machine.
B11、根据权利要求B9或B10所述的方法,其特征在于,还包括:B11, the method according to claim B9 or B10, is characterized in that, also comprises:
接收部署在物理机上的至少一个虚拟机发送的资源占用信息;receiving resource occupation information sent by at least one virtual machine deployed on the physical machine;
判断所有虚拟机占用的所述物理机的资源是否小于预设的、与所述物理机对应的第二限制阈值;judging whether the resources of the physical machine occupied by all virtual machines are smaller than a preset second limit threshold corresponding to the physical machine;
若判断获知所述占用的资源大于等于所述第二限制阈值,则根据所述线程优先级信息向所述虚拟机发送携带线程标识的休眠控制指令,以使所述虚拟机控制与所述线程标识对应的线程休眠。If it is determined that the occupied resource is greater than or equal to the second limit threshold, then according to the thread priority information, send a dormancy control instruction carrying a thread identifier to the virtual machine, so that the virtual machine controls and the thread Identifies the corresponding thread sleep.
B12、根据权利要求B11所述的方法,其特征在于,所述根据所述线程优先级信息向所述虚拟机发送携带线程标识的休眠控制指令之后,还包括:B12. The method according to claim B11, characterized in that, after sending the dormancy control instruction carrying the thread identification to the virtual machine according to the thread priority information, further comprising:
若判断获知所述占用的资源小于所述第二限制阈值,则向所述虚拟机发送携带线程标识的唤醒控制指令,以使所述虚拟机唤醒与所述线程标识对应的处于休眠状态的线程。If it is determined that the occupied resource is less than the second limit threshold, then send a wake-up control instruction carrying a thread ID to the virtual machine, so that the virtual machine wakes up a thread in a dormant state corresponding to the thread ID .
C13、一种虚拟机,其特征在于,包括:C13, a kind of virtual machine, is characterized in that, comprises:
监控模块,用于当所述虚拟机上的客户端针对控制中心下发的多个任务开启多线程运行时,开启监控线程,监控所有线程占用的虚拟机的资源;A monitoring module, configured to enable a monitoring thread to monitor resources of the virtual machine occupied by all threads when the client on the virtual machine starts multi-threaded operation for a plurality of tasks issued by the control center;
第一判断模块,用于判断所述占用的资源是否小于预设的、与所述虚拟机对应的第一限制阈值;A first judging module, configured to judge whether the occupied resource is smaller than a preset first limit threshold corresponding to the virtual machine;
第一控制模块,用于当所述第一判断模块获知所述占用的资源大于等于所述第一限制阈值时,根据所述控制中心下发的线程优先级信息,控制低级别的线程休眠。The first control module is configured to control low-level threads to sleep according to the thread priority information issued by the control center when the first judging module learns that the occupied resource is greater than or equal to the first limit threshold.
C14、根据权利要求C13所述的虚拟机,其特征在于,所述低级别的线程包括:C14. The virtual machine according to claim C13, wherein said low-level thread comprises:
扫描线程和漏洞修复线程。Scan threads and bug fix threads.
C15、根据权利要求C13所述的虚拟机,其特征在于,所述第一控制模块还用于:C15. The virtual machine according to claim C13, wherein the first control module is also used for:
当所述第一判断模块获知所述占用的资源小于所述第一限制阈值时,唤醒处于休眠状态的线程。When the first judging module learns that the occupied resource is less than the first limit threshold, wake up the thread in the dormant state.
C16、根据权利要求C13所述的虚拟机,其特征在于,所述监控模块包括:C16. The virtual machine according to claim C13, wherein the monitoring module includes:
开启单元,用于当所述虚拟机上的客户端针对控制中心下发的多个任务开启多线程运行时,开启监控线程;The opening unit is used to open the monitoring thread when the client on the virtual machine starts multi-threaded operation for multiple tasks issued by the control center;
获取单元,用于根据预设的监控触发策略获取监控频率;an acquisition unit, configured to acquire the monitoring frequency according to a preset monitoring trigger strategy;
监测单元,用于采用所述监控频率监控所有线程占用的虚拟机的资源。The monitoring unit is configured to monitor the resources of the virtual machine occupied by all threads by using the monitoring frequency.
C17、根据权利要求C16所述的虚拟机,其特征在于,所述获取单元,具体用于:C17. The virtual machine according to claim C16, wherein the acquiring unit is specifically used for:
根据预设的时间监控策略获取与当前时间对应的监控频率,Obtain the monitoring frequency corresponding to the current time according to the preset time monitoring strategy,
或者,or,
根据预设的任务监控策略获取与当前所接收的任务数量对应的监控频率。Obtain the monitoring frequency corresponding to the currently received task quantity according to the preset task monitoring policy.
C18、根据权利要求C13所述的虚拟机,其特征在于,还包括:C18. The virtual machine according to claim C13, further comprising:
请求模块,用于向所述控制中心发送资源控制请求;a request module, configured to send a resource control request to the control center;
第一接收模块,用于接收所述控制中心分配的与所述虚拟机对应的第一限制阈值,所述第一限制阈值是所述控制中心根据下发给所述虚拟机的任务类型进行分配的。A first receiving module, configured to receive a first limit threshold assigned by the control center and corresponding to the virtual machine, where the first limit threshold is allocated by the control center according to the task type issued to the virtual machine of.
C19、根据权利要求C13-C18任一所述的虚拟机,其特征在于,还包括:C19. The virtual machine according to any one of claims C13-C18, further comprising:
第一发送模块,用于将所述虚拟机的资源占用信息发送给所述控制中心;A first sending module, configured to send the resource occupation information of the virtual machine to the control center;
第二接收模块,用于接收所述控制中心根据所述线程优先级信息发送的、携带线程标识的休眠控制指令,所述休眠控制指令是所述控制中心获取所述虚拟机所属的物理机上、所有虚拟机的资源占用信息后,判断获知所有虚拟机占用的所述物理机的资源大于等于预设的、与所述物理机对应的第二限制阈值后发送的;The second receiving module is configured to receive a dormancy control instruction carrying a thread identifier sent by the control center according to the thread priority information, where the dormancy control instruction is obtained by the control center on the physical machine to which the virtual machine belongs, After the resource occupancy information of all virtual machines is determined, it is determined that the resources of the physical machine occupied by all virtual machines are greater than or equal to a preset second limit threshold corresponding to the physical machine and then sent;
所述第一控制模块,还用于控制与所述线程标识对应的线程休眠。The first control module is further configured to control the sleep of the thread corresponding to the thread identifier.
C20、根据权利要求C19所述的虚拟机,其特征在于,C20, the virtual machine according to claim C19, is characterized in that,
所述第二接收模块,还用于接收所述控制中心发送的携带线程标识的唤醒控制指令,所述唤醒控制指令是所述控制中心判断获知所有虚拟机占用的所述物理机的资源小于所述第二限制阈值后发送的;The second receiving module is further configured to receive a wake-up control instruction carrying a thread identifier sent by the control center, where the wake-up control instruction is determined by the control center to know that the resources of the physical machine occupied by all virtual machines are less than the specified resources. sent after the second restriction threshold;
所述第一控制模块,还用于唤醒与所述线程标识对应的处于休眠状态的线程。The first control module is further configured to wake up a thread corresponding to the thread identifier that is in a dormant state.
D21、一种控制中心,其特征在于,包括:D21, a kind of control center, is characterized in that, comprises:
第三接收模块,用于接收虚拟机发送的启动消息;The third receiving module is configured to receive the startup message sent by the virtual machine;
第二发送模块,用于向所述虚拟机上的客户端发送至少一个任务,以及线程优先级信息,以使所述客户端针对所述任务开启多线程运行时,监控所有线程占用的虚拟机的资源,当所述占用的资源大于等于与所述虚拟机对应的第一限制阈值时,根据所述线程优先级信息,控制低级别的线程休眠。The second sending module is configured to send at least one task and thread priority information to the client on the virtual machine, so that when the client starts multi-threaded execution for the task, monitors the virtual machine occupied by all threads resources, and when the occupied resources are greater than or equal to the first limit threshold corresponding to the virtual machine, control low-level threads to sleep according to the thread priority information.
D22、根据权利要求D21所述的控制中心,其特征在于,还包括:分配模块D22. The control center according to claim D21, further comprising: a distribution module
所述第三接收模块,还用于接收所述虚拟机发送的资源控制请求;The third receiving module is further configured to receive a resource control request sent by the virtual machine;
所述分配模块,用于根据下发给所述虚拟机的任务类型为所述虚拟机分配第一限制阈值,并将所述第一限制阈值发送给所述虚拟机。The allocating module is configured to allocate a first limit threshold to the virtual machine according to the task type delivered to the virtual machine, and send the first limit threshold to the virtual machine.
D23、根据权利要求D21或D22所述的控制中心,其特征在于,还包括:第二判断模块和第二控制模块,D23. The control center according to claim D21 or D22, further comprising: a second judgment module and a second control module,
所述第三接收模块,还用于接收部署在物理机上的至少一个虚拟机发送的资源占用信息;The third receiving module is further configured to receive resource occupation information sent by at least one virtual machine deployed on the physical machine;
所述第二判断模块,用于判断所有虚拟机占用的所述物理机的资源是否小于预设的、与所述物理机对应的第二限制阈值;The second judging module is configured to judge whether the resources of the physical machine occupied by all virtual machines are smaller than a preset second limit threshold corresponding to the physical machine;
所述第二控制模块,用于当所述第二判断模块获知所述占用的资源大于等于所述第二限制阈值时,根据所述线程优先级信息向所述虚拟机发送携带线程标识的休眠控制指令,以使所述虚拟机控制与所述线程标识对应的线程休眠。The second control module is configured to, when the second judging module learns that the occupied resource is greater than or equal to the second limit threshold, send a dormancy message carrying a thread ID to the virtual machine according to the thread priority information A control instruction, so that the virtual machine controls the thread corresponding to the thread identifier to sleep.
D24、根据权利要求D23所述的控制中心,其特征在于:D24. The control center according to claim D23, characterized in that:
所述第二控制模块,还用于当所述第二判断模块获知所述占用的资源小于所述第二限制阈值,则向所述虚拟机发送携带线程标识的唤醒控制指令,以使所述虚拟机唤醒与所述线程标识对应的处于休眠状态的线程。The second control module is further configured to send a wake-up control instruction carrying a thread identifier to the virtual machine when the second judging module learns that the occupied resource is less than the second limit threshold, so that the The virtual machine wakes up the thread in the dormant state corresponding to the thread identifier.
E25、一种虚拟化平台线程控制系统,其特征在于,所述系统包括:控制中心、所述控制中心控制至少一个物理机。每个物理机上至少部署一个虚拟机,所述控制中心与所有虚拟机进行通信交互,并控制部署在所述虚拟机上的客户端,其中,所述虚拟机为如权利要求13-20任一所述的虚拟机,所述控制中心为如权利要求21-24任一所述的控制中心E25. A virtualization platform thread control system, characterized in that the system includes: a control center, and the control center controls at least one physical machine. At least one virtual machine is deployed on each physical machine, and the control center communicates and interacts with all virtual machines, and controls the clients deployed on the virtual machines, wherein the virtual machine is any one of claims 13-20 The virtual machine, the control center is the control center according to any one of claims 21-24
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps for realizing the above-mentioned method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the It includes the steps of the above method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other various media that can store program codes.
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than limiting them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: It is still possible to modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the various embodiments of the present invention. scope.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510379915.2A CN105094945A (en) | 2015-07-01 | 2015-07-01 | Method, equipment and system for virtualization platform thread control |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510379915.2A CN105094945A (en) | 2015-07-01 | 2015-07-01 | Method, equipment and system for virtualization platform thread control |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105094945A true CN105094945A (en) | 2015-11-25 |
Family
ID=54575454
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510379915.2A Pending CN105094945A (en) | 2015-07-01 | 2015-07-01 | Method, equipment and system for virtualization platform thread control |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105094945A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109324878A (en) * | 2018-09-20 | 2019-02-12 | 郑州云海信息技术有限公司 | A kind of control method and relevant device of process CPU usage |
CN112743260A (en) * | 2019-10-30 | 2021-05-04 | 北京配天技术有限公司 | Robot welding control method, robot welding control apparatus, and storage medium |
CN112948212A (en) * | 2021-03-01 | 2021-06-11 | 金蝶软件(中国)有限公司 | RPA task state monitoring method, device and computer storage medium |
CN113703964A (en) * | 2021-07-30 | 2021-11-26 | 青岛海尔科技有限公司 | Memory management method and device |
CN115421931A (en) * | 2022-11-07 | 2022-12-02 | 深圳市明源云科技有限公司 | Business thread control method and device, electronic equipment and readable storage medium |
CN118733195A (en) * | 2024-06-20 | 2024-10-01 | 北京火山引擎科技有限公司 | Virtual machine hot migration method and device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101765225A (en) * | 2008-12-24 | 2010-06-30 | 华为技术有限公司 | Virtual cluster management system and cluster node |
CN101951411A (en) * | 2010-10-13 | 2011-01-19 | 戴元顺 | Cloud scheduling system and method and multistage cloud scheduling system |
CN102033782A (en) * | 2009-09-30 | 2011-04-27 | 英业达集团(天津)电子技术有限公司 | Scheduling method for dynamically adjusting priority value of process |
CN102695998A (en) * | 2009-12-16 | 2012-09-26 | 高通股份有限公司 | System and method for controlling central processing unit power in a virtualized system |
CN104199669A (en) * | 2014-09-12 | 2014-12-10 | 北京奇虎科技有限公司 | Method and device for managing application program processes |
-
2015
- 2015-07-01 CN CN201510379915.2A patent/CN105094945A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101765225A (en) * | 2008-12-24 | 2010-06-30 | 华为技术有限公司 | Virtual cluster management system and cluster node |
CN102033782A (en) * | 2009-09-30 | 2011-04-27 | 英业达集团(天津)电子技术有限公司 | Scheduling method for dynamically adjusting priority value of process |
CN102695998A (en) * | 2009-12-16 | 2012-09-26 | 高通股份有限公司 | System and method for controlling central processing unit power in a virtualized system |
CN101951411A (en) * | 2010-10-13 | 2011-01-19 | 戴元顺 | Cloud scheduling system and method and multistage cloud scheduling system |
CN104199669A (en) * | 2014-09-12 | 2014-12-10 | 北京奇虎科技有限公司 | Method and device for managing application program processes |
Non-Patent Citations (1)
Title |
---|
ZHANG Y等: ""Friendly virtual machines: leveraging a feedback-control model for application adaptation"", 《ACM/USENIX INTERNATIONAL CONFERENCE ON VIRTUAL EXECUTION ENVIRONMENTS》 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109324878A (en) * | 2018-09-20 | 2019-02-12 | 郑州云海信息技术有限公司 | A kind of control method and relevant device of process CPU usage |
CN112743260A (en) * | 2019-10-30 | 2021-05-04 | 北京配天技术有限公司 | Robot welding control method, robot welding control apparatus, and storage medium |
CN112948212A (en) * | 2021-03-01 | 2021-06-11 | 金蝶软件(中国)有限公司 | RPA task state monitoring method, device and computer storage medium |
CN113703964A (en) * | 2021-07-30 | 2021-11-26 | 青岛海尔科技有限公司 | Memory management method and device |
CN115421931A (en) * | 2022-11-07 | 2022-12-02 | 深圳市明源云科技有限公司 | Business thread control method and device, electronic equipment and readable storage medium |
CN118733195A (en) * | 2024-06-20 | 2024-10-01 | 北京火山引擎科技有限公司 | Virtual machine hot migration method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI783355B (en) | Distributed training method and apparatus of deep learning model | |
CN105094945A (en) | Method, equipment and system for virtualization platform thread control | |
US8881149B2 (en) | Control of java resource runtime usage | |
CN106250500A (en) | The dynamic management approach of database connection pool and system | |
WO2017080273A1 (en) | Task management methods and system, and computer storage medium | |
US20150160977A1 (en) | Load Based Dynamic Resource Sets | |
CN106533713B (en) | Application deployment method and device | |
JP5960263B2 (en) | Suspend and / or limit processes for connected standby | |
KR20110083084A (en) | Server operating device and method using virtualization | |
WO2018036133A1 (en) | File download method and device | |
CN106664259B (en) | Method and device for expanding virtual network function | |
CN106713375A (en) | Method and device for allocating cloud resources | |
CN104363277A (en) | Allocation management system and management method for bandwidth resources in cloud game distributed system | |
CN106911741B (en) | Method for balancing virtual network management file downloading load and network management server | |
CN105808341A (en) | Method, apparatus and system for scheduling resources | |
CN108268305A (en) | For the system and method for virtual machine scalable appearance automatically | |
CN114461668A (en) | MYSQL database query method and device based on thread pool | |
CN106598740A (en) | System and method for limiting CPU (Central Processing Unit) occupancy rate of multi-thread program | |
CN107919987A (en) | An implementation method of microservice cloud deployment | |
CN115617497B (en) | Thread processing method, scheduling component, monitoring component, server and storage medium | |
CN115426361A (en) | Distributed client packaging method and device, main server and storage medium | |
CN104750546B (en) | A kind of method and system for adjusting connection pool | |
JP6488910B2 (en) | Control method, control program, and information processing apparatus | |
CN114579298A (en) | Resource management method, resource manager, and computer-readable storage medium | |
WO2023193527A1 (en) | Thread execution method and apparatus, electronic device, and computer-readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C41 | Transfer of patent application or patent right or utility model | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20161213 Address after: 100016 Beijing Chaoyang District Jiuxianqiao Road No. 10, building 15, floor 17, floor 3, 1701-26 Applicant after: BEIJING QI'ANXIN SCIENCE & TECHNOLOGY CO., LTD. Address before: 100088 Beijing city Xicheng District xinjiekouwai Street 28, block D room 112 (Desheng Park) Applicant before: Beijing Qihoo Technology Co., Ltd. Applicant before: BEIJING QI'ANXIN SCIENCE & TECHNOLOGY CO., LTD. |
|
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20151125 |