CN106909453B - Resource allocation method and device - Google Patents

Resource allocation method and device Download PDF

Info

Publication number
CN106909453B
CN106909453B CN201510973535.1A CN201510973535A CN106909453B CN 106909453 B CN106909453 B CN 106909453B CN 201510973535 A CN201510973535 A CN 201510973535A CN 106909453 B CN106909453 B CN 106909453B
Authority
CN
China
Prior art keywords
node
nodes
pressure index
operating pressure
preset
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.)
Active
Application number
CN201510973535.1A
Other languages
Chinese (zh)
Other versions
CN106909453A (en
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.)
China Mobile Group Hebei Co Ltd
Original Assignee
China Mobile Group Hebei 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 China Mobile Group Hebei Co Ltd filed Critical China Mobile Group Hebei Co Ltd
Priority to CN201510973535.1A priority Critical patent/CN106909453B/en
Publication of CN106909453A publication Critical patent/CN106909453A/en
Application granted granted Critical
Publication of CN106909453B publication Critical patent/CN106909453B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/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
    • 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/4557Distribution of virtual machine instances; Migration and load balancing

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

the embodiment of the invention discloses a resource allocation method and a resource allocation device, wherein a first operation pressure index of each system, a second operation pressure index of each node and a heartbeat packet in a cloud computing resource pool are determined every other first preset time; determining a system with the first operating pressure index being greater than or equal to a first preset operating pressure index as a first system, and performing node expansion on the first system; determining a system with the first operation pressure index smaller than or equal to a second preset operation pressure index as a second system, and performing node recovery on the second system; determining a system with the first operating pressure index larger than a second preset operating pressure index and the first operating pressure index smaller than the first preset operating pressure index as a third system, and respectively judging the second operating pressure index of each node in the third system; and if the heartbeat packet of the node is not acquired within the first preset time, carrying out node migration on the node which does not acquire the heartbeat packet.

Description

Resource allocation method and device
Technical Field
The invention relates to the technical field of cloud computing, in particular to a resource configuration method and device.
background
with the increasing development of mobile internet technology, websites or systems may generate a sudden increase in the amount of access in a short time. This sudden increase in access will cause the existing fixed system architecture to crash. The distributed cloud computing resource pool architecture can satisfy the scalability of the node, and therefore, more and more companies start to adopt the distributed cloud computing resource pool architecture to solve the problem.
in the prior art, in order to deal with the situation of sudden increase of the access volume of a certain time node or a certain stage, emergency capacity expansion can be realized only by maintenance personnel. Although the system expansion can be realized, the system expansion has serious lag due to the need of manual intervention, and the system cannot be retracted after being expanded, so that partial resources are wasted.
Disclosure of Invention
In order to solve the above technical problems, embodiments of the present invention provide a resource allocation method and apparatus, which implement full utilization of system redundant node resources, avoid waste caused by the system occupation of the redundant node resources, and improve resource allocation efficiency.
the technical scheme of the invention is realized as follows:
The embodiment of the invention provides a resource allocation method, which comprises the following steps:
Determining a first operation pressure index of each system, a second operation pressure index of each node and a heartbeat packet every other first preset time, wherein each system comprises at least one node;
Determining a system with the first operating pressure index being greater than or equal to a first preset operating pressure index as a first system, and performing node expansion on the first system;
Determining a system with the first operating pressure index smaller than or equal to a second preset operating pressure index as a second system, and performing node recovery on the second system;
Determining that the first operating pressure index is larger than the second preset operating pressure index, and the system with the first operating pressure index smaller than the first preset operating pressure index is a third system, and respectively judging the second operating pressure index of each node in the third system;
if the heartbeat packet of the node is not acquired within the first preset time, determining that the node which does not acquire the heartbeat packet is a first node, and performing node migration on the first node.
in the foregoing solution, the respectively determining the second operating pressure index of each node in the third system includes:
determining a node of which the second operation pressure index is greater than or equal to a third preset operation pressure index as a second node, and determining a node of which the second operation pressure index is less than or equal to a fourth preset operation pressure index as a third node;
When the number of the second nodes in the third system is more than or equal to half of the total number of the nodes in the third system, performing node expansion on the third system;
when the number of the third nodes in the third system is more than or equal to half of the total number of the nodes in the third system, carrying out node recovery on the third system;
And when the number of the second nodes in the third system is one, carrying out node migration on the second node in the third system.
in the foregoing solution, the determining that the system with the first operating pressure index being greater than or equal to a first preset operating pressure index is a first system, and performing node expansion on the first system includes:
When the first operation pressure index is larger than or equal to the first preset operation pressure index, determining a system with the first operation pressure index larger than or equal to the first preset operation pressure index as a first system;
determining the number of the first system expansion nodes as a first numerical value according to a first operating pressure index of the first system;
determining nodes in the standby system in the cloud computing resource pool as extended nodes;
copying the data files of the nodes in the first system to a first number of expansion nodes in the standby system;
Modifying a configuration file of a first number of expansion nodes in the standby system according to a preset rule, and starting the first number of expansion nodes to bear services;
the step of determining that the system with the first operating pressure index smaller than or equal to a second preset operating pressure index is a second system, and performing node recovery on the second system comprises the following steps:
When the first operating pressure index is smaller than or equal to the second preset operating pressure index, determining that the system with the first operating pressure index smaller than or equal to the second preset operating pressure index is a second system;
determining the number of the recovery nodes as a second numerical value according to the number of the nodes in the second system and the first operating pressure index of the second system;
Placing a second number of nodes in the second system into a standby system;
modifying a configuration file of a second numerical value node of a standby system in the second system according to a preset rule;
if the heartbeat packet of the node is not acquired within the first preset time, determining that the node which does not acquire the heartbeat packet is a first node, and performing node migration on the first node, wherein the node migration includes:
If the heartbeat packet of the node is not acquired within the first preset time, determining that the node which does not acquire the heartbeat packet is a first node, and copying the data file of the first node to a migration node.
in the foregoing solution, when the number of the second nodes in the third system is greater than or equal to half of the total number of nodes in the third system, performing node expansion on the third system includes:
When the number of the second nodes in the third system is more than or equal to half of the total number of the nodes in the third system, determining the number of the third system expansion nodes as a third numerical value according to a second operating pressure index of the second nodes in the third system;
Determining nodes in the standby system in the cloud computing resource pool as extended nodes;
Copying the data files of the nodes in the third system to a third number of expansion nodes in the standby system;
modifying a configuration file of a third number of expansion nodes in the standby system according to a preset rule, and starting the third number of expansion nodes to bear services;
When the number of the third nodes in the third system is greater than or equal to half of the total number of the nodes in the third system, performing node recovery on the third system, including:
when the number of the third nodes in the third system is more than or equal to half of the total number of the nodes in the third system, determining the number of the recovery nodes as a fourth numerical value according to the number of the nodes in the third system and the first operating pressure index of the third system;
putting a fourth numerical value node in the third system into a standby system;
Modifying a configuration file of a fourth numerical value node of a standby system placed in the third system according to a preset rule;
When the number of the second nodes in the third system is one, performing node migration on the one second node in the third system includes:
When the number of the second nodes in the third system is one, copying the data file of the second node in the third system to a migration node.
in the foregoing solution, the determining a first operating pressure index of each system in the cloud computing resource pool every first preset time includes:
determining a first operation pressure index of each system every other first preset time according to the number of currently operating nodes in each system, the number of current concurrent users and the number of current concurrent requests of each node in each system, and the average number of concurrent users and the average number of concurrent requests of each node in each system before a second preset time;
the determining a second operation pressure index of each node in the cloud computing resource pool every other first preset time includes:
And determining a second operation pressure index of each node every other first preset time according to the current throughput, the current CPU utilization rate, the current memory utilization rate of each node and the average throughput, the average CPU utilization rate and the average memory utilization rate of each node before the second preset time.
The embodiment of the invention also provides a resource allocation device, which comprises: a determining unit and a processing unit, wherein,
the determining unit is used for determining a first operating pressure index of each system, a second operating pressure index of each node and a heartbeat packet every other first preset time, wherein each system comprises at least one node;
The determining unit is further configured to determine that the system with the first operating pressure index being greater than or equal to a first preset operating pressure index is a first system;
the processing unit is used for performing node expansion on the first system;
The determining unit is further configured to determine that the system with the first operating pressure index smaller than or equal to a second preset operating pressure index is a second system;
The processing unit is further configured to perform node recovery on the second system;
the determining unit is further configured to determine that the first operating pressure index is greater than the second preset operating pressure index, and a system in which the first operating pressure index is less than the first preset operating pressure index is a third system;
The processing unit is further configured to respectively determine a second operating pressure index of each node in the third system;
The determining unit is further configured to determine, if the heartbeat packet of the node is not obtained within the first preset time, that the node which does not obtain the heartbeat packet is a first node;
The processing unit is further configured to perform node migration on the first node.
In the foregoing scheme, the determining unit is configured to determine that a node where the second operating pressure index is greater than or equal to a third preset operating pressure index is a second node; the node which is used for determining that the second operation pressure index is smaller than or equal to a fourth preset operation pressure index is a third node;
The processing unit is configured to perform node expansion on the third system when the number of the second nodes in the third system is greater than or equal to half of the total number of nodes in the third system; the third system is also used for carrying out node recovery on the third system when the number of the third nodes in the third system is more than or equal to half of the total number of the nodes in the third system; and is further configured to perform node migration on the second node in the third system when the number of the second nodes in the third system is one.
in the foregoing solution, the determining unit is configured to determine, when the first operating pressure index is greater than or equal to the first preset operating pressure index, that a system of which the first operating pressure index is greater than or equal to the first preset operating pressure index is a first system; the system is also used for determining the number of the first system expansion nodes as a first numerical value according to a first operating pressure index of the first system; the method is also used for determining that the nodes in the standby system in the cloud computing resource pool are expansion nodes;
the processing unit is used for copying the data files of the nodes in the first system to a first number of extension nodes in the standby system; the standby system is also used for modifying the configuration file of the first number of expansion nodes in the standby system according to a preset rule and starting the first number of expansion nodes to bear services;
the determining unit is further configured to determine, when the first operating pressure index is less than or equal to the second preset operating pressure index, that the system with the first operating pressure index being less than or equal to the second preset operating pressure index is a second system; the first operation pressure index of the second system is used for determining the number of the recovery nodes as a first numerical value;
the processing unit is further configured to place a second number of nodes in the second system into a standby system; the configuration file of the second numerical nodes of the standby system is also used for modifying the configuration file of the second numerical nodes of the standby system in the second system according to a preset rule;
the determining unit is further configured to determine, if the heartbeat packet of the node is not obtained within the first preset time, that the node which does not obtain the heartbeat packet is a first node;
The processing unit is further configured to copy the data file of the first node to a migration node.
In the foregoing solution, the determining unit is configured to determine, according to a second operating pressure index of the second node in the third system, that the number of the expansion nodes of the third system is a third value when the number of the second nodes in the third system is greater than or equal to half of the total number of the nodes in the third system; the method is also used for determining that the nodes in the standby system in the cloud computing resource pool are expansion nodes;
The processing unit is used for copying the data files of the nodes in the third system to a third number of extension nodes in the standby system; the standby system is also used for modifying the configuration file of a third number of expansion nodes in the standby system according to a preset rule and starting the third number of expansion nodes to bear services;
the determining unit is further configured to determine, when the number of the third nodes in the third system is greater than or equal to half of the total number of the nodes in the third system, that the number of the recovery nodes is a fourth numerical value according to the number of the nodes in the third system and the first operating pressure index of the third system;
The processing unit is further configured to place a fourth numerical node in the third system into a standby system; the configuration file of the fourth numerical value node which is placed into the standby system in the third system is modified according to a preset rule;
The processing unit is further configured to copy the data file of the second node in the third system to a migration node when the number of the second nodes in the third system is one.
In the above scheme, the determining unit is configured to determine, every first preset time, a first operating pressure index of each system according to the number of currently operating nodes in each system, the current number of concurrent users and the current number of concurrent requests of each node in each system, and an average number of concurrent users and an average number of concurrent requests of each node in each system before a second preset time; and the second operation pressure index of each node is determined according to the current throughput, the current CPU utilization rate, the current memory utilization rate of each node and the average throughput, the average CPU utilization rate and the average memory utilization rate of each node before the second preset time every other first preset time.
The embodiment of the invention provides a resource allocation method and a resource allocation device, wherein a first operation pressure index of each system, a second operation pressure index of each node and a heartbeat packet in a cloud computing resource pool are determined every other first preset time, wherein each system comprises at least one node; determining a system with the first operating pressure index being greater than or equal to a first preset operating pressure index as a first system, and performing node expansion on the first system; determining a system with the first operating pressure index smaller than or equal to a second preset operating pressure index as a second system, and performing node recovery on the second system; determining that the first operating pressure index is larger than the second preset operating pressure index, and the system with the first operating pressure index smaller than the first preset operating pressure index is a third system, and respectively judging the second operating pressure index of each node in the third system; if the heartbeat packet of the node is not acquired within the first preset time, determining that the node which does not acquire the heartbeat packet is a first node, and performing node migration on the first node. The resource allocation method and the resource allocation device provided by the embodiment of the invention can monitor the node state and performance in real time, and realize the migration and expansion of the node and the recovery of the node according to the judgment of the first operation pressure index and the second operation pressure index, thereby realizing the timely retraction of the system and the full utilization of redundant node resources, avoiding the waste caused by the occupation of the redundant node resources on the system, and improving the resource allocation efficiency.
drawings
Fig. 1 is a schematic flowchart of a resource allocation method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a resource allocation method according to a second embodiment of the present invention;
Fig. 3 is a schematic flowchart of a resource allocation method according to a third embodiment of the present invention;
fig. 4 is a schematic flowchart of a resource allocation method according to a fourth embodiment of the present invention;
fig. 5 is a schematic flowchart of a resource allocation method according to a fifth embodiment of the present invention;
fig. 6 is a schematic structural diagram of a resource allocation apparatus according to a sixth embodiment of the present invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
Example one
an embodiment of the present invention provides a resource allocation method, as shown in fig. 1, the method may include:
S101, the resource configuration device determines a first operation pressure index of each system, a second operation pressure index of each node and a heartbeat packet every other first preset time in a cloud computing resource pool, wherein each system comprises at least one node.
Specifically, the cloud computing resource pool may include a plurality of systems with different functions, and each system with different functions may include at least one node.
The first operation pressure index is a system operation pressure index, and the second operation pressure index is a node operation pressure index. The first preset time may be set according to a requirement of actual monitoring, and may be 2 seconds or 2 minutes, and the second preset time is a preset time node before the first preset time, for example, the second preset time may be the same time node in a week before the first preset time, which is not specifically limited in this embodiment of the present invention.
and the resource configuration device determines a first operation pressure index of each system every other first preset time according to the number of the currently operated nodes in each system, the current number of concurrent users and the current number of concurrent requests of each node in each system, and the average number of concurrent users and the average number of concurrent requests of each node in each system before a second preset time.
and the resource configuration device determines a second operating pressure index of each node every first preset time according to the current throughput, the current CPU utilization rate and the current memory utilization rate of each node and the average throughput, the average CPU utilization rate and the average memory utilization rate of each node before the second preset time.
The heartbeat packet can be understood as a state that the node and the resource configuration device notify the other side of the state at regular time, and is sent at a certain time interval, which is similar to a heartbeat.
S102, the resource configuration device determines that the system with the first operation pressure index larger than or equal to a first preset operation pressure index is a first system, and node expansion is carried out on the first system.
the first preset operation pressure index is a preset upper limit value of the system operation pressure index. And the system with the system operation pressure index larger than or equal to the preset upper limit value of the system operation pressure index is a system to be expanded, and node expansion is carried out on the system to be expanded.
before node expansion is carried out on a system to be expanded, the number of nodes needing to be expanded is calculated, and the number of the nodes needing to be expanded is obtained mainly through the comparison condition of the current performance and the historical performance.
And copying the data files of the nodes in the system to new nodes required by the node expansion to complete the node expansion.
And if the newly added node relates to the modification of the configuration file or after the node is expanded, the upper layer configuration file needs to be modified, after the node is copied, the configuration file of the newly expanded node is modified according to a preset modification rule, and the new expanded node is started to carry the service.
The nodes in the standby system in the cloud computing resource pool are expansion nodes, the standby system is composed of a plurality of idle virtual machines, and the redundant virtual machines composed of the idle virtual machines are used for node migration, node expansion and node recycling of each system.
s103, the resource allocation device determines that the system with the first operation pressure index smaller than or equal to a second preset operation pressure index is a second system, and the second system is subjected to node recovery.
The second preset operating pressure index is a preset system operating pressure index lower limit value. And the system with the system operation pressure index smaller than or equal to the preset system operation pressure index lower limit value is a system to be recovered, and node recovery is carried out on the system to be recovered.
the number of nodes needing to be recycled is calculated before the nodes of the system are recycled. And calculating the operating pressure index of the system and the total number of the nodes of the system, rounding the reciprocal of the operating pressure index of the system downwards and then subtracting one, subtracting one from the total number of the nodes of the system, taking the minimum value of the two values, wherein the minimum value is the number of the nodes which should be recovered by the system, and placing the nodes into a standby system for other systems to be expanded to use.
And if the recycled node relates to the modification of the configuration file or after the node is recycled, modifying the configuration file of the recycled node according to a preset modification rule, wherein the configuration file of the upper layer configuration file needs to be modified.
s104, the resource allocation device determines that the first operation pressure index is larger than the second preset operation pressure index, and the system with the first operation pressure index smaller than the first preset operation pressure index is a third system, and the second operation pressure index of each node in the third system is judged respectively.
Specifically, when the pressure of the system is in a normal condition, that is, the pressure of the system is between a preset lower limit and an upper limit of the system operation pressure index, the pressure of the node in the system is judged. And when more than half of the node pressure indexes reach the upper limit, starting the system node expansion process. And when more than half of the node pressure indexes reach the lower limit, starting the recovery process of the system nodes. And when the pressure index of one node reaches the upper limit, starting a node migration process.
it should be noted that the preset values of the upper limit or the lower limit threshold of the system operation pressure index and the node operation pressure index and the values of the parameters α and β in the calculation of the system operation pressure index and the node operation pressure index are obtained by a pressure test performed before the system is on-line, and if the pressure test performed before the system is on-line is insufficient, a value within a proper range can be set in the actual operation process of the system, and then the values are adjusted according to the operation condition of the system.
and calculating the operating pressure index of the system and the total number of the nodes of the system, rounding the reciprocal of the operating pressure index of the system downwards and then subtracting one, subtracting one from the total number of the nodes of the system, taking the minimum value of the two values, wherein the minimum value is the number of the nodes which should be recovered by the system, and placing the nodes into a standby system for other systems to be expanded to use.
and S105, if the heartbeat packet of the node is not acquired within the first preset time, the resource configuration device determines that the node which does not acquire the heartbeat packet is the first node, and performs node migration on the first node.
if the heartbeat packet of a certain node is not obtained within the first preset time, the node can be determined to be abnormal in connection, the node which does not obtain the heartbeat packet is determined to be a node to be migrated, and the node to be migrated is migrated.
specifically, in practical application, each system has a fault-tolerant time, and the time for receiving the heartbeat packet is preset according to the fault-tolerant time of the system. When the fault-tolerant time of the system is long, the preset time is relatively long, and when the fault-tolerant time of the system is short, the preset time is relatively short. And copying the data file of the node to be migrated to the migration node to complete the node migration.
The resource allocation method provided by the embodiment of the invention can monitor the node state and performance in real time, and realize the migration and expansion of the node and the recovery of the node according to the judgment of the first operation pressure index and the second operation pressure index, thereby realizing the timely retraction of the system and the full utilization of redundant node resources, avoiding the waste caused by the occupation of the redundant node resources on the system, and improving the resource allocation efficiency.
Example two
an embodiment of the present invention provides a resource allocation method, as shown in fig. 2, the method may include:
S201, the resource configuration device determines a first operation pressure index of each system, a second operation pressure index of each node and a heartbeat packet every other first preset time in a cloud computing resource pool, wherein each system comprises at least one node.
The system operation pressure index of each system in the cloud computing resource pool, the node operation pressure index of each node in the system and the heartbeat packet are calculated every other first preset time, different systems can achieve different functions, and each system at least comprises one node. And calculating the system operation pressure index and the node operation pressure index through the whole node resource allocation process.
the first operation pressure index is a system operation pressure index, the current operation of the system on nodes n _1, n _2, … … and n _ m is set, u _1, u _2, … … and u _ m respectively correspond to the current concurrent user number of the nodes n _1, n _2, … … and n _ m, and r _1, r _2, … … and r _ m are the current concurrent request number; u _1, U _2, … … and U _ m are average values of the number of concurrent users at the same time node in the previous week, and R _1, R _2, … … and R _ m are average values of the number of concurrent requests; su (A) is the pressure index of the current user number of the system, and sr (A) is the pressure index of the current request number; the system operating pressure index may be determined by the following equation:
Wherein α is a number between 0 and 1.
The second operation pressure index is a node operation pressure index, a node N _ N is set as one of functional nodes in the system, the current I/O throughput of the node is t, the CPU utilization rate is uc, and the memory utilization rate is um; the average I/O throughput under the same time node in the previous week is T, the average CPU utilization rate is Uc, and the average memory utilization rate is Um; the current I/O pressure index of the node N _ N is st (N _ N), the current CPU pressure index is sc (N _ N), and the current memory pressure index is sm (N _ N); the node operating pressure index may be determined by the following equation:
wherein, alpha and beta are numbers between 0 and 1, and the sum of alpha and beta is not more than 1.
The heartbeat packet can be understood as a state that the node and the resource configuration device notify the other side of the state at regular time, and is sent at a certain time interval, which is similar to a heartbeat.
s202, when the first operation pressure index is larger than or equal to the first preset operation pressure index, the resource allocation device determines that the system with the first operation pressure index larger than or equal to the first preset operation pressure index is a first system.
And determining the system with the system operation pressure index greater than or equal to the preset upper limit value of the system operation pressure index as a system to be expanded, wherein the system to be expanded needs to expand a new node to meet the demand of the system node in the current service peak period, and performing node expansion on the system to be expanded.
s203, the resource allocation device determines the number of the first system expansion nodes as a first numerical value according to the first operation pressure index of the first system.
and determining the number of the nodes to be expanded according to the system operation pressure index of the system to be expanded. And under the condition that the system operation pressure index reaches the upper limit, the number of the nodes needing to be expanded, namely the number of the new nodes is the value of the system operation pressure index S (A) which is rounded upwards.
For example, if the current system a includes two nodes n _1 and n _2, the number of concurrent users of the current two nodes is 3100 and 3200, respectively, and the number of concurrent requests is 7000,7500, respectively. And according to the results of the previous monitoring sampling, under the same time condition, the average number of the historical concurrent users is 1100 and 1200, and the average number of the historical concurrent requests is 3500,4000. Setting alpha to be 0.5, and setting the upper limit of the preset system operation pressure index to be 2.
calculating the obtained system operation pressure index S (A) as:
(3100+3200)/(1100+1200)×0.5+(7000+7500)/(3500+4000)×0.5=2.33。
This results in 3 nodes being extended to restore system performance to normal levels.
S204, the resource configuration device determines that the nodes in the standby system in the cloud computing resource pool are extension nodes.
and nodes in the standby system in the cloud computing resource pool are expansion nodes. When the system needs node expansion, the idle nodes in the standby system provide expandable node resources for the system needing expansion.
S205, the resource allocation device copies the data files of the nodes in the first system to the first numerical expansion nodes in the standby system.
For example, the number of nodes that the system a needs to expand obtained in the above example of step S203 is 3, so the system a to be expanded currently needs to copy the data files of the nodes in the system to 3 new nodes in the standby system, and the 3 new nodes and the original 2 nodes in the system a form a system capable of completing the current traffic.
S206, the resource allocation device modifies the configuration file of the first number of expansion nodes in the standby system according to a preset rule and starts the first number of expansion nodes to carry services.
and modifying the configuration file of the nodes needing to be expanded in the standby system according to a preset rule, and starting the first numerical expansion nodes to bear services. And if the newly added node relates to the modification of the configuration file or after the node is expanded, the upper layer configuration file needs to be modified, after the node is copied, the configuration file of the newly expanded node is modified according to a preset modification rule, and the new expanded node is started to carry the service.
In the example, a business support system is taken as an example for description, and a business system module, an account system module, a customer service system module, a network hall system module and the like are distributed in a cloud computing resource pool. And redundant virtual machine modules consisting of spare idle virtual machines are distributed in the resource pool. And each system module has a service low peak period and a service high peak period under the actual operation condition. Taking the accounting system and the business system as an example, generally, during the monthly settlement period of the accounting system, the pressure of the accounting system is large, and after the monthly settlement period of the accounting system, the user will bring large pressure to the business system due to the actions of paying the bill, inquiring the bill, and the like. During the business peak period of the accounting system, the operating pressure of the accounting system is increased, so that the system performance is reduced, a node expansion target scheme is formed by monitoring the node performance of the accounting system module, the number of nodes needing to be expanded is calculated, and the normal operation of the accounting system is ensured by expanding the system nodes without manual intervention. After the financial system is finalized, the business system reaches the peak period of business, the pressure of the business system is increased, the performance is reduced, the node performance of the business system module is monitored to form a node expansion target scheme, the number of nodes needing to be expanded is calculated, the business system module nodes are correspondingly expanded, and the normal operation of the business system is guaranteed by expanding the system nodes without manual intervention.
The resource allocation method provided by the embodiment of the invention can monitor the node state and performance in real time, and realize the migration and expansion of the node and the recovery of the node according to the judgment of the first operation pressure index and the second operation pressure index, thereby realizing the timely retraction of the system and the full utilization of redundant node resources, avoiding the waste caused by the occupation of the redundant node resources on the system, and improving the resource allocation efficiency.
EXAMPLE III
an embodiment of the present invention provides a resource allocation method, as shown in fig. 3, the method may include:
s301, the resource configuration device determines a first operation pressure index of each system, a second operation pressure index of each node and a heartbeat packet every other first preset time in the cloud computing resource pool, wherein each system comprises at least one node.
the system operation pressure index of each system in the cloud computing resource pool, the node operation pressure index of each node in the system and the heartbeat packet are calculated every other first preset time, different systems can achieve different functions, and each system at least comprises one node. And calculating the system operation pressure index and the node operation pressure index through the whole node resource allocation process.
s302, when the first operation pressure index is smaller than or equal to the second preset operation pressure index, the resource allocation device determines that the system with the first operation pressure index smaller than or equal to the second preset operation pressure index is a second system.
And determining the system with the system operation pressure index smaller than or equal to the preset system operation pressure index upper limit value as the system to be recovered, wherein in the service low peak period of the system to be recovered, the pressure of the system to be recovered is reduced, the current system can complete the current service volume without the original node number, and the node recovery is carried out on the system to be recovered.
S303, the resource allocation device determines the number of the recovery nodes to be a second numerical value according to the number of the nodes in the second system and the first operation pressure index of the second system.
in the system to be recovered, calculating the system operation pressure index and the total number of system nodes, rounding the reciprocal of the system operation pressure index, then subtracting one, subtracting one from the total number of the system nodes, taking the minimum value of the two values, wherein the minimum value is the number of the nodes to be recovered by the system, and placing the nodes into a standby system for other systems to be expanded to use.
the calculation formula of the number of the nodes which should be recovered by the system A is as follows:
Wherein, S (A) is the operating pressure index of the system A, and sum (A) is the total number of the nodes of the system A.
Illustratively, if the current operating pressure index of the system a is 0.2, and the number of the current system nodes is 4.
The number of nodes that system a should be recovered is:
it can be determined that 3 nodes of the system a can be recovered without wasting resources, and can meet the service requirement of the current system.
s304, the resource allocation device puts the second numerical nodes in the second system into a standby system.
and the resource allocation device puts the nodes needing to be recovered in the system to be recovered into the standby system.
illustratively, the number of the nodes that the system a needs to recover obtained in the above example of step S303 is 3, and the 3 recovered nodes are put into the standby system to become idle nodes for use by other systems to be expanded.
s305, the resource allocation device modifies the configuration file of the second numerical value nodes of the standby system in the second system according to the preset rule.
and if the recycled node relates to the modification of the configuration file or after the node is recycled, modifying the configuration file of the recycled node according to a preset modification rule, wherein the configuration file of the upper layer configuration file needs to be modified.
the method includes the steps that an expanded account system and a business system are taken as an example for explanation, after a month is over, the account system enters a business low peak period, node pressure is reduced, system performance is improved, a node recovery target scheme is formed by monitoring node performance of an account system module, the number of nodes needing to be recovered is calculated, the expanded nodes in the account system are recovered, and the recovered nodes are placed into a redundant virtual machine module to be used by other systems to be expanded. Likewise, the business system enters a business down time. The node pressure is reduced, the system performance is improved, a node recovery target scheme is formed by monitoring the node performance of a business system module, the number of nodes needing to be recovered is calculated, the nodes expanded in the business system are recovered, and the recovered nodes are put into a redundant virtual machine module for other systems to be expanded to use.
optionally, after S301, the method may further perform S306.
S306, if the heartbeat packet of the node is not acquired within the first preset time, the resource configuration device determines that the node which does not acquire the heartbeat packet is the first node, and copies the data file of the first node to the migration node.
and if the heartbeat packet of a certain node in the system is not acquired within a certain preset time, determining the node which does not acquire the heartbeat packet as the node to be migrated, and migrating the node to be migrated.
Deploying a node data file to be migrated on a new node in the standby system may include: CPU, memory, storage, etc. And copying the data file of the node to be migrated to the migration node in the standby system to complete the node migration.
the resource allocation method provided by the embodiment of the invention can monitor the node state and performance in real time, and realize the migration and expansion of the node and the recovery of the node according to the judgment of the first operation pressure index and the second operation pressure index, thereby realizing the timely retraction of the system and the full utilization of redundant node resources, avoiding the waste caused by the occupation of the redundant node resources on the system, and improving the resource allocation efficiency.
Example four
An embodiment of the present invention provides a resource allocation method, as shown in fig. 4, the method may include:
S401, the resource configuration device determines a first operation pressure index of each system, a second operation pressure index of each node and a heartbeat packet every other first preset time in the cloud computing resource pool, wherein each system comprises at least one node.
the system operation pressure index of each system in the cloud computing resource pool, the node operation pressure index of each node in the system and the heartbeat packet are calculated every other first preset time, different systems can achieve different functions, and each system at least comprises one node. And calculating the system operation pressure index and the node operation pressure index through the whole node resource allocation process.
S402, the resource allocation device determines that the first operation pressure index is larger than the second preset operation pressure index, and the system with the first operation pressure index smaller than the first preset operation pressure index is a third system.
And the resource allocation device determines that the system operation pressure index is larger than a preset system operation pressure index lower limit, and the system with the system operation pressure index smaller than a preset system operation pressure index upper limit is a system with normal system pressure. And under the condition that the system pressure is normal, respectively judging the operation pressure index of each node in the system with normal system pressure.
And S403, the resource allocation device determines that the node with the second operation pressure index greater than or equal to a third preset operation pressure index is a second node, and determines that the node with the second operation pressure index less than or equal to a fourth preset operation pressure index is a third node.
The third preset operation pressure index is the upper limit value of the node operation pressure index, the fourth preset operation pressure index is the lower limit value of the node operation pressure index, the second node is a node to be expanded, and the third node is a node to be recovered.
And the resource allocation device determines the node with the node operation pressure index greater than or equal to the upper limit value of the node operation pressure index as the node to be expanded, and determines the node with the node operation pressure index less than or equal to the lower limit value of the node operation pressure index as the node to be recovered.
S404, when the number of the second nodes in the third system is more than or equal to half of the total number of the nodes in the third system, the resource allocation device determines that the number of the third system expansion nodes is a third numerical value according to a second operation pressure index of the second nodes in the third system.
in detail, when the number of the nodes to be expanded in the system with normal system pressure is more than or equal to half of the total number of the nodes in the system with normal system pressure, the number of the nodes to be expanded in the system with normal system pressure is determined according to the node operation pressure index of the nodes to be expanded in the system with normal system pressure. The number of new nodes is an rounded up value of the sum of all nodes operating pressure indexes up to the upper limit.
Illustratively, the system operating pressure index of the system a is normal, the total number of nodes of the system is 4, and the upper limit value of the system node operating pressure index is 2, but the node operating pressure indexes of two nodes n _1 and n _2 are 2.2 and 2.5 respectively, and both are greater than the upper limit value 2 of the node operating pressure index, then the node operating pressure indexes of the nodes n _1 and n _2 need to be added, that is, 2.2+2.5, to obtain a value of 4.7, and the obtained value of 4.7 is rounded up to a value of 5, so that the system a should extend 5 nodes to meet the normal performance requirement.
S405, the resource configuration device determines that the nodes in the standby system in the cloud computing resource pool are extension nodes.
and nodes in the standby system in the cloud computing resource pool are expansion nodes. When the system needs node expansion, the idle nodes in the standby system provide expandable node resources for the system needing expansion.
s406, the resource allocation device copies the data files of the nodes in the third system to a third number of extension nodes in the standby system.
For example, the system a in step S405 should extend 5 nodes, and copy the data files of the nodes in the system a to 5 extension nodes in the backup system in the cloud computing resource pool to complete node extension.
s407, the resource allocation device modifies the configuration file of the third number of expansion nodes in the standby system according to a preset rule, and enables the third number of expansion nodes to carry services.
Illustratively, if the newly added node of the system a in the step S405 involves modifying the configuration file or after the node is extended, the configuration file of the upper layer needs to be modified, the configuration files of 5 extended nodes in the standby system are modified according to the preset rule, and after the modification is completed, the 5 new extended nodes are enabled to carry the service.
s408, when the number of the second nodes in the third system is one, the resource configuration device copies the data file of the second node in the third system to the migration node.
illustratively, the system pressure of system a is normal, and the total number of nodes in the system is 5. And when the node operation pressure index of 1 node is greater than or equal to the upper limit value of the node operation pressure index, carrying out node migration on the node. And copying the node data file to be migrated to a migration node of the standby system to complete the migration process of the node.
the resource allocation method provided by the embodiment of the invention can monitor the node state and performance in real time, and realize the migration and expansion of the node and the recovery of the node according to the judgment of the first operation pressure index and the second operation pressure index, thereby realizing the timely retraction of the system and the full utilization of redundant node resources, avoiding the waste caused by the occupation of the redundant node resources on the system, and improving the resource allocation efficiency.
EXAMPLE five
An embodiment of the present invention provides a resource allocation method, as shown in fig. 5, the method may include:
S501, the resource configuration device determines a first operation pressure index of each system, a second operation pressure index of each node and a heartbeat packet every other first preset time in the cloud computing resource pool, wherein each system comprises at least one node.
The system operation pressure index of each system in the cloud computing resource pool, the node operation pressure index of each node in the system and the heartbeat packet are calculated at regular intervals, different systems can achieve different functions, and each system at least comprises one node. And calculating the system operation pressure index and the node operation pressure index through the whole node resource allocation process.
s502, the resource allocation device determines that the first operation pressure index is larger than the second preset operation pressure index, and the system with the first operation pressure index smaller than the first preset operation pressure index is a third system.
s503, the resource allocation device determines that the node of which the second operation pressure index is greater than or equal to a third preset operation pressure index is a second node, and determines that the node of which the second operation pressure index is less than or equal to a fourth preset operation pressure index is a third node.
the third preset operation pressure index is the upper limit value of the node operation pressure index, the fourth preset operation pressure index is the lower limit value of the node operation pressure index, the second node is a node to be expanded, and the third node is a node to be recovered. And the resource allocation device determines the node with the node operation pressure index greater than or equal to the upper limit value of the node operation pressure index as the node to be expanded, and determines the node with the node operation pressure index less than or equal to the lower limit value of the node operation pressure index as the node to be recovered.
S504, when the number of the third nodes in the third system is greater than or equal to half of the total number of the nodes in the third system, the resource allocation device determines that the number of the recovery nodes is a fourth numerical value according to the number of the nodes in the third system and the first operating pressure index of the third system.
when the number of the nodes to be recovered in the system with normal system pressure is more than or equal to half of the total number of the nodes in the system with normal system pressure, determining the number of the nodes to be recovered in the system with normal system pressure according to the number of the nodes in the system with normal system pressure and the system operation pressure index with normal system pressure.
In the system to be recovered, calculating the system operation pressure index and the total number of system nodes, rounding the reciprocal of the system operation pressure index, then subtracting one, subtracting one from the total number of the system nodes, taking the minimum value of the two values, wherein the minimum value is the number of the nodes to be recovered by the system, and placing the nodes into a standby system for other systems to be expanded to use.
specifically, the calculation of the number of nodes that should be recovered by the system a may refer to the description of step S303, and is not described herein again in the embodiments of the present invention.
and S505, the resource allocation device puts the fourth numerical value node in the third system into a standby system.
And putting the nodes needing to be recovered in the system with normal system pressure into a standby system. And placing the calculated nodes needing to be recovered into a standby system to become idle nodes for other systems to be expanded to use.
s506, the resource allocation device modifies the configuration file of the fourth numerical value node of the standby system placed in the third system according to the preset rule.
And if the nodes to be recovered relate to the modification of the configuration files or after the nodes are recovered, modifying the configuration files of the recovery nodes of the standby system in the system with normal system pressure according to a preset rule, wherein the configuration files of the recovery nodes of the standby system are placed in the system with normal system pressure.
The resource allocation method provided by the embodiment of the invention can monitor the node state and performance in real time, and realize the migration and expansion of the node and the recovery of the node according to the judgment of the first operation pressure index and the second operation pressure index, thereby realizing the timely retraction of the system and the full utilization of redundant node resources, avoiding the waste caused by the occupation of the redundant node resources on the system, and improving the resource allocation efficiency.
EXAMPLE six
an embodiment of the present invention further provides a resource allocation apparatus 6, as shown in fig. 6, where the apparatus 6 includes: a determining unit 601, a processing unit 602, wherein,
The determining unit 601 is configured to determine, every first preset time, a first operating pressure index of each system, a second operating pressure index of each node, and a heartbeat packet of each system in the cloud computing resource pool, where each system includes at least one node;
the determining unit 601 is further configured to determine that a system in which the first operating pressure index is greater than or equal to a first preset operating pressure index is a first system;
The processing unit 602 is configured to perform node expansion on the first system;
the determining unit 601 is further configured to determine that a system in which the first operating pressure index is smaller than or equal to a second preset operating pressure index is a second system;
The processing unit 602 is further configured to perform node recovery on the second system;
the determining unit 601 is further configured to determine that the system in which the first operating pressure index is greater than the second preset operating pressure index and the first operating pressure index is less than the first preset operating pressure index is a third system;
The processing unit 602 is further configured to respectively determine a second operating pressure index of each node in the third system;
The determining unit 601 is further configured to determine, if the heartbeat packet of the node is not obtained within the first preset time, that the node that does not obtain the heartbeat packet is a first node;
the processing unit 602 is further configured to perform node migration on the first node.
further, the determining unit 601 is configured to determine that a node where the second operating pressure index is greater than or equal to a third preset operating pressure index is a second node; the node which is used for determining that the second operation pressure index is smaller than or equal to a fourth preset operation pressure index is a third node;
The processing unit 602 is configured to perform node expansion on the third system when the number of the second nodes in the third system is greater than or equal to half of the total number of nodes in the third system; the third system is also used for carrying out node recovery on the third system when the number of the third nodes in the third system is more than or equal to half of the total number of the nodes in the third system; and is further configured to perform node migration on the second node in the third system when the number of the second nodes in the third system is one.
further, the determining unit 601 is configured to determine, when the first operating pressure index is greater than or equal to the first preset operating pressure index, that the system with the first operating pressure index being greater than or equal to the first preset operating pressure index is a first system; the system is also used for determining the number of the first system expansion nodes as a first numerical value according to a first operating pressure index of the first system; the method is also used for determining that the nodes in the standby system in the cloud computing resource pool are expansion nodes;
The processing unit 602 is configured to copy the data file of the node in the first system to a first number of extension nodes in the standby system; and the configuration file management module is further configured to modify the configuration file of the first number of expansion nodes in the standby system according to a preset rule, and enable the first number of expansion nodes to carry services.
The determining unit 601 is further configured to determine, when the first operating pressure index is less than or equal to the second preset operating pressure index, that the system with the first operating pressure index being less than or equal to the second preset operating pressure index is a second system; the first operation pressure index of the second system is used for determining the number of the recovery nodes as a first numerical value;
The processing unit 602 is further configured to put a second number of nodes in the second system into a standby system; and the configuration file is also used for modifying the configuration file of the second numerical nodes of the standby system in the second system according to a preset rule.
The determining unit 601 is further configured to determine, if the heartbeat packet of the node is not obtained within the first preset time, that the node that does not obtain the heartbeat packet is a first node;
the processing unit 602 is further configured to copy the data file of the first node to a migration node.
Further, the determining unit 601 is configured to determine, according to a second operating pressure index of the second node in the third system, that the number of the third system expansion nodes is a third value when the number of the second nodes in the third system is greater than or equal to half of the total number of the nodes in the third system; the method is also used for determining that the nodes in the standby system in the cloud computing resource pool are expansion nodes;
the processing unit 602 is configured to copy the data file of the node in the third system to a third number of extended nodes in the standby system; and the standby system is further configured to modify a configuration file of a third number of expansion nodes in the standby system according to a preset rule, and enable the third number of expansion nodes to carry services.
the determining unit 601 is further configured to determine, when the number of the third nodes in the third system is greater than or equal to half of the total number of the nodes in the third system, that the number of the recovery nodes is a fourth numerical value according to the number of the nodes in the third system and the first operating pressure index of the third system;
the processing unit 602 is further configured to place a fourth number of nodes in the third system into a standby system; and the configuration file of the fourth numerical node which is placed into the standby system in the third system is modified according to a preset rule.
The processing unit 602 is further configured to copy the data file of the second node in the third system to a migration node when the number of the second nodes in the third system is one.
Further, the determining unit 601 is configured to determine, every first preset time, a first operating pressure index of each system according to the number of currently operating nodes in each system, the current number of concurrent users and the current number of concurrent requests of each node in each system, and an average number of concurrent users and an average number of concurrent requests of each node in each system before a second preset time; and the second operation pressure index of each node is determined according to the current throughput, the current CPU utilization rate, the current memory utilization rate of each node and the average throughput, the average CPU utilization rate and the average memory utilization rate of each node before the second preset time every other first preset time.
Specifically, for the description of the resource allocation apparatus provided in the embodiment of the present invention, reference may be made to the description of the resource allocation method in the first to fifth embodiments, and details of the embodiment of the present invention are not repeated herein.
in practical applications, the determining Unit 601 and the Processing Unit 602 may be implemented by a Central Processing Unit (CPU), a Micro Processing Unit (MPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), or the like, which are located in the resource allocation device 6.
The resource allocation device provided by the embodiment of the invention can monitor the node state and performance in real time, and realize the migration and expansion of the node and the recovery of the node according to the judgment of the first operation pressure index and the second operation pressure index, thereby realizing the timely retraction of the system and the full utilization of redundant node resources, avoiding the waste caused by the occupation of the redundant node resources on the system, and improving the resource allocation efficiency.
as will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
the present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
these computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.

Claims (6)

1. a method for resource allocation, the method comprising:
Determining a first operation pressure index of each system, a second operation pressure index of each node and a heartbeat packet every other first preset time, wherein each system comprises at least one node;
Determining a system with the first operating pressure index being greater than or equal to a first preset operating pressure index as a first system, and performing node expansion on the first system;
Determining a system with the first operating pressure index smaller than or equal to a second preset operating pressure index as a second system, and performing node recovery on the second system;
Determining that the first operating pressure index is larger than the second preset operating pressure index, and the system with the first operating pressure index smaller than the first preset operating pressure index is a third system, and respectively judging the second operating pressure index of each node in the third system;
the respectively judging the second operating pressure index of each node in the third system includes:
Determining a node of which the second operation pressure index is greater than or equal to a third preset operation pressure index as a second node, and determining a node of which the second operation pressure index is less than or equal to a fourth preset operation pressure index as a third node;
when the number of the second nodes in the third system is more than or equal to half of the total number of the nodes in the third system, determining the number of the expansion nodes of the third system to be a third numerical value according to a second operating pressure index of the second nodes in the third system; determining nodes in the standby system in the cloud computing resource pool as extended nodes; copying the data files of the nodes in the third system to a third number of expansion nodes in the standby system; modifying a configuration file of a third number of expansion nodes in the standby system according to a preset rule, and starting the third number of expansion nodes to bear services;
when the number of the third nodes in the third system is more than or equal to half of the total number of the nodes in the third system, determining the number of the recovery nodes as a fourth numerical value according to the number of the nodes in the third system and the first operating pressure index of the third system; putting a fourth numerical value node in the third system into a standby system; modifying a configuration file of a fourth numerical value node of a standby system placed in the third system according to a preset rule;
when the number of the second nodes in the third system is one, copying the data file of one second node in the third system to a migration node;
and if the heartbeat packet of the node is not acquired within the first preset time, determining that the node which does not acquire the heartbeat packet is the first node, and performing node migration on the first node.
2. the resource allocation method according to claim 1,
The determining that the system with the first operating pressure index being greater than or equal to a first preset operating pressure index is a first system, and performing node expansion on the first system includes:
When the system with the first operation pressure index being larger than or equal to a first preset operation pressure index is determined to be a first system, determining the number of the first system expansion nodes to be a first numerical value according to the first operation pressure index of the first system;
Determining nodes in the standby system in the cloud computing resource pool as extended nodes;
Copying the data files of the nodes in the first system to a first number of expansion nodes in the standby system;
Modifying a configuration file of a first number of expansion nodes in the standby system according to a preset rule, and starting the first number of expansion nodes to bear services;
The step of determining that the system with the first operating pressure index smaller than or equal to a second preset operating pressure index is a second system, and performing node recovery on the second system comprises the following steps:
when the system with the first operation pressure index smaller than or equal to the second preset operation pressure index is determined to be a second system, determining the number of the recovery nodes to be a second numerical value according to the number of the nodes in the second system and the first operation pressure index of the second system;
Placing a second number of nodes in the second system into a standby system;
Modifying a configuration file of a second numerical value node of a standby system in the second system according to a preset rule;
If the heartbeat packet of the node is not acquired within the first preset time, determining that the node which does not acquire the heartbeat packet is a first node, and performing node migration on the first node, wherein the node migration includes:
if the heartbeat packet of the node is not acquired within the first preset time, determining that the node which does not acquire the heartbeat packet is the first node, and copying the data file of the first node to the migration node.
3. the resource allocation method according to any one of claims 1 to 2,
The determining a first operating pressure index of each system in the cloud computing resource pool every other first preset time includes:
determining a first operation pressure index of each system every other first preset time according to the number of currently operating nodes in each system, the number of current concurrent users and the number of current concurrent requests of each node in each system, and the average number of concurrent users and the average number of concurrent requests of each node in each system before a second preset time;
Determining a second operation pressure index of each node in the cloud computing resource pool every a first preset time, wherein the method comprises the following steps:
And determining a second operation pressure index of each node every other first preset time according to the current throughput, the current CPU utilization rate, the current memory utilization rate of each node and the average throughput, the average CPU utilization rate and the average memory utilization rate of each node before the second preset time.
4. an apparatus for resource configuration, the apparatus comprising: a determining unit and a processing unit, wherein,
The determining unit is used for determining a first operating pressure index of each system, a second operating pressure index of each node and a heartbeat packet every other first preset time, wherein each system comprises at least one node;
The determining unit is further configured to determine that the system with the first operating pressure index being greater than or equal to a first preset operating pressure index is a first system;
the processing unit is used for performing node expansion on the first system;
the determining unit is further configured to determine that the system with the first operating pressure index smaller than or equal to a second preset operating pressure index is a second system;
the processing unit is further configured to perform node recovery on the second system;
the determining unit is further configured to determine that the first operating pressure index is greater than the second preset operating pressure index, and a system in which the first operating pressure index is less than the first preset operating pressure index is a third system;
The processing unit is further configured to respectively determine a second operating pressure index of each node in the third system;
the determining unit is further configured to determine that a node where the second operating pressure index is greater than or equal to a third preset operating pressure index is a second node, and determine that a node where the second operating pressure index is less than or equal to a fourth preset operating pressure index is a third node;
The determining unit is further configured to determine, when the number of the second nodes in the third system is greater than or equal to half of the total number of the nodes in the third system, that the number of the expansion nodes of the third system is a third numerical value according to a second operating pressure index of the second nodes in the third system; determining nodes in the standby system in the cloud computing resource pool as extended nodes;
the processing unit is further configured to copy the data file of the node in the third system to a third number of extended nodes in the standby system; modifying a configuration file of a third number of expansion nodes in the standby system according to a preset rule, and starting the third number of expansion nodes to bear services;
The determining unit is further configured to determine, when the number of the third nodes in the third system is greater than or equal to half of the total number of the nodes in the third system, that the number of the recovery nodes is a fourth numerical value according to the number of the nodes in the third system and the first operating pressure index of the third system;
The processing unit is further configured to place a fourth numerical node in the third system into a standby system; modifying a configuration file of a fourth numerical value node of a standby system placed in the third system according to a preset rule;
The processing unit is further configured to copy a data file of one second node in the third system to a migration node when the number of the second nodes in the third system is one;
The determining unit is further configured to determine, if the heartbeat packet of the node is not obtained within the first preset time, that the node which does not obtain the heartbeat packet is the first node;
the processing unit is further configured to perform node migration on the first node.
5. the resource configuration apparatus of claim 4,
The determining unit is further configured to determine, according to a first operating pressure index of the first system, that the number of the first system expansion nodes is a first numerical value; the method is also used for determining that the nodes in the standby system in the cloud computing resource pool are expansion nodes;
The processing unit is used for copying the data files of the nodes in the first system to a first number of extension nodes in the standby system; the standby system is also used for modifying the configuration file of the first number of expansion nodes in the standby system according to a preset rule and starting the first number of expansion nodes to bear services;
the determining unit is further configured to determine that the number of the recovery nodes is a second numerical value according to the number of the nodes in the second system and the first operating pressure index of the second system;
The processing unit is further configured to place a second number of nodes in the second system into a standby system; the configuration file of the second numerical nodes of the standby system is also used for modifying the configuration file of the second numerical nodes of the standby system in the second system according to a preset rule;
the determining unit is further configured to determine, if the heartbeat packet of the node is not obtained within the first preset time, that the node which does not obtain the heartbeat packet is a first node;
the processing unit is further configured to copy the data file of the first node to a migration node.
6. the resource configuration apparatus according to any of claims 4 to 5,
The determining unit is configured to determine, every first preset time, a first operating pressure index of each system according to the number of currently operating nodes in each system, the current number of concurrent users and the current number of concurrent requests of each node in each system, and the average number of concurrent users and the average number of concurrent requests of each node in each system before a second preset time; and the second operation pressure index of each node is determined according to the current throughput, the current CPU utilization rate, the current memory utilization rate of each node and the average throughput, the average CPU utilization rate and the average memory utilization rate of each node before the second preset time every other first preset time.
CN201510973535.1A 2015-12-22 2015-12-22 Resource allocation method and device Active CN106909453B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510973535.1A CN106909453B (en) 2015-12-22 2015-12-22 Resource allocation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510973535.1A CN106909453B (en) 2015-12-22 2015-12-22 Resource allocation method and device

Publications (2)

Publication Number Publication Date
CN106909453A CN106909453A (en) 2017-06-30
CN106909453B true CN106909453B (en) 2019-12-10

Family

ID=59200358

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510973535.1A Active CN106909453B (en) 2015-12-22 2015-12-22 Resource allocation method and device

Country Status (1)

Country Link
CN (1) CN106909453B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103607459A (en) * 2013-11-21 2014-02-26 东北大学 Dynamic resource monitoring and scheduling method of cloud computing platform IaaS layer
CN104166594A (en) * 2014-08-19 2014-11-26 杭州华为数字技术有限公司 Load balancing control method and related devices

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103607459A (en) * 2013-11-21 2014-02-26 东北大学 Dynamic resource monitoring and scheduling method of cloud computing platform IaaS layer
CN104166594A (en) * 2014-08-19 2014-11-26 杭州华为数字技术有限公司 Load balancing control method and related devices

Also Published As

Publication number Publication date
CN106909453A (en) 2017-06-30

Similar Documents

Publication Publication Date Title
CN110737442B (en) Edge application management method and system
CN110597616B (en) Memory allocation method and device for neural network
CN108632365B (en) Service resource adjusting method, related device and equipment
CN104461744B (en) A kind of resource allocation methods and device
US9405589B2 (en) System and method of optimization of in-memory data grid placement
CN104166606A (en) File backup method and main storage device
CN107169009B (en) Data splitting method and device of distributed storage system
CN110633325B (en) Docker-based database cluster capacity expansion method and device
CN111381928B (en) Virtual machine migration method, cloud computing management platform and storage medium
WO2015149514A1 (en) Virtual machine deploying method and apparatus
CN104239123A (en) Campus-cloud-platform-oriented virtual machine management dispatching method and system
CN104572340A (en) Incremental backup system and method
CN106469117B (en) Storage resource management method and device for virtual machine storage migration
CN103561055A (en) Web application automatic elastic extension method under cloud computing environment based on sessions
CN106681839A (en) Elasticity calculation dynamic allocation method
CN111666266A (en) Data migration method and related equipment
CN105159759B (en) Application example dispositions method and device
US20130247037A1 (en) Control computer and method for integrating available computing resources of physical machines
CN104346210B (en) The online moving method of virtual machine and system based on temporal and spatial correlations
CN104378239A (en) Rapid reliability index statistical system and method based on cluster frame
CN106909453B (en) Resource allocation method and device
Goutam et al. The performance evaluation of proactive fault tolerant scheme over cloud using CloudSim simulator
CN105373451A (en) Virtual machine placement method and apparatus
JP2019121333A (en) Data dynamic migration method and data dynamic migration device
CN114385366A (en) Elastic capacity expansion method, system, medium and equipment for container group of container 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
GR01 Patent grant
GR01 Patent grant