Green Cloud Scheduler

Contents

  1. Overview
  2. Behavior
  3. Interaction with OpenNebula
  4. Deployment
  5. Configuration options

Overview

Green Cloud Scheduler (GCS) consolidates the virtual machines in the cloud such that as few servers as possible are used to run the current workload while the unused servers are shut down. The controller dynamically monitors, analyzes the current cloud context and plans actions to turn on servers as needed, turn off the unused servers, deploy and migrate virtual machines targeting to free up servers.

Behavior

GCS behavior is described in the following four steps.
  1. Reads servers's characteristics by using the Java OCA API HostPool class.
  2. Reads the OpenNebula managed virtual machines by using the Java OCA API VirtualMachinePool class.
  3. Updates the energy-aware cloud context model.
  4. Whenever a new VM is submitted to OpenNebula or an existing VM is deleted (see Figure 1), an OpenNebula Hook event is triggered. GCS will react to the event and will start analyzing the cloud context for finding the optimum virtual machine distribution.
The GCS operates as a MAPE loop consisting of Monitoring, Analysis, Planning and Execution phases.

OpenNebula interaction

Figure 1: Add/Remove Virtual Machine Behavior

Interaction with OpenNebula

Cloud Monitoring

The GCS uses the JAVA OCA API for accessing the OpenNebula servers pool and virtual machines pool.

Retrieving Servers Information

For finding most of the information regarding servers the GCS uses the Java OCA API (memory, number of cores,etc.). Specific tools are used for retrieving other server related information.

Retrieving Virtual Machines Information

The GCS uses OpenNebula Java OCA API to interact with OpenNebula for retrieving information about pending virtual machines from the OpenNebula VM Pool and enforcing adaptation actions like Deploy VM, Migrate VM, Delete VM.

Tools used by GCS

Deployment

  1. Install wakeonlan on the control node
  2. Optionally (but strongly recommended), install cpufreq-utils on the OpenNebula nodes
  3. Setup passwordless shutdown for OpenNebula Nodes
  4. Edit the /etc/one/oned.conf file to enter the vm creation and deletion hooks. Restart the one deamon.
  5. Install Ant on the OpenNebula controller node. Enter the java JDK location in the ./build.xml file by changing the jdk.home property. Issue ant in the GreenCloudScheduler directory to compile the software.
  6. Kill the Default OpenNebula Scheduler process: sudo killall mm_sched
  7. Run the GreenCloudScheduler.jar from the directory where it is located : java –jar ./GreenCloudScheduler.jar or use ant ant run

Green Cloud Scheduler Deployment Structure

Figure 4 : Structure of the distribution directory ./dist .

Configuration options

The next table contains the basic configuration options which need to be addressed when deploying the Green Cloud Scheduler (see Table 1). The configuration options are set from the /config/config.properties file.

Green Cloud Scheduler configurationExplanation
openNebulaRCPAPIAddress = http://localhost:2633/RPC2Address and port of the OpenNebula XML RCP API
openNebulaCredentials = oneadmin:oneadminUsername and password for accessing the OpenNebula API
resourceLoadOptimalValue = 80Optimal load for server’s computing resources in percentage %
resourceLoadVariation = 20Accept load variation from the defined optimal load value in %
pingLocation = /bin/pingPath to the ping executable
arpLocation = /usr/sbin/arpPath to the arp executable
sshLocation = /usr/sbin/sshPath to the arp executable
nodesWakeUpMechanism = wakeonlan | wol Path of the wake-up mechanism executable
vmMigrationMechanism = live | offline Live or offline virtual machines migration method
migrationIsEnabledDisables the VM migration. The scheduler will only consider deployment of VMs and turning on/off servers in this case.
vmDefaultCPUFrequencyDefault CPU frequency for a VM.
Table 1: Configuration Options