{"id":20656680,"url":"https://github.com/platformlab/homamodule","last_synced_at":"2025-04-12T15:41:48.964Z","repository":{"id":37685260,"uuid":"139636077","full_name":"PlatformLab/HomaModule","owner":"PlatformLab","description":"A Linux kernel module that implements the Homa transport protocol.","archived":false,"fork":false,"pushed_at":"2025-03-11T21:36:13.000Z","size":3490,"stargazers_count":222,"open_issues_count":0,"forks_count":47,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-04-04T07:31:48.680Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PlatformLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2018-07-03T20:54:09.000Z","updated_at":"2025-03-25T21:27:21.000Z","dependencies_parsed_at":"2023-02-16T16:45:21.219Z","dependency_job_id":"d675f95b-7ed3-44a3-94f6-1da9254f66f2","html_url":"https://github.com/PlatformLab/HomaModule","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PlatformLab%2FHomaModule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PlatformLab%2FHomaModule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PlatformLab%2FHomaModule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PlatformLab%2FHomaModule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PlatformLab","download_url":"https://codeload.github.com/PlatformLab/HomaModule/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248590879,"owners_count":21129904,"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-16T18:16:55.866Z","updated_at":"2025-04-12T15:41:48.937Z","avatar_url":"https://github.com/PlatformLab.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"This repo contains an implementation of the Homa transport protocol as a Linux kernel module.\n\n- For more information on Homa in general, see the [Homa\n  Wiki](https://homa-transport.atlassian.net/wiki/spaces/HOMA).\n\n- More information about this implementation and its performance are available in\n  the paper [A Linux Kernel Implementation of the Homa Transport\n  Protocol](https://www.usenix.org/system/files/atc21-ousterhout.pdf),\n  which appeared in the USENIX Annual Technical Conference in July, 2021.\n\n- A synopsis of the protocol implemented by this module is available in\n  [protocol.md](https://github.com/PlatformLab/HomaModule/blob/master/protocol.md).\n\n- As of August 2020, Homa has complete functionality for running real applications,\n  and its tail latency is more than 10x better than TCP for all workloads I have\n  measured (Homa's 99-th percentile latency is usually better than TCP's mean\n  latency). Here is a list of the most significant functionality that is still\n  missing:\n  - The incast optimization from Section 3.6 of the SIGCOMM paper has not\n    been implemented yet. If you would like to test Homa under large incasts,\n    let me know and I will implement this feature.\n  - Socket buffer memory management needs more work. Large numbers of large\n    messages (hundreds of MB?) may cause buffer exhaustion and deadlock.\n\n - Please contact me if you have any problems using this repo; I'm happy to\n   provide advice and support.\n\n- The head is known to work under Linux 6.10.6. In the past, Homa has\n  run under several earlier versions of Linux. There is a separate branch\n  for each of these\n  older versions, with names such as linux_4.15.18. Older branches are\n  out of date feature-wise: recent commits have not been back-ported to them.\n  Other versions of Linux have not been tested and\n  may require code changes (these upgrades rarely take more than a couple\n  of hours). If you get Homa working on some other version, please submit a\n  pull request with the required code changes.\n\n- Related work that you may find useful:\n  - [Preliminary support for using Homa with gRPC](https://github.com/PlatformLab/grpc_homa)\n  - [A Go client that works with this module](https://github.com/dpeckett/go-homa)\n\n- To build the module, type `make all`; then type `sudo insmod homa.ko` to install\n  it, and `sudo rmmod homa` to remove an installed module. In practice, though,\n  you'll probably want to do several other things as part of installing Homa.\n  I have created a Python script that I use for installing Homa on clusters\n  managed by the CloudLab project; it's in `cloudlab/bin/config`. I normally\n  invoke it with no parameters to install and configure Homa on the current\n  machine.\n\n- The script `cloudlab/bin/install_homa` will copy relevant Homa files\n  across a cluster of machines and configure Homa on each node. It assumes\n  that nodes have names `nodeN` where N is a small integer, and it also\n  assumes that you have already run `make` both in the top-level directory and\n  in `util`.\n\n- For best Homa performance, you should also make the following configuration\n  changes:\n  - Enable priority queues in your switches, selected by the 3\n    high-order bits of the DSCP field in IPv4 packet headers or the 4\n    high-order bits of the Traffic Class field in IPv6 headers.\n    You can use `sysctl` to configure Homa's use of\n    priorities (e.g., if you want it to use fewer than 8 levels). See the man\n    page `homa.7` for more info.\n  - Enable jumbo frames on your switches and on the Linux nodes.\n\n- NIC support for TSO: Homa can use TCP Segmentation Offload (TSO) in order\n  to send large messages more efficiently. To do this, it uses a header format\n  that matches TCP's headers closely enough to take advantage of TSO support in NICs.\n  It is not clear that this approach will work with all NICs, but the following\n  NICs are known to work:\n  - Mellanox ConnectX-4, ConnectX-5, and ConnectX-6\n\n  There have been reports of problems with the following NICs (these have not\n  yet been explored thoroughly enough to know whether the problems are\n  insurmountable):\n  - Intel E810 (ice), XXV710 (i40e), XL710\n\n  Please let me know if you find other NICs that work (or NICs that don't work).\n  If the NIC doesn't support TSO for Homa, then you can request that Homa\n  perform segmentation in software by setting the `gso_force_software` parameter\n  to a nonzero value using `sysctl`. Unfortunately, software segmentation\n  is inefficient because it has to copy the packet data. Alternatively,\n  you can ensure that the `max_gso_size` parameter is the same as the maximum\n  packet size, which eliminates GSO in any form. This is also inefficient\n  because it requires more packets to traverse the Linux networking stack.\n\n- A collection of man pages is available in the \"man\" subdirectory. The API for\n  Homa is different from TCP sockets.\n\n- The subdirectory \"test\" contains unit tests, which you can run by typing\n  \"make\" in that subdirectory.\n\n- The subdirectory \"util\" contains an assortment of utility programs that\n  you may find useful in exercising and benchmarking Homa. Compile them by typing\n  `make` in that subdirectory. Here are some examples of benchmarks you might\n  find useful:\n  - The `cp_node` program can be run stand-alone on clients and servers to run\n    simple benchmarks. For a simple latency test, run `cp_node server` on node1 of\n    the cluster, then run `cp_node client` on node 0. The client will send\n    continuous back-to-back short requests to the server and output timing\n    information. Or, run `cp_node client --workload 500000` on the client:\n    this will send continuous 500 KB messages for a simple througput test.\n    Type `cp_node --help` to learn about other ways you can use this program.\n  - The `cp_vs_tcp` script uses `cp_node` to run cluster-wide tests comparing\n    Homa with TCP (and/or DCTCP); it was used to generate the data for\n    Figures 3 and 4 in the Homa ATC paper. Here is an example command:\n    ```\n    cp_vs_tcp -n 10 -w w4 -b 20\n    ```\n    When invoked on node0, this will run a benchmark using the W4 workload\n    from the ATC paper,\n    running on 10 nodes and generating 20 Gbps of offered load (80%\n    network load on a 25 Gbps network). Type `cp_vs_tcp --help` for\n    information on all available options.\n  - Other `cp_` scripts can be used for different benchmarks.\n    See `util/README.md` for more information.\n\n - Some additional tools you might find useful:\n   - Homa collects various metrics about its behavior, such as the size\n     distribution of incoming messages. You can access these through the\n     file `/proc/net/homa_metrics`. The script `util/metrics.py` will\n     collect metrics and print out all the numbers that have changed\n     since its last run.\n   - Homa exports a collection of configuration parameters through the\n     sysctl mechanism. For details, see the man page `homa.7`.\n\n## Significant recent improvements\n- October 2024: Homa now has an official IANA IP protocol number (146).\n- August 2024: upgraded to Linux 6.10.6.\n- July 2024: introduced \"TCP hijacking\", where Homa packets are sent as\n  legitimate TCP segments (using TCP as the IP protocol) and then reclaimed\n  from TCP on the destination. This allows Homa to make better use of\n  TSO and RSS.\n- June 2024: refactored sk_buff management to use frags; improves\n  efficiency significantly.\n- April 2024: replaced `master` branch with `main`\n- July 2023: upgraded to Linux 6.1.38.\n- December 2022: Version 2.0. This includes a new mechanism for managing\n  buffer space for incoming messages, which improves throughput by\n  50-100% in many situations. In addition, Homa now uses the sendmsg\n  and recvmsg system calls, rather than ioctls, for sending and receiving\n  messages. The API for receiving messages is incompatible with 1.01.\n- November 2022: implemented software GSO for Homa.\n- September 2022: added support for IPv6, as well as completion cookies.\n  This required small but incompatible changes to the API.\n  Many thanks to Dan Manjarres for contributing these\n  improvements.\n- September 2022: Homa now works on Linux 5.18 as well as 5.17.7\n- June 2022: upgraded to Linux 5.17.7.\n- November 2021: changed semantics to at-most-once (servers can no\n  longer see multiple instances of the same RPC).\n- August 2021: added new versions of the Homa system calls that\n  support iovecs; in addition, incoming messages can be read\n  incrementally across several homa_recv calls.\n- November 2020: upgraded to Linux 5.4.3.\n- June 2020: implemented busy-waiting during homa_recv: shaves 2\n  microseconds off latency.\n- June 2020: several fixes to prevent RPCs from getting \"stuck\",\n  where they never make progress.\n- May 2020: got priorities working correctly using the DSCP field\n  of IP headers.\n- December 2019: first versions of cperf (\"cluster performance\")\n  benchmark.\n- December 2019 - June 2020: many improvements to the GRO mechanism,\n  including better hashing and batching across RPCs; improves both\n  throughput and latency.\n- Fall 2019: many improvements to pacer, spread over a couple of months.\n- November 6, 2019: reworked locking to use RPC-level locks instead of\n  socket locks for most things (significantly reduces socket lock.\n  contention). Many more refinements to this in subsequent commits.\n- September 25, 2019: reworked timeout mechanism to eliminate over-hasty\n  timeouts. Also, limit the rate at which RESENDs will be sent to an\n  overloaded machine.\n- August 1, 2019: GSO and GRO are now working.\n- March 13, 2019: added support for shutdown kernel call, plus poll, select,\n  and epoll. Homa now connects will all of the essential Linux plumbing.\n- March 11, 2019: extended homa_recv API with new arguments: flags, id.\n- February 16, 2019: added manual entries in the subdirectory \"man\".\n- February 14, 2019: output queue throttling now seems to work (i.e., senders\n  implement SRPT properly).\n- November 6, 2019: timers and packet retransmission now work.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplatformlab%2Fhomamodule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplatformlab%2Fhomamodule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplatformlab%2Fhomamodule/lists"}