Disclosure of Invention
The invention provides an energy-saving resource allocation method for data-driven manufacturing service in the industrial Internet of things, aiming at realizing real-time monitoring and adjustment of allocated tasks, reducing system resource consumption, ensuring that SLA is delivered by a cloud manufacturing service provider and reducing host energy consumption and cooling cost.
The technical scheme adopted by the invention for solving the technical problems is as follows:
an energy-saving resource allocation method for data-driven manufacturing service in the industrial internet of things comprises the following steps:
step one, detecting the CPU utilization rate: detecting the utilization rate of a host CPU in the cloud-enabled IIoT data center, then classifying the utilization rates, and setting three threshold values T according to the utilization rate of the host CPUlower,Tmiddle,TupperClassifying the hosts, and sequentially classifying the hosts into four classes, namely SU-hosts, SA-hosts, NL-hosts and SO-hosts according to threshold values from low to high;
step two, determining all D2M services on SU-hosts and D2M services selected from SO-hosts (S0 hosts) to be migrated out of the service (D2M service refers to data-driven manufacturing service);
and step three, searching a proper host to allocate resources for the D2M service determined to be moved in the step two, finding a host suitable for D2M service migration by using an energy and thermal perception resource allocation (ETV) scheme, and performing service migration to reduce energy consumption.
Further, three thresholds T are set in step onelower,Tmiddle,TupperThe determination process of (2) is:
the determination of the three thresholds is selected by a least median square regression model, and is specifically determined by using formulas (9) to (11):
Tupper=(1-c×LMS) (11)
LMS in the formula represents the square of the minimum median; and c represents a safety factor, and the value of c is 0.5.
Further, the classification of the utilization rate based on the above three thresholds is described as follows:
1) obtaining the current i
thPrediction of CPU utilization for a host
Classifying the hosts into an affiliated group corresponding thereto;
2) if, if
Then the host is identified as a member of the SO-hosts group, the host belonging to the group must migrate some D2M services to SA-hosts,
groups to reduce SLA violations;
3) in NL-hosts, the first step of the method,
hosts in the group, all their D2M services remain unchanged;
4) if, if
The host is identified as one of the members and the hosts belonging to the group must migrate all of their D2M services into SA-hosts.
Further, the specific implementation process of the step two is as follows:
modeling the energy consumption problem in a cloud-enabled IIoT environment, a set of n D2M services S is defined that need to be placed on m hosts H and G stands for gateway device, S ═ S1,s2,....,sn,H=h1,h2,....,hm(ii) a Energy consumption of the cloud-supported IIoT environment includes computational energy consumption and cooling energy consumption, observed time is divided into l time slots, q is 1, 2.
The allocation of D2M services to the cloud-enabled IIoT data center is described with an energy consumption model and a cooling energy consumption model;
the energy consumption model is as follows:
wherein:
representing the consumption of base power, P, by each host
hostRepresents the total power consumption consumed by the host,
and
maximum power consumption of the host and the gateway, respectively, over a period of time; delta
jHolding a binary value of 0, 1; if the jth D2M service gets resources from the host, the value of δ j is "1", otherwise "0"; CPU(s)
j) Represents the total number of CPUs required for the jth D2M service; p
hostThe formula represents the utilization of the host, which is derived from the ratio of the total number of CPU cores per D2M service request associated with the D2M service to the total number of CPU cores of the host;
c is the capacity of the original bearer network, C
maxIs the maximum network capacity;
consuming base power, P, on behalf of the gateway
gateRepresents the total power consumed by the gateway;
during the observation time, the overall computing power consumption of the cloud-enabled IIoT environment is represented by a matrix P,
q ═ 1, 2,. 1, l;
i 1, 2, m determines the matrixAn element in P;
in summary, the computational energy consumption model of the cloud-enabled IIoT environment is defined as follows:
the refrigeration energy consumption model is as follows:
in cloud-supported IIoT data centers, the energy consumed by computer room air conditioners CRAC is called cooling energy consumption, and depends on the heat generated by the host and the efficiency of CRAC; HR matrix d describes the relationship between each pair of hosts, with entry di,kRepresents the i-ththGenerating host to kthThe recirculation rate of each host; the heat contribution of all hosts affects the iththThe inlet temperature of each host in the observed time slot q is given by the following formula:
which is indicative of the inlet temperature, is,
which is indicative of the temperature being supplied,
all inlet temperatures
Wherein T is
upIs the warning temperature, which has a nominal value of 70 ℃, the temperature of the cold air provided from the CRAC is set by equation (4) as follows:
using the CoP model:
CoP(Tsupply)=0.0068(Tsupply)2+0.0008Tsupply+0.458 to describe the refrigeration energy consumption model:
and (3) integrating the models in the formula (3) and the formula (6) to obtain a total consumption model:
further optimization (7) can be achieved using equation (5), resulting in the final optimization objective:
searching for the best host to obtain resource allocation: the D2M resource allocation optimization is achieved by selecting the most appropriate host from either SO-hosts or SU-hosts at each scheduling interval based on obtaining the list of hosts and services, with the cost of each host calculated using equation (8), and compressing the host cost in each iteration.
Further, the specific implementation process of the step three is as follows:
balancing the trade-off between computing and cooling systems with an ETV resource allocation scheme, D2M service resource allocation is directly dependent on the current temperature of the hosts, which is the lowest temperature among hosts in the cloud-enabled IIoT data center when selecting hosts for resource allocation for the D2M service, constructed based on costs of energy and thermal energy, from a list of hosts, D2M service, Tlower、TmiddleUsing equation (8) to make a feasible host list, the host list search space is sorted to find the best feasible host list.
The invention has the following beneficial technical effects: the present invention provides a solution to how to reduce host power consumption and cooling costs while ensuring that SLAs are delivered by cloud manufacturing service providers. It can be seen that increasing the level of host resource utilization in a cloud-enabled IIoT data center can minimize the overall energy consumption of the cloud-enabled IIoT environment. However, simply increasing host utilization may affect the temperature of hosts and SLAs delivered by the cloud manufacturing service provider. Therefore, D2M service should be selected for reallocation from either service-overloaded hosts (SO hosts) or service-underloaded hosts (SU hosts) according to current resource demand to reduce SLA violations. The number of active hosts is reduced by switching idle hosts to a power saving mode to reduce power consumption. When D2M service workload demand increases, the host may be reactivated. The present invention performs energy-saving resource allocation using three main tasks: (1) detecting the utilization rate of a CPU; (2) selecting a D2M service from the SO host; (3) searching for a suitable host allocates resources for the D2M service. The invention considers the energy-saving consumption of resource allocation, carries out real-time monitoring and adjustment after the task allocation, reduces the resource consumption of the system, ensures that SLA is delivered by a cloud manufacturing service provider, and simultaneously reduces the energy consumption and the cooling cost of the host.
Detailed Description
With reference to fig. 1 to 5, the energy-saving resource allocation method for data-driven manufacturing service in the internet of things of the industry according to the present invention is described as follows:
1, modeling and problem formulation description of a system, and performing model research and formulation work on the energy consumption problem in the cloud-supported IIoT environment in order to better explain the problem. The following formalization is described:
a set of n D2M services S ═ (S)1,s2,....,sn) H ═ H needs to be placed on m hosts1,h2,...., hm) And G represents a gateway device. The energy consumption of the cloud-enabled IIoT environment includes computing energy consumption and cooling energy consumption. The observed time is divided into l (q ═ 1, 2.. eta., l) time slots, each time slot having a duration of κ. For the allocation algorithm to allocate D2M services to cloud-enabled IIoT data centers, we will describe their energy consumption model and thermal perception energy consumption model, respectively.
1.1 calculating energy consumption model
In the cloud-enabled IIoT environment, the computational energy consumption is determined by the energy consumed by the CPU, storage, memory, and network. However, the CPU is the primary computational energy consumer. Therefore, the computational power consumption model focuses mainly on the power consumption of the CPU. The energy consumed by the gateway is determined by its network carrying capacity, as follows:
each host consuming base power
To support basic tasks such as networking, monitoring and running instance fans to perform host heat dissipation. Wherein P is
hostRepresents the total power consumption consumed by the host,
and
the maximum power consumption of the host and the gateway, respectively, over a period of time. C is the capacity of the original bearer network, C
maxIs the maximum network capacity. Delta
jThe binary value (0,1) is maintained. If the jth D2M service gets resources from the host, then the value of δ j is "1", otherwise it is "0". CPU(s)
j) Representing the total number of CPUs required for the jth D2M service. The above equation indicates that the utilization of the host is derived from the ratio of the total number of CPU cores per D2M service request associated with the D2M service to the total number of CPU cores of the host. During the observation time, the overall computing power consumption of the cloud-enabled IIoT environment is represented by a matrix P,
the elements in the matrix P are determined. The computational energy consumption model of the cloud-enabled IIoT environment is defined as follows:
1.2 refrigeration energy consumption model
In cloud-enabled IIoT data centers, the energy consumed by Computer Room Air Conditioners (CRACs) is referred to as cooling energy. It depends on the heat generated by the host and the efficiency of the CRAC. The airflow patterns in a typical cloud-enabled IIoT data center are complex and therefore result in thermal recirculation (HR). The HR phenomenon is that hot air formed at the outlet of the host is recirculated in the IIoT data center supporting the cloud function and mixed with cold air provided by the CRAC. HR matrix d describes the relationship between each pair of hosts, with entry d
i,kRepresents the i-th
thGenerating host to k
thThe recirculation rate of each host. HR phenomenon in cloud-enabled IIoT data centers results in ith
thThe inlet temperature of the host in the observed time slot q
Above the temperature provided by
The cold air of (2). Therefore, the HR phenomenon plays a key role in the increase in energy consumption of cloud-enabled IIoT data centers. The heat contribution of all hosts affects the ith
thThe inlet temperature of each host in the observed time slot q is given by the following formula:
to ensure reliability of all hosts in cloud-enabled IIoT data centers, the temperature of all portals
Wherein T is
upIs the warning temperature (nominal 70 ℃). Therefore, we can set the cool air temperature provided from the CRAC by equation (4). The overall structure is as follows:
the amount of heat generated by the host is proportional to the calculated energy consumption. The efficiency of a CRAC unit is typically characterized by a coefficient of performance (CoP), expressed as cold energy, to remove 100J of heat. It should be noted that CoP is generally related to the temperature (T) of the cold air suppliedsupply) Is non-linear. We use the CoP model of the HP data center:
CoP(Tsupply)=0.0068(Tsupply)2+0.0008Tsupply+0.458。
thus, the energy consumption of the cooling can be described as follows:
by combining the above models, we can derive a total consumption model:
with equation (5), we can further optimize (7) to get the final optimization goal:
2 GreenlloT frame
The frame is divided into two parts: 1. the scheme of a multi-threshold-based host CPU utilization classification (MCU) scheme is responsible for dividing host into four categories: SU-hosts, SA-hosts, NL-hosts, and SO-hosts. 2. The energy and thermal awareness resource allocation (ETV) scheme uses related algorithms to find a host suitable for D2M service migration, and performs service migration to reduce energy consumption.
2.1 MCU scheme
The MCU scheme utilizes three thresholds Tlower,Tmiddle,TupperHost is divided into four categories: SU-hosts, SA-hosts, NL-hosts, and SO-hosts. The specific division is shown in fig. 1:
the division of the three thresholds was chosen by least mean square regression (LMS). More specifically, it is determined using equations (9) to (11):
Tupper=(1-c×LMS) (11)
the MCU scheme is described as follows:
1) obtain the current i
thPrediction of CPU utilization for a host
This helps to classify the hosts into the belonging group to which they correspond.
2) If it is not
Identifies the host as a member of the SO-hosts group. Those hosts that fall into the group must migrate some D2M services to SA-hosts
Groups, thereby reducing SLA violations in an energy efficient manner.
3) In cloud-enabled IIoT data centers, migrating too much D2M service from one host to another can result in an unneeded increase in energy consumption and high SLA violations. Thus, in NL-hosts
The hosts in the group, all of their D2M services, remain unchanged.
4) If it is not
The host is identified as one of the members. Hosts that fall into this group must migrate all of their D2M services into SA-hosts. As a result, the hosts in SU-hosts will switch to a low power mode to save a lot of energy. These hosts will be reactivated as resource demands increase.
2.2 ETV protocol
In the cloud-enabled IIoT data center, an efficient resource allocation algorithm of the D2M service contributes to efficient utilization of resources and reduction of energy consumption. To balance the tradeoff between computing and cooling systems, an ETV resource allocation scheme is proposed. The basic idea of the scheme is as follows: the D2M service resource allocation is directly dependent on the current temperature of the host. This means that when a host is selected for the D2M service for resource allocation, the current temperature of that host is lower than the lowest temperature of the other hosts in the cloud-enabled IIoT data center.
Algorithm 1 is shown below.
"HostList" and "ServiceList" in algorithm 1 refer to a host and a service in the cloud-enabled IIoT data center, respectively. GreenIIoT is divided into two stages: the first stage is as follows: allocating host resources for the new service, the second stage: service overload and under-service hosts are detected to minimize energy consumption and SLA violations, and resources are allocated for services in SA-hosts. We have discussed the CPU classification threshold Tlower,Tmiddle,Tupper. First, the algorithm sorts all D2M services in descending order according to their MIPS requirements. Thereafter, it is checked whether the D2M service resource requirements meet the requirements of the available hosts. If D2M service finds a host that meets the requirements, then T is usedlowerAnd TmiddleThe threshold value checks the corresponding host group. If none of the hosts meet the new D2M service requirements, the host that turned on sleep mode allocates resources for it. The SO-hosts and SU-hosts detection stages are key to minimize energy consumption, avoid performance degradation, and reduce SLA violations. Upon detection of the SO-hosts, the D2M service to be migrated is selected. In the next phase, the selected D2M service should be placed in the host based on the host temperature. The next algorithm is to describe the host resource allocation workflow according to each host temperature.
Algorithm 2 is as follows:
algorithm 2 searches for the best host to obtain resource allocation. It will take the list of hosts and services as input and return the best suited host for allocation. In the first phase, the most suitable host is selected from either SO-hosts or SU-hosts for each scheduling interval (5 minutes in this example). The cost per host is calculated by using the formula (8), and the host cost is compressed in each iteration, so that D2M resource allocation optimization is realized.
Algorithm 3 is as follows:
algorithm 3 is built based on the cost of energy and heat. It is expressed as HostList, services, Tlower,TmiddleAs input, and returns the best feasible host list (bestfeasble-HostList), whose cost is calculated by equation (8). The first stage of the algorithm is through the use of TlowerAnd TmiddleTo make a feasible host list (FeasibleHostList), which limits the search space for the best feasible host list and reduces the time complexity. Finally, the process will return a BestFeasibleHostList to which the cost of each host belongs.
3, the technical effects of the invention are verified as follows:
to illustrate the effect, we first introduce the SLA index and the energy efficiency index (ME 2).
SLA plays a quality index role in cloud-enabled IIoT data centers, measuring, for example, the quality of service provided by a cloud manufacturing service provider to cloud service users. The SLA metric is used to measure the performance characteristics of the service object. Over time, the computational performance of the SO-hosts may degrade, which may increase SLA violations. The SLA metric is critical to the energy sensitive algorithm, and can be defined as follows:
and
representing MIPS and MIPS assigned by all services, respectively.
Energy efficiency index (ME 2): the energy efficiency index (ME2) describes the overall performance of the proposed solution on the cloud-supported IIoT data center. By using the index, the system energy consumption efficiency and the SLA violation can be known. The larger the value of ME2, the higher the overall performance of the solution in the cloud-enabled IIoT data center. Thus, if the ME2 value of the proposed solution is greater than other solutions, the solution may be more efficient in cloud-enabled IIoT datacenters. The formula for ME2 is described as follows:
and simulating the system environment by utilizing a cloudsim tool, and performing related tests on the simulated environment. The superiority of the system will be explained from five aspects:
1) energy consumption: the energy consumed by the host is primarily related to CPU and memory utilization. However, on modern hosts using large storage devices, multi-core CPUs and large hard disks, the traditional linear power consumption model is no longer applicable. Simulation results of this protocol were analyzed and compared with KMI-MR, KMI-MP, RANDOM, and PABFD. The results of the simulation of energy consumption are shown in fig. 2. In terms of energy consumption, the ETV method and KMI-MR, KMI-MP, PABFD, RANDOM methods have energy consumptions of 32.5kWh, 43.2kWh, 41.1kWh, 49.3kWh, 76.7kWh, respectively. In other words, ETV reduces consumption by 24%, 20%, 34% and 57% over KMI-MR, KMI-MP, PABFD and RANDOM, respectively, as shown in FIG. 2.
2) SLA violation: over-migrating the D2M service can result in severe SLA standard violations in cloud-enabled IIoT data centers. FIG. 3 compares the SLA violation percentage of KLA-MR, KMI-MP, RANDOM and PABFD to ETV. As in the 03-Mar experiment, the methods KMI-MR, KMI-MP, PABFD, RANDOM and ETV gave SLA violation percentages of 7.2%, 9.5%, 9%, 12% and 6%, respectively. In other words, the ETV protocol SLA was 16%, 36%, 33% and 50% less than KMI-MR, KMI-MP, PABFD and RANDOM, respectively. Thus, the proposed scheme reduces the percentage of SLA violations in cloud-enabled IIoT data centers, as shown in fig. 3.
3) ME 2: ME2 is used to evaluate the overall performance of the cloud-enabled IIoT data center. Cloud manufacturing service providers aim to minimize energy consumption and SLA violations while maximizing overall performance. FIG. 4 shows that ME2 is better for the ETV scheme compared to KMI-MR, KMI-MP, RANDOM and PABFD methods. Methods KMI-ME 2 for MR, KMI-MP, PABFD, RANDOM and ETV were 16.2, 12.9, 13.1, 9.6 and 19.7, respectively. Thus, the overall performance with the ETV resource allocation scheme is much better than other approaches, as shown in fig. 4.
4) Temperature of the host: the temperature of the host directly affects the operating costs (energy consumption, cooling costs) of the cloud-enabled IIoT data center. FIG. 5 compares the results of simulations of this algorithm with host temperatures of KMI-MR, KMI-MP, RANDOM, and PABFD. The proposed ETV algorithm does not exceed the maximum temperature (T) due to its energy and thermally aware resource allocation schemeup). FIG. 4 shows that the temperature of the host is always Tup(70 ℃) nearby, which may maximize resource utilization and minimize cooling costs for the cloud-enabled IIoT environment, as shown in fig. 5.
5) The number of hosts is turned off: the reactivated host directly affects power consumption. If the number thereof increases, the power consumption also increases. The host will reactivate when assigned to a new D2M service and shut down when idle is detected. FIG. 6 analyzes and compares the results of the simulation for the number of host shutdowns. In total, simulation results of ETV schemes were compared to KMI-MR, KMI-MP, RANDOM, and PABFD for the number of host shutdowns. In the 03-Mar experiment, the algorithms KMI-MR, KMI-MP, PABFD, RANDOM, and ETV host shut down times were 1950, 1800, 2200, 2500, and 1500, respectively. In other words, proposed solution (ETV) SLA violations were 23%, 16%, 31% and 40% less than KMI-MR, KMI-MP, PABFD and RANDOM, respectively. The following figure shows that the proposed solution (ETV) is more efficient than the KMI-MR, KMI-MP, PABFD and RANDOM methods, due to the smaller number of hosts that are reactivated. In this simulation setup, we use only 800 hosts. However, the number of hosts that are shut down exceeds 800 due to the reactivation of the host. The proposed scheme significantly reduces the number of host reactivations compared to the KMI-MR, KMI-MP, PABFD and RANDOM methods, as shown in FIG. 6.