https://github.com/osrg/bgperf
https://github.com/osrg/bgperf
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/osrg/bgperf
- Owner: osrg
- License: apache-2.0
- Created: 2015-12-21T10:22:03.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-09-29T09:03:47.000Z (over 6 years ago)
- Last Synced: 2025-04-23T14:15:26.592Z (about 2 months ago)
- Language: Python
- Size: 340 KB
- Stars: 87
- Watchers: 13
- Forks: 30
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
bgperf
========bgperf is a performance measurement tool for BGP implementation.
* [How to install](#how_to_install)
* [How to use](#how_to_use)
* [How bgperf works](https://github.com/osrg/bgperf/blob/master/docs/how_bgperf_works.md)
* [Benchmark remote target](https://github.com/osrg/bgperf/blob/master/docs/benchmark_remote_target.md)
* [MRT injection](https://github.com/osrg/bgperf/blob/master/docs/mrt.md)## Prerequisites
* Python 2.7 or later
* Docker```bash
$ git clone https://github.com/osrg/bgperf
$ cd bgperf
$ pip install -r pip-requirements.txt
$ ./bgperf.py --help
usage: bgperf.py [-h] [-b BENCH_NAME] [-d DIR]
{doctor,prepare,update,bench,config} ...BGP performance measuring tool
positional arguments:
{doctor,prepare,update,bench,config}
doctor check env
prepare prepare env
update pull bgp docker images
bench run benchmarks
config generate configoptional arguments:
-h, --help show this help message and exit
-b BENCH_NAME, --bench-name BENCH_NAME
-d DIR, --dir DIR
$ ./bgperf.py prepare
$ ./bgperf.py doctor
docker version ... ok (1.9.1)
bgperf image ... ok
gobgp image ... ok
bird image ... ok
quagga image ... ok
```## How to use
Use `bench` command to start benchmark test.
By default, `bgperf` benchmarks [GoBGP](https://github.com/osrg/gobgp).
`bgperf` boots 100 BGP test peers each advertises 100 routes to `GoBGP`.```bash
$ sudo ./bgperf.py bench
run tester
tester booting.. (100/100)
run gobgp
elapsed: 16sec, cpu: 0.20%, mem: 580.90MB
elapsed time: 11sec
```To change a target implementation, use `-t` option.
Currently, `bgperf` supports [BIRD](http://bird.network.cz/) and [Quagga](http://www.nongnu.org/quagga/)
other than GoBGP.```bash
$ sudo ./bgperf.py bench -t bird
run tester
tester booting.. (100/100)
run bird
elapsed: 16sec, cpu: 0.00%, mem: 147.55MB
elapsed time: 11sec
$ sudo ./bgperf.py bench -t quagga
run tester
tester booting.. (100/100)
run quagga
elapsed: 33sec, cpu: 0.02%, mem: 477.93MB
elapsed time: 28sec
```To change a load, use following options.
* `-n` : the number of BGP test peer (default 100)
* `-p` : the number of prefix each peer advertise (default 100)
* `-a` : the number of as-path filter (default 0)
* `-e` : the number of prefix-list filter (default 0)
* `-c` : the number of community-list filter (default 0)
* `-x` : the number of ext-community-list filter (default 0)```bash
$ sudo ./bgperf.py bench -n 200 -p 50
run tester
tester booting.. (200/200)
run gobgp
elapsed: 23sec, cpu: 0.02%, mem: 1.26GB
elapsed time: 18sec
```For a comprehensive list of options, run `sudo ./bgperf.py bench --help`.