Elektron is a lightweight, power-aware, pluggable Mesos framework that behaves as a playground to experiment with different scheduling policies to schedule ad-hoc jobs in docker containers.
This repository has been archived on 2024-04-10. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
Find a file
Pradyumna Kaushik 4200eda783 Reorganized workload section.
Also removed class_to_watts attribute from the example to keep it
simple.
2018-10-04 20:22:23 -04:00
constants Fixed the comments to be capitalized at the start and also terminate with a period. 2017-09-28 15:36:47 -04:00
def Runing goimports on project as well as fixing README so that headers render correctly. 2018-09-30 18:23:38 -07:00
docs Fix section sizes. Reposition sp selector image. 2018-10-03 21:44:46 -04:00
environment Now retrieving path to rapl throttle script by reading value of an environment variable. Also, stored the RAPL_PKG_Throttle.py script in a directory called scripts/. The location of this needs to be stored in an environment variable named RAPL_PKG_THROTTLE_LOCATION. 2017-09-28 15:01:06 -04:00
logging Runing goimports on project as well as fixing README so that headers render correctly. 2018-09-30 18:23:38 -07:00
pcp Powercap policy and PCP config from commandline. 2018-10-04 19:21:45 -04:00
powerCap Powercap policy and PCP config from commandline. 2018-10-04 19:21:45 -04:00
rapl Adding HostKeyCallback to sshConfig. Fix command. 2018-10-04 19:14:50 -04:00
schedulers Reorganized code. 2018-10-04 19:27:13 -04:00
scripts Now retrieving path to rapl throttle script by reading value of an environment variable. Also, stored the RAPL_PKG_Throttle.py script in a directory called scripts/. The location of this needs to be stored in an environment variable named RAPL_PKG_THROTTLE_LOCATION. 2017-09-28 15:01:06 -04:00
utilities Runing goimports on project as well as fixing README so that headers render correctly. 2018-09-30 18:23:38 -07:00
vendor Adding dep files and dependencies. 2018-09-30 18:02:42 -07:00
.gitignore added .gitignore. 2018-09-23 18:39:11 -04:00
config updated pcp config file to not include stratos information 2017-09-26 01:40:17 -04:00
Gopkg.lock Adding dep files and dependencies. 2018-09-30 18:02:42 -07:00
Gopkg.toml Adding dep files and dependencies. 2018-09-30 18:02:42 -07:00
README.md Reorganized workload section. 2018-10-04 20:22:23 -04:00
schedPolConfig.json Removed unused json attribute varCpuShare. 2018-10-03 21:35:20 -04:00
scheduler.go Hi/Lo Thresholds only for extrema and prog-extrema. 2018-10-04 20:10:46 -04:00
workload_sample.json updated example workload definition 2017-09-26 01:37:28 -04:00

Elektron: A Pluggable Mesos framework with power-aware capabilities

Elektron is a Mesos framework that behaves as a playground for developers to experiment with different scheduling policies to schedule ad-hoc jobs in docker containers. It is designed as a lightweight, configurable framework, which can be used in conjunction with built-in power-capping policies to reduce the peak power and/or energy usage of co-scheduled tasks.

However, in addition to being a scheduler, Elektron also takes advantage of tools such as Performance Co-Pilot and RAPL to help contain the power envelope within defined thresholds, reduce peak power consumption, and also reduce total energy consumption. Elektron is able to leverage the Mesos-provided resource abstraction to allow different algorithms to decide how to consume resource offers made by a Mesos Master.

Architecture

Elektron is comprised of three main components: Task Queue, Scheduler and Power Capper.

  • Task Queue - Maintains tasks that are yet to be scheduled.
  • Scheduler - Matches tasks' resource requirements with Mesos resource offers. Tasks that matched offers are then launched on the corresponding nodes.
  • Power Capper - The Power Capper monitors the power consumption of the nodes in the cluster through the use of Performance Co-Pilot. A power capping policy uses this information and decides to power cap or power uncap one or more nodes in the cluster using RAPL.

Usage

Logging

Please go through the logging library doc to understand how the logging library has been setup. There are also instructions on how one can add additional loggers.

Data

Software Requirements

Requires Performance Co-Pilot tool pmdumptext to be installed on the machine on which electron is launched for logging to work and PCP collector agents installed on the Mesos Agents

Compatible with the following versions:

  • Mesos 1.5.0
  • Go 1.9.7

Build and Run

Compile the source code using the go build tool as shown below.

go build -o elektron

Use the --help option to get information about other command-line options

Workload

Use the -workload option to specify the location of the workload json file. Below is an example workload.

[
   {
      "name": "minife",
      "cpu": 3.0,
      "ram": 4096,
      "watts": 63.141,
      "image": "rdelvalle/minife:electron1",
      "cmd": "cd src && mpirun -np 3 miniFE.x -nx 100 -ny 100 -nz 100",
      "inst": 10
   },
   {
      "name": "dgemm",
      "cpu": 3.0,
      "ram": 32,
      "watts": 85.903,
      "image": "rdelvalle/dgemm:electron1",
      "cmd": "/./mt-dgemm 1024",
      "inst": 10
   }
]
./elektron -master <host:port> -workload <workload json>

Use the -logPrefix option to provide the prefix for the log file names.

Plug-in Power Capping

Elektron is also capable of running power capping policies along with scheduling policies.

Use the -powercap option with the name of the power capping policy to be run.

./elektron -master <host:port> -workload <workload json> -powercap <powercap policy name>

If the power capping policy is Extrema or Progressive Extrema, then the following options must also be specified.

  • -hiThreshold - If the average historical power consumption of the cluster exceeds this value, then one or more nodes would be power capped.
  • -loThreshold - If the average historical power consumption of the cluster is lesser than this value, then one or more nodes would be uncapped.

Plug-in Scheduling Policy

Use the -schedPolicy option with the name of the scheduling policy to be deployed.
The default scheduling policy is First Fit.

./elektron -master <host:port> -workload <workload json> -schedPolicy <sched policy name>

Note: To obtain the list of possible scheduling policy names, use the -listSchedPolicies option.

Enable Scheduling Policy Switching

Use the -switchSchedPolicy option to enable scheduling policy switching.

One needs to also provide a scheduling policy configuration file (see schedPolConfig for reference).
Use the -schedPolConfig option to specify the path of the scheduling policy configuration file.

./elektron -master <host:port> -workload <workload json> -switchSchedPolicy -schedPolConfig <config file>

The following options can be used when scheduling policy switching is enabled.

  • -fixFirstSchedPol - Fix the first scheduling policy that is deployed (value=int)
  • -fixSchedWindow - Allow the size of the scheduling window to be fixed.
  • -schedWindowSize - Specify the size of the scheduling window (value=int). If no scheduling window size specified and fixSchedWindow option is enabled, the default size of 200 is used.
  • -schedPolSwitchCriteria - Criteria to be used when deciding the next scheduling policy to switch to. Default criteria is task distribution (taskDist) based. However, one can either switch based on a Round Robin (round-robin) or Reverse Round Robin (rev-round-robin) order.