Skip to content
Frank Schröder edited this page Jul 18, 2016 · 2 revisions

fabio has been tested to deliver up to 15.000 req/sec on a single 16 core host with moderate memory requirements (~ 60 MB).

To achieve the performance fabio sets the following defaults which can be overwritten with the environment variables:

  • GOMAXPROCS is set to runtime.NumCPU() since this is not the default for Go 1.4 and before
  • GOGC=800 is set to reduce the pressure on the garbage collector

When fabio is compiled with Go 1.5 and run with default settings it can be up to 40% slower than the same version compiled with Go 1.4. The GOGC=100 default puts more pressure on the Go 1.5 GC which makes the fabio spend 10% of the time in the GC. With GOGC=800 this drops back to 1-2%. Higher values don't provide higher gains.

The benchmarks were performed with weighttp and the following command:

./weighttp -n 1000000 -c 100 -t 16 "http://host:port/static-2k-page.html"

As usual, don't rely on these numbers and perform your own benchmarks. You can check the time fabio spends in the GC with GODEBUG=gctrace=1.