Introduction to CloudSim.pdf

Document Sample
Introduction to CloudSim.pdf Powered By Docstoc
					                CloudSim
    org.cloudbus.




                      Pradeeban Kathiravelu

                      Implementation of Distributed Systems
1
                   Agenda
    
        Motivations
    
        Gridbus and Cloudbus
    
        CloudSim
    
        Scheduling in CloudSim
    
        CloudAnalyst




2
    Why Simulations?




    Image Source: http://i00.i.aliimg.com/wsphoto/v0/1400086818/22pcs-child-s-play-house-font-b-toys-b-font-2-7-year-old-Children-s.jpg
3
                 CloudSim
    
        A simulation framework
    
        Allows researchers to control every
        aspect of a Cloud environment
           – Algorithms
           – Platforms
           – Infrastructure
    
        Open Source
           – License: GNU LGPL V3.
    
        Java.
4
                 Evolution
    
        Easy to extend
    
        Gridbus → Cloudbus
    
        GridSim → CloudSim →
           – CloudAnalyst
           – GreenCloud
           – NetworkCloudSim




5
              Cloud Computing
    
        “A type of parallel and distributed
        system consisting of a collection of
        interconnected and virtualized computers
            – that are dynamically provisioned
            – presented as one or more unified
                computing resources
            – based on service-level agreements”

    
        - Buyya et al.
6
    Gridbus Middleware
       Grid computing Initiative




7
8
    Cloudbus Middleware
      Cloud computing Marketplace




9
10
     Market Oriented Cloud Computing




11
     CloudSim Architecture




12
         What can I do with CloudSim?
     
         Evaluate strategies in Cloud Computing
            – Policies
            – Scheduling Algorithms
            – Mapping
            – Load Balancing Policies
     
         Simulate my own cloud environment.
     
         Build solutions
            – CloudAnalyst

13
         What CloudSim can NOT do?
     
         Run actual applications for real.
     
         Run on its own.
     
         Can be a replacement for a cloud
         environment.




14
              Running CloudSim
     
         Checkout the source code.
     
         Build using Apache Maven.
     
         modules/cloudsim-examples
            – from cloudsim-3.1-
                SNAPSHOT/jars
            – java -classpath cloudsim-3.1-
                SNAPSHOT.jar:cloudsim-
                examples-3.1-SNAPSHOT.jar
              org.cloudbus.cloudsim.examples.
15
              CloudSimExample6
     Terminology




16
     Flow




17
           Scheduling in CloudSim
     
         Host Level
            – VmScheduler.
            – Sharing fractions of PE to VMs on
               the host.
     
         VM Level
            – CloudletScheduluer
            – Sharing the VM resources.
     
         Broker Level (Application scheduling)
            – Given a few Cloudlets from a
18
               broker, which one to execute?
     int num_user = 2; // # of cloud users
     CloudSim.init(num_user, calendar,
                    trace_flag);
     Datacenter datacenter0 =
                createDatacenter("Datacenter_0");
     Datacenter datacenter1 =
                createDatacenter("Datacenter_1");

     DatacenterBroker broker = createBroker();
     int brokerId = broker.getId();
     vmlist = createVM(brokerId,5);
     cloudletList = createCloudlet(brokerId,40);
19
     broker.submitVmList(vmlist);
     broker.submitCloudletList(cloudletList);

     CloudSim.startSimulation();

     List<Cloudlet> newList =
                broker.getCloudletReceivedList();

     CloudSim.stopSimulation();

     printCloudletList(newList);
     //Method defined to log the statistics.
20
               createDatacenter()
     
         Create machines (Pe Lists) & list of hosts.
     
         Define datacenter characteristics
             – arch, os, vmm; time_zone, cost,
                 costPerMem, CostPerStorage,
                 costPerBw
     
         Create the datacenter.
         datacenter = new Datacenter(name,
           characteristics, new
           VmAllocationPolicySimple(hostList),
            StorageList, 0);
21
                   createVM()
     
         Define the parameters
            – long size = 1000; //image size (MB)
            – int ram = 512; //vm memory (MB)
            – int mips = 1000;
            – long bw = 1000;
            – int pesNumber = 1; //# of cpus
            – String vmm = "Xen"; //VMM name
     
         Create the list of VMs.

22
                createCloudlet()
     
         Define the parameters
            – long length = 1000; //MI
            – long filesize = 300; //B
            – long outputSize = 300; //B
            – long bw = 1000;
            – UtilizationModel // for Cpu, Ram,
                and Bw.
     
         Create the list of Cloudlets.

23
                  CloudAnalyst
     
         Download and extract.
     
         From CloudAnalyst/jars
            – java -classpath
                simjava2.jar:gridsim.jar:iText-
                2.1.5.jar:cloudanalyst.jar
                cloudsim.ext.gui.GuiMain




24
     Demo




25
     Thank you!




26

				
DOCUMENT INFO
Shared By:
Stats:
views:83
posted:11/29/2013
language:English
pages:26
Description: An introduction to CloudBus and CloudSim.