{"id":16724948,"url":"https://github.com/pchaigno/tail-call-bench","last_synced_at":"2025-04-10T10:22:41.878Z","repository":{"id":152041850,"uuid":"349132199","full_name":"pchaigno/tail-call-bench","owner":"pchaigno","description":"Benchmark tools to evaluate the cost of BPF tail calls","archived":false,"fork":false,"pushed_at":"2021-08-12T15:48:20.000Z","size":289,"stargazers_count":9,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T09:11:29.520Z","etag":null,"topics":["ansible","benchmark","bpf","ebpf"],"latest_commit_sha":null,"homepage":"https://pchaigno.github.io/ebpf/2021/03/22/cost-bpf-tail-calls.html","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pchaigno.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":"2021-03-18T15:51:41.000Z","updated_at":"2024-07-22T11:23:20.000Z","dependencies_parsed_at":"2023-07-12T03:15:12.422Z","dependency_job_id":null,"html_url":"https://github.com/pchaigno/tail-call-bench","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pchaigno%2Ftail-call-bench","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pchaigno%2Ftail-call-bench/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pchaigno%2Ftail-call-bench/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pchaigno%2Ftail-call-bench/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pchaigno","download_url":"https://codeload.github.com/pchaigno/tail-call-bench/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248199080,"owners_count":21063641,"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":["ansible","benchmark","bpf","ebpf"],"created_at":"2024-10-12T22:47:21.710Z","updated_at":"2025-04-10T10:22:41.861Z","avatar_url":"https://github.com/pchaigno.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Benchmark Tools for BPF Tail Calls\n\n\n\nThis repository contains an Ansible playbook and the sources of a Docker image to execute BPF tail call benchmarks on remote servers. \nIt measures the cost of tail call chains of varying lengths using [`kern.c`](image/kern.c) as the BPF program.\nThe Docker image is available at `docker.io/pchaigno/tail-calls:v1.0`.\n\nResults produced by these tools are presented at https://pchaigno.github.io/ebpf/2021/03/22/cost-bpf-tail-calls.html.\n\n## Requirements\n\nThe Ansible playbook was developed to work with [Packet](https://www.packet.com/)'s Ubuntu 20.04 and may not work with other distributions.\nOnly Ansible and the kernel debian packages are required on the machine used to run the playbook.\n\n\n## Running the Benchmark\n\n### Populate hosts.ini\n\nYou need to complete `hosts.ini` with the IP addresses of your benchmark servers, a string matching the kernel debian package to install, and the file where results should be written.\nFor example:\n```\n147.75.100.157 kernel=5.10.0-retpoline boot_order=0 output=results-5.10-retpoline.txt ansible_user=root ansible_python_interpreter=/usr/bin/python3\n147.75.100.157 kernel=5.4.0-retpoline boot_order=2 output=results-5.4-retpoline.txt ansible_user=root ansible_python_interpreter=/usr/bin/python3\n```\n\nThe `kernel` string will be used in the file glob `linux-*[kernel]*.deb` to select the debian packages to install.\n`boot_order` should be set to `0` on kernels 5.5+ and `2` on others.\n\n### Execute the Ansible Playbook\n\nYou can then execute `ansible-playbook`:\n```shell\nansible-playbook -v -i hosts.ini -e nb_runs=100 -e nb_measures=10 -e result_dir=/home/paul/pchaigno.github.io playbook.yaml\n```\nThe Ansible tasks are executed on all servers in parallel without waiting for other servers.\n\n- `result_dir` is the directory where the `output` result files mentioned above will be saved.\n- `nb_runs` corresponds to the number of time each BPF program will be executed in the kernel.\nOnly the mean of those `nb_runs` executions will be reported.\n- `nb_measures` corresponds to the number of times `BPF_PROG_TEST_RUN` will be called.\nWith the above parameters, each tail call chain will run a thousand times and 10 means will be reported. \n\n\n## License\n\nThis project is under [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpchaigno%2Ftail-call-bench","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpchaigno%2Ftail-call-bench","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpchaigno%2Ftail-call-bench/lists"}