Giter Site home page Giter Site logo

egress-filtering-benchmark's Introduction

Egress Filtering Benchmark

This repository contains a set of tools to measure the egress filtering performance using BPF, iptables, ipsets and calico.

How to Use

  1. Setup two computers to run the test. You need to have Docker, iptables and ipset installed and you should be able to connect to those computers with SSH without requiring a password.

  2. Download the latest Lokomotive release

    Unpack and move to a desired locatin:

    tar xvf lokoctl_$VERSION_linux_amd64.tar.gz
    mv lokoctl_$VERSION_linux_amd64/lokoctl ~/.local/bin/lokoctl
  3. Create a Kubernetes cluster using Lokomotive with at least one worker node.

    A minimal working configuration that can be deployed on Packet (acquired by Equinix Metal)

    Update the variables in lokocfg.vars and execute:

    git clone [email protected]:kinvolk/egress-filtering-benchmark.git
    cd lokomotive
    lokoctl cluster apply

    Set location of kubeconfig using the environment variable KUBECONFIG:

    cd egress-filtering-benchmark/lokomotive
    export KUBECONFIG=$PWD/assets/cluster-assets/auth/kubeconfig
    

    Label the worker node as follows:

    kubectl label node calico-benchmark-pool-1-worker-0 nodetype=worker-benchmark
    
  4. Configure the parameters of the test in the parameters.py file.

  5. Install the required libraries in the client to run the Python script

pip install -r requirements.txt
  1. Execute the tests:
$ cd benchmark
$ make
$ python run_tests.py --mode udp --username USERNAME --client CLIENTADDR --server SERVERADDR

This will create some csv files with the information about the test. You can plot them by your self or follow the next step.

  1. Plot the data by running
$ python plot_data.py

This will create some svg files with the graphs.

Credits

The BPF filter is inspired by the tc-bpf man page and the Cilium documentation.

egress-filtering-benchmark's People

Contributors

alban avatar ipochi avatar mauriciovasquezbernal avatar pchaigno 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

Watchers

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

egress-filtering-benchmark's Issues

Broken link in the article (Performance Benchmark Analysis of Egress Filtering on Linux)

Description

Thanks for the article (Performance Benchmark Analysis of Egress Filtering on Linux), it's a very interesting read!

The own link in the following sentence points to https://github.com/kinvolk/egress-filtering-benchmark/blob/master/pkg/filters/bpf/datapath/bpf.c which returns 404.

Given that we want to keep the tests as simple as possible we decided to implement our own filtering program in eBPF that will be attached to the traffic control layer with a clsact qdisc.

I assume the correct one is: https://github.com/kinvolk/egress-filtering-benchmark/blob/master/pkg/filters/tc-bpf/datapath/bpf.c

Use Packet per Second as a metric

Current situation

Currently one of the metric for the Performance benchmark is Throughput in Gbps for TCP/UDP.

Impact
Measuring the throughput with a fixed packet size doesn't give the direct insights compared to measuring packets per second.

Ideal future situation
UDP test doesn't tell the size of the packets and measures only the throughput and it's easy to get a high throughput by using large packets.

The challenge is to maintain line rate throughput with the smallest packets because filtering is a per-packet action. So instead of comparing the throughput with ~64 bytes packets it is an established practice to directly measure the Mpps (million packets per second) and see if the maximum of ~14 Mpps for a 10 G line rate is reached.

Additional information

https://discuss.aerospike.com/t/benchmarking-throughput-and-packet-count-with-iperf3/2791

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.