Trying to understand BRITE files in CloudSim—the connectivity of brokers and datacentres

5 views
Skip to first unread message

Michael Kenning

unread,
Nov 9, 2018, 9:45:43 AM11/9/18
to CloudSim Plus
I am currently experimenting with the code in NetworkExample3.java and the topology.brite file that comes with the simulation software.

I wanted to understand how the edges affect the allocation of VMs to hosts in the datacentres. The node connectivity at the moment looks like this:

IMG_20181109_141219450_HDR~2.jpg


(Ignore the direction of the arrows; initially I thought the edges were directed, but apparently they aren't.)

In NetworkExample3, two brokers are set up along with two datacentres. Each datacentre contains one host. Each broker has one cloudlet to assign. When the simulation is finished, the cloudlets will have been executed each on a separate datacentre.

In the above picture, nodes 0 and 2 correspond to Datacenters 1 and 2 respectively; nodes 3 and 4 correspond to Brokers 3 and 4 respectively.

This is the output of a run:

Starting NetworkExample3
INFO  Starting CloudSim Plus 4.0.4
INFO  DatacenterSimple1 is starting...
INFO  DatacenterSimple2 is starting...
INFO  DatacenterBrokerSimple3 is starting...
INFO  DatacenterBrokerSimple4 is starting...
INFO  Entities started.
INFO  0.0: DatacenterBrokerSimple3: List of 2 datacenters(s) received.
INFO  0.0: DatacenterBrokerSimple3: Trying to Create Vm 0/Broker 3 in DatacenterSimple1
INFO  0.0: DatacenterBrokerSimple4: List of 2 datacenters(s) received.
INFO  0.0: DatacenterBrokerSimple4: Trying to Create Vm 1/Broker 4 in DatacenterSimple1
INFO  3.0: VmAllocationPolicySimple: Vm 1/Broker 4 has been allocated to Host 0/DC 1
WARN  3.9: VmAllocationPolicySimple: No suitable host found for Vm 0/Broker 3 in Datacenter 1
INFO  6.1: DatacenterBrokerSimple4: Sending Cloudlet 1 to Vm 1/Broker 4 in Host 0/DC 1.
INFO  6.1: DatacenterBrokerSimple4: All waiting Cloudlets submitted to some VM.
INFO  7.9: DatacenterBrokerSimple3: Trying to Create Vm 0/Broker 3 in DatacenterSimple2 (due to lack of a suitable Host in previous one)
INFO  12.9: VmAllocationPolicySimple: Vm 0/Broker 3 has been allocated to Host 0/DC 2
INFO  18.0: DatacenterBrokerSimple3: Sending Cloudlet 0 to Vm 0/Broker 3 in Host 0/DC 2.
INFO  18.0: DatacenterBrokerSimple3: All waiting Cloudlets submitted to some VM.
INFO  172.1: DatacenterBrokerSimple4: Cloudlet 1 finished and returned to broker.
INFO  188.0: DatacenterBrokerSimple3: Cloudlet 0 finished and returned to broker.
INFO  188.0: Processing last events before simulation shutdown.
INFO  188.0: DatacenterBrokerSimple3 is shutting down...
INFO  188.0: DatacenterBrokerSimple3: Requesting Vm 0/Broker 3 destruction.
INFO  188.0: DatacenterBrokerSimple4 is shutting down...
INFO  188.0: DatacenterBrokerSimple4: Requesting Vm 1/Broker 4 destruction.
INFO  191.00: DatacenterSimple: Vm 1/Broker 4 destroyed on Host 0/DC 1. 

INFO  193.00: DatacenterSimple: Vm 0/Broker 3 destroyed on Host 0/DC 2. 

INFO  Simulation: No more future events

INFO  CloudInformationService0: Notify all CloudSim Plus entities to shutdown.

INFO  193.0: DatacenterSimple1 is shutting down...
INFO  193.0: DatacenterSimple2 is shutting down...
INFO  
================== Simulation finished at time 193.00 ==================



                                   Broker DatacenterBrokerSimple3

Cloudlet|Status |DC|Host|Host PEs |VM|VM PEs   |CloudletLen|CloudletPEs|StartTime|FinishTime|ExecTime
      ID|       |ID|  ID|CPU cores|ID|CPU cores|         MI|  CPU cores|  Seconds|   Seconds| Seconds
-----------------------------------------------------------------------------------------------------
       0|SUCCESS| 2|   0|        1| 0|        1|      40000|          1|       23|       183|     160
-----------------------------------------------------------------------------------------------------


                                   Broker DatacenterBrokerSimple4

Cloudlet|Status |DC|Host|Host PEs |VM|VM PEs   |CloudletLen|CloudletPEs|StartTime|FinishTime|ExecTime
      ID|       |ID|  ID|CPU cores|ID|CPU cores|         MI|  CPU cores|  Seconds|   Seconds| Seconds
-----------------------------------------------------------------------------------------------------
       1|SUCCESS| 1|   0|        1| 1|        1|      40000|          1|        9|       169|     160
-----------------------------------------------------------------------------------------------------
NetworkExample3 finished!

Process finished with exit code 0


The line highlighted in red gives a warning that Vm 0/Broker 3 is unable to be assigned to Datacenter 1, presumably because Vm 1/Broker 4 is already assigned to its single host. Instead, it allocates the VM to Datacenter 2.

This is perfectly comprehensible from what I can see in the BRITE file. Broker 4 (node 4) is connected to both datacenters. Broker 3 is connected directly to 0 and indirectly (via nodes 0 and 4) to 2.

Experimentation

I decided to experiment with the BRITE file to test the effects on the programme. I removed all edges except for those connecting (1) node 3/Broker 3 to node 0/Datacenter 1, and (2) node 4/Broker 4 to node 2/Datacenter 2.

I expected to see Broker 3 assign its VM to Datacenter 1 and Broker 4 to assign its VM to Datacenter 2, without further ado. I expect this because this is how I've specified the connections in the BRITE file.

However, this is not what I see when I run the code; instead it hangs. Here's the modified topology.brite file:

Topology: ( 5 Nodes, 8 Edges )
Model (1 - RTWaxman): 5 5 5 1 2 0.15000000596046448 0.20000000298023224 1 1 10.0 1024.0

Nodes: ( 5 )
0 1 3 3 3 -1 RT_NODE
1 0 3 3 3 -1 RT_NODE
2 4 3 3 3 -1 RT_NODE
3 3 1 3 3 -1 RT_NODE
4 3 3 4 4 -1 RT_NODE


Edges: ( 8 )
1 3 0 2.8284271247461903 3.9 10.0 -1 -1 E_RT U
2 4 2 1.0 4.0 10.0 -1 -1 E_RT U

Here's the output from the execution of the programme (note that it hangs while waiting for the cloudlet result):

Starting NetworkExample3
INFO  Starting CloudSim Plus 4.0.4
INFO  DatacenterSimple1 is starting...
INFO  DatacenterSimple2 is starting...
INFO  DatacenterBrokerSimple3 is starting...
INFO  DatacenterBrokerSimple4 is starting...
INFO  Entities started.
INFO  0.0: DatacenterBrokerSimple3: List of 2 datacenters(s) received.
INFO  0.0: DatacenterBrokerSimple3: Trying to Create Vm 0/Broker 3 in DatacenterSimple1
INFO  0.0: DatacenterBrokerSimple4: List of 2 datacenters(s) received.
INFO  0.0: DatacenterBrokerSimple4: Trying to Create Vm 1/Broker 4 in DatacenterSimple1
INFO  3.9: VmAllocationPolicySimple: Vm 0/Broker 3 has been allocated to Host 0/DC 1
INFO  7.9: DatacenterBrokerSimple3: Sending Cloudlet 0 to Vm 0/Broker 3 in Host 0/DC 1.
INFO  7.9: DatacenterBrokerSimple3: All waiting Cloudlets submitted to some VM.
INFO  175.70000000000002: DatacenterBrokerSimple3: Cloudlet 0 finished and returned to broker.
WARN  1.7976931348623157E308: VmAllocationPolicySimple: No suitable host found for Vm 1/Broker 4 in Datacenter 1
INFO  Infinity: DatacenterBrokerSimple4: Trying to Create Vm 1/Broker 4 in DatacenterSimple2 (due to lack of a suitable Host in previous one)
INFO  Infinity: VmAllocationPolicySimple: Vm 1/Broker 4 has been allocated to Host 0/DC 2
INFO  Infinity: DatacenterBrokerSimple4: Sending Cloudlet 1 to Vm 1/Broker 4 in Host 0/DC 2.
INFO  Infinity: DatacenterBrokerSimple4: All waiting Cloudlets submitted to some VM.

Both brokers try to submit their cloudlets to the datacenters as above. This time, however, Broker 4 attempts to allocate its VM to the other datacenter. This time however it fails. This makes no sense to me, given that Broker should have a direct connection to the second Datacenter.

This error can be fixed adding an additional edge between any other pair of nodes—i.e., between 0 and 4, 2 and 3, or 3 and 4.

Question

Why do I not see my expected output? Is there something missing in my understanding of the BRITE file and the way that CloudSim Plus uses them?

LAHIAOUNI ABDERRAHMAN

unread,
Nov 13, 2018, 5:16:05 AM11/13/18
to clouds...@googlegroups.com
Hello Michael,

In the first scenario, if the 1 host in the first data center had enough resources to host both Vms it would have, in the second scenario i see that both Vms were allocated as you said, but it is saying infinity, ill try to explain this:
1-The brite file doesn't affect policies in any way it just define bandwidth and latencies between nodes.
2-As a result of the first point if 2 nodes try to communicate there should be an edge in Brite linking them if there is non you will experience the hanging, like the broker 4 trying to allocate its Vm to Dc1 in 2nd scenario but failed and took so much time 1.7976931348623157E308 since there is no edge between node 0 and 4 it means there is 0 bandwidth between them (this is how the simulator works) so the time to transfer a message between the 2 will be infinite.
3-An info to note in your brite file with those 2 edges there it is not possible to have spanning tree, i.e if there was an edge between 3 and 2 there would be an indirect connection between 4 and 0 and your example would have worked since the cloudsim (this existed since original cloudsim) is capable of finding indirect routes in the topology graph.
4- I repeat that your Brite never affects "default" policies unless you write some on your own that take its content in consideration.


Best regards.
 

--
If you received an answer that worked for you, please be kind and reply to let everybody knows it worked.
http://cloudsimplus.org
---
You received this message because you are subscribed to the Google Groups "CloudSim Plus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloudsim-plu...@googlegroups.com.
To post to this group, send email to clouds...@googlegroups.com.
Visit this group at https://groups.google.com/group/cloudsim-plus.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloudsim-plus/3fb3e5e1-a357-4c9c-b5e1-92fe271406ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages