Monday, April 14, 2014


Trying to read papers... 
read paper on deadline provisioning with Aneka cloud...

Sunday, April 13, 2014

understanding the Code for datacenter, host and VM's


Trying to understand how to simulate datacenter with host and VM's
According to the example problem,
A simple example showing how to create a datacenter with one host and run one cloudlet on it.

To create a datacentre:
Create host list and PE list, add the PE list to the host list and add that to the datacentre.
host has
  • hostID - 0
  • ram - 2048MB
  • storage: 1000000 (host storage)
  • bw - 10000
1.  PE list : need to store Pe id and MIPS Rating
  • mips : 1000
List<Pe> peList = new ArrayList<Pe>();
int mips = 1000;
peList.add(new Pe(0, new PeProvisionerSimple(mips)));

2.  List<Host> hostList = new ArrayList<Host>();
 new Host(    hostId,
    new RamProvisionerSimple(ram),
    new BwProvisionerSimple(bw),
    storage,
    peList,
    new VmSchedulerTimeShared(peList)
   )
  );

3.  Add datacentre characteristics
  • arch : x86
  • os : Linux
  • vmm: Xen
  • time-zone: 10
  • cost per sec : 3
  • cost per Memory : 0.05
  • cost per Storage : 0.001
  • cost per bw : 0.0
DatacenterCharacteristics characteristics = new DatacenterCharacteristics(
    arch, os, vmm, hostList, time_zone, cost, costPerMem,
    costPerStorage, costPerBw);


4.  Create a datacentre
   datacenter = new Datacenter(name, characteristics, new VmAllocationPolicySimple(hostList), storageList, 0);

VmAllocationPolicySimple is an VmAllocationPolicy that chooses, as the host for a VM, the host with less PEs in use.
5.  Create VM list ( in this case 1)
  • vmid : 0
  • mips : 1000
  • size : 10000
  • ram: 512
  • bw : 1000
  • pesnumber : 1
  • vmm: Xen
Vm vm = new Vm(vmid, brokerId, mips, pesNumber, ram, bw, size, vmm, new CloudletSchedulerTimeShared()); 
vmlist.add(vm);
broker.submitVmList(vmlist); 

Friday, April 11, 2014

Installation of cloudsim

so like I thought I'll pen down how I installed cloudsim with netbeans.
I downloaded the jar file, cloudsim 3.0.2.
I installed the library with Netbeans.
I used these instructions in order to install cloudsim with Netbeans
http://cloudsim-setup.blogspot.in/2012/01/cloudsim-installation-with-netbeans.html

I did something else to make it run but I forgot what... initially it wasn't running properly.

Ex 1 : how to create a datacenter with one host and run one cloudlet on it.

1. Initialize the cloudsim package, it should be called before creating any entities.
2.  Create a datacenter.... they are resource providers... at least one is required
3.  create broker....
4.  Create one virtual machine.
     a.  Give VM description, vmid, mips, image size, ram, bw, number of PC's, VM name
     b.  Create vM by calling the constructor.
     c.  Add VM to the VM list
     d. submit the list to the broker.
5.  Create one cloudlet.
    a.  create cloudlet properties: id, length, file size, output size, utilization model
    b.  set user id to the broker id
    c.  set VM id
    d.  add cloudlet to list
    e.  submit cloudlet list to broker.
6.  Start and stop the simulation
7.  Print results when simulation is over.
     print the debt of each user to each datacenter.

Creating the datacenter

1.  Create a list to store our machine
2.  a machine contains one or more PE's(processing elements) or CPU/cores.  in this example 1
3.  Create PE's and add these to a list.
4.  Create host with its id and list of PE's and add them to the list.
5.  Create a datacenter Characteristics object that stores the properties of the  datacenter: architecture, OS, list of m/c, allocation policy: time or space shared, time zone and its price.
     set the timezone
     set the cost of processing in this resource.
     cost of using memory in this resource
     cost of using storage in this resource
     cost of using bw in this resource
6.  Create a PowerDatacenter object

Creating the broker
according to our specifications

Print the log