This repository has been archived by the owner on Sep 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
1,022 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
This is the procedure used to install all the necessary software stack for the tests. | ||
|
||
Application setup | ||
----------------- | ||
|
||
ssh [email protected] -i ~/.ssh/benchmark_amazon.pem | ||
sudo apt-get update | ||
sudo apt-get install make git python-dev libevent-dev | ||
|
||
Python | ||
------ | ||
sudo apt-get install python-setuptools | ||
sudo easy_install pip | ||
sudo pip install virtualenv virtualenvwrapper | ||
source `which virtualenvwrapper.sh` | ||
|
||
PyPy | ||
----- | ||
sudo apt-get install pypy | ||
mkvirtualenv benchmark_pypy --python=pypy | ||
workon benchmark_pypy | ||
make install | ||
|
||
Project Code | ||
------------ | ||
sudo apt-get install libcurl4-gnutls-dev librtmp-dev # pycurl dependencies | ||
mkvirtualenv benchmark | ||
git clone git://github.com/globocom/benchmark-python-wsgi.git | ||
cd benchmark-python-wsgi | ||
make install | ||
|
||
Virtuoso | ||
-------- | ||
|
||
sudo apt-get install virtuoso-opensource | ||
# senha: dba (2 vezes) | ||
/usr/bin/isql-vt 1111 dba dba | ||
SPARQL CREATE GRAPH <http://graph-uri> ; | ||
SPARQL INSERT DATA INTO <http://graph-uri> { <http://dummyClass.com> a owl:Class . <http://dummyObj.com> a <http://dummyClass.com> . } ; | ||
|
||
|
||
Redis | ||
----- | ||
sudo apt-get install redis-server | ||
|
||
|
||
|
||
Client-side setup | ||
================= | ||
|
||
sudo apt-get update | ||
sudo apt-get install make gcc git | ||
|
||
Install WRK | ||
----------- | ||
|
||
git clone git://github.com/wg/wrk.git | ||
cd wrk | ||
make | ||
|
||
./wrk -r10000 -t5 -c50 "http://ec2-54-234-130-164.compute-1.amazonaws.com :8888/" | ||
EXPORT PATH=`pwd`:PATH for i in {1..5}; do wrk -r10000 -t5 -c50 "ec2-54-234-130-164.compute-1.amazonaws.com:8888/"; done | ||
|
||
|
||
Install weighttp | ||
---------------- | ||
|
||
sudo apt-get install libev-dev | ||
git clone git://git.lighttpd.net/weighttp | ||
cd weighttp | ||
./waf configure | ||
./waf build | ||
sudo ./waf install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,56 @@ | ||
Benchmark of Python WSGI Servers | ||
================================ | ||
|
||
Based on: | ||
http://nichol.as/benchmark-of-python-web-servers | ||
|
||
We will run the following WSGI application ‘virtuoso_io.py’ on all servers: | ||
|
||
:: | ||
|
||
# code for ‘virtuoso_io.py | ||
|
||
|
||
Which performs: | ||
* POST to add a resource | ||
* GET to get a resource | ||
|
||
Increasing the rate with an interval of 100 from 400 up to 9000 requests per second for a total of 40.000 requests at each interval. | ||
|
||
|
||
Contestant servers | ||
------------------ | ||
|
||
The servers will create / retrieve information in Virtuoso. | ||
|
||
These technologies will be used: | ||
|
||
* GEvent | ||
* Gunicorn | ||
* Tornado | ||
|
||
With and without PyPy. | ||
We were interested in comparing Gevent with Tornado to see which would better suit our needs. | ||
The starting point was a benchmark [1] done by Nicholas Piël in 2010 showing that Tornado | ||
had excellent performance followed closely by Gevent. | ||
|
||
We did a very quick and non-rigorous benchmark in 2013-01-05. | ||
Nevertheless we are making the code and results available in case this can be useful elsewhere. | ||
|
||
|
||
Scenarios | ||
--------- | ||
|
||
First we tested a linux client generating HTTP traffic towards a MacOSX running the server backend. | ||
This test was run over the corporate wi-fi network. | ||
Then, we recreated the same test scenario in two different sets of Amazon instances to cross-validate the performance | ||
measured. | ||
|
||
In the client side, we used wrk [2], weighttp [3] and locust [4] to generate traffic. | ||
|
||
The test cases where basically: | ||
- the HTTP server just responds a "hello world" to a GET request. | ||
- the HTTP server queries a backend Virtuoso triple-store database | ||
- the HTTP server queries a backend REDIS database | ||
|
||
Infra-structure details | ||
----------------------- | ||
|
||
In the tests were used: | ||
* (corporate) Linux running Fedora 16, Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz 8Gb RAM, cache size 4096 KB | ||
* (corporate) MacOSX lion 10.7.5 - 2Ghz Intel Vore i5 8Gb RAM, L2 Cache (per Core) 256 KB | ||
* (Amazon) Linux Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-31-virtual x86_64), Intel(R) Xeon(R) CPU E5645 @ 2.40GHz, cache size 12288 KB | ||
|
||
Raw Data | ||
-------- | ||
|
||
The file Raw_data.txt contains dumps of the tests executed. | ||
|
||
Team members | ||
------------ | ||
|
||
The team members that took part in the testing efforts were: | ||
- Ícaro Medeiros | ||
- Tatiana Al-Chuery | ||
- Guilherme Machado Cirne | ||
- Rodrigo Dias Arruda Senra | ||
|
||
|
||
References | ||
---------- | ||
|
||
[1] http://nichol.as/benchmark-of-python-web-servers | ||
[2] https://github.com/wg/wrk | ||
[3] http://redmine.lighttpd.net/projects/weighttp/wiki | ||
[4] http://locust.io/ |
Oops, something went wrong.