Questions on the SingleThreshold example of CloudSim

428 views
Skip to first unread message

Agustin

unread,
Sep 28, 2010, 9:51:09 AM9/28/10
to cloudsim, accam...@scc.uned.es, aro...@scc.uned.es, sr...@scc.uned.es
Hi all,

I have some doubts regarding the SingleThreshold example of CloudSim.
I've modified the example to make it easier, since there were a lot
of VMs and cloudlets with different features blurring the example. Now
I have 2 VMs (all of them with 1000 MIPS Rating) and 2 cloudlets (with
the original parameters of the example). Also, all the PEs of the
datacenter have 3000 MIPS.

Here I include a sample of the output of the example. What I don't
understand is the following:

- What's is the meaning of the "requested" MIPS for a VM? (e.g. "5.00:
Total allocated MIPS for VM #0 (Host #0) is 870.59, was requested
870.59 out of total 1000.00 (87.06%)"). In this line, I see that there
is a VM with 1000 MIPS, but why have only 870.59 been requested?

- What does "Restored VM #1 on host #0" mean? I see that VMs have been
created in the host 0, so what is the usefulness of this?

- Also, right after restoring VM 1 in host 0 I get this message:
"Migration of VM #1 from Host #0 to Host #1 is started".
Considering that there is only 2 VMs with the features mentioned above
and the host utilization is 40.77%, why does the migration take place?
Is it really needed?

- What does "Under allocated MIPS for VM #1: requested
70.98254313342723, allocated 63.88428882008451" mean? How are MIPS
allocated? This is related to the first point mentioned above.

>>>> Sample output:

0.00: VM #0 has been allocated to the host #0
0.00: VM #1 has been allocated to the host #0
0.0: Broker: VM #0 has been created in Datacenter #2, Host #0
0.0: Broker: VM #1 has been created in Datacenter #2, Host #0
...
5.00: Host #0
5.00: Total allocated MIPS for VM #0 (Host #0) is 870.59, was
requested 870.59 out of total 1000.00 (87.06%)
5.00: Total allocated MIPS for VM #1 (Host #0) is 352.46, was
requested 352.46 out of total 1000.00 (35.25%)
5.00: Host #0 utilization is 40.77%
...
VM #0 allocated to host #0
VM #1 allocated to host #1
Restored VM #0 on host #0
Restored VM #1 on host #0
5.00: Migration of VM #1 from Host #0 to Host #1 is started
...
10.00: Host #0
10.00: Total allocated MIPS for VM #0 (Host #0) is 110.04, was
requested 110.04 out of total 1000.00 (11.00%)
Under allocated MIPS for VM #1: requested 637.9470589427116, allocated
574.1523530484404
10.00: Total allocated MIPS for VM #1 (Host #0) is 574.15, was
requested 637.95 out of total 1000.00 (63.79%)
VM #1 is in migration
10.00: Host #0 utilization is 24.93%

10.00: Host #1
10.00: Host #1 utilization is 0.00%
...
VM #0 allocated to host #0
Restored VM #0 on host #0
Restored VM #1 on host #0
...
15.00: Host #0
15.00: Host #0 utilization is 24.93%
15.00: Host #0 energy is 960.52 W*sec
15.00: Host #1
15.00: Host #1 utilization is 0.00%
15.00: Host #1 energy is 0.00 W*sec
...
15.00: Host #0
15.00: Total allocated MIPS for VM #0 (Host #0) is 619.47, was
requested 619.47 out of total 1000.00 (61.95%)
Under allocated MIPS for VM #1: requested 70.98254313342723, allocated
63.88428882008451
15.00: Total allocated MIPS for VM #1 (Host #0) is 63.88, was
requested 70.98 out of total 1000.00 (7.10%)
VM #1 is in migration
15.00: Host #0 utilization is 23.02%
...
VM #0 allocated to host #0
Restored VM #0 on host #0
Restored VM #1 on host #0
...

<<<<

Thanks a lot for your help.

Regards,

Agustin

Anton Beloglazov

unread,
Oct 3, 2010, 7:59:17 AM10/3/10
to clou...@googlegroups.com, accam...@scc.uned.es, aro...@scc.uned.es, sr...@scc.uned.es, Rodrigo Neves Calheiros
Hi Agustin,

Sorry for taking long to reply. Here are the answers to your questions:

1. In the example you are looking at, each Cloudlet gets an instance of the UtilizationModelStochastic class as their utilization models. What this means is that a Cloudlet doesn't use all the available CPU capacity (1000 MIPS) all the time. Each time frame the CPU utilization is generated according to the uniform distribution - at each time frame a Cloudlet may consume from 0 to 1000 MIPS. The "requested MIPS" mean the amount of MIPS that are requested by a VM according to its current CPU utilization. The purpose of this particular example is to perform continuous consolidation of VMs to minimize the number of physical nodes (hosts) in use. VMs are dynamically consolidated using live migration according to their current CPU usage (which is random from 0 to 1000 MIPS). Therefore, it may happen that due to consolidation, VMs will not get the requested CPU capacity and will be allocated with a smaller amount. The "allocated MIPS" mean the amount of MIPS that are actually allocated for a VM.

2. The "Restored... " message is not actually related to the simulation scenario itself, it's given due to the way the VM reallocation policy is implemented. At each time frame, this policy (PowerVmAllocationPolicySingleThreshold::optimizeAllocation()) fist saves the current placement of VMs on physical nodes, cleans the current allocation, then allocates all the VMs again to minimize the number of hosts. After that, the policy finds a set of VMs that have to be migrated to achieve this new allocation. Once this set is found, the created allocation is cleaned again, and the saved allocation is restored. That is why you see messages about restored VMs.

3. A migration is initiated if it is possible to obtain a VM placement that reduces the number of hosts. So the migration you've mentioned has been started because the VMs could be consolidated to a single host.

4. An "under-allocation" occurs when the requested MIPS cannot be allocated. Another reason is the way the performance degradation due to migration is modelled. When a VM is being migrated, it is modelled to experience a 10% performance degradation; therefore, just 90% of the requested MIPS are allocated to the VM.

I hope this information is useful. Please feel free to ask any other question you may get.

Best regards,
Anton

2010/9/28 Agustin <superc...@gmail.com>

Anton Beloglazov

unread,
Oct 4, 2010, 10:10:59 AM10/4/10
to Agustin Caminero, clou...@googlegroups.com, aro...@scc.uned.es, sr...@scc.uned.es, Rodrigo Neves Calheiros
Hi Agustin,

You are right, these VMs should fit to a single host. Could you please send me your modified example? Probably, the reason is in a low threshold value, or some other resource constraints. I need to check the code to answer you.

Best regards,
Anton

2010/10/4 Agustin Caminero <accam...@scc.uned.es>
Hi Anton,

Thanks for your answers but I still don't understand why the VM 1 is migrated in this example.

Considering that I have 1 datacenter with 10 hosts, each of the PEs in the example have 3000 MIPS, VMs have 1000 MIPS Rating, and I have 2 VMs, both VM 0 and 1 should fit in one single host (and there would be room for one more VM of the same size). But still VM 1 is migrated from host 0 to host 1. Why is VM 1 migrated?

Thanks a lot for ur valuable help

Agustin
2010/9/28 Agustin <superc...@gmail.com <mailto:superc...@gmail.com>>

--
Dr. Agustin Caminero
Assistant Professor
Dept. of Communication and Control Systems
The National University of Distance Education
Madrid. Spain
E-Mail:accam...@scc.uned.es
Phone: +34 913 989 468
http://www.uned.es

Agustin Caminero

unread,
Nov 2, 2010, 5:46:21 AM11/2/10
to Anton Beloglazov, Agustin Caminero, clou...@googlegroups.com, aro...@scc.uned.es, sr...@scc.uned.es, Rodrigo Neves Calheiros
Hi,

Not sure if this email arrived properly, I resend it.

Thanks a lot for ur help,

Regards

Agustin

On 10/04/2010 04:27 PM, Agustin Caminero wrote:
> Here it is


>
> On 10/04/2010 04:10 PM, Anton Beloglazov wrote:
>> Hi Agustin,
>>

>> You are right, these VMs should fit to a single host. Could you please
>> send me your modified example? Probably, the reason is in a low
>> threshold value, or some other resource constraints. I need to check the
>> code to answer you.
>>
>> Best regards,
>> Anton
>>
>> 2010/10/4 Agustin Caminero <accam...@scc.uned.es

>> <mailto:accam...@scc.uned.es>>

>> <mailto:superc...@gmail.com> <mailto:superc...@gmail.com

>> E-Mail:accam...@scc.uned.es <mailto:E-Mail%3Aacca...@scc.uned.es>

SingleThreshold.java

Anton Beloglazov

unread,
Nov 14, 2010, 10:24:06 AM11/14/10
to Agustin Caminero, Agustin Caminero, clou...@googlegroups.com, aro...@scc.uned.es, sr...@scc.uned.es, Rodrigo Neves Calheiros
Hi Agustin,

Looks like there was a bug in the PowerVmAllocationPolicySingleThreshold::optimizeAllocation() method. Please try to use the attached version with the fixed policy and let me know if you find any other problems.

Thanks,
Anton
PowerVmAllocationPolicySingleThreshold.java

Agustin

unread,
Nov 16, 2010, 6:03:29 AM11/16/10
to cloudsim, accam...@scc.uned.es, sr...@scc.uned.es, aro...@scc.uned.es
Hi Anton,

I've tryed the same example, and at first seems it works. But some bug
still remains since I get this message: "Received 0 cloudlets".
Also, the cloudlet information (after "========== OUTPUT ==========")
shows no cloudlets.

Thanks a lot for all ur help,

Regards,

Agustin

On 14 nov, 16:24, Anton Beloglazov <anton.belogla...@gmail.com> wrote:
> Hi Agustin,
>
> Looks like there was a bug in the
> PowerVmAllocationPolicySingleThreshold::optimizeAllocation()
> method. Please try to use the attached version with the fixed policy and let
> me know if you find any other problems.
>
> Thanks,
> Anton
>
> On Tue, Nov 2, 2010 at 3:16 PM, Agustin Caminero <supercocon...@gmail.com>wrote:
>
> > Hi,
>
> > Not sure if this email arrived properly, I resend it.
>
> > Thanks a lot for ur help,
>
> > Regards
>
> > Agustin
>
> > On 10/04/2010 04:27 PM, Agustin Caminero wrote:
>
> >> Here it is
>
> >> On 10/04/2010 04:10 PM, Anton Beloglazov wrote:
>
> >>> Hi Agustin,
>
> >>> You are right, these VMs should fit to a single host. Could you please
> >>> send me your modified example? Probably, the reason is in a low
> >>> threshold value, or some other resource constraints. I need to check the
> >>> code to answer you.
>
> >>> Best regards,
> >>> Anton
>
> >>> 2010/10/4 Agustin Caminero <accamin...@scc.uned.es
> >>> <mailto:accamin...@scc.uned.es>>
> >>> 2010/9/28 Agustin <supercocon...@gmail.com
> >>> <mailto:supercocon...@gmail.com> <mailto:supercocon...@gmail.com
> >>> <mailto:supercocon...@gmail.com>>>
> >>> E-Mail:accamin...@scc.uned.es <E-Mail%3Aaccamin...@scc.uned.es> <mailto:
> >>> E-Mail%3Aaccamin...@scc.uned.es <E-Mail%253Aaccamin...@scc.uned.es>>
> >>> Phone: +34 913 989 468
> >>>http://www.uned.es
>
>
>
>  PowerVmAllocationPolicySingleThreshold.java
> 11 KVerDescargar

Anton Beloglazov

unread,
Nov 16, 2010, 6:21:47 AM11/16/10
to clou...@googlegroups.com, accam...@scc.uned.es, sr...@scc.uned.es, aro...@scc.uned.es
Hi Agustin,

Try to replace the attached class as well. I've fixed something there, but haven't tried it with your case. Probably it will help, let me know if not.

Best regards,
Anton
PowerDatacenter.java

Agustin

unread,
Nov 17, 2010, 4:18:04 AM11/17/10
to cloudsim
Hi Anton,

At first, seems the code works fine.

Thanks a lot for ur help

Agustin

On 16 nov, 12:21, Anton Beloglazov <anton.belogla...@gmail.com> wrote:
> Hi Agustin,
>
> Try to replace the attached class as well. I've fixed something there, but
> haven't tried it with your case. Probably it will help, let me know if not.
>
> Best regards,
> Anton
>
> > E-Mail%3Aaccamin...@scc.uned.es <E-Mail%253Aaccamin...@scc.uned.es>>
> > <mailto:
> > > >>> E-Mail%3Aaccamin...@scc.uned.es <E-Mail%253Aaccamin...@scc.uned.es><
> > E-Mail%253Aaccamin...@scc.uned.es
>
> ...
>
> leer más »
>
>  PowerDatacenter.java
> 11 KVerDescargar

Agustin

unread,
Nov 17, 2010, 5:51:23 AM11/17/10
to cloudsim, accam...@scc.uned.es, aro...@scc.uned.es, sr...@scc.uned.es
Hi Anton,

I've going through the example again, made a small modification (now
there are 6 VM and 6 cloudlets, the rest of the example is like
above), and 1 question arises.

Here is a sample output:

5.00: Host #0
5.00: Total allocated MIPS for VM #0 (Host #0) is 251.95, was
requested 251.95 out of total 1000.00 (25.20%)
5.00: Total allocated MIPS for VM #1 (Host #0) is 687.94, was
requested 687.94 out of total 1000.00 (68.79%)
5.00: Total allocated MIPS for VM #2 (Host #0) is 695.11, was
requested 695.11 out of total 1000.00 (69.51%)
5.00: Host #0 utilization is 54.50%

5.00: Host #1
5.00: Total allocated MIPS for VM #3 (Host #1) is 821.67, was
requested 821.67 out of total 1000.00 (82.17%)
5.00: Total allocated MIPS for VM #4 (Host #1) is 118.17, was
requested 118.17 out of total 1000.00 (11.82%)
5.00: Total allocated MIPS for VM #5 (Host #1) is 98.10, was requested
98.10 out of total 1000.00 (9.81%)
5.00: Host #1 utilization is 34.60%
...

5.00: Migration of VM #3 from Host #1 to Host #0 is started
5.00: Migration of VM #4 from Host #1 to Host #0 is started
5.00: Migration of VM #5 from Host #1 to Host #0 is started

Considering that the utilizationThreshold is 0.8 (in other words,
80%), and utilizations of both hosts add 54.50 + 34.60 = 89.1%, I
don't understand why VMs 3 to 5 are migrated, since after the
migration host 0 would be overloaded (its load would be above the
utilization threshold).

Best regards,

Agustin
> ...
>
> leer más »

Anton Beloglazov

unread,
Nov 17, 2010, 9:24:50 AM11/17/10
to clou...@googlegroups.com, accam...@scc.uned.es, aro...@scc.uned.es, sr...@scc.uned.es
Hi Agustin,

Looks like there is another bug in the PowerVmAllocationPolicySingleThreshold class. I'll try to debug it when I have time. Or if you want, you can try to debug it yourself, it will help to understand how it works. If you happen to find a solution, please post it back here.

Thanks,
Anton
Reply all
Reply to author
Forward
0 new messages