Monday, June 16, 2014

Simulation Architecture in Iqbal et al

So, had a little problem with the code:
 The objective is  to simulate 1 data   center and 6 processing elements (PE's) in cloudsim

The examples available in cloudsim are
Ex 1: 1 data center, 1 host, 1 cloudlet
Ex 2 : 1 data center, 1 host, 2 cloudlets
Ex 3:  1 data center, 2 hosts, 2 cloudlets
Ex 4: 2 data centers, 1 host each, 2 cloudlets
Ex 5:  2 data centers, 1 host each, cloudlets of 2 users.
Ex 6 : creating scalable simulations
Ex 7: to pause and resume simulations, create simulation entities dynamically.
Ex 8:  create simulation entities during runtime.


So I think i'll write code to simulate the PE's first and then go from there.

Encountered a new error...
 Unsupported major.minor version 51.0 trying to resolve that...

Resolved, currently, JDK 1.6 is the library used, so i changed it to JDK 1.7, found this useful,
https://netbeans.org/kb/docs/java/javase-jdk7.html

Items to consider:
I want to simulate the number of VMs in each PE... don't know how to do that...
 I don't know what is the debt that is calculater either...
Here is the sample output for 2 cloudlet with 400,000 MI and a file size of 300 bytes.

========== OUTPUT ==========
Cloudlet ID    STATUS    Data center ID    VM ID    Time    Start Time    Finish Time
    0              SUCCESS             2                   0          400         0.1               400.1
*****Datacenter: Datacenter_0*****
User id        Debt
3                35.6
**********************************
  • Time : stands for getActualCPUTime() -  couldn't find the units... can't be sec so am assuming its milliseconds... so .4 sec
  • Data center ID, obtained by getResourceID(), the resource that processes the cloudlet. (why is it 2???.... no idea...).
  • printDebts() - prints the debts
    • costPerMem = 0.05, RAM on VM is 512, 0.05*512= 25.6
    • costPerStorage = 0.001, size is 10000, 0.001*10000= 10
    • Debt = 25.6 + 10
Notes 
 cost for processing = 3, seems to be left out in debt calculation
costPerBw -is used when transfer of files is involved, so it is set to 0.0..


 Found this post useful..."How are debts calculated..."

Code so far
  • Create 6 nodes as 6 hosts with the corresponding no. of Pe's
  • Created a datacenter
  • Created a broker
  • Created 10 VM's for 10 Pe's
  • Created 2 cloudlets with same size
Sample Output

Starting simulation...
Initialising...
Topology file: topology.brite
Problem in processing BRITE file. Network simulation is disabled. Error: topology.brite (The system cannot find the file specified)
Starting CloudSim version 3.0
Datacenter_0 is starting...
Broker is starting...
Entities started.
0.0: Broker: Cloud Resource List received with 1 resource(s)
0.0: Broker: Trying to Create VM #0 in Datacenter_0
0.0: Broker: Trying to Create VM #1 in Datacenter_0
0.0: Broker: Trying to Create VM #2 in Datacenter_0
0.0: Broker: Trying to Create VM #3 in Datacenter_0
0.0: Broker: Trying to Create VM #4 in Datacenter_0
0.0: Broker: Trying to Create VM #5 in Datacenter_0
0.0: Broker: Trying to Create VM #6 in Datacenter_0
0.0: Broker: Trying to Create VM #7 in Datacenter_0
0.0: Broker: Trying to Create VM #8 in Datacenter_0
0.0: Broker: Trying to Create VM #9 in Datacenter_0
0.1: Broker: VM #0 has been created in Datacenter #2, Host #3
0.1: Broker: VM #1 has been created in Datacenter #2, Host #4
0.1: Broker: VM #2 has been created in Datacenter #2, Host #5
0.1: Broker: VM #3 has been created in Datacenter #2, Host #6
0.1: Broker: VM #4 has been created in Datacenter #2, Host #0
0.1: Broker: VM #5 has been created in Datacenter #2, Host #1
0.1: Broker: VM #6 has been created in Datacenter #2, Host #2
0.1: Broker: VM #7 has been created in Datacenter #2, Host #3
0.1: Broker: VM #8 has been created in Datacenter #2, Host #4
0.1: Broker: VM #9 has been created in Datacenter #2, Host #5
0.1: Broker: Sending cloudlet 0 to VM #0
0.1: Broker: Sending cloudlet 1 to VM #1
400.1: Broker: Cloudlet 0 received
400.1: Broker: Cloudlet 1 received
400.1: Broker: All Cloudlets executed. Finishing...
400.1: Broker: Destroying VM #0
400.1: Broker: Destroying VM #1
400.1: Broker: Destroying VM #2
400.1: Broker: Destroying VM #3
400.1: Broker: Destroying VM #4
400.1: Broker: Destroying VM #5
400.1: Broker: Destroying VM #6
400.1: Broker: Destroying VM #7
400.1: Broker: Destroying VM #8
400.1: Broker: Destroying VM #9
Broker is shutting down...
Simulation: No more future events
CloudInformationService: Notify all CloudSim entities for shutting down.
Datacenter_0 is shutting down...
Broker is shutting down...
Simulation completed.
Simulation completed.

========== OUTPUT ==========
Cloudlet ID    STATUS    Data center ID    VM ID    Time    Start Time    Finish Time
    0        SUCCESS        2            0        400        0.1        400.1
    1        SUCCESS        2            1        400        0.1        400.1
*****Datacenter: Datacenter_0*****
User id        Debt
3        356
**********************************


Work to be done tomorrow
 look up Iqbal et al paper, try to model the tasks in the form of cloudlets.

Other hiccups...
Tried to use Network Topology in cloudsim, encountered an error ,
 code executes fine... have to debug that also and check whether there are other alternatives.
Fixed... have to give entire path name for topology.brite.


No comments:

Post a Comment