{"id":13769388,"url":"https://github.com/Cloudslab/cloudsimsdn","last_synced_at":"2025-05-11T02:32:22.806Z","repository":{"id":30268340,"uuid":"33819781","full_name":"Cloudslab/cloudsimsdn","owner":"Cloudslab","description":"CloudSimSDN is an SDN extension of CloudSim project to simulate Networking, SDN and SFC features in the context of edge and cloud data centers.","archived":false,"fork":false,"pushed_at":"2023-09-27T12:48:44.000Z","size":555,"stargazers_count":92,"open_issues_count":9,"forks_count":59,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-08-03T17:08:13.701Z","etag":null,"topics":["cloud","cloud-data-center","cloudsim","data-center","edge","edge-computing","edge-extension","sdn","simulation","vm-allocation","vm-creation","vms","vnf","workload"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"wiseodd/generative-models","license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cloudslab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-04-12T14:23:08.000Z","updated_at":"2024-06-11T01:41:11.000Z","dependencies_parsed_at":"2023-02-19T15:00:51.748Z","dependency_job_id":"b2e47175-3a47-43de-9ec3-7073fd3b0f6a","html_url":"https://github.com/Cloudslab/cloudsimsdn","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cloudslab%2Fcloudsimsdn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cloudslab%2Fcloudsimsdn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cloudslab%2Fcloudsimsdn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cloudslab%2Fcloudsimsdn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cloudslab","download_url":"https://codeload.github.com/Cloudslab/cloudsimsdn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225004579,"owners_count":17405644,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloud","cloud-data-center","cloudsim","data-center","edge","edge-computing","edge-extension","sdn","simulation","vm-allocation","vm-creation","vms","vnf","workload"],"created_at":"2024-08-03T17:00:23.533Z","updated_at":"2024-11-17T05:30:50.769Z","avatar_url":"https://github.com/Cloudslab.png","language":"Java","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# CloudSimSDN\n\nCloudSimSDN: SDN extension of CloudSim project. Version 2.0 (CloudSimSDN-NFV) is now availalbe.\n\n## New Features:\n\n* Resource provisioning for NFV in the edge computing environment;\n* Simulation framework for NFV in edge and cloud computing (inter cloud data centers);\n* Policy supports of Network link selection, VM allocation, Virtual Network Function(VNF) placement, and SFC auto-scaling algorithms;\n* Performance evaluation of the framework with use case scenarios.\n\n## Introduction\n\n**CloudSimSDN** is to simulate utilization of hosts and networks, and response time of requests in SDN-enabled cloud data centers.\n**CloudSimSDN** is an add-on package to [CloudSim](http://www.cloudbus.org/cloudsim/), thus it is highly recommended to learn how to use CloudSim before using CloudSimSDN.\nCloudSimSDN supports calculating power consumption by both hosts and switches. For instance, network-aware VM placement policies can be evaluated using CloudSimSDN. As an example, we will present energy savings in SDN-enabled cloud data center via VM consolidation. If VMs are consolidated to the minimum number of hosts, the unused hosts and switches can be powered off to save more power. We will show two different VM placement policies: Best Fit (MFF, Most Full First) and Worst Fit (LFF, Least Full First).\n\n## Program Dependencies📄\nYou need to integrate CloudSim with CloudSimSDN. There are two ways to include CloudSim into the project: (1) including the CloudSim Source code; (2) importing the CloudSim jar.\n\n### Method1: including the CloudSim Source Code\nIn order to integrate the CloudSim src code, download CloudSim source code from (https://github.com/Cloudslab/cloudsim), then copy the CloudSim src code (\\cloudsim-master\\modules\\cloudsim\\src\\main) into (\\cloudsimsdn-master\\src\\main).\nFor the dependency of opencsv used in the container module of CloudSim, include the dependency in the pom.xml:\n```\n\u003cdependency\u003e\n        \u003cgroupId\u003ecom.opencsv\u003c/groupId\u003e\n        \u003cartifactId\u003eopencsv\u003c/artifactId\u003e\n        \u003cversion\u003e3.7\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Method2: importing the CloudSim jar\n1. You need download or clone [CloudSim](https://github.com/Cloudslab/cloudsim) and export the jar of the newest version (bugs fixed to support cloudsimsdn-nfv), name it (cloudsim-4.0.jar);\n2. Add generated cloudsim-4.0.jar local jar into the maven dependencies: add the cloudsim dependency in pom.xml.\n````\n        \u003cdependency\u003e\n            \u003cgroupId\u003eorg.cloudbus.cloudsim\u003c/groupId\u003e\n            \u003cartifactId\u003ecloudsim\u003c/artifactId\u003e\n            \u003cversion\u003e4.0\u003c/version\u003e\n            \u003cscope\u003esystem\u003c/scope\u003e\n    \t    \u003csystemPath\u003e${project.basedir}/YOUR_PATH/cloudsim-4.0.jar\u003c/systemPath\u003e\n        \u003c/dependency\u003e\n````\n3. enter the project's root directory and execute `mvn clean install` to install the jar packages into your local maven repository.\n\nOther dependencies are already included.\n\n## Quick Start⚡️\nAfter the mvn build, you could simply run the project's example in IDE's Run Configurations by adding commands in the Arguments:\n\n* For example, to start the simulation example of SimpleExampleInterCloud:\n````\nLFF example-intercloud/intercloud.physical.json example-intercloud/intercloud.virtual.json example-intercloud/intercloud-example-workload.csv example-intercloud/intercloud-example-workload2.csv\n````\n\n* To run StartExperimentSFCEdge:\n````\nLFF 0 example-edge/edge.physical.json example-edge/edge.virtual.json example-edge/ edge.workload_host1.csv edge.workload_host2.csv\n````\n* To run StartExperimentSFC:\n1 for enable SFC auto-scaling\n````\nLFF 1 example-sfc/sfc-example-physical.json example-sfc/sfc-example-scale-virtual.json example-sfc/ sfc-example-scale-workload.csv\n````\n\n## Package Components\n1. org.cloudbus.cloudsim.sdn\n\n  Main components of CloudSimSDN. Core functions are implemented in this package source codes.\n  \n2. org.cloudbus.cloudsim.example\n\n  Example program. SimpleExample.java is the entry point of the example program. Please follow the code from SimpleExample.java\n  This document is to describe the example program.\n  Other Scenarios includes:\n  Inter cloud data centers, Link Selection Policy, Overbooking Host Resources, QoS, Service Function Chaining, and\n  Service Function Chaining in edge computing.\n  \n3. org.cloudbus.cloudsim.sdn.exmaple.topogenerators\n\n  Example topology generators. Physical / Virtual topology files (inter-clouds, Edge computing, SFC, multi-tier web application, etc.) can be generated by using these generators with customizable parameters. Some distributions can be used within topology generators.\n  \n4. org.cloudbus.cloudsim.sdn.monitor\n\n  Energy consumption and utilization monitor.\n  \n5. org.cloudbus.cloudsim.sdn.nos\n\n Main components of Networking Operation System includes flow channel manager, and extended version of nos for different scenarios. \n  \n6. org.cloudbus.cloudsim.sdn.parsers\n  \n  Parsers for physical topology, virtual topology, and workload.\n  \n7. org.cloudbus.cloudsim.sdn.physicalcomponents\n\n  SDN-enabled components includes node, link, physical topology, switches (Aggregation, core, edge, gateway, inter-cloud), routing table, extended datacenter, and host.\n  \n8. org.cloudbus.cloudsim.sdn.policies\n\n  Policies (algorithms) for Host selection, Link selection, Vm allocation, Host overbooking.\n  \n 9. org.cloudbus.cloudsim.sdn.provisioners\n \n  Bandwidth(bw) and CPU(Pe) overbooking provisioners.\n  \n 10. org.cloudbus.cloudsim.sdn.sfc\n \n  Main components of Service Function Chaining (SFC) festures, including SFC Forwarder, SFC policy, auto scaling algorihtms (scaling up and out), etc.\n  \n 11. org.cloudbus.cloudsim.sdn.virtualcomponents\n \n  Flows created in VMs (SDNVM.java) through channel(Channel.java) based on corresponding Flow configuration(FlowConfig.java) are forwarded according to rules(ForwardingRule.java) in SDN-enabled switches. VirtualNetworkMapper includes the main APIs for network traffic forwarding.\n  \n 12. org.cloudbus.cloudsim.sdn.workload\n \n  Core components for workload processing and networking transmission. Request.java represents the message submitted to VM that includes a list of activities(Activity.java) that should be performed at the VM (Processing and Transmission). Furthermore, in some senarios, one request could include another request for the subsequent requests which will be performed at the other VMs.\n  \n## Input Data\nWe need to submit three input files to CloudSimSDN: data center configuration (physical topology), resource deployment request (virtual topology), and workloads for VMs.\n\n### Physical topology (Data center configuration)\nConfigurations of physical hosts, switches and links that consist of SDN-enabled cloud data center. This can input as JSON file.  Please look at sdn-example-physical.json file. \nIn this example, data center is configured to operate 100 hosts, 10 edge switches connecting 10 hosts each, and one core switch that connects all edge switches.\n\n* Host nodes\n  1. type: \"host\"\n  2. name: name of the host\n  3. pes, mips, ram, storage : the host specification\n  4. bw: connection bandwidth with the edge switch\n\n* Switch nodes\n  1. type: either \"core\", \"aggregate\" or \"edge\"\n  2. name: name of the switch\n  3. bw: maximum bandwidth support by switch\n\n* Links\n  1. source: the name of source node\n  2. destination: the name of destination node\n\n### Virtual topology (Resource deployment request)\nWhen customers send VM creation requests to the cloud data center, they provide virtual topology for their network QoS and SLA. Virtual topology consists of VM types and virtual links between VMs. This can input as JSON file. Please look at sdn-example-virtual.json file.\n\nThe resource deployment file includes 500 VM creation requests in which three to five VMs are grouped in a same virtual network to communicate with each other. \n\n* Nodes\n  1. type: \"vm\"\n  2. name: name of the vm\n  3. pes, mips, ram, size: the VM specification\n* Links\n  1. name: the name of the link that can be used in workloads. For default link, use \"default\"\n  2. source: the name of source VM\n  3. destination: the name of destination VM\n  4. bandwidth (optional): specifically requested bandwidth for the link\n\n### Workloads (workload.csv)\nAfter VMs are created in the data center, computation and network transmission workloads from end-users are passed to VMs to be processed. A workload consists of compute processing and network transmission. This can input as CSV file.\nPlease look at `sdn-example-workload-*.csv` files\n\nWorkload file has a long packet transmission between VMs in a same virtual network. Since we should measure power consumption of switches, data transmissions between VMs are necessary to let switches work for the experiment time. To make the experiment simple, we make VMs use network bandwidth in full during their lifetime, so that just one long packet transmission workload for each VM is given in the workload file.\n\n* CSV file structure\n  1. Submission time\n  2. Submission VM (VM1)\n  3. Packet size of the transmission to VM1 (use 0)\n  4. Computational workload for VM1\n  5. The name of virtual link to transfer packet to the next VM (VM2)\n  6. The next VM (VM2)\n  7. Packet size of the transmission to VM2\n  8. Computational workload for VM2\n  9. ... (repeat v ~ viii)\n\n**A tutorial for 3-tier web application (wikipedia) workloads:**\nhttps://github.com/Cloudslab/sfcwikiworkload\n\n## Simulation Execution\nYou have to build the project using your IDE or typing `mvn clean install` at the project's root directory.\nAfter that, to execute the example, enter the project's `target` directory and use the following command:\n\n```\njava -cp cloudsimsdn-1.0-with-dependencies.jar org.cloudbus.cloudsim.sdn.example.SDNExample \u003cLFF|MFF\u003e [physical.json] [virtual.json] [workload1.csv] [workload2.csv] [...]\n```\n\n* ```\u003cLFF | MFF\u003e```: Choose VM placement policy. LFF(Least Full First) or MFF(Most Full First)\n* ```[physical.json]```: Filename of physical topology (data center configuration)\n* ```[virtual.json]```: Filename of virtual topology (VM creation and network request)\n* ```[workload1.csv] ...```: Filenames of workload files. Multiple files can be supplied.\n\n### EXAMPLE:\n```\njava -cp cloudsimsdn-1.0-with-dependencies.jar org.cloudbus.cloudsim.sdn.example.SDNExample MFF ../dataset-energy/energy-physical.json ../dataset-energy/energy-virtual.json ../dataset-energy/energy-workload.csv \u003e results.out\n```\n\nThis command will run the simulation using MFF algorithm, and the output is redirected to results.out file.\n\n## Simulation results\nThe results have five parts.\n\n* Part 1) Detailed result of workloads: shows computational time and transmission time of each workload components. It also shows total response time of each workload.\n* Part 2) Average result of workloads: shows the total number of workloads, average rate of all workload requests, and the average response time.\n* Part 3) Host power consumption and detailed utilization: shows total power consumption and detailed utilization history (in MIPS) for each host\n* Part 4) Switch power consumption and detailed utilization: shows total power consumption and detailed utilization history (in number of active ports) for each switch\n* Part 5) Total power consumption: shows total power consumption over the data center with the maximum hosts utilized at the same time\n\n### EXAMPLE:\n* Part 1 / 2) In our example, part 1 and 2 (for workload results) is not useful; because the workload is generated solely to make switches work for the whole lifetime of communicating VMs. \n* Part 3 / 4)\n```\nHost #0: 29653.168930555563\n0.0, 4000.0\n0.0, 16000.0\n0.0, 35200.0\n0.0, 51200.0\n2390.0, 55200.0\n2423.0, 59200.0\n...\nSwitch #103: 27511.461264316662\n22660.21001, 2\n90180.21001, 3\n502117.0, 2\n1458312.66651, 0\n```\nPart 3 and 4 shows the detailed power consumption and utilization level of each host or switch. \nFor Host #0, it consumed 29,653 Wh which hosted 4 VMs at the time 0. From the time 0 until 2390, the host utilized 51200 MIPS. \nFor Switch #103, it consumed 27,511 Wh for the whole experiment. No traffic was occurred until the time 22660, and 2 ports were active between 22660 and 90180 seconds.\n\n* Part 5)\n```\n========== TOTAL POWER CONSUMPTION ===========\nHost energy consumed: 1848038.3846250002\nSwitch energy consumed: 92493.37391543222\nTotal energy consumed: 1940531.7585404324\nSimultanously used hosts:30\n```\nPart 5 is the main result of this example. Using MFF policy, total energy consumption of the data center was 1,940,531Wh and at most 30 hosts were used at the same time.\n \nTo compare with the result of LFF policy, run the same program with 'LFF' parameter instead of 'MFF'. The result shows that 2,508,871Wh was consumed with LFF policy.\n \n## Generate different scenarios\n1. Use topology generators (org.cloudbus.cloudsim.sdn.example.topogenerators) to create more complex scenario in larger scale.\n2. Implement different VM allocation policy to test different VM placement algorithms\n3. Implement different NetworkOperatingSystem to test different network policies.\n\n## Publication\nFor the newest Edge computing, NFV and SFC version, please cite this paper:\n* Jungmin Son, TianZhang He, and Rajkumar Buyya, [\"CloudSimSDN-NFV: Modeling and Simulation of Network Function Virtualization and Service Function Chaining in Edge Computing Environments\"](https://doi.org/10.1002/spe.2755), Software: Practive and Experience. 2019;1–17.https://doi.org/10.1002/spe.2755\n\nPlease cite this paper:\n* Jungmin Son, Amir Vahid Dastjerdi, Rodrigo N. Calheiros, Xiaohui Ji, Young Yoon, and Rajkumar Buyya, [\"CloudSimSDN: Modeling and Simulation of Software-Defined Cloud Data Centers\"](http://ieeexplore.ieee.org/document/7152513/), Proceedings of the 15th IEEE/ACM International Symposium on Cluster, Cloud and Grid Computing (CCGrid 2015), Shenzhen, China, May 4-7, 2015. doi:10.1109/CCGrid.2015.87\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCloudslab%2Fcloudsimsdn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCloudslab%2Fcloudsimsdn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCloudslab%2Fcloudsimsdn/lists"}