Skip to content

dpukhkaiev/BRISE2

Repository files navigation

BRISE 2.5.0

Benchmark Reduction via Adaptive Instance Selection

BRISE-CI

Software Product Line for Parameter Tuning
Initial use case: search of an optimal sweet-spot configuration (CPU Frequency and number of threads) for different algorithms (data compressing, integers sorting, etc.) w.r.t. energy consumption minimization (optimization goal).

Getting started

Requirements

Software requirements:

  • Docker (with Docker Engine 18.06.0+), Docker-compose (1.22.0+).
  • Python (v3.7+).
  • jq (v1.5-1+)
  • Kubectl (v1.18.0+) only in case of using Kubernetes.

Hardware requirements:

  • 5 GB HDD, 2 GB RAM, 2x 2.5 GHz CPU + Resources for running N (amount of workers, 3 by default) instances of your system.

Installing and running basic installation

To get a working instance of BRISE:

  • git clone this repository and
  • ./brise.sh up -m docker-compose in the root folder of copied repository to deploy the BRISE instance using docker-compose.

Run ./brise.sh help to see possible options for starting it. For example, if you want to overwrite the standard addresses and ports used by the event-service or database, you may use the following command: ./brise.sh up -m docker-compose -eAMQP 49153 -eGUI 49154 -db_host localhost -db_port 27017 If no values are specified, the default ones will be taken from the SettingsBRISE.json.

NOTE. brise.sh is designed for UNIX operating system. Running the script under Windows Subsystem for Linux may require additional actions, for example, using [dos2unix](https://linux.die.net/man/1/dos2unix) tools.

The following Docker containers will be created:

  • main-node - performs the main flow of an optimization experiment. Contains extendable features to customize your optimization process.
  • worker-service - parallelization and orchestration of configurations between worker nodes.
  • N workers - evaluate the target system with concrete parameters.
  • front-end - control and visualisation of the optimization process.
  • event-service - RabbitMQ server instance for event management.
  • mongo-db - MongoDB server instance for the BRISE database management.

Testing the installation

  • Get into main-node:
    • $ docker exec -it main-node /bin/bash
    • Run BRISE by python3.7 main.py inside the container. In the end you will see a final report for Radixsort Energy Experiment (search for the best CPU frequency and number of threads of the Radixsort sorting 500 millions of integers w.r.t. energy consumption)

Using BRISE

To apply BRISE for your target system, you will need to:

  1. Install BRISE.
  2. Describe your experiment in *.json Experiment Description file.
  3. Describe your search space in *.json Experiment data file. These files should be inside of the main-node container (put it into main_node/Resources/ folder).
  4. Adapt BRISE to your particular optimization case (if needed) in SettingsBRISE file.
  5. Launch BRISE and check the results.

Dev instructions. Local environment

Main-node

Main node have a single entry point - main.py in a root of the main-node folder, so you could easily run it locally, after satisfying needed requirements.

See main-node requirements in a corresponding requirements.txt file.

Front-end

There is an already built version running in the front-end container. Just go to localhost.

If you would like to make own front-end build:

  1. Install Node.js version 6.9+
  2. Update NPM to version 3.0+
  3. $ npm install @angular/cli -g
  4. From the front_end folder run $ npm install
  5. Start front-server with $ ng serve --host 0.0.0.0 --port 80
  6. Go to localhost:80

Questions, contributing.

Questions, suggestions, remarks? Feel free to contact us via 📬

License

This project is licensed under the MIT License - see the LICENSE file for details.