LEAF
Simulator for modeling energy consumption in cloud, fog, and edge computing environments.
https://github.com/dos-group/leaf
Category: Consumption
Sub Category: Computation and Communication
Keywords
edge-computing energy-consumption fog-computing modeling simulation
Last synced: about 19 hours ago
JSON representation
Repository metadata
Simulator for modeling energy consumption in cloud, fog, and edge computing environments 🌱
- Host: GitHub
- URL: https://github.com/dos-group/leaf
- Owner: dos-group
- License: mit
- Created: 2021-01-22T17:00:06.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-02T07:53:34.000Z (about 1 year ago)
- Last Synced: 2025-04-17T20:40:20.870Z (9 days ago)
- Topics: edge-computing, energy-consumption, fog-computing, modeling, simulation
- Language: Python
- Homepage: https://leaf.readthedocs.io
- Size: 1.16 MB
- Stars: 111
- Watchers: 13
- Forks: 14
- Open Issues: 0
- Releases: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
README.md
LEAF is a simulator for analytical modeling of energy consumption in cloud, fog, or edge computing environments.
It enables the modeling of simple tasks running on a single node as well as complex application graphs in distributed, heterogeneous, and resource-constrained infrastructures.
LEAF is based on SimPy for discrete-event simulation and NetworkX for modeling infrastructure or application graphs.
Please have a look at out examples and visit the official documentation for more information on this project.
This Python implementation was ported from the original Java protoype.
All future development will take place in this repository.
⚙️ Installation
You can install the latest release of LEAF via pip:
$ pip install leafsim
Alternatively, you can also clone the repository (including all examples) and set up your environment via:
$ pip install -e .
🚀 Getting started
LEAF uses SimPy for process-based discrete-event simulation and adheres to their API.
To understand how to develop scenarios in LEAF, it makes sense to familiarize yourself with SimPy first.
import simpy
from leaf.application import Task
from leaf.infrastructure import Node
from leaf.power import PowerModelNode, PowerMeter
# Processes modify the model during the simulation
def place_task_after_2_seconds(env, node, task):
"""Waits for 2 seconds and places a task on a node."""
yield env.timeout(2)
task.allocate(node)
node = Node("node1", cu=100, power_model=PowerModelNode(max_power=30, static_power=10))
task = Task(cu=100)
power_meter = PowerMeter(node, callback=lambda m: print(f"{env.now}: Node consumes {int(m)}W"))
env = simpy.Environment()
# register our task placement process
env.process(place_task_after_2_seconds(env, node, task))
# register power metering process (provided by LEAF)
env.process(power_meter.run(env))
env.run(until=5)
Which will result in the output:
0: Node consumes 10W
1: Node consumes 10W
2: Node consumes 30W
3: Node consumes 30W
4: Node consumes 30W
For other examples, please refer to the examples folder.
🍃 What can I do with LEAF?
LEAF enables high-level simulation of computing scenarios, where experiments are easy to create and easy to analyze.
Besides allowing research on scheduling and placement algorithms on resource-constrained environments, LEAF puts a special focus on:
- Dynamic networks: Simulate mobile nodes which can join or leave the network during the simulation.
- Power consumption modeling: Model the power usage of individual compute nodes, network traffic, and applications.
- Energy-aware algorithms: Implement dynamically adapting task placement strategies, routing policies, and other energy-saving mechanisms.
- Scalability: Model the execution of thousands of compute nodes and applications in magnitudes faster than real time.
Please visit the official documentation for more information and examples on this project.
📖 Publications
If you use LEAF in your research, please cite our paper:
Philipp Wiesner and Lauritz Thamsen. "LEAF: Simulating Large Energy-Aware Fog Computing Environments" In the Proceedings of the 2021 5th IEEE International Conference on Fog and Edge Computing (ICFEC). IEEE. 2021 [arXiv preprint] [video]
Bibtex:
@inproceedings{WiesnerThamsen_LEAF_2021,
author={Wiesner, Philipp and Thamsen, Lauritz},
booktitle={2021 IEEE 5th International Conference on Fog and Edge Computing (ICFEC)},
title={{LEAF}: Simulating Large Energy-Aware Fog Computing Environments},
year={2021},
pages={29-36},
doi={10.1109/ICFEC51620.2021.00012}
}
💚 Projects using LEAF
- Shivani Tripathi, Praveen Kumar, Priyadarshni Gupta, Rajiv Misra, and T.N. Singh. "Workload Shifting Based on Low Carbon Intensity Periods: A Framework for Reducing Carbon Emissions in Cloud Computing". 2023 IEEE International Conference on Big Data (BigData). IEEE. 2023.
- Rui Zhang, Xuesen Chu, Ruhui Ma, Meng Zhang, Liwei Lin, Honghao Gao, and Haibing Guan. "OSTTD: Offloading of Splittable Tasks with Topological Dependence in Multi-Tier Computing Networks". IEEE Journal on Selected Areas in Communications. 2022.
- Zizheng Liu. "A Web-Based User Interface for the LEAF Simulator". MSc IT+ Dissertation at U of Glasgow. 2022 [code]
- Yana Kernerman. "Interactive Visualization of Energy Consumption in Edge and Fog Computing Simulations". Bachelor Thesis at TU Berlin. 2022 [code]
- Sangeeta Kakati and Rupa Deka. "Computational and Adaptive Offloading in Edge/Fog based IoT Environments." 2nd International Conference on Intelligent Technologies (CONIT). IEEE. 2022
- Philipp Wiesner, Ilja Behnke, Dominik Scheinert, Kordian Gontarska, and Lauritz Thamsen. "Let's Wait Awhile: How Temporal Workload Shifting Can Reduce Carbon Emissions in the Cloud". 22nd International Middleware Conference. ACM. 2021 [code]
- Liam Brugger. "An Evaluation of Carbon-Aware Load Shifting Techniques". Bachelor Thesis at TU Berlin. 2021 [code]
Owner metadata
- Name: DOS Group at TU Berlin
- Login: dos-group
- Email:
- Kind: organization
- Description: Distributed and Operating Systems group at Technische Universität Berlin
- Website: https://tu.berlin/en/dos
- Location: Technische Universität Berlin
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/5664005?v=4
- Repositories: 71
- Last ynced at: 2024-04-16T16:22:44.883Z
- Profile URL: https://github.com/dos-group
GitHub Events
Total
- Watch event: 6
- Fork event: 2
Last Year
- Watch event: 6
- Fork event: 2
Committers metadata
Last synced: 6 days ago
Total Commits: 41
Total Committers: 2
Avg Commits per committer: 20.5
Development Distribution Score (DDS): 0.024
Commits in past year: 1
Committers in past year: 1
Avg Commits per committer in past year: 1.0
Development Distribution Score (DDS) in past year: 0.0
Name | Commits | |
---|---|---|
Philipp Wiesner | w****r@t****e | 40 |
Lauritz Thamsen | l****n@m****g | 1 |
Committer domains:
- mailbox.org: 1
- tu-berlin.de: 1
Issue and Pull Request metadata
Last synced: 2 days ago
Total issues: 1
Total pull requests: 8
Average time to close issues: about 3 hours
Average time to close pull requests: 7 days
Total issue authors: 1
Total pull request authors: 2
Average comments per issue: 6.0
Average comments per pull request: 0.0
Merged pull request: 5
Bot issues: 0
Bot pull requests: 0
Past year issues: 0
Past year pull requests: 0
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 0
Past year pull request authors: 0
Past year average comments per issue: 0
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- Muhammad-Fahimullah (1)
Top Pull Request Authors
- birnbaum (6)
- kenan991 (2)
Top Issue Labels
Top Pull Request Labels
Package metadata
- Total packages: 1
-
Total downloads:
- pypi: 230 last-month
- Total dependent packages: 0
- Total dependent repositories: 2
- Total versions: 9
- Total maintainers: 1
pypi.org: leafsim
Simulator for modeling energy consumption in cloud, fog, and edge computing environments
- Homepage: https://github.com/dos-group/leaf
- Documentation: https://leaf.readthedocs.io/
- Licenses: MIT
- Latest release: 0.4.2 (published almost 3 years ago)
- Last Synced: 2025-04-25T11:32:39.192Z (2 days ago)
- Versions: 9
- Dependent Packages: 0
- Dependent Repositories: 2
- Downloads: 230 Last month
-
Rankings:
- Dependent packages count: 7.31%
- Stargazers count: 7.672%
- Dependent repos count: 11.798%
- Forks count: 11.986%
- Average: 13.322%
- Downloads: 27.842%
- Maintainers (1)
Dependencies
- networkx *
- numpy *
- pandas *
- simpy *
- tqdm *
- actions/checkout v2 composite
- actions/setup-python v2 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- pypa/gh-action-pypi-publish release/v1 composite
Score: 10.85371583543798