Information Technology Reference
In-Depth Information
Algorithm 2.
EPOBF: Core EPOBF algorithm for energy-aware VM allocation
in HPC Clouds
1:
function
Epobf
2:
Input:
vmList - a sorted list of virtual machines to be scheduled
3:
Input:
hostList - a list of physical servers
4:
Output:
mapping (a feasible schedule) or null
5:
for
vm ∈ vmList
do
6: host = FindHostForVmByGreenMetric(vm, hostList);
7: CloudSim.allocationMap.put(vm.getId(),host.getId());
8:
end for
9: Return mapping
10:
end function
11:
function
FindHostForVmByGreenMetric
12:
Input:
vm - a virtual machine
13:
Input:
hostList - a list of physical servers
14:
Output:
bestHost - a best host for allocation of the
vm
15:
bestHost = null
16:
maxG = 0
17:
CandidateHosts = findCandidateHosts(vm, hostList);
18:
for
h ∈ CandidateHosts
do
19:
if
h
.checkAvailableResource( vm )
then
20:
Available resources of the host
h
has enough the vm's requested resources
21:
if
h
.isOverUtilizedAfterAllocationVm( vm )
then
22:
host
h
is over utilized after allocation the
vm
23:
continue
24:
end if
25:
h.vmCreate(vm)
begin test
26:
G[h] = h.TotalMIPS / h.GetPower(1);
27:
h.vmDestroy(vm)
end test
if
(maxG
<
G[h] )
then
28:
29:
maxG = G[h]
30:
bestHost = h
31:
end if
Next iterate over set of candidate host
32:
end if
33:
if
(bestHost != null)
then
34:
allocate the
vm
to the
host
35:
add the pair of
vm
(key) and
host
to the
mapping
36:
end if
37:
end for
end for host list
38: return
mapping
39:
end function
assigns each ready virtual machine
]
value. Algorithm
1
shows the pseudo-code for the EPOBF-ST and EPOBF-FT
and Algorithm
2
shows the pseudo-code for the main core of the EPOBF.
In the Algorithm
1
, the EPOBF-ST sorts all VMs by earliest starting time
first (line
5
) and the EPOBF-FT sorts all VMs by earliest finishing time first
(line
12
).
v
to the host
h
that has maximum
G
[
h
Search WWH ::
Custom Search