{"id":18422011,"url":"https://github.com/spcl/htsim-old","last_synced_at":"2025-04-13T12:11:30.463Z","repository":{"id":180513154,"uuid":"657313235","full_name":"spcl/HTSIM-old","owner":"spcl","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-22T18:15:56.000Z","size":170246,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-10T00:57:54.992Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spcl.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,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-06-22T19:39:16.000Z","updated_at":"2025-01-17T07:21:57.000Z","dependencies_parsed_at":"2024-03-08T18:08:14.708Z","dependency_job_id":null,"html_url":"https://github.com/spcl/HTSIM-old","commit_stats":null,"previous_names":["spcl/lgsxhtsim","spcl/htsim-old"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spcl%2FHTSIM-old","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spcl%2FHTSIM-old/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spcl%2FHTSIM-old/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spcl%2FHTSIM-old/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spcl","download_url":"https://codeload.github.com/spcl/HTSIM-old/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248710445,"owners_count":21149190,"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":[],"created_at":"2024-11-06T04:27:43.550Z","updated_at":"2025-04-13T12:11:30.423Z","avatar_url":"https://github.com/spcl.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# htsim Network Simulator\n\nhtsim is a high performance discrete event simulator, inspired by ns2, but much faster, primarily intended to examine congestion control algorithm behaviour.  It was originally written by [Mark Handley](http://www0.cs.ucl.ac.uk/staff/M.Handley/) to allow [Damon Wishik](https://www.cl.cam.ac.uk/~djw1005/) to examine TCP stability issues when large numbers of flows are multiplexed.  It was extended by [Costin Raiciu](http://nets.cs.pub.ro/~costin/) to examine [Multipath TCP performance](http://nets.cs.pub.ro/~costin/files/mptcp-nsdi.pdf) during the MPTCP standardization process, and models of datacentre networks were added to [examine multipath transport](http://nets.cs.pub.ro/~costin/files/mptcp_dc_sigcomm.pdf) in a variety of datacentre topologies.  [NDP](http://nets.cs.pub.ro/~costin/files/ndp.pdf) was developed using htsim, and simple models of DCTCP, DCQCN were added for comparison.  Later htsim was adopted by Correct Networks (now part of Broadcom) to develop [EQDS](http://nets.cs.pub.ro/~costin/files/eqds.pdf), and switch models were improved to allow a variety of forwarding methods.  Support for a simple RoCE model, PFC, Swift and HPCC were added.\n\n## Getting Started\n\nThere are some limited instructions in the [wiki](https://github.com/Broadcom/csg-htsim/wiki).  \n\nhtsim is written in C++, and has no dependencies.  It should compile and run with g++ or clang on MacOS or Linux.  To compile htsim, cd into the sim directory and run make.\n\nTo get started with running experiments, take a look in the experiments directory where there are some examples.  These examples generally require bash, python3 and gnuplot.\n\n## Basic Instructions for htsim\n\nCompile with the following instruction. Note that currently there are some issues with the make file (being fixed ASAP) so it is necessary to clean and recompile everything each time to avoid issues. To do so, we recommend running the following command line from the ```/sim``` directory.\n\n```\nmake clean \u0026\u0026 cd datacenter/ \u0026\u0026 make clean \u0026\u0026 cd .. \u0026\u0026 make -j 8 \u0026\u0026 cd datacenter/ \u0026\u0026 make -j 8 \u0026\u0026 cd ..\n```\n\nOnce that is done, we currently provide two entry points to run the simulator with the support of LogGOPSim: htsim_uec_entry_modern (and also the oversubscribed version) and htsim_ndp_entry_modern. The idea here is that these entry points will execute the GOAL input file (in binary format) that is given as part of the ```-goal``` command. The input file should be inside ```sim/lgs/input/```.\nWe also include a list of pre-compiled binary input GOAL files to use for certain benchmarks (incast, permutation...).\n\nTo actually run the application a typical command line would look like this (for the UEC protocol):\n```\n./htsim_uec_entry_modern_os -o uec_entry -nodes 64 -q 255500 -strat perm -kmin 20 -kmax 80 -linkspeed 400000 -mtu 2048  -hop_latency 400 -switch_latency 0 -k 4 -reuse_entropy 1 -goal permutation_across_64_large.bin \u003e outUEC.tmp\n```\n\nAnd like this for NDP:\n```\n./htsim_ndp_entry_modern_os -o uec_entry -nodes 512 -cwnd 255500 -q 255500 -strat perm -linkspeed 400000 -mtu 2048  -hop_latency 400 -switch_latency 0 -k 4 -goal mp.bin \u003e outUEC.tmp\n```\n\nOther protocols are currently being added. It is possible to add one by editing the logsim-interface files.\n\n\n## Generating GOAL input files\nWe will now explain how to generate a goal inpute file and then how to convert it into a binary format for it to be used as input.\n\n### Manually\nIt is possible to write a goal input file manually. For the specific of it, please check the original [GOAL](https://htor.inf.ethz.ch/publications/img/hoefler-goal.pdf) paper and [LGS](https://htor.inf.ethz.ch/publications/img/hoefler-loggopsim.pdf) paper.\n\n### Schedgen\nSchedgen offers a quick system to generate traces based on a specific traffic format. We currently support a numbers of MPI collectives and also general traffic patters such as incast, permutation, tornado... Check the ```schedgen/schedgen.cpp``` file for more infromation.\nAs as example, to generate a permutation with multiple send/recv per node, we would use (after running ```make```):\n\n```\n./schedgen -p multiple_permutation -s 64 -o mp.goal -d 1000000\n```\nThis will generate a ```.goal``` input file for 64 nodes and a message of 1MiB.\n\n### Schedgen ML Traces\nComing soon, it is implemented but missing some features. \n\n### Convert GOAL raw files to binary\nFinally, to convert the GOAL input files to binary we need to use the built in tool. The usage is very simple and follows the following command line from ```goal_converter/``` (after running ```make``` from the same folder):\n```\n./txt2bin -i ./mp.goal -o ./mp.bin -p\n```\nThis will generate a binary file that we can then use as input file for htsim when specifying the ```-goal``` parameter.\n\n## Plotting\n\nWe currently provide two plotting files:\n\n- ```performance.py``` will generate a plot with some overall results including RTT, CWND, NACK, ECN, Queue sizes over time.\n\n- ```load_balance_anlysis.py``` will generate a plot with link utilization after having fixed a specific switch to analyze. \n\nPlease check the files for more command line options that can be used with both. It is also possible that some Python libraries will need to be installed\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspcl%2Fhtsim-old","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspcl%2Fhtsim-old","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspcl%2Fhtsim-old/lists"}