CN110275760A - Process based on fictitious host computer processor hangs up method and its relevant device - Google Patents

Process based on fictitious host computer processor hangs up method and its relevant device Download PDF

Info

Publication number
CN110275760A
CN110275760A CN201910569791.2A CN201910569791A CN110275760A CN 110275760 A CN110275760 A CN 110275760A CN 201910569791 A CN201910569791 A CN 201910569791A CN 110275760 A CN110275760 A CN 110275760A
Authority
CN
China
Prior art keywords
host computer
fictitious host
cpu usage
business process
business
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
Application number
CN201910569791.2A
Other languages
Chinese (zh)
Inventor
杜琛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Onething Technology Co Ltd
Original Assignee
Shenzhen Onething Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Onething Technology Co Ltd filed Critical Shenzhen Onething Technology Co Ltd
Priority to CN201910569791.2A priority Critical patent/CN110275760A/en
Publication of CN110275760A publication Critical patent/CN110275760A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4418Suspend and resume; Hibernate and awake
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45575Starting, stopping, suspending or resuming virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Debugging And Monitoring (AREA)

Abstract

A kind of process hang-up method based on fictitious host computer processor, which comprises obtain first processor CPU usage of each fictitious host computer on physical host;If the first CPU usage is located in the corresponding preset threshold section of fictitious host computer, and is greater than the corresponding default regulation threshold value of fictitious host computer, the second CPU usage of each business process on fictitious host computer is obtained;The CPU usage index of business process is determined according to the corresponding default weight of business process and the second CPU usage for each business process;If CPU usage index is greater than the corresponding pre-set level threshold value of business process, determine that business process is exceeded process;Target process is determined from exceeded process, and target process is hung up.The present invention also provides a kind of server and storage mediums.The present invention can improve the runnability for the business process that service priority is high on fictitious host computer.

Description

Process based on fictitious host computer processor hangs up method and its relevant device
Technical field
The present invention relates to field of computer technology more particularly to a kind of process based on fictitious host computer processor to hang up method And its relevant device.
Background technique
Currently, the program of processing business is deployed on Cloud Server i.e. fictitious host computer by many enterprises, meeting on fictitious host computer It runs multiple business procedure (having multiple business process), all business process on multiple fictitious host computers share the same object Manage the CPU of host, however cpu resource is limited, each business process can occupy CPU as needed and each business into Journey can not all know that the CPU of other business process is occupied, this will cause multiple business process while going out the case where seizing cpu resource It is existing, it is robbed so as to cause the high business process of service priority by the low business process of service priority and accounts for cpu resource, so that industry The high business process runnability of priority of being engaged in is low, or even is unable to run.
As it can be seen that the runnability for how improving the business process that service priority is high on fictitious host computer is a urgent need to resolve The technical issues of.
Summary of the invention
In view of the foregoing, it is necessary to provide that a kind of process based on fictitious host computer processor hangs up method and its correlation is set It is standby, it can be improved the runnability of the high business process of service priority on fictitious host computer.
The first aspect of the present invention provides a kind of process hang-up method based on fictitious host computer processor, the method packet It includes:
For each fictitious host computer on physical host, obtain the fictitious host computer on the physical host first at Manage device CPU usage;
If first CPU usage is located in the corresponding preset threshold section of the fictitious host computer, and the first CPU Utilization rate is greater than the corresponding default regulation threshold value of the fictitious host computer, obtains second of each business process on the fictitious host computer CPU usage;
For each business process, made according to the corresponding default weight of the business process and the 2nd CPU With rate, the CPU usage index of the business process is determined;
If the CPU usage index be greater than the corresponding pre-set level threshold value of the business process, determine the business into Journey is exceeded process;
Target process is determined from the exceeded process, and the target process is hung up.
In one possible implementation, the method also includes:
If first CPU usage is greater than the maximum value in the corresponding preset threshold section of the fictitious host computer, institute is determined The load condition for stating fictitious host computer is serious overburden;
The fictitious host computer is hung up.
In one possible implementation, each fictitious host computer on physical host obtains described virtual Host after the first processor CPU usage on the physical host, the method also includes:
Obtain the mark of the fictitious host computer;
According to the mark of the fictitious host computer and first CPU usage, hung up using process trained in advance When model judges that the fictitious host computer needs to be suspended, the fictitious host computer is hung up.
In one possible implementation, described to be directed to each business process, it is corresponding according to the business process Default weight and second CPU usage, after the CPU usage index for determining the business process, the method Further include:
Obtain the mark of the business process;
According to the mark of the business process, second CPU usage and the CPU usage index, using When the model of trained process hang-up in advance judges that the business process needs to be suspended, the business process is hung up.
In one possible implementation, after the determination business process is exceeded process, the method is also Include:
According to the exceeded process, warning message is generated;
Export the warning message;
It is described to determine that target process includes: from the exceeded process
Receiving process/thread suspension instruction;
The process/thread is hung up into the indicated process/thread of instruction and is determined as target process.
In one possible implementation, after the hang-up by the target process, the method also includes:
According to the relevant information for the process/thread being suspended, learning sample is generated;
It is trained using the learning sample, model is hung up to the process and is optimized.
In one possible implementation, described to determine that target process includes: from the exceeded process
From the exceeded process, determine that the smallest process of CPU usage index is target process;
The method also includes:
Whether the operation attribute for judging the thread that the target process includes is concurrently to execute;
It is described to include: by target process hang-up
If the operation attribute for the thread that the target process includes is concurrently to execute, any for including by the target process A thread suspension;Or
If the operation attribute for the thread that the target process includes is not concurrently to execute, the target process is hung up.
In one possible implementation, the method also includes:
Obtain current time;
The current time is input to trained process in advance and hangs up model, obtains warning information;
If the warning information is not null value, the warning information is exported.
The second aspect of the present invention provides a kind of process hanging-up device based on fictitious host computer processor, described device packet It includes:
Module is obtained, for obtaining the fictitious host computer in the physics for each fictitious host computer on physical host First processor CPU usage on host;
The acquisition module, if being also used to first CPU usage is located at the corresponding preset threshold of the fictitious host computer In section, and first CPU usage is greater than the corresponding default regulation threshold value of the fictitious host computer, obtains the fictitious host computer Second CPU usage of upper each business process;
Determining module, for being directed to each business process, according to the corresponding default weight of the business process and Second CPU usage determines the CPU usage index of the business process;
The determining module, if being also used to the CPU usage index greater than the corresponding pre-set level of the business process Threshold value determines that the business process is exceeded process;
The determining module is also used to determine target process from the exceeded process;
Suspension module, for hanging up the target process.
The third aspect of the present invention provides a kind of server, and the server includes processor and memory, the processing Device realizes that the process based on fictitious host computer processor is hung when being used to execute the computer program stored in the memory The method of rising.
The fourth aspect of the present invention provides a kind of computer readable storage medium, deposits on the computer readable storage medium Computer program is contained, the process based on fictitious host computer processor is realized when the computer program is executed by processor Hang-up method.
By above technical scheme, in the present invention, can be obtained described virtual for each fictitious host computer on physical host First CPU usage of the host on the physical host;If it is corresponding that first CPU usage is located at the fictitious host computer In preset threshold section and first CPU usage is greater than the corresponding default regulation threshold value of the fictitious host computer, obtains institute State the second CPU usage of each business process on fictitious host computer;For each business process, according to the business process Corresponding default weight and second CPU usage, determine the CPU usage index of the business process;If the CPU Utilization rate index is greater than the corresponding pre-set level threshold value of the business process, determines that the business process is exceeded process;From institute It states and determines target process in exceeded process, and the target process is hung up.As it can be seen that in the present invention, when fictitious host computer is in physics When the first CPU usage on host belongs to the fictitious host computer corresponding preset threshold section, show on current virtual host Business process rob the cpu resource for accounting for business process on other fictitious host computers, if first CPU usage be greater than the void The quasi- corresponding default regulation threshold value of host shows that the fictitious host computer needs to carry out the regulation to business process, in exceeded process A smallest process of CPU usage index is selected to hang up in (robbing the process for accounting for the cpu resource of other processes), i.e., by industry The cpu resource that the low business process of business priority occupies releases, and other business process can be obtained and is released Cpu resource improves the runnability for the business process that service priority is high on fictitious host computer.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is the stream for the preferred embodiment that a kind of process based on fictitious host computer processor disclosed by the invention hangs up method Cheng Tu.
Fig. 2 is disclosed by the invention a kind of pre- without the effect using the process hang-up method based on fictitious host computer processor Mapping.
Fig. 3 is that the present invention realizes that the process based on fictitious host computer processor hangs up the effect prediction figure of method.
Fig. 4 is a kind of function of the preferred embodiment of process hanging-up device based on fictitious host computer processor disclosed by the invention It can module map.
Fig. 5 is that the present invention realizes that the process based on fictitious host computer processor hangs up the server of the preferred embodiment of method Structural schematic diagram.
Specific embodiment
To better understand the objects, features and advantages of the present invention, with reference to the accompanying drawing and specific real Applying example, the present invention will be described in detail.It should be noted that in the absence of conflict, the embodiment of the present invention and embodiment In feature can be combined with each other.
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
Unless otherwise defined, all technical and scientific terms used herein and belong to technical field of the invention The normally understood meaning of technical staff is identical.Term as used herein in the specification of the present invention is intended merely to description tool The purpose of the embodiment of body, it is not intended that in the limitation present invention.
In order to make the foregoing objectives, features and advantages of the present invention clearer and more comprehensible, with reference to the accompanying drawing and specific real Applying mode, the present invention is described in further detail.
The process based on fictitious host computer processor of the embodiment of the present invention hangs up method application in the server, can also answer In server and the hardware environment being made up of the electronic equipment that network and the server are attached, by server It is executed jointly with electronic equipment.Network includes but is not limited to: wide area network, Metropolitan Area Network (MAN) or local area network.
Wherein, server, which can refer to, to provide the department of computer science of service to equipment (such as electronic equipment) other in network System.If personal computer can externally provide File Transfer Protocol (File Transfer Protocol, abbreviation FTP) clothes Business, can also be server.From narrow scope, server refers exclusively to certain high-performance computers, can externally be mentioned by network For service, for common PC, stability, safety, performance etc. require it is higher, therefore The hardware such as CPU, chipset, memory, disk system, network and common PC are different.
The electronic equipment include it is a kind of can according to the instruction for being previously set or store, it is automatic carry out numerical value calculate with/ Or the electronic equipment of information processing, hardware include but is not limited to microprocessor, specific integrated circuit (ASIC), programmable gate array Arrange (FPGA), digital processing unit (DSP), embedded device etc..
In the present invention, a SDK (Software Development Kit, software development can be installed in the server Kit), external program only needs to import SDK (integrated SDK module), so that it may call the method finished writing in SDK to realize meter Calculate CPU usage index, hang-up process, the CPU usage for obtaining the corresponding process of the program and collect data and generate to The learning sample etc. of model training.
In the present invention, an Agent (agency), the available program without integrating SDK can be installed in the server The CPU usage of corresponding process can be managed data, and provide external interface to other program inquirings its manage Data.
Referring to Figure 1, Fig. 1 is that a kind of process based on fictitious host computer processor disclosed by the invention hangs up the preferable of method The flow chart of embodiment.Wherein, the sequence of step can change in the flow chart according to different requirements, and certain steps can be with It omits.
S11, server obtain the fictitious host computer in the physical host for each fictitious host computer on physical host On first processor CPU usage.
Wherein, the physical host, that is, server itself entity hardware can be deployed on the server more A fictitious host computer.Processor (CPU, Central Processing Unit) is one piece of ultra-large integrated circuit, is one The arithmetic core (Core) and control core (Control Unit) of computer.Its function be mainly interpretive machine instruction with And the data in processing computer software.
Wherein, multiple fictitious host computers can be deployed on the server, fictitious host computer (virtual hosting) refers to Virtual server, the physical server of an operation on the internet can be divided into multiple virtual servers.
In the embodiment of the present invention, can by export physical host /(fictitious host computer is on physical host by proc/pid Process id) statistical information of/status file gets the CPU usage of each fictitious host computer, i.e., and described first CPU uses Rate.
Optionally, first CPU usage that the SDK being deployed on physical host can will acquire is sent to Agent, Agent can save first CPU usage into virtual tables, wherein the virtual tables are a kind of numbers According to structure, for saving data.
As an alternative embodiment, after step S11, the method also includes:
Obtain the mark of the fictitious host computer;
According to the mark of the fictitious host computer and first CPU usage, hung up using process trained in advance When model judges that the fictitious host computer needs to be suspended, the fictitious host computer is hung up.
Wherein, the mark includes virtual host name and the corresponding Business Name of fictitious host computer.
It, can be defeated by the mark of the fictitious host computer and first CPU usage in the optional embodiment Enter to trained process in advance and hang up in model, hangs up model when the process and judge that the fictitious host computer needs are suspended When, the instruction that can export the hang-up fictitious host computer receives described in hang-up to the SDK being deployed on physical host, the SDK After the instruction of fictitious host computer, the fictitious host computer is hung up.It can be constantly according to new sample because the process hang-up model is Original study optimization, judges whether fictitious host computer needs to be suspended than program according to Rule of judgment such as the threshold values being arranged in code Judge whether fictitious host computer needs to be suspended more accurate, and can directly export the hang-up instruction for fictitious host computer, It does not need SDK to request to send hang-up instruction to Agent, reduces the performance loss of Agent.
If S12, first CPU usage are located in the corresponding preset threshold section of the fictitious host computer, and described One CPU usage is greater than the corresponding default regulation threshold value of the fictitious host computer, and server obtains each industry on the fictitious host computer Second CPU usage of business process.
Wherein, the preset threshold section refers in advance for a CPU usage value model of each fictitious host computer setting (threshold interval) is enclosed, when CPU usage is in this range, then it is assumed that the CPU is in the load condition slightly loaded.
Wherein, the default regulation threshold value refers to a regulation threshold value being arranged in advance for each fictitious host computer, when described When the CPU usage of fictitious host computer is greater than the regulation threshold value, determine that the fictitious host computer needs to regulate and control its business process.
The present invention can preset the threshold interval of each fictitious host computer, when the CPU of the fictitious host computer makes in implementing With rate in the corresponding threshold interval of the fictitious host computer, it is determined that (current CPU is negative for the load condition of the fictitious host computer Carry) it is slight overburden;If the CPU usage of the fictitious host computer is less than the minimum of the corresponding threshold interval of the fictitious host computer Value, it is determined that the load condition of the fictitious host computer is normal load;If the CPU usage of the fictitious host computer is greater than the void The maximum value of the quasi- corresponding threshold interval of host, it is determined that the load condition of the fictitious host computer is serious overburden.When described When first CPU usage belongs to the fictitious host computer corresponding preset threshold section, determine that the cpu load of the fictitious host computer is Slight overburden, the SDK for being deployed in the fictitious host computer also need further to judge whether the fictitious host computer is adjusted Control shows the fictitious host computer needs if first CPU usage is greater than the corresponding default regulation threshold value of the fictitious host computer Regulated and controled, obtains the CPU usage (i.e. the second CPU usage) of each business process on the fictitious host computer.
Optionally, local soket (socket) is created on physical host, the SDK being deployed on fictitious host computer can lead to Cross the information such as the load condition of fictitious host computer described in Agent request of the soket on physical host;Wherein, the soket It is the abstract representation of endpoint during network communication, comprising carrying out five kinds of information necessary to network communication: the agreement used is connected, The IP address of local host, the protocol port of local process, the IP address of remote ground host, the protocol port of remote ground process can be with Realize that network communication carries out data exchange for the program in the program and fictitious host computer on physical host.
As an alternative embodiment, the method also includes:
If first CPU usage is greater than the maximum value in the corresponding preset threshold section of the fictitious host computer, institute is determined The load condition for stating fictitious host computer is serious overburden;
The fictitious host computer is hung up.
In the optional embodiment, if first CPU usage is greater than the corresponding default threshold of the fictitious host computer It is worth the maximum value in section, determines that the load condition of the fictitious host computer is serious overburden, show that the fictitious host computer greatly may be used very much Can occur mistake in the process of running or perform the code of mistake, need out of service, waiting technical staff's investigation Mistake, the SDK being deployed on physical host can hang up the fictitious host computer, occupy too many CPU to avoid the fictitious host computer Resource, it is ensured that other fictitious host computers on physical host operate normally.
S13, it is directed to each business process, server is according to the corresponding default weight of the business process and described Second CPU usage determines the CPU usage index of the business process.
Wherein, the weight refers to the significance level of a certain factor or index relative to a certain things.
Wherein, the CPU usage index is an index associated with the weight of business process, for measuring business The current CPU occupancy situation of process.
In the embodiment of the present invention, each business can be given in advance according to the significance level (service priority) of business process Weight is arranged in process, and the value of the weight of the high business process of service priority is bigger.By the weight of business process multiplied by described Business process from the CPU usage (i.e. described second CPU usage) on fictitious host computer, calculated result be the business into The CPU usage index of journey.For example, currently there was only two business process of A and B on a fictitious host computer, the weight of A is 0.9, The weight that CPU usage is 50%, B is 0.1, CPU usage 10%, then the CPU usage index of A is 45%, B's CPU usage index is 1%.
As an alternative embodiment, after step S13, the method also includes:
Obtain the mark of the business process;
According to the mark of the business process, second CPU usage and the CPU usage index, using When the model of trained process hang-up in advance judges that the business process needs to be suspended, the business process is hung up.
Wherein, the mark includes Business Name and business process title.
It, can be by the mark of the business process, second CPU usage and institute in the optional embodiment It states CPU usage index to be input in trained process hang-up model in advance, hangs up model when the process and judge the industry When business process needs to be suspended, the Agent being deployed on fictitious host computer can export the instruction for hanging up the business process to described Business process corresponding SDK hangs up the business process after the SDK receives the instruction for hanging up the business process.Cause Hanging up model for the process is constantly to learn to optimize according to new sample, judges whether business process needs to be hung It is more quasi- according to Rule of judgment such as the metrics-thresholds being arranged in code to judge whether business process needs to be suspended than program Really, and can directly export for business process hang-up instruction, do not need SDK to Agent request send hang up instruction, drop The performance loss of low Agent.
If S14, the CPU usage index are greater than the corresponding pre-set level threshold value of the business process, server is determined The business process is exceeded process.
In the embodiment of the present invention, the metrics-thresholds of each business process can be preset.The index of each business process Threshold value is the index value that the CPU maximum that the business process allows occupies.If the CPU usage index of the business process is greater than The corresponding pre-set level threshold value of the business process, shows that the CPU of the business process has occupied over the business process institute The CPU maximum of permission occupies, i.e., the business process robs the cpu resource for accounting for other business process.Determine that the business process is Exceeded process.
As an alternative embodiment, after step S14, the method also includes:
According to the exceeded process, warning message is generated;
Export the warning message;
It is described to determine that target process includes: from the exceeded process
Receiving process/thread suspension instruction;
The process/thread is hung up into the indicated process/thread of instruction and is determined as target process.
Wherein, the warning message can include but is not limited to the title of fictitious host computer, the title of business process and build View hangs up score.
Wherein, the thread refers to that operating system is able to carry out the minimum unit of operation scheduling.It is comprised in process it In, it is the actual operation unit in process.
In the optional embodiment, determine the business process be exceeded process after, SDK can be generated about The warning message of the exceeded process, for example, the warning message generated can be with are as follows: the fictitious host computer A of present physical host is in Slight extra-heavy state, exceeded process are test1, it is proposed that hanging up score is 60 points (full marks 100 divide).Wherein, it is proposed that hang up Score is high, indicates that the CPU usage of the exceeded process is relatively high or the service priority of the exceeded process is relatively low, it is proposed that hang up Score can show that the CPU usage of process is higher, weight is lower according to preset computation rule, get over it is recommended that hanging up score It is high.How to calculate suggestion and hang up score, the present invention is not specifically limited in this embodiment.The warning message can be exported to physical host On interface, prompt user's present physical host fictitious host computer be in extra-heavy state, show exceeded process and it is exceeded into Score is hung up in the suggestion of journey.User can with reference proposition hang up score come determine hang up process, according to user input process/ The process/thread for hanging up instruction instruction is hung up in thread suspension instruction.I.e. by user be manually entered instruction hang-up process or Hang up the thread that some process includes.
As an alternative embodiment, after the hang-up by the target process, the method also includes:
According to the relevant information for the process/thread being suspended, learning sample is generated;
It is trained using the learning sample, model is hung up to the process and is optimized.
Wherein, the first information include but is not limited to the title of the process, Business Name, the process CPU make The time point and the process being suspended with rate, the mark of the corresponding fictitious host computer of the process, the process/thread are hung Rise concrete condition (thread that entire process is suspended or process includes is suspended, if hang up process thread, will record by The quantity of the thread of hang-up).
In the optional embodiment, learning sample can be generated according to the first information.The study module of SDK The learning sample can be used to be trained, adjust the process and hang up condition (the various numbers that model hangs up business process According to) range, improve the process and hang up model and judge the accuracy whether business process needs to hang up, thus realization to it is described into The optimization of journey extension pattern drawing.
S15, server determine target process from the exceeded process, and the target process is hung up.
In the embodiment of the present invention, SDK can execute the hang-up instruction sended over from Agent, and target process is hung up.
It is disclosed by the invention a kind of without using based on fictitious host computer processor please also refer to Fig. 2 and Fig. 3, Fig. 2 The effect prediction figure of process hang-up method;Fig. 3 is that the present invention realizes that the process based on fictitious host computer processor hangs up the effect of method Fruit prognostic chart;As shown in Fig. 2, no matter the remaining cpu resource of physical host is more or few, the cpu resource that fictitious host computer occupies Constant, the cpu resource that the low business process of service priority occupies is constant, i.e., with the remaining cpu resource of the physical host Fewer and fewer, cpu resource obtained by the high business process of service priority is also fewer and fewer, may cause service priority height Business process because enough cpu resources cannot be obtained and runnability lowly or even is unable to run.When having used the present invention After the process hang-up method based on fictitious host computer processor realized, as described in Figure 3, when the remaining cpu resource of physical host becomes When few, the low business process of service priority can be hung up from extra-heavy fictitious host computer, release service priority is low The occupied cpu resource of business process, the business process for allowing service priority high obtain enough cpu resources, thus Improve the runnability of the high business process of service priority.
Specifically, described determine that target process includes: from the exceeded process
From the exceeded process, determine that the smallest process of CPU usage index is target process;
The method also includes:
Whether the operation attribute for judging the thread that the target process includes is concurrently to execute;
It is described to include: by target process hang-up
If the operation attribute for the thread that the target process includes is concurrently to execute, any for including by the target process A thread suspension;Or
If the operation attribute for the thread that the target process includes is not concurrently to execute, the target process is hung up.
In the optional embodiment, it can determine that the smallest process of CPU usage index is mesh from exceeded process Mark process, for CPU usage index with weight correlation, it is minimum that the smallest process of CPU usage index is generally service priority The business priority of process, i.e., the described target process is relatively low, it may be possible to minimum.Can the target process hang up, release The cpu resource that the target process occupies uses, it is ensured that the high business process of service priority can be obtained to other business process Enough to cpu resource, the runnability of the high business process of service priority can be improved.It is hung up to the target process Before, it can be determined that whether the operation attribute for the thread that the target process includes is concurrently to execute, if the target process packet The operation attribute of the thread included be concurrently execute, any one thread suspension for including by the target process, such as: if some into Journey be for sending one piece of data, the thread which includes all be for and meanwhile send a part of this segment data, then should The operation attribute for the thread that process includes is concurrently to execute, any one thread suspension that can include by the process, which can To work on, but the cpu resource that the process occupies is few, and the process can be allowed to mitigate system load while working on. Optionally, if the operation attribute for the thread that the target process includes is not concurrently to execute, the target process is hung up.
As an alternative embodiment, the method also includes:
Obtain current time;
The current time is input to trained process in advance and hangs up model, obtains warning information;
If the warning information is not null value, the warning information is exported.
In the optional embodiment, the available current time, the current time is input to and is trained in advance Process hang up model, i.e., using the process hang up model monitoring current time, if current time be pre-warning time within the scope of, Warning information can be exported.For example, exporting warning information if process A needs are hung up in 6:00 in 5:45, prompting user's physics Fictitious host computer B on host can need to hang up process A in 6:00 overburden.For fictitious host computer overburden, Ke Yijin Row gives warning in advance, and user is allowed to handle in time, avoids the business process that service priority is high on fictitious host computer because fictitious host computer is super Load and runnability is low.
In the method flow described in Fig. 1, it can be obtained described virtual for each fictitious host computer on physical host First CPU usage of the host on the physical host;If it is corresponding that first CPU usage is located at the fictitious host computer In preset threshold section and first CPU usage is greater than the corresponding default regulation threshold value of the fictitious host computer, obtains institute State the second CPU usage of each business process on fictitious host computer;For each business process, according to the business process Corresponding default weight and second CPU usage, determine the CPU usage index of the business process;If the CPU Utilization rate index is greater than the corresponding pre-set level threshold value of the business process, determines that the business process is exceeded process;From institute It states and determines target process in exceeded process, and the target process is hung up.As it can be seen that in the present invention, when fictitious host computer is in physics When the first CPU usage on host belongs to the fictitious host computer corresponding preset threshold section, show on current virtual host Business process rob the cpu resource for accounting for business process on other fictitious host computers, if first CPU usage be greater than the void The quasi- corresponding default regulation threshold value of host shows that the fictitious host computer needs to carry out the regulation to business process, in exceeded process A smallest process of CPU usage index is selected to hang up in (robbing the process for accounting for the cpu resource of other processes), i.e., by industry The cpu resource that the low business process of business priority occupies releases, and other business process can be obtained and is released Cpu resource improves the runnability for the business process that service priority is high on fictitious host computer.
The above is only a specific embodiment of the invention, but scope of protection of the present invention is not limited thereto, for For those skilled in the art, without departing from the concept of the premise of the invention, improvement, but these can also be made It all belongs to the scope of protection of the present invention.
Fig. 4 is referred to, Fig. 4 is a kind of the preferable of process hanging-up device based on fictitious host computer processor disclosed by the invention The functional block diagram of embodiment.
In some embodiments, the process hanging-up device based on fictitious host computer processor is run in server.Institute Stating the process hanging-up device based on fictitious host computer processor may include multiple functional modules as composed by program code segments.Institute The program code for stating each program segment in the process hanging-up device based on fictitious host computer processor can store in memory, And as performed by least one processor, to execute in the process hang-up method described in Fig. 1 based on fictitious host computer processor Some or all of step.
In the present embodiment, the function based on the process hanging-up device of fictitious host computer processor according to performed by it can To be divided into multiple functional modules.The functional module may include: to obtain module 201, determining module 202 and suspension module 203.The so-called module of the present invention, which refers to, a kind of performed by least one processor and can complete fixed function Series of computation machine program segment, storage is in memory.It in some embodiments, will be subsequent about the function of each module It is described in detail in embodiment.
Module 201 is obtained, for obtaining the fictitious host computer in the object for each fictitious host computer on physical host Manage the first processor CPU usage on host;
Wherein, processor (CPU, Central Processing Unit) is one piece of ultra-large integrated circuit, is one The arithmetic core (Core) and control core (Control Unit) of platform computer.Its function is mainly interpretive machine instruction And the data in processing computer software.
Wherein, fictitious host computer (virtual hosting) refers to virtual server, the physics of an operation on the internet Server can be divided into multiple virtual servers.
In the embodiment of the present invention, can by export physical host /(fictitious host computer is on physical host by proc/pid Process id) statistical information of/status file gets the CPU usage of each fictitious host computer, i.e., and described first CPU uses Rate.
Optionally, first CPU usage that the SDK being deployed on physical host can will acquire is sent to Agent, Agent can save first CPU usage into virtual tables, wherein the virtual tables are a kind of numbers According to structure, for saving data.
The acquisition module 201, if being also used to first CPU usage is located at the corresponding default threshold of the fictitious host computer It is worth in section, and first CPU usage is greater than the corresponding default regulation threshold value of the fictitious host computer, obtains the virtual master Second CPU usage of each business process on machine;
Wherein, the preset threshold section refers in advance for a CPU usage value model of each fictitious host computer setting (threshold interval) is enclosed, when CPU usage is in this range, then it is assumed that the CPU is in the load condition slightly loaded.
Wherein, the default regulation threshold value refers to a regulation threshold value being arranged in advance for each fictitious host computer, when described When the CPU usage of fictitious host computer is greater than the regulation threshold value, determine that the fictitious host computer needs to regulate and control its business process.
The present invention can preset the threshold interval of each fictitious host computer, when the CPU of the fictitious host computer makes in implementing With rate in the corresponding threshold interval of the fictitious host computer, it is determined that (current CPU is negative for the load condition of the fictitious host computer Carry) it is slight overburden;If the CPU usage of the fictitious host computer is less than the minimum of the corresponding threshold interval of the fictitious host computer Value, it is determined that the load condition of the fictitious host computer is normal load;If the CPU usage of the fictitious host computer is greater than the void The maximum value of the quasi- corresponding threshold interval of host, it is determined that the load condition of the fictitious host computer is serious overburden.When described When first CPU usage belongs to the fictitious host computer corresponding preset threshold section, determine that the cpu load of the fictitious host computer is Slight overburden, the SDK for being deployed in the fictitious host computer also need further to judge whether the fictitious host computer is adjusted Control shows the fictitious host computer needs if first CPU usage is greater than the corresponding default regulation threshold value of the fictitious host computer Regulated and controled, obtains the CPU usage (i.e. the second CPU usage) of each business process on the fictitious host computer.
Optionally, local soket (socket) is created on physical host, the SDK being deployed on fictitious host computer can lead to Cross the information such as the load condition of fictitious host computer described in Agent request of the soket on physical host;Wherein, the soket It is the abstract representation of endpoint during network communication, comprising carrying out five kinds of information necessary to network communication: the agreement used is connected, The IP address of local host, the protocol port of local process, the IP address of remote ground host, the protocol port of remote ground process can be with Realize that network communication carries out data exchange for the program in the program and fictitious host computer on physical host.
Determining module 202, for be directed to each business process, according to the corresponding default weight of the business process with And second CPU usage, determine the CPU usage index of the business process;
Wherein, the weight refers to the significance level of a certain factor or index relative to a certain things.
Wherein, the CPU usage index is an index associated with the weight of business process, for measuring business The current CPU occupancy situation of process.
In the embodiment of the present invention, each business can be given in advance according to the significance level (service priority) of business process Weight is arranged in process, and the value of the weight of the high business process of service priority is bigger.By the weight of business process multiplied by described Business process from the CPU usage (i.e. described second CPU usage) on fictitious host computer, calculated result be the business into The CPU usage index of journey.For example, currently there was only two business process of A and B on a fictitious host computer, the weight of A is 0.9, The weight that CPU usage is 50%, B is 0.1, CPU usage 10%, then the CPU usage index of A is 45%, B's CPU usage index is 1%.
The determining module 202, if being also used to the CPU usage index greater than the corresponding default finger of the business process Threshold value is marked, determines that the business process is exceeded process;
In the embodiment of the present invention, the metrics-thresholds of each business process can be preset.The index of each business process Threshold value is the index value that the CPU maximum that the business process allows occupies.If the CPU usage index of the business process is greater than The corresponding pre-set level threshold value of the business process, shows that the CPU of the business process has occupied over the business process institute The CPU maximum of permission occupies, i.e., the business process robs the cpu resource for accounting for other business process.Determine that the business process is Exceeded process.
The determining module 202 is also used to determine target process from the exceeded process.
Suspension module 203, for hanging up the target process.
In the embodiment of the present invention, SDK can execute the hang-up instruction sended over from Agent, and target process is hung up.
It is disclosed by the invention a kind of without using based on fictitious host computer processor please also refer to Fig. 2 and Fig. 3, Fig. 2 The effect prediction figure of process hang-up method;Fig. 3 is that the present invention realizes that the process based on fictitious host computer processor hangs up the effect of method Fruit prognostic chart;As shown in Fig. 2, no matter the remaining cpu resource of physical host is more or few, the cpu resource that fictitious host computer occupies Constant, the cpu resource that the low business process of service priority occupies is constant, i.e., with the remaining cpu resource of the physical host Fewer and fewer, cpu resource obtained by the high business process of service priority is also fewer and fewer, may cause service priority height Business process because enough cpu resources cannot be obtained and runnability lowly or even is unable to run.When having used the present invention After the process hang-up method based on fictitious host computer processor realized, as described in Figure 3, when the remaining cpu resource of physical host becomes When few, the low business process of service priority can be hung up from extra-heavy fictitious host computer, release service priority is low The occupied cpu resource of business process, the business process for allowing service priority high obtain enough cpu resources, thus Improve the runnability of the high business process of service priority.
As an alternative embodiment, the determining module 202, is greater than if being also used to first CPU usage The maximum value in the corresponding preset threshold section of the fictitious host computer determines that the load condition of the fictitious host computer is serious super negative It carries;
The suspension module 203 is also used to hang up the fictitious host computer.
In the optional embodiment, if first CPU usage is greater than the corresponding default threshold of the fictitious host computer It is worth the maximum value in section, determines that the load condition of the fictitious host computer is serious overburden, show that the fictitious host computer greatly may be used very much Can occur mistake in the process of running or perform the code of mistake, need out of service, waiting technical staff's investigation Mistake, the SDK being deployed on physical host can hang up the fictitious host computer, occupy too many CPU to avoid the fictitious host computer Resource, it is ensured that other fictitious host computers on physical host operate normally.
As an alternative embodiment, the acquisition module 201, is also used to obtain the mark of the fictitious host computer;
The suspension module 203 is also used to mark and first CPU usage according to the fictitious host computer, When judging that the fictitious host computer needs to be suspended using process hang-up model trained in advance, the fictitious host computer is hung up.
Wherein, the mark includes virtual host name and the corresponding Business Name of fictitious host computer.
It, can be defeated by the mark of the fictitious host computer and first CPU usage in the optional embodiment Enter to trained process in advance and hang up in model, hangs up model when the process and judge that the fictitious host computer needs are suspended When, the instruction that can export the hang-up fictitious host computer receives described in hang-up to the SDK being deployed on physical host, the SDK After the instruction of fictitious host computer, the fictitious host computer is hung up.It can be constantly according to new sample because the process hang-up model is Original study optimization, judges whether fictitious host computer needs to be suspended than program according to Rule of judgment such as the threshold values being arranged in code Judge whether fictitious host computer needs to be suspended more accurate, and can directly export the hang-up instruction for fictitious host computer, It does not need SDK to request to send hang-up instruction to Agent, reduces the performance loss of Agent.
As an alternative embodiment, the acquisition module 201, is also used to obtain the mark of the business process;
The suspension module 203 is also used to the mark according to the business process, second CPU usage and institute CPU usage index is stated, when judging that the business process needs to be suspended using process hang-up model trained in advance, by institute State business process hang-up.
Wherein, the mark includes Business Name and business process title.
It, can be by the mark of the business process, second CPU usage and institute in the optional embodiment It states CPU usage index to be input in trained process hang-up model in advance, hangs up model when the process and judge the industry When business process needs to be suspended, the Agent being deployed on fictitious host computer can export the instruction for hanging up the business process to described Business process corresponding SDK hangs up the business process after the SDK receives the instruction for hanging up the business process.Cause Hanging up model for the process is constantly to learn to optimize according to new sample, judges whether business process needs to be hung It is more quasi- according to Rule of judgment such as the metrics-thresholds being arranged in code to judge whether business process needs to be suspended than program Really, and can directly export for business process hang-up instruction, do not need SDK to Agent request send hang up instruction, drop The performance loss of low Agent.
As an alternative embodiment, the process hanging-up device based on fictitious host computer processor can also wrap It includes:
Generation module determines the business process for the determining module 202 to surpass after exceeded process according to described Mark process generates warning message;
First output module, for exporting the warning message;
The determining module 202 determines the mode of target process from the exceeded process specifically:
Receiving process/thread suspension instruction;
The process/thread is hung up into the indicated process/thread of instruction and is determined as target process.
Wherein, the warning message can include but is not limited to the title of fictitious host computer, the title of business process and build View hangs up score.
Wherein, the thread refers to that operating system is able to carry out the minimum unit of operation scheduling.It is comprised in process it In, it is the actual operation unit in process.
In the optional embodiment, determine the business process be exceeded process after, SDK can be generated about The warning message of the exceeded process, for example, the warning message generated can be with are as follows: the fictitious host computer A of present physical host is in Slight extra-heavy state, exceeded process are test1, it is proposed that hanging up score is 60 points (full marks 100 divide).Wherein, it is proposed that hang up Score is high, indicates that the CPU usage of the exceeded process is relatively high or the service priority of the exceeded process is relatively low, it is proposed that hang up Score can show that the CPU usage of process is higher, weight is lower according to preset computation rule, get over it is recommended that hanging up score It is high.How to calculate suggestion and hang up score, the present invention is not specifically limited in this embodiment.The warning message can be exported to physical host On interface, prompt user's present physical host fictitious host computer be in extra-heavy state, show exceeded process and it is exceeded into Score is hung up in the suggestion of journey.User can with reference proposition hang up score come determine hang up process, according to user input process/ The process/thread for hanging up instruction instruction is hung up in thread suspension instruction.I.e. by user be manually entered instruction hang-up process or Hang up the thread that some process includes.
As an alternative embodiment, the generation module, be also used to the suspension module 203 by the target into After journey is hung up, according to the relevant information for the process/thread being suspended, learning sample is generated;
The process hanging-up device based on fictitious host computer processor can also include:
Training module is hung up model to the process and optimized for being trained using the learning sample.
Wherein, the first information include but is not limited to the title of the process, Business Name, the process CPU make The time point and the process being suspended with rate, the mark of the corresponding fictitious host computer of the process, the process/thread are hung Rise concrete condition (thread that entire process is suspended or process includes is suspended, if hang up process thread, will record by The quantity of the thread of hang-up).
In the optional embodiment, learning sample can be generated according to the first information.The study module of SDK The learning sample can be used to be trained, adjust the process and hang up condition (the various numbers that model hangs up business process According to) range, improve the process and hang up model and judge the accuracy whether business process needs to hang up, thus realization to it is described into The optimization of journey extension pattern drawing.
As an alternative embodiment, the determining module 202 determines target process from the exceeded process Mode specifically:
From the exceeded process, determine that the smallest process of CPU usage index is target process;
The process hanging-up device based on fictitious host computer processor can also include:
Judgment module, for judging whether the operation attribute of thread that the target process includes is concurrently to execute;
The mode that the suspension module 203 hangs up the target process specifically:
If the operation attribute for the thread that the target process includes is concurrently to execute, any for including by the target process A thread suspension;Or
If the operation attribute for the thread that the target process includes is not concurrently to execute, the target process is hung up.
In the optional embodiment, it can determine that the smallest process of CPU usage index is mesh from exceeded process Mark process, for CPU usage index with weight correlation, it is minimum that the smallest process of CPU usage index is generally service priority The business priority of process, i.e., the described target process is relatively low, it may be possible to minimum.Can the target process hang up, release The cpu resource that the target process occupies uses, it is ensured that the high business process of service priority can be obtained to other business process Enough to cpu resource, the runnability of the high business process of service priority can be improved.It is hung up to the target process Before, it can be determined that whether the operation attribute for the thread that the target process includes is concurrently to execute, if the target process packet The operation attribute of the thread included be concurrently execute, any one thread suspension for including by the target process, such as: if some into Journey be for sending one piece of data, the thread which includes all be for and meanwhile send a part of this segment data, then should The operation attribute for the thread that process includes is concurrently to execute, any one thread suspension that can include by the process, which can To work on, but the cpu resource that the process occupies is few, and the process can be allowed to mitigate system load while working on. Optionally, if the operation attribute for the thread that the target process includes is not concurrently to execute, the target process is hung up.
As an alternative embodiment, the acquisition module 201, is also used to obtain current time;
The process hanging-up device based on fictitious host computer processor can also include:
Input module hangs up model for the current time to be input to trained process in advance, obtains early warning letter Breath;
Second output module exports the warning information if not being null value for the warning information.
In the optional embodiment, the available current time, the current time is input to and is trained in advance Process hang up model, i.e., using the process hang up model monitoring current time, if current time be pre-warning time within the scope of, Warning information can be exported.For example, exporting warning information if process A needs are hung up in 6:00 in 5:45, prompting user's physics Fictitious host computer B on host can need to hang up process A in 6:00 overburden.For fictitious host computer overburden, Ke Yijin Row gives warning in advance, and user is allowed to handle in time, avoids the business process that service priority is high on fictitious host computer because fictitious host computer is super Load and runnability is low.
It, can be for every on physical host in the process hanging-up device based on fictitious host computer processor described by Fig. 4 A fictitious host computer obtains first CPU usage of the fictitious host computer on the physical host;If the first CPU is used Rate is located in the corresponding preset threshold section of the fictitious host computer and first CPU usage is greater than the fictitious host computer pair The default regulation threshold value answered, obtains the second CPU usage of each business process on the fictitious host computer;For each industry Business process determines the business process according to the corresponding default weight of the business process and second CPU usage CPU usage index;If the CPU usage index be greater than the corresponding pre-set level threshold value of the business process, determine described in Business process is exceeded process;Target process is determined from the exceeded process, and the target process is hung up.As it can be seen that this In invention, when first CPU usage of the fictitious host computer on physical host belongs to the corresponding preset threshold area of the fictitious host computer Between when, show that the business process on current virtual host robs the cpu resource for accounting for business process on other fictitious host computers, if described First CPU usage is greater than the corresponding default regulation threshold value of the fictitious host computer, shows that the fictitious host computer needs are carried out to industry The regulation of business process selects a CPU usage index in exceeded process the process of the cpu resource of other processes (rob account for) The smallest process is hung up, i.e., releases the cpu resource that the low business process of service priority occupies, allow other business into Journey can obtain the cpu resource being released, and improve the runnability for the business process that service priority is high on fictitious host computer.
As shown in figure 5, Fig. 5 is that the present invention realizes that the process based on fictitious host computer processor hangs up the preferred embodiment of method Server structural schematic diagram.The server 3 includes memory 31, at least one processor 32, is stored in the storage In device 31 and the computer program 33 and at least one communication bus 34 that can be run at least one described processor 32.
It will be understood by those skilled in the art that schematic diagram shown in fig. 5 is only the example of the server 3, not structure The restriction of the pairs of server 3 may include perhaps combining certain components or not than illustrating more or fewer components Same component, such as the server 3 can also include input-output equipment, network access equipment etc..
The server 3 further include but be not limited to any one can be with user by keyboard, mouse, remote controler, touch tablet Or the modes such as voice-operated device carry out the electronic product of human-computer interaction, for example, personal computer, tablet computer, smart phone, individual Digital assistants (Personal Digital Assistant, PDA), game machine, Interactive Internet TV (Internet Protocol Television, IPTV), intellectual wearable device etc..Network locating for the server 3 includes but unlimited In internet, wide area network, Metropolitan Area Network (MAN), local area network, Virtual Private Network (Virtual Private Network, VPN) etc..
At least one described processor 32 can be central processing unit (Central Processing Unit, CPU), It can also be other general processors, digital signal processor (Digital Signal Processor, DSP), dedicated integrated Circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..The processor 32 can be microprocessor or the processor 32 is also possible to any conventional processor Deng the processor 32 is the control centre of the server 3, utilizes each of various interfaces and the entire server 3 of connection A part.
The memory 31 can be used for storing the computer program 33 and/or module/unit, and the processor 32 passes through Operation executes the computer program and/or module/unit being stored in the memory 31, and calls and be stored in memory Data in 31 realize the various functions of the server 3.The memory 31 can mainly include storing program area and storage number According to area, wherein storing program area can application program needed for storage program area, at least one function (for example sound plays function Energy, image player function etc.) etc.;Storage data area, which can be stored, uses created data (such as audio number according to server 3 According to, phone directory etc.) etc..In addition, memory 31 may include high-speed random access memory, it can also include non-volatile memories Device, such as hard disk, memory, plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card), at least one disk memory, flush memory device or other volatibility are solid State memory device.
In conjunction with Fig. 1, it is a kind of based on fictitious host computer to realize that the memory 31 in the server 3 stores multiple instruction The process of processor hangs up method, and the multiple instruction can be performed to realize in the processor 32:
For each fictitious host computer on physical host, obtain the fictitious host computer on the physical host first at Manage device CPU usage;
If first CPU usage is located in the corresponding preset threshold section of the fictitious host computer, and the first CPU Utilization rate is greater than the corresponding default regulation threshold value of the fictitious host computer, obtains second of each business process on the fictitious host computer CPU usage;
For each business process, made according to the corresponding default weight of the business process and the 2nd CPU With rate, the CPU usage index of the business process is determined;
If the CPU usage index be greater than the corresponding pre-set level threshold value of the business process, determine the business into Journey is exceeded process;
Target process is determined from the exceeded process, and the target process is hung up.
In a kind of optional embodiment, the multiple instruction is can be performed to realize in the processor 32:
If first CPU usage is greater than the maximum value in the corresponding preset threshold section of the fictitious host computer, institute is determined The load condition for stating fictitious host computer is serious overburden;
The fictitious host computer is hung up.
In a kind of optional embodiment, each fictitious host computer on physical host is obtained described virtual For host after the first processor CPU usage on the physical host, the multiple instruction is can be performed in the processor 32 To realize:
Obtain the mark of the fictitious host computer;
According to the mark of the fictitious host computer and first CPU usage, hung up using process trained in advance When model judges that the fictitious host computer needs to be suspended, the fictitious host computer is hung up.
It is described to be directed to each business process in a kind of optional embodiment, it is corresponding according to the business process Default weight and second CPU usage, after the CPU usage index for determining the business process, the processing The multiple instruction can be performed to realize in device 32:
Obtain the mark of the business process;
According to the mark of the business process, second CPU usage and the CPU usage index, using When the model of trained process hang-up in advance judges that the business process needs to be suspended, the business process is hung up.
In a kind of optional embodiment, the determination business process is the processor after exceeded process 32 can be performed the multiple instruction to realize:
According to the exceeded process, warning message is generated;
Export the warning message;
It is described to determine that target process includes: from the exceeded process
Receiving process/thread suspension instruction;
The process/thread is hung up into the indicated process/thread of instruction and is determined as target process.
In a kind of optional embodiment, after the hang-up by the target process, the processor 32 is executable The multiple instruction is to realize:
According to the relevant information for the process/thread being suspended, learning sample is generated;
It is trained using the learning sample, model is hung up to the process and is optimized.
It is described to determine that target process includes: from the exceeded process in a kind of optional embodiment
From the exceeded process, determine that the smallest process of CPU usage index is target process;
The method also includes:
Whether the operation attribute for judging the thread that the target process includes is concurrently to execute;
It is described to include: by target process hang-up
If the operation attribute for the thread that the target process includes is concurrently to execute, any for including by the target process A thread suspension;Or
If the operation attribute for the thread that the target process includes is not concurrently to execute, the target process is hung up.
In a kind of optional embodiment, the multiple instruction is can be performed to realize in the processor 32:
Obtain current time;
The current time is input to trained process in advance and hangs up model, obtains warning information;
If the warning information is not null value, the warning information is exported.
Specifically, the processor 32 can refer to the concrete methods of realizing of above-metioned instruction related in Fig. 1 corresponding embodiment The description of step, this will not be repeated here.
In the server 3 described in Fig. 5, it can be obtained described virtual for each fictitious host computer on physical host First CPU usage of the host on the physical host;If it is corresponding that first CPU usage is located at the fictitious host computer In preset threshold section and first CPU usage is greater than the corresponding default regulation threshold value of the fictitious host computer, obtains institute State the second CPU usage of each business process on fictitious host computer;For each business process, according to the business process Corresponding default weight and second CPU usage, determine the CPU usage index of the business process;If the CPU Utilization rate index is greater than the corresponding pre-set level threshold value of the business process, determines that the business process is exceeded process;From institute It states and determines target process in exceeded process, and the target process is hung up.As it can be seen that in the present invention, when fictitious host computer is in physics When the first CPU usage on host belongs to the fictitious host computer corresponding preset threshold section, show on current virtual host Business process rob the cpu resource for accounting for business process on other fictitious host computers, if first CPU usage be greater than the void The quasi- corresponding default regulation threshold value of host shows that the fictitious host computer needs to carry out the regulation to business process, in exceeded process A smallest process of CPU usage index is selected to hang up in (robbing the process for accounting for the cpu resource of other processes), i.e., by industry The cpu resource that the low business process of business priority occupies releases, and other business process can be obtained and is released Cpu resource improves the runnability for the business process that service priority is high on fictitious host computer.
If the integrated module/unit of the server 3 is realized in the form of SFU software functional unit and as independent production Product when selling or using, can store in a computer readable storage medium.Based on this understanding, the present invention realizes All or part of the process in above-described embodiment method can also instruct relevant hardware to complete by computer program, The computer program can be stored in a computer readable storage medium, the computer program when being executed by processor, The step of above-mentioned each embodiment of the method can be achieved.Wherein, the computer program includes computer program code, the calculating Machine program code can be source code form, object identification code form, executable file or certain intermediate forms etc..The computer Readable medium may include: any entity or device, recording medium, USB flash disk, the movement that can carry the computer program code Hard disk, magnetic disk, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It needs to illustrate It is that the content that the computer-readable medium includes can be fitted according to the requirement made laws in jurisdiction with patent practice When increase and decrease, such as in certain jurisdictions, according to legislation and patent practice, computer-readable medium does not include electric carrier wave letter Number and telecommunication signal.
In several embodiments provided by the present invention, it should be understood that disclosed system, device and method can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the module It divides, only a kind of logical function partition, there may be another division manner in actual implementation.
The module as illustrated by the separation member may or may not be physically separated, aobvious as module The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.Some or all of the modules therein can be selected to realize the mesh of this embodiment scheme according to the actual needs 's.
It, can also be in addition, each functional module in each embodiment of the present invention can integrate in one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of hardware adds software function module.
It is obvious to a person skilled in the art that invention is not limited to the details of the above exemplary embodiments, Er Qie In the case where without departing substantially from spirit or essential attributes of the invention, the present invention can be realized in other specific forms.Therefore, no matter From the point of view of which point, the present embodiments are to be considered as illustrative and not restrictive, and the scope of the present invention is by appended power Benefit requires rather than above description limits, it is intended that all by what is fallen within the meaning and scope of the equivalent elements of the claims Variation is included in the present invention.Any attached associated diagram label in claim should not be considered as right involved in limitation to want It asks.Furthermore, it is to be understood that one word of " comprising " does not exclude other units or steps, odd number is not excluded for plural number.It is stated in system claims Multiple units or device can also be implemented through software or hardware by a unit or device.Second equal words are used to table Show title, and does not indicate any particular order.
Finally it should be noted that the above examples are only used to illustrate the technical scheme of the present invention and are not limiting, although reference Preferred embodiment describes the invention in detail, those skilled in the art should understand that, it can be to of the invention Technical solution is modified or equivalent replacement, without departing from the spirit and scope of the technical solution of the present invention.

Claims (10)

1. a kind of process based on fictitious host computer processor hangs up method, which is characterized in that the described method includes:
For each fictitious host computer on physical host, first processor of the fictitious host computer on the physical host is obtained CPU usage;
If first CPU usage is located in the corresponding preset threshold section of the fictitious host computer, and the first CPU is used Rate is greater than the corresponding default regulation threshold value of the fictitious host computer, obtains the 2nd CPU of each business process on the fictitious host computer Utilization rate;
For each business process, according to the corresponding default weight of the business process and second CPU usage, Determine the CPU usage index of the business process;
If the CPU usage index is greater than the corresponding pre-set level threshold value of the business process, determine that the business process is Exceeded process;
Target process is determined from the exceeded process, and the target process is hung up.
2. the method according to claim 1, wherein the method also includes:
If first CPU usage is greater than the maximum value in the corresponding preset threshold section of the fictitious host computer, the void is determined The load condition of quasi- host is serious overburden;
The fictitious host computer is hung up.
3. the method according to claim 1, wherein each fictitious host computer on physical host, is obtained Take the fictitious host computer after the first processor CPU usage on the physical host, the method also includes:
Obtain the mark of the fictitious host computer;
According to the mark of the fictitious host computer and first CPU usage, model is being hung up using process trained in advance When judging that the fictitious host computer needs to be suspended, the fictitious host computer is hung up.
4. the method according to claim 1, wherein described be directed to each business process, according to the industry The corresponding default weight of business process and second CPU usage, determine the business process CPU usage index it Afterwards, the method also includes:
Obtain the mark of the business process;
According to the mark of the business process, second CPU usage and the CPU usage index, using preparatory When trained process hang-up model judges that the business process needs to be suspended, the business process is hung up.
5. according to the method described in claim 4, it is characterized in that, the determination business process be exceeded process after, The method also includes:
According to the exceeded process, warning message is generated;
Export the warning message;
It is described to determine that target process includes: from the exceeded process
Receiving process/thread suspension instruction;
The process/thread is hung up into the indicated process/thread of instruction and is determined as target process.
6. according to the method described in claim 5, it is characterized in that, it is described by the target process hang up after, the method Further include:
According to the relevant information for the process/thread being suspended, learning sample is generated;
It is trained using the learning sample, model is hung up to the process and is optimized.
7. the method according to claim 1, wherein described determine target process packet from the exceeded process It includes:
From the exceeded process, determine that the smallest process of CPU usage index is target process;
The method also includes:
Whether the operation attribute for judging the thread that the target process includes is concurrently to execute;
It is described to include: by target process hang-up
If the operation attribute for the thread that the target process includes is concurrently to execute, any one line for including by the target process Journey is hung up;Or
If the operation attribute for the thread that the target process includes is not concurrently to execute, the target process is hung up.
8. method according to any one of claim 1 to 7, which is characterized in that the method also includes:
Obtain current time;
The current time is input to process trained in advance and hangs up model, obtains warning information;
If the warning information is not null value, the warning information is exported.
9. a kind of server, which is characterized in that the server includes processor and memory, and the processor is deposited for executing The computer program stored in reservoir is to realize as claimed in any of claims 1 to 8 in one of claims based on fictitious host computer processor Process hang up method.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has at least one Instruction, at least one described instruction realize when being executed by processor as described in claim 1 to 8 any one based on virtual master The process of machine processor hangs up method.
CN201910569791.2A 2019-06-27 2019-06-27 Process based on fictitious host computer processor hangs up method and its relevant device Pending CN110275760A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910569791.2A CN110275760A (en) 2019-06-27 2019-06-27 Process based on fictitious host computer processor hangs up method and its relevant device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910569791.2A CN110275760A (en) 2019-06-27 2019-06-27 Process based on fictitious host computer processor hangs up method and its relevant device

Publications (1)

Publication Number Publication Date
CN110275760A true CN110275760A (en) 2019-09-24

Family

ID=67962439

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910569791.2A Pending CN110275760A (en) 2019-06-27 2019-06-27 Process based on fictitious host computer processor hangs up method and its relevant device

Country Status (1)

Country Link
CN (1) CN110275760A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110740100A (en) * 2019-10-22 2020-01-31 新华三信息安全技术有限公司 transmission rate determination method, device, network equipment and storage medium
CN111142943A (en) * 2019-12-27 2020-05-12 中国银行股份有限公司 Automatic control concurrency method and device
CN111381952A (en) * 2020-03-12 2020-07-07 腾讯科技(深圳)有限公司 Process freezing method, device, terminal and storage medium
CN117596212A (en) * 2024-01-18 2024-02-23 苏州元脑智能科技有限公司 Service processing method, device, equipment and medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050235285A1 (en) * 2004-04-14 2005-10-20 Michael Monasterio Systems and methods for CPU throttling utilizing processes
CN102257481A (en) * 2008-12-23 2011-11-23 思杰系统有限公司 Systems and methods for controlling, by a hypervisor, access to physical resources
CN102307224A (en) * 2011-05-17 2012-01-04 华为软件技术有限公司 Method and device for realizing service isolation in cloud computing system, and cloud server
US8295275B2 (en) * 2006-03-20 2012-10-23 Intel Corporation Tagging network I/O transactions in a virtual machine run-time environment
CN105955826A (en) * 2016-05-10 2016-09-21 广东睿江云计算股份有限公司 Control method and device of quality of service in cloud host system
CN107885544A (en) * 2017-10-31 2018-04-06 广东欧珀移动通信有限公司 Application program management-control method, device, medium and electronic equipment
CN108897603A (en) * 2018-07-03 2018-11-27 郑州云海信息技术有限公司 A kind of memory source management method and device
CN109324878A (en) * 2018-09-20 2019-02-12 郑州云海信息技术有限公司 A kind of control method and relevant device of process CPU usage
CN109783223A (en) * 2018-11-26 2019-05-21 努比亚技术有限公司 A kind of memory method for cleaning, terminal and computer readable storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050235285A1 (en) * 2004-04-14 2005-10-20 Michael Monasterio Systems and methods for CPU throttling utilizing processes
US8295275B2 (en) * 2006-03-20 2012-10-23 Intel Corporation Tagging network I/O transactions in a virtual machine run-time environment
CN102257481A (en) * 2008-12-23 2011-11-23 思杰系统有限公司 Systems and methods for controlling, by a hypervisor, access to physical resources
CN102307224A (en) * 2011-05-17 2012-01-04 华为软件技术有限公司 Method and device for realizing service isolation in cloud computing system, and cloud server
CN105955826A (en) * 2016-05-10 2016-09-21 广东睿江云计算股份有限公司 Control method and device of quality of service in cloud host system
CN107885544A (en) * 2017-10-31 2018-04-06 广东欧珀移动通信有限公司 Application program management-control method, device, medium and electronic equipment
CN108897603A (en) * 2018-07-03 2018-11-27 郑州云海信息技术有限公司 A kind of memory source management method and device
CN109324878A (en) * 2018-09-20 2019-02-12 郑州云海信息技术有限公司 A kind of control method and relevant device of process CPU usage
CN109783223A (en) * 2018-11-26 2019-05-21 努比亚技术有限公司 A kind of memory method for cleaning, terminal and computer readable storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
张海冰,王秀艳: "《城市智慧环保规划与设计研究》", 30 November 2016, 中国环境科学出版社 *
郭玉东: "《基于名字空间的安全程序设计》", 31 December 2018, 国防工业出版社 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110740100A (en) * 2019-10-22 2020-01-31 新华三信息安全技术有限公司 transmission rate determination method, device, network equipment and storage medium
CN110740100B (en) * 2019-10-22 2022-04-22 新华三信息安全技术有限公司 Transmission rate determining method, device, network equipment and storage medium
CN111142943A (en) * 2019-12-27 2020-05-12 中国银行股份有限公司 Automatic control concurrency method and device
CN111381952A (en) * 2020-03-12 2020-07-07 腾讯科技(深圳)有限公司 Process freezing method, device, terminal and storage medium
CN111381952B (en) * 2020-03-12 2023-05-12 腾讯科技(深圳)有限公司 Process freezing method, device, terminal and storage medium
CN117596212A (en) * 2024-01-18 2024-02-23 苏州元脑智能科技有限公司 Service processing method, device, equipment and medium
CN117596212B (en) * 2024-01-18 2024-04-09 苏州元脑智能科技有限公司 Service processing method, device, equipment and medium

Similar Documents

Publication Publication Date Title
CN110275760A (en) Process based on fictitious host computer processor hangs up method and its relevant device
CN103870314B (en) Method and system for simultaneously operating different types of virtual machines by single node
CN106385329B (en) Processing method, device and the equipment of resource pool
CN104601664B (en) A kind of control system of cloud computing platform resource management and scheduling virtual machine
CN103473115B (en) virtual machine placement method and device
CN105940377A (en) Methods, systems, and computer readable media for a cloud-based virtualization orchestrator
CN101595456A (en) The method and system that is used for transaction resource control
CN109471725A (en) Resource allocation methods, device and server
US11411799B2 (en) Scalable statistics and analytics mechanisms in cloud networking
CN109522090A (en) Resource regulating method and device
CN110389843A (en) A kind of business scheduling method, device, equipment and readable storage medium storing program for executing
CN103455363B (en) Command processing method, device and physical host of virtual machine
CN115033340A (en) Host selection method and related device
CN106713375A (en) Method and device for allocating cloud resources
CN106708620A (en) Data processing method and system
CN113032102A (en) Resource rescheduling method, device, equipment and medium
CN109271247A (en) Memory Optimize Method, device, computer installation and storage medium
CN111464331A (en) Control method and system for thread creation and terminal equipment
WO2013008036A2 (en) Modelling virtualized infrastructure
CN113204425B (en) Method, device, electronic equipment and storage medium for process management internal thread
CN111506414A (en) Resource scheduling method, device, equipment, system and readable storage medium
CN110286961A (en) Process based on physical host processor hangs up method and relevant device
CN108306912A (en) Virtual network function management method and its device, network function virtualization system
US11769075B2 (en) Dynamic machine learning on premise model selection based on entity clustering and feedback
CN110868330B (en) Evaluation method, device and evaluation system for CPU resources which can be divided by cloud platform

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190924