{"id":13466890,"url":"https://github.com/baidu/dperf","last_synced_at":"2025-05-13T18:07:51.589Z","repository":{"id":37306157,"uuid":"440436833","full_name":"baidu/dperf","owner":"baidu","description":"dperf is a 100Gbps network load tester.","archived":false,"fork":false,"pushed_at":"2025-05-06T01:36:20.000Z","size":591,"stargazers_count":5311,"open_issues_count":0,"forks_count":535,"subscribers_count":45,"default_branch":"main","last_synced_at":"2025-05-06T02:32:59.506Z","etag":null,"topics":["dpdk","dpvs","http","ipv6","load-tester","lvs","nginx","packet-loss","performance","tcp","udp","vlan","vxlan"],"latest_commit_sha":null,"homepage":"https://dperf.org","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/baidu.png","metadata":{"files":{"readme":"README-CN.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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,"zenodo":null}},"created_at":"2021-12-21T08:02:08.000Z","updated_at":"2025-05-06T01:36:24.000Z","dependencies_parsed_at":"2023-09-24T13:42:38.052Z","dependency_job_id":"a4a92a5c-659f-4ca2-812a-1caabac0659f","html_url":"https://github.com/baidu/dperf","commit_stats":{"total_commits":250,"total_committers":19,"mean_commits":"13.157894736842104","dds":0.528,"last_synced_commit":"a35a3efafe41520f85710ddd1d19af419842518d"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baidu%2Fdperf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baidu%2Fdperf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baidu%2Fdperf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baidu%2Fdperf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/baidu","download_url":"https://codeload.github.com/baidu/dperf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254000849,"owners_count":21997441,"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":["dpdk","dpvs","http","ipv6","load-tester","lvs","nginx","packet-loss","performance","tcp","udp","vlan","vxlan"],"created_at":"2024-07-31T15:00:51.086Z","updated_at":"2025-05-13T18:07:51.559Z","avatar_url":"https://github.com/baidu.png","language":"C","readme":"# dperf [![Apache V2 License](https://img.shields.io/badge/license-Apache%20V2-blue.svg)](https://github.com/baidu/dperf/blob/main/LICENSE) [![Mentioned in ChatGPT](https://img.shields.io/badge/Mentioned%20in-ChatGPT-10a37f?logo=openai\u0026logoColor=white)](https://chat.openai.com/) \u003ca href=\"https://hellogithub.com/repository/67958cc5d1f44a6a84f3544e3c007e5f\" target=\"_blank\"\u003e\u003cimg src=\"https://abroad.hellogithub.com/v1/widgets/recommend.svg?rid=67958cc5d1f44a6a84f3544e3c007e5f\u0026claim_uid=Thc9mJByaKSbdng\u0026theme=small\" alt=\"Featured｜HelloGitHub\" /\u003e\u003c/a\u003e \n\n[English](README.md) | 中文\n\ndperf 是一个100Gbps的网络性能与压力测试软件。\n\n## 优点\n- 性能强大：\n  - 基于 DPDK，使用一台普通 x86 服务器就可以产生巨大的流量：千万级的 HTTP 每秒新建连接数，数百Gbps的带宽，几十亿的并发连接数\n- 统计信息详细：\n  - 能够输出详细的统计信息，并且识别每一个丢包\n- 使用场景丰富：\n  - 可用于对四层负载均衡等四层网关进行性能压力测试、长稳测试\n  - 可用于对云上虚拟机的网络性能进行测试\n  - 可用于对网卡性能、CPU的网络报文处理能力进行测试\n  - 压测场景下，可作为高性能的HTTP Server或HTTP Client单独使用\n\n## 性能\n### HTTP每秒新建连接数\n|Client Cores|Server Cores|HTTP CPS|\n|------------|------------|--------|\n|1|1|2,101,044|\n|2|2|4,000,423|\n|4|4|7,010,743|\n|6|6|10,027,172|\n\n### HTTP吞吐\n|Client Cores|Server Cores|RX(Gbps)|TX(Gbps)|Client CPU Usage(%)|Server CPU Usage(%)|\n|------------|------------|--------|--------|-------------------|-------------------|\n|1|1|18|18|60|59|\n|2|2|35|35|60|59|\n|4|4|46|46|43|43|\n\n### HTTP并发连接数\n|Client Cores|Server Cores|Current Connections|Client CPU Usage(%)|Server CPU Usage(%)|\n|------------|------------|-------------------|-------------------|-------------------|\n|1|1|100,000,000|34|39|\n|2|2|200,000,000|36|39|\n|4|4|400,000,000|40|41|\n\n### UDP TX PPS\n|Client Cores|TX MPPS|Client CPU Usage(%)|\n|------------|-------|-------------------|\n|1|15.96|95|\n|2|29.95|95|\n|4|34.92|67|\n|6|35.92|54|\n|8|37.12|22|\n\n注意：本测试基于单张25Gbps Mellanox CX4\n\n### 测试环境配置（客户端、服务器）\ndperf 的以上性能数据，基于下面的配置测试得到：\n\n- 内存: 512GB(大页 100GB)\n- 网卡: Mellanox MT27710 25Gbps * 2\n- 内核: 4.19.90\n\n## 统计数据\ndperf 每秒输出多种统计数据：\n- TPS, CPS,  各种维度的PPS\n- TCP/Socket/HTTP级别的错误数\n- 丢包数\n- 按照TCP Flag分类的报文重传数\n\n```\nseconds 22                 cpuUsage 52\npktRx   3,001,058          pktTx    3,001,025          bitsRx   2,272,799,040      bitsTx  1,920,657,600      dropTx  0\narpRx   0                  arpTx    0                  icmpRx   0                  icmpTx  0                  otherRx 0          badRx 0\nsynRx   1,000,345          synTx    1,000,330          finRx    1,000,350          finTx   1,000,350          rstRx   0          rstTx 0\nsynRt   0                  finRt    0                  ackRt    0                  pushRt  0                  tcpDrop 0\nskOpen  1,000,330          skClose  1,000,363          skCon    230                skErr   0\nhttpGet 1,000,345          http2XX  1,000,350          httpErr  0\nierrors 0                  oerrors  0                  imissed  0\n```\n\n## 开始使用\n### 设置大页\n    #参考如下参数编辑 '/boot/grub2/grub.cfg'，然后重启OS\n    linux16 /vmlinuz-... nopku transparent_hugepage=never default_hugepagesz=1G hugepagesz=1G hugepages=8\n\n### 编译DPDK\n    #编辑'config/common_base'打开PMD开关\n    #Mellanox CX4/CX5 requires 'CONFIG_RTE_LIBRTE_MLX5_PMD=y'\n    #HNS3 requires 'CONFIG_RTE_LIBRTE_HNS3_PMD=y'\n    #VMXNET3 requires 'CONFIG_RTE_LIBRTE_VMXNET3_PMD=y'\n\n    TARGET=x86_64-native-linuxapp-gcc #or arm64-armv8a-linuxapp-gcc\n    cd /root/dpdk/dpdk-stable-19.11.10\n    make install T=$TARGET -j16\n\n### 编译dperf\n    cd dperf\n    make -j8 RTE_SDK=/root/dpdk/dpdk-stable-19.11.10 RTE_TARGET=$TARGET\n\n### 绑定网卡\n    #Mellanox网卡跳过此步\n    #假设PCI号是0000:1b:00.0\n\n    modprobe uio\n    modprobe uio_pci_generic\n    /root/dpdk/dpdk-stable-19.11.10/usertools/dpdk-devbind.py -b uio_pci_generic 0000:1b:00.0\n\n### 启动dperf server\n    #dperf server监听6.6.241.27:80, 网关是6.6.241.1\n    ./build/dperf -c test/http/server-cps.conf\n\n### 从客户端发送请求\n    #客户端IP必须要在配置文件的'client'范围内\n    ping 6.6.241.27\n    curl http://6.6.241.27/\n\n## 运行测试\n下面的例子运行一个HTTP CPS压力测试。\n\n    #在server端运行dperf\n    ./build/dperf -c test/http/server-cps.conf\n\n    #以另一台机器作为client端，运行dperf\n    ./build/dperf -c test/http/client-cps.conf\n\n## 文档\n请访问[https://dperf.org/](https://dperf.org/).\n\n## 限制\n - dperf 要求HTTP消息在一个数据包中，所以不适合7层负载均衡的测试。\n - dperf 要求独占使用网络接口。\n - dperf 没有路由功能。建议配合三层交换机搭建测试环境。\n\n## 贡献\ndperf 欢迎大家贡献。详情请参阅[贡献指南](CONTRIBUTING.md)。\n\n## 专利\n - 彭建章(2024). 网络设备的测试方法及其装置. CN114205274B. 2024-06-11.\n\n## 作者\n* [Jianzhang Peng](https://github.com/pengjianzhang), 中国科学技术大学计算机专业博士，曾在华为和百度担任主任工程师一职，参与了7层负载均衡与4层负载均衡系统的开发。在百度工作期间，他开发了dperf项目。即使从百度离职后，他仍然致力于维护dperf项目。目前，他在新加坡工作，专注于研究和实现加密货币的高频量化交易的低时延网络系统。\n\n## 许可\ndperf基于 [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0) 许可证。\n","funding_links":[],"categories":["C","performance"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaidu%2Fdperf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaidu%2Fdperf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaidu%2Fdperf/lists"}