{"id":13612060,"url":"https://github.com/erpc-io/eRPC","last_synced_at":"2025-04-13T11:31:30.039Z","repository":{"id":37334477,"uuid":"76991394","full_name":"erpc-io/eRPC","owner":"erpc-io","description":"Efficient RPCs for datacenter networks","archived":false,"fork":false,"pushed_at":"2024-05-09T22:45:46.000Z","size":6942,"stargazers_count":878,"open_issues_count":21,"forks_count":140,"subscribers_count":35,"default_branch":"master","last_synced_at":"2025-04-06T23:45:37.733Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erpc-io.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,"publiccode":null,"codemeta":null}},"created_at":"2016-12-20T21:02:20.000Z","updated_at":"2025-04-03T21:17:57.000Z","dependencies_parsed_at":"2024-02-03T08:44:39.355Z","dependency_job_id":"5b12e7e1-0807-4f48-a90d-a61abfef5c8a","html_url":"https://github.com/erpc-io/eRPC","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/erpc-io%2FeRPC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erpc-io%2FeRPC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erpc-io%2FeRPC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erpc-io%2FeRPC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erpc-io","download_url":"https://codeload.github.com/erpc-io/eRPC/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248705654,"owners_count":21148569,"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-08-01T20:00:21.838Z","updated_at":"2025-04-13T11:31:28.604Z","avatar_url":"https://github.com/erpc-io.png","language":"C++","funding_links":[],"categories":["C","C++"],"sub_categories":[],"readme":"**News [Dec 2023]: Check out [Machnet](https://github.com/microsoft/machnet) for fast and easy DPDK-based messaging. It supports many types of cloud VMs and bare-metal NICs, multiple application processes, language bindings, etc.**\n\neRPC is a fast and general-purpose RPC library for datacenter networks.\nOur NSDI 2019 [paper](https://www.usenix.org/system/files/nsdi19-kalia.pdf)\ndescribes the system in detail. Documentation can be generated by running `doxygen`.\n\nSome highlights:\n * Multiple supported networks: Ethernet, InfiniBand, and RoCE\n * Low latency: 2.3 microseconds round-trip RPC latency with UDP over Ethernet\n * Performance for small 32-byte RPCs: ~10M RPCs/sec with one CPU core,\n   60--80M RPCs/sec with one NIC.\n * Bandwidth for large RPC: 75 Gbps on one connection (one CPU core at server\n   and client) for 8 MB RPCs\n * Scalability: 20000 RPC sessions per server\n * End-to-end congestion control that tolerates 100-way incasts\n * Nested RPCs, and long-running background RPCs\n * A port of [Raft](https://github.com/willemt/raft) as an example. Our 3-way\n   replication latency is 5.3 microseconds with traditional UDP over Ethernet.\n\n## System requirements\n * NICs: Fast (10 GbE+) NICs are needed for good performance. eRPC works best\n   with Mellanox Ethernet and InfiniBand NICs. Any DPDK-capable NICs\n   also work well.\n * System configuration:\n   * At least 1024 huge pages on every NUMA node, and unlimited SHM limits\n   * On a machine with `n` eRPC processes, eRPC uses kernel UDP ports `{31850,\n     ..., 31850 + n - 1}.` These ports should be open on the management\n     network. See `scripts/firewalld/erpc_firewall.sh` for systems running\n     `firewalld`.\n\n## eRPC quickstart\n * Build and run the test suite:\n   `cmake . -DPERF=OFF -DTRANSPORT=dpdk; make -j; sudo ctest`.\n   * `DPERF=OFF` enables debugging, which greatly reduces performance. Set\n     `DPERF=ON` for good performance.\n   * Here, `dpdk` should be replaced with `infiniband` for InfiniBand NICs.\n   * A machine with two ports is needed to run the unit tests if DPDK is chosen.\n     Run `scripts/run-tests-dpdk.sh` instead of `ctest`.\n * Run the `hello_world` application:\n   * `cd hello_world`\n   * Edit the server and client hostnames in `common.h` \n   * Based on the transport that eRPC was compiled for, compile `hello_world`\n     using `make dpdk`, or `make infiniband`.\n   * Run `./server` at the server, and `./client` at the client\n * Generate the documentation: `doxygen`\n\n## Supported bare-metal NICs:\n * Ethernet/UDP mode:\n   * DPDK-enabled bare-metal NICs: Use `DTRANSPORT=dpdk`. We have primarily tested Mellanox CX3--CX5 NICs.\n   * DPDK-enabled NICs on Microsoft Azure: Use `-DTRANSPORT=dpdk -DAZURE=on`\n * RDMA (InfiniBand/RoCE) NICs: Use `DTRANSPORT=infiniband`. Add `DROCE=on`\n   if using RoCE.\n\n## Running eRPC over DPDK on Microsoft Azure VMs\n\n  * eRPC works well on Azure VMs with accelerated networking.\n\n  * Configure two Ubuntu 18.04 VMs as below. Use the same resource group and\n    availability zone for both VMs.\n\n    * Uncheck \"Accelerated Networking\" when launching each VM from the Azure\n      portal (e.g., F32s-v2). For now, this VM should have just the control\n      network (i.e., `eth0`) and `lo` interfaces.\n    * Add a NIC to Azure via the Azure CLI: `az network nic create\n      --resource-group \u003cyour resource group\u003e --name \u003ca name for the NIC\u003e\n      --vnet-name \u003cname of the VMs' virtual network\u003e --subnet default\n      --accelerated-networking true --subscription \u003cAzure subscription, if\n      any\u003e --location \u003cthe VM's availability zone\u003e`\n    * Stop the VM launched earlier, and attach the NIC created in the previous\n      step to the VM (i.e., in \"Networking\" -\u003e \"Attach network interface\").\n    * Re-start the VM. It should have a new interface called `eth1`, which eRPC\n      will use for DPDK traffic.\n\n  * Prepare DPDK 21.11\n    * [rdma-core](https://github.com/linux-rdma/rdma-core) must be installed\n      from source. We recommend the tag `stable-v40. First, install its\n      dependencies listed in rdma-core's README.\n      Then, in the `rdma-core` directory:\n       * `cmake .`\n       * `sudo make install`\n    * Install upstream pre-requisite libraries and modules:\n       * `sudo apt install make cmake g++ gcc libnuma-dev libgflags-dev numactl`\n       * `sudo modprobe ib_uverbs`\n       * `sudo modprobe mlx4_ib`\n    * Download the [DPDK  tarball](https://core.dpdk.org/download/) and\n      extract it. Other DPDK versions are not supported.\n    * Edit `config/common_base` by changing `CONFIG_RTE_LIBRTE_MLX5_PMD` and\n      `CONFIG_RTE_LIBRTE_MLX4_PMD` to `y` instead of `n`.\n    * Build and locally install DPDK: \n```bash\nexport RTE_SDK=\u003csome dpdk directory\u003e\ngit clone --depth 1 --branch 'v21.11' https://github.com/DPDK/dpdk.git \"${RTE_SDK}\"\ncd \"${RTE_SDK}\"\nmeson build -Dexamples='' -Denable_kmods=false -Dtests=false -Ddisable_drivers='raw/*,crypto/*,baseband/*,dma/*'\ncd build/\nDESTDIR=\"${RTE_SDK}/build/install\" ninja install\n```\n\n  *  Create hugepages:\n```bash\nsudo bash -c \"echo 2048 \u003e /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages\"\nsudo mkdir /mnt/huge\nsudo mount -t hugetlbfs nodev /mnt/huge\n```\n\n  * Build eRPC's library and latency benchmark:\n```bash\ncmake . -DTRANSPORT=dpdk -DAZURE=on\nmake\nmake latency\n```\n\n  * Create the file `scripts/autorun_process_file` like below. Here, do not use\n    the IP addresses of the accelerated NIC (i.e., not of `eth1`).\n```\n\u003cPublic IPv4 address of VM #1\u003e 31850 0\n\u003cPublic IPv4 address of VM #2\u003e 31850 0\n```\n\n  * Run the eRPC application (the latency benchmark by default):\n    * At VM #1: `./scripts/do.sh 0 0`\n    * At VM #2: `./scripts/do.sh 1 0`\n\n\n## Configuring and running the provided benchmarks\n * The `apps` directory contains a suite of benchmarks and examples. The\n   instructions below are for this suite of applications. eRPC can also be\n   simply linked as a library instead (see `hello_world/` for an example).\n * To build an application, create `scripts/autorun_app_file` and change its\n   contents to one of the available directory names in `apps/`. See\n   `scripts/example_autorun_app_file` for an example. Then generate a\n   Makefile using `cmake . -DTRANSPORT=dpdk/infiniband`. \n * Each application directory in `apps/` contains a config file\n   that must specify all flags defined in `apps/apps_common.h`. For example,\n   `num_processes` specifies the total number of eRPC processes in the cluster.\n * The URIs of eRPC processes in the cluster are specified in\n   `scripts/autorun_process_file`. Each line in this file must be\n   `\u003chostname\u003e \u003cmanagement udp port\u003e \u003cnuma_node\u003e`.\n * Run `scripts/do.sh` for each process:\n   * With single-CPU machines: `num_processes` machines are needed.\n     Run `scripts/do.sh \u003ci\u003e 0` on machine `i` in `{0, ..., num_processes - 1}`.\n   * With dual-CPU machines: `num_machines = ceil(num_processes / 2)` machines\n     are needed. Run `scripts/do.sh \u003ci\u003e \u003ci % 2\u003e` on machine i in\n     `{0, ..., num_machines - 1}`.\n * To automatically run an application at all processes in\n   `scripts/autorun_process_file`, run `scripts/run-all.sh`. For some\n   applications, statistics generated in a run can be collected and processed\n   using `scripts/proc-out.sh`.\n\n## Getting help\n * GitHub issues are preferred over email. Please include the following\n   information in the issue:\n   * NIC model\n   * `rdma_core` version and DPDK version\n   * Operating system\n\n## Contact\nAnuj Kalia\n\n## License\n\t\tCopyright 2018, Carnegie Mellon University\n\n        Licensed under the Apache License, Version 2.0 (the \"License\");\n        you may not use this file except in compliance with the License.\n        You may obtain a copy of the License at\n\n            http://www.apache.org/licenses/LICENSE-2.0\n\n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferpc-io%2FeRPC","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferpc-io%2FeRPC","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferpc-io%2FeRPC/lists"}