?

Log in

Wed, Feb. 25th, 2009, 07:53 pm
FAPWS-0.2 (WSGI server based on libev)

I'm really happy to announce the release of FAPWS3-0.2 a WSGI webserver based on libev.

This release include several bugfixes.

You can got it on my github website: http://github.com/william-os4y/fapws3/tarball/v0.2

Most importantly, with this release FAPWS becomes much more stable and useful.

I've tested it with many different type of configurations and it has always resisted to my differents Stress tests (with ApacheBenchmark tool):
- Django webpage with a complex (and ugly) sql command with 300 concurrent requests
- Simple Django webpage with 300 concurrents requets
- for a simple Jpg files I've got 3524#/sec.


Thanks to give it a trial.


William


ANNEXES:
========

Tests with 300 concurrent requests.


Heavy Django page:
------------------
Server Software:        fapws3/0.2
Server Hostname:        127.0.0.1 
Server Port:            8084      

Document Path:          /acts/2009/
Document Length:        24554 bytes     

Concurrency Level:      300
Time taken for tests:   166.334 seconds
Complete requests:      1000            
Failed requests:        0              
Write errors:           0              
Total transferred:      19772014 bytes 
HTML transferred:       19667754 bytes 
Requests per second:    4.81 [#/sec] (mean)
Time per request:       62375.084 [ms] (mean)
Time per request:       207.917 [ms] (mean, across all concurrent requests)
Transfer rate:          116.08 [Kbytes/sec] received                       


Much more simple Django page
-----------------------------
Server Software:        fapws3/0.2
Server Hostname:        127.0.0.1 
Server Port:            8084      

Document Path:          /membres/Off/
Document Length:        4918 bytes

Concurrency Level:      300
Time taken for tests:   23.178 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      5290304 bytes
HTML transferred:       5154064 bytes
Requests per second:    43.14 [#/sec] (mean)
Time per request:       6953.497 [ms] (mean)
Time per request:       23.178 [ms] (mean, across all concurrent requests)
Transfer rate:          222.89 [Kbytes/sec] received


Simple jpg file
----------------
Server Software:        fapws3/0.2
Server Hostname:        127.0.0.1 
Server Port:            8084      

Document Path:          /static/images/img04.jpg
Document Length:        13974 bytes

Concurrency Level:      300
Time taken for tests:   28.369 seconds
Complete requests:      100000
Failed requests:        0
Write errors:           0
Total transferred:      1416300000 bytes
HTML transferred:       1397400000 bytes
Requests per second:    3524.99 [#/sec] (mean)
Time per request:       85.107 [ms] (mean)
Time per request:       0.284 [ms] (mean, across all concurrent requests)
Transfer rate:          48754.28 [Kbytes/sec] received

Tue, Dec. 30th, 2008, 12:11 pm
Fapws3-0.1 versus Fapws2-0.3: First comparison

As promised, you can see here under results of performance tests I've made.

Machine: AMD Athlon(tm) 64 X2 Dual Core Processor 4800+ A
OS: Linux 2.6.27-ARCH #1 SMP PREEMPT
Benchmark tool: ApacheBench, Version 2.3 ($Revision: 655654 $)
Python: Python 2.6.1
Libev: libev-3.49
Methodology: run webserver and ApacheBench ("ab" in short) on the same host; 
but I use "nice -n20" for "ab". Wait enough time between each run to assure all "waiting" 
connections  will be effectively closed (+- 1 minute on my machine). Execute each 
tests 5 times and take one "ab" report which is representative (to avoid abnormal good/bad 
results). 


Observations

(results are in the annexes):
Errors: we don't see it in the results here bellow, but neither Fapws2 neither Fapws3 have 
generated errors.
Requests per seconds: Fapws3 is a bit better(10%) than Fapws2 for low number of concurrent 
requests. Above 500 concurrent requests Fapws2 is a bit better (5%).
mean: Fapws3 has a better mean than Fapws2 for all tests.
median: Fapws3 is better for all tests
Standard deviation: Both are equal until 100 concurrent requests. Above Fapws2 is better. 


To summarize I would say that, thanks to libev, Fapws3 is not too bad.


As comparison, I've added results of cherrypy (threaded). By the way Charrypy is not bad 
at all ;-). We can see that, as expected (cherrypy is fully written with python), 
that number of requests per seconds are much lower than Fapws. We also see the impact of 
a threaded system on the Standard Deviation. With such a big standard deviation, user's 
perception can be quite various. 



William


Annexes


Fapws3-0.1Fapws2-0.3
Server Software:        fapws3/0.1
Document Path:          /test
Document Length:        13 bytes
Concurrency Level:      10
Complete requests:      10000        
Requests per second:    5565.03 [#/sec] (mean)
Connection Times (ms)
              min  mean[+/-sd] median   max
Total:          1    2   0.7      2      17
Server Software:        fapws2/0.3
Document Path:          /hello
Document Length:        13 bytes
Concurrency Level:      10
Complete requests:      10000        
Requests per second:    4964.60 [#/sec] (mean)
Connection Times (ms)
              min  mean[+/-sd] median   max
Total:          1    2   0.0      2       3
Server Software:        fapws3/0.1
Document Path:          /test
Document Length:        13 bytes
Concurrency Level:      100
Complete requests:      10000        
Requests per second:    5798.24 [#/sec] (mean)
Connection Times (ms)
              min  mean[+/-sd] median   max
Total:          1    3   4.4      2     212
Server Software:        fapws2/0.3
Document Path:          /hello
Document Length:        13 bytes
Concurrency Level:      100
Complete requests:      10000        
Requests per second:    4847.79 [#/sec] (mean)
Connection Times (ms)
              min  mean[+/-sd] median   max
Total:         12   21   1.1     21      28
Server Software:        fapws3/0.1
Document Path:          /test
Document Length:        13 bytes
Concurrency Level:      500
Complete requests:      10000        
Requests per second:    4464.30 [#/sec] (mean)
Connection Times (ms)
              min  mean[+/-sd] median   max
Total:          2   20  36.1      3     368
Server Software:        fapws2/0.3
Document Path:          /hello
Document Length:        13 bytes
Concurrency Level:      500
Complete requests:      10000
Requests per second:    4818.79 [#/sec] (mean)
Connection Times (ms)
              min  mean[+/-sd] median   max
Total:         85  103   2.6    104     107
Server Software:        fapws3/0.1
Document Path:          /test
Document Length:        13 bytes
Concurrency Level:      1000
Complete requests:      10000        
Requests per second:    4300.18 [#/sec] (mean)
Connection Times (ms)
              min  mean[+/-sd] median   max
Total:         60  120  46.3     92     220
Server Software:        fapws2/0.3
Document Path:          /hello
Document Length:        13 bytes
Concurrency Level:      1000
Complete requests:      10000
Requests per second:    4594.43 [#/sec] (mean)
Connection Times (ms)
              min  mean[+/-sd] median   max
Total:         11  154  92.7    221     680



Charrypy-3.1.1
Server Software:        CherryPy/3.1.1
Document Path:          /
Document Length:        13 bytes
Concurrency Level:      10
Complete requests:      10000        
Requests per second:    1040.73 [#/sec] (mean)
Connection Times (ms)
              min  mean[+/-sd] median   max
Total:          1    5 105.4      3    9608
Server Software:        CherryPy/3.1.1
Document Path:          /
Document Length:        13 bytes
Concurrency Level:      100
Complete requests:      10000        
Requests per second:    1910.31 [#/sec] (mean)
Connection Times (ms)
              min  mean[+/-sd] median   max
Total:          0   26 268.2      3    4884
Server Software:        CherryPy/3.1.1
Document Path:          /
Document Length:        13 bytes
Concurrency Level:      500
Complete requests:      10000        
Requests per second:    1250.71 [#/sec] (mean)
Connection Times (ms)
              min  mean[+/-sd] median   max
Total:          1  228 659.8      5    6243
Server Software:        CherryPy/3.1.1
Document Path:          /
Document Length:        13 bytes
Concurrency Level:      1000
Complete requests:      10000
Requests per second:    1518.28 [#/sec] (mean)
Connection Times (ms)
              min  mean[+/-sd] median   max
Total:          1  275 865.1      5    6324

Sun, Dec. 28th, 2008, 02:29 pm
Fapws3-0.1 has just been released

Hello all,

After several months of hesitations, work, trials and tests, I'm very happy to announce the first release of Fapws3.

Fapws3 is a full re-write of Fapws2 but based on libev.

Indeed, since the API changes in libevent (>1.4.0) we were forced to modify the libevent sources before compiling it, just for the usage of Fapws2. This was not really comfortable.
Moreover, libev is incredibly very well documented.

Fapws2 will stay open just for bug fixing, but my future work will now be focused on Fapws3.

This has been successfully tested on Linux 2.6.27 and FreeBSD-6.1 with libev-3.49.

Benchmark between Fapws2 and Fapws3 is on going and will be published as soon as possible.

And because the number of people willing to discuss about Fapws is increasing, I've setup a dedicated mailing-list: http://groups.google.com/group/fapws
Feel free to join ;-).



William


ANNEXES:
--------

source repository for version 0.1
Download fapws3-0.1 as a tarball
Git repository: http://github.com/william-os4y/fapws3/tree/master
Demo site running wsgi_wiki with Fapws3: http://fapws3.vmrt.homelinux.com/

Mon, Nov. 3rd, 2008, 02:14 pm
my contact details

Since the crash of my server: opensource4you.com, I've spent lot of time to recover my files from few old backups.

I've not yet find back my mailing-lists for fapws, but interested people can contact me at my new gmail account: william dot os4y at gmail.com

Sorry for disturbance.

William

Sun, Nov. 2nd, 2008, 08:46 am
FAPWS2 on github

Thanks to Piranha, I've discovered a git repository provider: github.

The new fapws2 git repository is now: http://github.com/william-os4y/fapws2/tree/master.

For interested people, I've got several good feedback about FAPWS2. Some of them have internet websites runnning without any problems. Some have even reported an uptime of +2 months without any issue.
You are always free to send me your websites running with fapws2, if they are public, I'll be happy to talk about them ;-).

My current work with FAPWS is to facilitate the integration with libevent. Indeed, for fapws2, I'm using a different methodology to parse URL than libevent does. This force me to modify the code of libevent (evhttp_handle_request); which is not a so good solution.

William

Tue, Sep. 2nd, 2008, 05:22 pm
Year the reasons why the server as desapeard

I've stored all emails from the sivit.fr support team into one Yahoo folder. Even the emails send into the Yahoo Spam.

As you can see under suddenly, all of the sivit's communications were filtered out by Yahoo as Spam.
Indeed, they have used wrong email format with the fromaddress. That's why yahoo complains.



On that suddent email problem, they don't give any answers.

They claim that I've been informed on time about the issue and the associated risks. But, between the first mail and crash of the machine, we hae only 10 hours. Which are the sleeping hours.

This was, thus, rather impossible to treat them accordingly.

More over, they never explained why the server has been destroyed.
And for sure, they have never give any excuses.

This is just my, bad, story with them.
You should not be generalised, because, maybe, some customers are happy with their quality of service.

Up to everyone to decide if they are trustable.

Tue, Sep. 2nd, 2008, 04:30 am
Repository is down

After a Technical intervention of sivit.fr, the dedicated server has been removed.
The server opensource4you.com is, thus, no more available.

I'm no more trusting them and will surely no more use their services.

I'll keep you informed when a new repository will be setup.

William

Tue, Apr. 15th, 2008, 01:53 pm
using fapws2 as a proxy

On current multi core machine, I have the idea to run several fapws2 instances for complex websites. That way I will have several fapws2 server dealing each a part of the web application.

To stay with fapws2, that means that one instance will be a "front end" web server. He will querying the others.

But what is the best way to implement such proxy mechanism (by only using libevent, no threads) ?
People having knowledge, references of document exaplaining it, ... are welcome ;).

William

Tue, Apr. 15th, 2008, 01:32 pm
fapws2 with libevent-1.4.3-stable

I've just tried compiling fapws2 with the brand new libevent library. With all the changes that they have made inside libevent, I was suprised that fapws2 is running without major changes ;).

Patch for libevent-1.4:
Remove "static" for the procedure called "evhttp_handle_request" in http.c.
FAPWS2 over-writte this procedure, thus it cannot be static ;(.
I've provided my evhttp_handle_request (with backward compatibility), but the libevent development team has not include it ;(.




On the most important feature of fapws2: performance, and based on my simple "hello world" sample, I see a small improvement: 6%. (633#/sec with libevent-1.4.3 against 594#/sec with libevent-1.3e).

Additional tests must be made with this new library but the starting point is promising ;).

William

git repository
Tar file here


Annexe


Patch on the libevent-1.4.3 sources
[libevent]$ diff http.c http_orig.c
1936c1936
< void
---
> static void



with fapws2 based on libevent-1.4.3
[fapws2]# ab -n 1000 -c10 http://127.0.0.1:8080/hello
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Finished 1000 requests


Server Software:        fapws2/0.3
Server Hostname:        127.0.0.1
Server Port:            8080

Document Path:          /hello
Document Length:        13 bytes

Concurrency Level:      10
Time taken for tests:   1.579206 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      105000 bytes
HTML transferred:       13000 bytes
Requests per second:    633.23 [#/sec] (mean)
Time per request:       15.792 [ms] (mean)
Time per request:       1.579 [ms] (mean, across all concurrent requests)
Transfer rate:          64.59 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.2      0       3
Processing:     1   15   9.5     12      48
Waiting:        0   14   9.4     12      48
Total:          3   15   9.5     12      48

Percentage of the requests served within a certain time (ms)
  50%     12
  66%     13
  75%     14
  80%     15
  90%     38
  95%     42
  98%     45
  99%     46
 100%     48 (longest request)

with fapws2 based on libevent-1.3e
[root@myhost fapws2]# ab -n 1000 -c10 http://127.0.0.1:8080/hello
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Finished 1000 requests


Server Software:        fapws2/0.2
Server Hostname:        127.0.0.1
Server Port:            8080

Document Path:          /hello
Document Length:        13 bytes

Concurrency Level:      10
Time taken for tests:   1.683275 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      105000 bytes
HTML transferred:       13000 bytes
Requests per second:    594.08 [#/sec] (mean)
Time per request:       16.833 [ms] (mean)
Time per request:       1.683 [ms] (mean, across all concurrent requests)
Transfer rate:          60.60 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.1      0       2
Processing:     1   16   9.5     13      58
Waiting:        0   15   9.4     13      55
Total:          3   16   9.5     13      58

Percentage of the requests served within a certain time (ms)
  50%     13
  66%     14
  75%     16
  80%     19
  90%     29
  95%     42
  98%     44
  99%     48
 100%     58 (longest request)

Mon, Nov. 12th, 2007, 07:20 pm
Fapws2-0.2 ready for tests

I've just released the 0.2 version of FAPWS2 (Fast Asynchronous Python WebServer) which is WSGI compliant.

With this release, several bug fixes has been done (binaries are better working, cookies, ...).
Now, FAPWS2 can now serve Django application (GET and POST), the admin page is working too ;-).

Please not that FAPWS2 has been developed based on libevent-1.3x releases (on linux, but has been reported to work on Mac-OSX too).

TGZ: http://www.opensource4you.com/downloads/fapws2-0.2.tgz
Git repository: http://www.opensource4you.com/cgi-bin/gitweb.cgi?p=fapws2;a=summary

Your feedbacks, comments, tests results, ... are very welcome.

William

skipped back 10