Benchmarking high-speed network servers is a difficult task but an extremely useful one. Good benchmarks not only reveal performance characteristics, they also effectively test the server and help to reveal unusual behaviour. The benchmarks that have been run on Pants to date have been limited, but should provide a useful measure of its performance for highly-responsive, low-throughput servers.
Benchmarks such as this are only useful when they truly give an accurate picture of the performance of the frameworks involved. We have tried our best to benchmark these frameworks in an accurate and fair manner. If you find an error in our methodology, please do let us know by contacting us directly or filing an issue on the pants-bench repository on GitHub. All feedback and suggestions for improvement is greatly appreciated.
The benchmarks in this document were run using two machines on a closed LAN.
A number of frameworks were tested in this benchmark. The programs used for the various servers can be found in the pants-bench repository on GitHub.
The client used the siege benchmarking tool to generate load on the server. The siege configuration file used for these benchmarks can also be found in the pants-bench repository on GitHub. siege was run from the command line with no options specified. The tool was run three times on each server, with the best result being taken as representative of the servers performance in that benchmark.
The following frameworks were tested in this benchmark:
These frameworks were chosen for their prominent positions in the Python ecosystem (with the exception of Pants, of course). We intend to run this benchmark again against a far greater number of frameworks in the future.
Three scenarios were enacted in this benchmark:

| Framework | Requests/Second | Avg. Response Time | Max. Response Time |
|---|---|---|---|
| asyncore | 24933.07 | 0.01s | 0.03s |
| eventlet | 19531.68 | 0.01s | 0.04s |
| Pants | 20970.72 | 0.01s | 0.04s |
| Tornado | 15838.06 | 0.02s | 0.03s |
| Twisted | 17067.44 | 0.01s | 0.05s |

| Framework | Requests/Second | Avg. Response Time | Max. Response Time |
|---|---|---|---|
| Pants | 9974.41 | 0.02s | 0.06s |
| Tornado | 5102.2 | 0.05s | 0.10s |
| Twisted | 3103.77 | 0.08s | 0.19s |

| Framework | Requests/Second | Avg. Response Time | Max. Response Time |
|---|---|---|---|
| eventlet | 3489.4 | 0.07ms | 0.16s |
| Pants | 6263.93 | 0.04ms | 0.09s |
| Tornado | 3728.03 | 0.07ms | 0.13s |
| Twisted | 1711.79 | 0.15ms | 0.23s |