Activation Host

33 views
Skip to first unread message

艾可

unread,
Dec 9, 2022, 12:28:50 PM12/9/22
to CloudSim Plus: Cloud Simulation Framework

Parameter

4 host, 4 pes for each

4 vm 4 pes for each

4 cloudlet 4 pes for each

VmAllocationPolicyBestFit


I want to create a Datacenter with all Hosts powered off, and create vms and cloudlets that one Cloudlet for each VM.

When simulation start, I find host not open together. insteadit open one by one. I think the reason is broker don’t know how many vms the opening host can put. It open one and place a vm, then find not enough, then open other one.

After it open all hosts and place all vms, it will Send Cloudlets to Vms. That means all cloudlet start after last host turn on.

 

My question is: Sending Cloudlet to Vm must happen after place all vms? Can I send a cloudlet to a vm after a vm is placed in host and start running. Rather than wait all vms place completely.

Manoel Campos

unread,
Dec 12, 2022, 3:39:22 PM12/12/22
to clouds...@googlegroups.com
Check https://github.com/cloudsimplus/cloudsimplus-examples/blob/master/src/main/java/org/cloudsimplus/examples/power/HostActivationExample.java for more details.

Manoel Campos da Silva Filho Software Engineer

Computer Science and Engineering Ph.D. Student at University of Beira Interior (Portugal)

Professor at Federal Institute of Education, Science and Technology of Tocantins (Brazil)

http://manoelcampos.com


 about.me


On Mon, Dec 12, 2022 at 5:38 PM Manoel Campos <manoel...@gmail.com> wrote:

Hello


On Fri, Dec 9, 2022 at 2:28 PM 艾可 <irnais.0...@gmail.com> wrote:
 

I want to create a Datacenter with all Hosts powered off, and create vms and cloudlets that one Cloudlet for each VM.

When simulation start, I find host not open together. insteadit open one by one.

If you want to create the Datacenter with all Hosts powered off, they will startup on demand, as VMs are placed into some Host.
In actual cloud infrastructures, it doesn't make sense to start Hosts which are not being used yet.

I think the reason is broker don’t know how many vms the opening host can put. It open one and place a vm, then find not enough, then open other one.

Exactly. 

After it open all hosts and place all vms, it will Send Cloudlets to Vms. That means all cloudlet start after last host turn on.

I'm not sure about that. You have to check the simulation logs.  

My question is: Sending Cloudlet to Vm must happen after place all vms?

You can send cloudlets at any time you desire. If its VM is not placed yet, such cloudlets are delayed. 

Can I send a cloudlet to a vm after a vm is placed in host and start running. Rather than wait all vms place completely.

You can use the Vm.vm.addOnHostAllocationListener as below, where inside the brackets you put your code to submit cloudlets:
 
vm.addOnHostAllocationListener(info -> {

});

--
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: Cloud Simulation Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloudsimplus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloudsimplus/7804bc11-43fa-4155-9298-1ef8476e3f29n%40googlegroups.com.

Manoel Campos

unread,
Dec 12, 2022, 3:40:32 PM12/12/22
to clouds...@googlegroups.com

Hello


On Fri, Dec 9, 2022 at 2:28 PM 艾可 <irnais.0...@gmail.com> wrote:
 

I want to create a Datacenter with all Hosts powered off, and create vms and cloudlets that one Cloudlet for each VM.

When simulation start, I find host not open together. insteadit open one by one.

If you want to create the Datacenter with all Hosts powered off, they will startup on demand, as VMs are placed into some Host.
In actual cloud infrastructures, it doesn't make sense to start Hosts which are not being used yet.

I think the reason is broker don’t know how many vms the opening host can put. It open one and place a vm, then find not enough, then open other one.

Exactly. 

After it open all hosts and place all vms, it will Send Cloudlets to Vms. That means all cloudlet start after last host turn on.

I'm not sure about that. You have to check the simulation logs.  

My question is: Sending Cloudlet to Vm must happen after place all vms?

You can send cloudlets at any time you desire. If its VM is not placed yet, such cloudlets are delayed. 

Can I send a cloudlet to a vm after a vm is placed in host and start running. Rather than wait all vms place completely.

You can use the Vm.vm.addOnHostAllocationListener as below, where inside the brackets you put your code to submit cloudlets:

艾可

unread,
Dec 13, 2022, 2:47:30 AM12/13/22
to CloudSim Plus: Cloud Simulation Framework
thank you for answer. there is another question: i use "host.getCpuUtilizationStats().getMean()*100" to calculate the host CPU Utilization mean like example. but the result is not as expected. for example: i create VM fully use resource of a host, and run a cloudlet with all vm's resource by "UtilizationModelFull()". however the CPU Utilization mean is not 100%, it is 50%. can you explain the logic of calculate the host CPU Utilization mean in cloudsim++?
best wish
Reply all
Reply to author
Forward
0 new messages