Monday, June 22, 2015

Cloudsim : MinET and MinCT

MinET(Minimum Execution Time )

As expected in MET all the cloudlets got allotted to VM #0 'cos that's having the minimum execution time with 82000 mips but because we do not consider the load already allocated to it, all the tasks get allotted to it...

Some observations:


  • When size ratio is more, in BoT 5, it is 13 (more number of small tasks), MET performs better than {StoL, R}.
  • In all other cases the performance is not good.


MinCT (Minimum Completion Time)


Now to determine which machine gives earliest completion time(MCT) and the trick here is we should know when the machine will be ready after completing the task at hand and then allot.

So, I had to do a substantial amount of tinkering around in cloudsim to get this thing to work properly...

What i did initially...
I modified the submitCloudlets() method in myDataCenterBroker class by manually calculated the expected finish time....
but the problem was...
in this method, the cloudlets just get submitted... at maybe 0.1 in cloudsim clock time....
No cloudlets begin execution in vm and hence it is impossible to calculate the expected finishing time for which you need to know the current number of cloudlets in the vm,,,

Solution :
I still sent the cloudlets to randomly assigned VM's...
I extended the Datacenter class to create a myDatacenter class.
So in the processCloudletSubmit method is where the cloudlets are submitted to the cloudlet scheduler.

before that happens, I calculate the vm which will give the minimum expected completion time.

for(Vm vm : getVmList()){
                    
            CloudletScheduler scheduler1 = vm.getCloudletScheduler();
           Log.printLine("No. of Currently running cloudlets in VM #"+vm.getId()+" :"+ scheduler1.runningCloudlets());
             Log.printLine("Estimated finish time in VM #"+vm.getId()+" :"+
                             scheduler1.updateVmProcessing(CloudSim.clock(), scheduler1.getCurrentMipsShare()));
                     
          double eft = scheduler1.updateVmProcessing(CloudSim.clock(), scheduler1.getCurrentMipsShare());
      if(vm.getId()==0)
            mineft = scheduler1.updateVmProcessing(CloudSim.clock(), scheduler1.getCurrentMipsShare());
                     
                     if(eft <mineft){
                         mineft=eft;
                         minVmId = vm.getId();
                     }
                }


Then I reassign the vm id to that particular cloudlet to minVmId....

The output will look something like this, for one of the cloudlets submitted...

No. of Currently running cloudlets in VM #0 :7
Estimated finish time in VM #0 :4295.208414634147
No. of Currently running cloudlets in VM #1 :6
Estimated finish time in VM #1 :4295.20812244898
No. of Currently running cloudlets in VM #2 :4
Estimated finish time in VM #2 :4295.22676923077
No. of Currently running cloudlets in VM #3 :15
Estimated finish time in VM #3 :4295.203269230769
No. of Currently running cloudlets in VM #4 :20
Estimated finish time in VM #4 :4295.20076923077
No. of Currently running cloudlets in VM #5 :33
Estimated finish time in VM #5 :4295.200000000001
No. of Currently running cloudlets in VM #6 :1
Estimated finish time in VM #6 :4295.200000000001
No. of Currently running cloudlets in VM #7 :1
Estimated finish time in VM #7 :4295.200000000001
No. of Currently running cloudlets in VM #8 :1
Estimated finish time in VM #8 :4295.200000000001
No. of Currently running cloudlets in VM #9 :1
Estimated finish time in VM #9 :4295.200000000001
4295.1 @ Minimum EFT is VM #5

What I did later :
I didn't override the submitcloudlets method in myDatacenterBroker 'cos I don't need to assign any VM to it.... I just let it do whatever it does by default.

I did an override on the processCloudletSubmit in myDatacenter directly... seems to work fine...

 Some observations


  • For BoT 5 where the size ratio is 13 (where the number of small tasks are more), {LtoS, MinCT} performs much better compared to all other scheduling algorithms.
  • The same can be observed in BoT 7 where the size ratio is 7.
  • I think I can safely conclude that if there is a system in heterogeneous computing with very high MIPS compared to the rest ordering the tasks LtoS gives good results because... obviously, those tasks get assigned to the most powerful machine first and they get executed first.


No comments:

Post a Comment