Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Simulator for modeling energy consumption in cloud, fog, and edge computing environments 🌱

License

NotificationsYou must be signed in to change notification settings

dos-group/leaf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 onSimPy for discrete-event simulation andNetworkX for modeling infrastructure or application graphs.

Please have a look at outexamples and visit the officialdocumentation for more information on this project.

This Python implementation was ported from theoriginal Java protoype.All future development will take place in this repository.

⚙️ Installation

You can install thelatest release of LEAF viapip:

$ 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 usesSimPy 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.

importsimpyfromleaf.applicationimportTaskfromleaf.infrastructureimportNodefromleaf.powerimportPowerModelNode,PowerMeter# Processes modify the model during the simulationdefplace_task_after_2_seconds(env,node,task):"""Waits for 2 seconds and places a task on a node."""yieldenv.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=lambdam:print(f"{env.now}: Node consumes{int(m)}W"))env=simpy.Environment()# register our task placement processenv.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 10W1: Node consumes 10W2: Node consumes 30W3: Node consumes 30W4: Node consumes 30W

For other examples, please refer to theexamples 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 officialdocumentation 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 20215th 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


[8]ページ先頭

©2009-2025 Movatter.jp