W sobota 11 października 2003 o godz. 19:12:49
Jamieson Becker <[EMAIL PROTECTED]> napisał(a):

> Can you post the results of your findings with Webware (mod_webkit?)
> vs mod_php?

See below.

> Every benchmark I've seen shows mod_php killing mod_python and I was
> considering moving back to php based on those tests.

No! Don't do it. In the beginning, I had very bad performance not
because Python was slow, but because my templates (Cheetah) was
initialized in awake() method of Webware servlets. Later, I moved them
to __init() method of each servlet. It helped a little, but it was not
enough fast. When I moved them to external module (which is inherited by
all my servlets) I gained the excelent performance. I was really
surprised. It was even 20x faster than before. In the beginning, my
memory was eaten up to 180 MB. Now it takes about 11 MB.

I was working with PHP for many years. I was in development team od
PHPLib and I know many tricks how to accelerate PHP. But, when I
finally *correctly projected* Webware servlets, I was very suprised
its good performance. It is far beyond PHP can reach. It is not only
because Python is faster. It is mainly because Webware is the
application server, and its servlets are compiled all the time in the
memory. So I think, every application server (even writen in Java) can
beat every non-trivial PHP application. PHP can be faster only for
very simple code. But for more compilated code, when it have to load
different modules and template files, Webware as application server
is invincible.

I did some comparision tests using ApacheBench http://codeflux.com/ab/
for my site and two others with similiar functions.
(A) http://muratordom.pl/bank (Webware)
  vs.
(B) http://www.pkt.pl/ (PHP)
  vs.
(C) http://www.panoramafirm.com.pl/  (PHP)

For max settings (25 request with concurrency level=5) the test for
Webware (site A) was finished in 5.2 seconds. For site B in almost 30
s. and for site C in 13.4 s. The application A was 2.4 times faster
than B and 5.7 times faster than C in total request time. Below there
are more details:

Benchmarking muratordom.pl (be patient)...
                                                                           
Server Software:        Apache/1.3.27
Server Hostname:        muratordom.pl
Server Port:            80

Document Path:          /bank
Document Length:        451 bytes

Concurrency Level:      5
Time taken for tests:   5.211 seconds
Complete requests:      25
Failed requests:        23
   (Connect: 0, Length: 23, Exceptions: 0)
Total transferred:      769491 bytes
HTML transferred:       760063 bytes
Requests per second:    4.80
Transfer rate:          147.67 kb/s received

Connection Times (ms): 
              min   avg   max
Connect:      141   142   144
Processing:   764   884   950
Total:        905  1026  1094



Benchmarking www.pkt.pl (be patient)...
                                                                           
Server Software:        Apache/1.3.12
Server Hostname:        www.pkt.pl
Server Port:            80

Document Path:          /index.php
Document Length:        37769 bytes

Concurrency Level:      5
Time taken for tests:   29.864 seconds
Complete requests:      25
Failed requests:        15
   (Connect: 0, Length: 15, Exceptions: 0)
Total transferred:      964243 bytes
HTML transferred:       957718 bytes
Requests per second:    0.84
Transfer rate:          32.29 kb/s received

Connection Times (ms): 
              min   avg   max
Connect:      146   164   218
Processing:  1206  5661 18639
Total:       1352  5825 18857


Benchmarking www.panoramafirm.com.pl (be patient)...
                                                                           
Server Software:        Apache
Server Hostname:        www.panoramafirm.com.pl
Server Port:            80

Document Path:          /
Document Length:        61866 bytes

Concurrency Level:      5
Time taken for tests:   13.451 seconds
Complete requests:      25
Failed requests:        12
   (Connect: 0, Length: 12, Exceptions: 0)
Total transferred:      1638766 bytes
HTML transferred:       1629318 bytes
Requests per second:    1.86
Transfer rate:          121.83 kb/s received

Connection Times (ms): 
              min   avg   max
Connect:      154   171   197
Processing:  1608  2248  3092
Total:       1762  2419  3289

I have also compared my application against another, very fast
php_mod4 and Smarty based site (http://www.bizplace.pl). My Webware
application (using much slower hardware and using many request from
over 10 other projects, phpBB forums etc) has beaten modern, dedicated
server with mod_php4 and compiled Smarty templates. In this situation
Webware was still 20% faster.

Python code combined with Cheetah is much cleaner and powerfull than
every PHP code. Using Webware it is much faster than similiar PHP
solutions.

I am going to never go back to PHP again for non trivial projects. But
I do not want to reject PHP, because it can be usefull for small
projects or for such cute software as phpBB (http://www.phpbb.com).

-- 
JZ ICQ:6712522



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to