What will be needed:
- Node.js (https://nodejs.org)
- Redis (http://redis.io/)
- Application DAG
- Application binaries
Check how to generate DAG, Montage data and binaries
https://github.com/malawski/hyperflow-gcf-executor
After those steps we should have:
- dag.json
- Montage inputs
- Montage binaries
Install Hyperflow (https://github.com/hyperflow-wms/hyperflow):
npm install git://github.com/piotrek722/hyperflow.git#develop --save
Make sure that hyperflow/bin is added to your path.
hyperflow/functions directory contains the functions that will be executed by hyperflow.
We are using serverless framework to deploy cloud functions. To deploy functions we need to:
Install serverless (https://serverless.com/framework/docs/providers/aws/guide/installation/).
Copy application binaries to CloudFunctionOptimizer/hflow_functions/aws/aws-executor.
Change aws-bucket in serverless.yml to your S3 bucket name.
Run:
npm install
serverless deploy
Copy application binaries and inputs to S3 bucket.
Complete hyperflow/functions/awsCommand.config.js, put urls to your functions and path to S3 bucket.
Running SDBWS consists of several steps:
- decorating DAG with ids,
- executing DAG on selected homogeneous resources,
- parsing logs from executions to obtain task times on all resources,
- normalizing task times,
- running SDBWS algorithm to produce decorated DAG,
- executing decorated DAG on resources assigned by the algorithm.
Current version is prepared to run on AWS Lambda.
- In
configuration/config.js, set your cloud provider, resource memory sizes and their pricing:
const FUNCTION_TYPES = ["256", "512", "1024", "1536"];
const PROVIDER = "AWS";
const PRICES = {
"AWS" : {
"256": 0.000000417,
"512": 0.000000834,
"1024": 0.000001667,
"1536": 0.000002501
}
}
Set user parameters:
const BUDGET_PARAMETER = 0.3;
const DEADLINE_PARAMETER = 0.7;
The values should be from range [0, 1].
2.Decorate DAG with task ids:
node dagscripts/id-decorator.js DAG_PATH OUTPUT_PATH
3.Run experiments with script ./scripts/run.sh:
Parameters:
- Path to dag
- Output folder.
- Provider
- Number of executions for each type
- Function types
Example invocation:
./run.sh ./dag.json output AWS 5 256 512 1024 1536
To visualize the results you can use scripts from plots directory.
gant_resources.Rdraws Gantt chart which shows which resource was used for each task execution. Remember to set which resources were used in the experiment.compare_times.Rdraws a bar plot which compares times of execution on homogeneous resources, heterogeneous resources(real) and theoretical execution(sdbws). Setuser_timeto user's deadline.compare_prices.Rdraws a bar plot which compares prices of executions. Setuser_priceto user's budget limit.