In this paper, we present EcoLife, an innovative strategy that leverages multi-generation hardware to co-optimize carbon footprint and service time within the serverless environment. EcoLife extends Particle Swarm Optimization (PSO) to adapt to the variations in serverless computing for making keep-alive and execution decisions. Our experimental results show that EcoLife effectively reduces carbon emissions while maintaining high performance for function execution.
- Language: Python3.10
- Hardware: This repo is mainly simulation, you don't need any hardware to reproduce the results.
- Libs: Ensure that all the libs are installed.
│eco-life/
├──carbon_intensity/
├──data/
├──motivations/
├──node/
├──optimizers/
├──results/
carbon_intensity
contains the carbon intensity for various regions, Use one of them to simulate.data
contains the profiled data for optimization. (eg. the carbon and energy data for different serverless functions)motivations
: 4 motivations in the paper.node
: Generate the profiled data. You don't need this.optimizers
: different optimizers in Ecoliferesults
: you may need to save your results in this folder.exe_decide.py
:Execution Placement Decision Maker.function_mem.csv
: Memory consumption of different serverless functions.main.py
: You may use it to run the codebase.pso.py
: DPSO in Ecolife. You need to change it.utils.py
: Help functions.selected_trace.zip
: Traces for simulation.
unzip selected_trace.zip
python3 main.py <add your desired configuration>
When you run the main.py, check the code.
Here are some tasks for you.
- Read the paper. link
- Read the code.
- Weakness/improvement of this paper.
- Change DPSO to other heuristic algorithms. If you don't know what's a heuristic algorithm, check this: link(https://optimization.cbe.cornell.edu/index.php?title=Heuristic_algorithms) Note that, you may need to compare the results with DPSO in Ecolife. Plotting a bar figure is a good way to try.
- Don't use 12 days for simulation, it will take 2-3 days. Just use one day.
- If you have any questions, contact me! [email protected]