Code Monkey home page Code Monkey logo

bgperf's Introduction

bgperf

bgperf is a performance measurement tool for BGP implementation.

Prerequisites

  • Python 2.7 or later
  • Docker
$ 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 config

optional 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

Use bench command to start benchmark test. By default, bgperf benchmarks GoBGP. bgperf boots 100 BGP test peers each advertises 100 routes to GoBGP.

$ 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 and Quagga other than GoBGP.

$ 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)
$ 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.

bgperf's People

Contributors

benerudolph avatar fujita avatar pierky avatar rzalamena avatar yokoi-h avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bgperf's Issues

Could not run on FreeBSD

Hello, folks!

I would like to use toolkit on FreeBSD but I could not start it:

./bgperf.py --help
Traceback (most recent call last):
  File "./bgperf.py", line 30, in <module>
    from nsenter import Namespace
  File "/usr/local/lib/python2.7/site-packages/nsenter/__init__.py", line 21, in <module>
    class Namespace(object):
  File "/usr/local/lib/python2.7/site-packages/nsenter/__init__.py", line 52, in Namespace
    _libc = ctypes.CDLL('libc.so.6', use_errno=True)
  File "/usr/local/lib/python2.7/ctypes/__init__.py", line 365, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: Shared object "libc.so.6" not found, required by "python"

Unfortunately, we haven't nsenter and cgroups at FreeBSD. Could you offer workaround for this case?

You're benching Quagga with a 30s MRAI against implementations with no MRAI

Hi,

You're bench marking Quagga in its default configuration with a 30s MRAI against BGP implementations that do not implement an MRAI at all. Your convergence time numbers as a result are not apples-apples.

You should configure Quagga with a 0s MRAI (neighbor ... advertisement-interval), or at least some part of your numbers are just indicative of what no-MRAI BGP versus 30s MRAI.

Python exception thrown when running bench

I've just installed bgperf, as described in your instructions.

21:18:49 [dotwaffle@hasselhoff:~/Code/bgperf] master ± sudo ./bgperf.py bench
creating Docker network "bgperf-br" with subnet 10.10.0.0/16
run monitor
run gobgp
waiting bgp connection between gobgp and monitor
run tester tester type normal
tester booting.. (100/100)
elapsed: 0sec, cpu: 0.00%, mem: 0.00B, recved: 9900
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/srv/home/dotwaffle/Code/bgperf/base.py", line 179, in stats
    queue.put({'who': self.name, 'cpu': cpu_percentage, 'mem': stat['memory_stats']['usage']})
KeyError: 'usage'
elapsed: 2sec, cpu: 0.00%, mem: 0.00B, recved: 10000
21:20:20 [dotwaffle@hasselhoff:~/Code/bgperf] master ±

Any ideas? I made sure to run pip --upgrade -r pip-requirements.txt in case that helps... It didn't. Also happens using -t bird.

System is Debian Stable.

Be nice to support HTTP proxies

It'd be nice if the docker build of the containers supported passing in a HTTP proxy somehow, for the apt commands, for those behind a corp firewall.

For now I just manually added in ENV http_proxy ... etc to the {bird,exabgp,gobgp,quagga}.py files.

regards,

Paul

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.