how to calculate utilization and energy

1,435 views
Skip to first unread message

sagana

unread,
Apr 5, 2013, 11:50:11 PM4/5/13
to clou...@googlegroups.com
In Singlethreshold.java  energy and utilization value is printed for each virtual machine ....
how it is calculated and where ... in which part of code it is calculated and how it is generated ..
Please anybody help

madhu

unread,
Apr 6, 2013, 5:11:41 AM4/6/13
to clou...@googlegroups.com
utilization of vm mips depends on Utilizationmodel- for this example it is utilizationmodelStochastic.
based on the utilization of all vms host utilization is calculated.
based on host utilization power can be calculate for diff utilization values. using this power from last interval (like 600 to 900) energy of a host can be calculated.
this can be there in PowerDatacenter.



--
 
---
You received this message because you are subscribed to the Google Groups "cloudsim" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloudsim+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

pallavi gupta

unread,
May 16, 2013, 5:55:26 AM5/16/13
to clou...@googlegroups.com, saga...@gmail.com
  Please would you tell me where is Singlethreshold.java class in cloudsim package? Is this is in cloudsim3.0.1?

madhu

unread,
May 16, 2013, 1:26:19 PM5/16/13
to clou...@googlegroups.com
ya.its there in 3.0.1 also


--

pallavi gupta

unread,
May 17, 2013, 3:33:47 AM5/17/13
to clou...@googlegroups.com
hey madhu,
        Is this is the class for single threshold "PowerVmAllocationPolicyMigrationStaticThreshold" ?

madhu

unread,
May 17, 2013, 5:53:34 AM5/17/13
to clou...@googlegroups.com
ya.
but it is a vm allocation policy.
the threshlod value is 80 which is upper threshold value

Divya

unread,
May 17, 2013, 3:59:31 PM5/17/13
to clou...@googlegroups.com
Can anyone send me vm migration code❓

pallavi gupta

unread,
May 22, 2013, 1:26:49 PM5/22/13
to clou...@googlegroups.com
Hello,
      Many examples in the power package used the utilizationmodel stocastic which means it chooses random values for the cpu utilization(load).Is it like, irrespective of no.of vms allocated to the hosts, the utilization of that host differ?  I allocated 3 vms to 1 host and 2 vms for 2nd host. but it gives 0.48% utilization of 1st host and 8.47% of 2nd host...why?Normally by increases the no. of vms the utilization should also be increased....but this is not happened.

Please help me

madhu

unread,
May 22, 2013, 2:08:23 PM5/22/13
to clou...@googlegroups.com
this is becasue the utilization model you used for your datacenter.
i think you used(default) UtilizationModelstochastic(seed*i) somthing.
you change it to UtilizationModelFull in which case the total requires mips allocated to Vm.
in former case random values less than the requested are assigned to vm.so you are getting result what u dont want. and also it is a random function so each time it may change and you may get diff loads.
sorry if am wrong

pallavi gupta

unread,
May 22, 2013, 2:35:30 PM5/22/13
to clou...@googlegroups.com
Hi madhu,
  after changing the utilization model from stocastic to full.I am getting this...........
If utilization is zero there is no energy consumption...........
CLOUDLET_LENGTH = 2500;
CLOUDLET_PES = 1; 



New resource usage for the time frame starting at 2.60:

2.60: [Host #0] Total allocated MIPS for VM #0 (Host #0) is 0.00, was requested 0.00 out of total 1000.00 (0.00%)
2.60: [Host #0] MIPS for VM #0 by PEs (4 * 1860.0).
2.60: [Host #0] Total allocated MIPS for VM #1 (Host #0) is 0.00, was requested 0.00 out of total 2500.00 (0.00%)
2.60: [Host #0] MIPS for VM #1 by PEs (4 * 1860.0).
2.60: [Host #0] utilization is 0.00%

2.60: [Host #1] Total allocated MIPS for VM #2 (Host #1) is 0.00, was requested 0.00 out of total 1500.00 (0.00%)
2.60: [Host #1] MIPS for VM #2 by PEs (4 * 2760.0).
2.60: [Host #1] Total allocated MIPS for VM #3 (Host #1) is 0.00, was requested 0.00 out of total 1000.00 (0.00%)
2.60: [Host #1] MIPS for VM #3 by PEs (4 * 2760.0).
2.60: [Host #1] utilization is 0.00%

2.60: [Host #2] utilization is 0.00%

2.60: [Host #3] utilization is 0.00%

2.60: [Host #4] utilization is 0.00%

2.60: [Host #5] Total allocated MIPS for VM #4 (Host #5) is 0.00, was requested 0.00 out of total 1000.00 (0.00%)
2.60: [Host #5] MIPS for VM #4 by PEs (4 * 1860.0).
2.60: [Host #5] utilization is 0.00%



pallavi gupta

unread,
May 22, 2013, 3:09:29 PM5/22/13
to clou...@googlegroups.com
May be because I use default cludlet dynamic workload schedular. When I change the schedular to cloudletspace shared. I got some utilization values. Is it necessary to use cloudletdynamicworkload sheduler for power aware algorithm ?

Thanku for ur valuable time,
Thanks a lot.

madhu

unread,
May 23, 2013, 1:47:13 AM5/23/13
to clou...@googlegroups.com
ya. no need to change.
but you have to change cloudlet utilizationmodel.
here i think the problem is, your vm is not geting cpu resources, moreover their demand is 0 so they are not getting.
have you changed any code in Powerdatacnter or HostDynamic workload etc.
check once and trace the problem by changing some values

pallavi gupta

unread,
May 23, 2013, 3:23:49 AM5/23/13
to clou...@googlegroups.com
hi,
   No i didn't change any code in the Power datacenter or HostDynamic workload ..I just make my own Powervmallocation policy.
       I used  :-  NUMBER_OF_VMS = 6; NUMBER_OF_HOSTS = 5; CLOUDLET_UTILIZATION_SEED = 1;
                     SCHEDULING_INTERVAL = 50;SIMULATION_LIMIT =1000;CLOUDLET_LENGTH = 4000;CLOUDLET_PES= 1;

 VM_TYPES = 4;                                                        
 VM_MIPS = { 660, 900, 1700, 700 };
 VM_PES = { 1,1, 1, 1 };
 VM_RAM = { 500,  1600, 1740, 613 };
 VM_BW = 100000; 
 VM_SIZE = 2500;  
HOST_TYPES  =5
HOST_MIPS  = { 1860, 2660,1860,2660 ,2300};
  HOST_PES  = {4, 5, 5 ,4,3};                                              
  HOST_RAM = { 5740, 7096 ,6000,4096,3500 };
  HOST_BW = 1000000; 
  HOST_STORAGE = 100000;

 // 283 line in  dynsmic scdular ->the  ((rcl.getRemainingCloudletLength()) is-------------4000
 //283 line in dynsmic scdular ->the  ((rcl.getRemainingCloudletLength()) is-------------1000
// 283 line in dynsmic scdular ->the  ((rcl.getRemainingCloudletLength()) is-------------818
4.54: [Host #0] Total allocated MIPS for VM #0 (Host #0) is 660.00, was requested 660.00 out of total 660.00 (100.00%)
4.54: [Host #0] MIPS for VM #0 by PEs (4 * 1860.0). PE #0: 660.00.
4.54: [Host #0] Total allocated MIPS for VM #1 (Host #0) is 0.00, was requested 0.00 out of total 900.00 (0.00%)
4.54: [Host #0] MIPS for VM #1 by PEs (4 * 1860.0).
4.54: [Host #0] Total allocated MIPS for VM #2 (Host #0) is 0.00, was requested 0.00 out of total 1700.00 (0.00%)
4.54: [Host #0] MIPS for VM #2 by PEs (4 * 1860.0).
4.54: [Host #0] Total allocated MIPS for VM #3 (Host #0) is 700.00, was requested 700.00 out of total 700.00 (100.00%)
4.54: [Host #0] MIPS for VM #3 by PEs (4 * 1860.0). PE #0: 700.00.
4.54: [Host #0] utilization is 18.28%

 // 283 line in dynsmic scdular ->the  ((rcl.getRemainingCloudletLength()) is-------------1000
4.54: [Host #1] Total allocated MIPS for VM #4 (Host #1) is 660.00, was requested 660.00 out of total 660.00 (100.00%)
4.54: [Host #1] MIPS for VM #4 by PEs (5 * 2660.0). PE #0: 660.00.
4.54: [Host #1] Total allocated MIPS for VM #5 (Host #1) is 0.00, was requested 0.00 out of total 900.00 (0.00%)
4.54: [Host #1] MIPS for VM #5 by PEs (5 * 2660.0).
4.54: [Host #1] utilization is 4.96%

I'm not getting why vm1,vm2 and vm5 request 0 mips?
I used utilization model full .and cloudletdynamicworkloadshedular...
Here i uses 6 vms. when i uses 9 vms then again each host give me utilization 0.00%. why?


Thanks & regards
              

madhu

unread,
May 23, 2013, 6:16:13 AM5/23/13
to clou...@googlegroups.com
are you starting all the virtual machines at a time or you are starting some of the virtual machines later stage

pallavi gupta

unread,
May 23, 2013, 6:26:51 AM5/23/13
to clou...@googlegroups.com
 i am started all vms at the same time... 
When i changed the schduler from dynamic to space shared then i got the values for vm1,2&5.
I think this is all because of cloudlet scheduler policy........
may be...

madhu

unread,
May 23, 2013, 6:42:17 AM5/23/13
to clou...@googlegroups.com
you do one thing you use space shared for both vms and cloudlets

pallavi gupta

unread,
May 23, 2013, 7:29:41 AM5/23/13
to clou...@googlegroups.com
I am getting an error in setPeMap. vm  space shedular does not find the pes...so null pointer exception occured.. but i will try then tell u.
ok 
 thanks

pallavi gupta

unread,
May 29, 2013, 3:14:03 AM5/29/13
to clou...@googlegroups.com
hey ,
   I try my best. but when i change vm sheduler policy from time shared to space shared in power package i m getting multiple errors...........any built in example in power random class not running.........why this happen?

madhu

unread,
May 29, 2013, 1:32:11 PM5/29/13
to clou...@googlegroups.com
its better to try with very lesser number of physical machines and virtual machines like 5 pms.
you tell me which example prog u have used and where you done any changes. you send me those files.

jnana

unread,
May 30, 2013, 3:45:00 AM5/30/13
to clou...@googlegroups.com

Guys the utilization is calculated per host, and it is calculated in the HostDynamicWorkload file. It has 2 functions for calculating the utilization in the previous and the current time frame, based on these it gives u the average host utilization in the current time frame. You can manipulate these functions according to your requirement.

Venkatesh Jaisankar

unread,
Jun 24, 2013, 2:39:46 AM6/24/13
to clou...@googlegroups.com
how do i control the execution of VM's??? pls tell me the class which controls the VM execution... thank you..

Er. Vartta Siyal

unread,
Jul 29, 2013, 3:32:32 AM7/29/13
to clou...@googlegroups.com
hey, pallavi
I m also doing same, bt cudn't understand d output.... cud u plz make me understand d output, i want to make changes in vm selection policy!!! Plz reply..
thanks.
Reply all
Reply to author
Forward
0 new messages