Quercus (PHP implementation in Java) is faster than the C version

Interesting piece of information from this post on PushToTest :

Caucho told developers that they are seeing an astonishing 4 to 6 times performance improvement over the C-version of PHP. Quercus runs with JVM thread safety - something not available to PHP developers today - to enable things like database connection pooling in a threaded environment. Quercus is expected to ship by December 2006.

Here is another mention of this information on ServerSide :

Apparently, the PHP pages are compiled in the background to byte-code, and the resulting performance is six times that of Apache mod_php!

And this post is generating quite a few comments.

A more definitive source of information is available on the caucho forum where some actual numbers have been posted :

Test NameResin/QuercusApache 2.0/PHP 5.0
file_1k6341 ops3255 ops
file_1k (10 clients, 16 keepalive)13186 ops6154 ops
file_64k 857 ops841 ops
file_64k (10 clients, 16 keepalive)1019 ops995 ops
file_7m 10.7 ops11.8 ops
jsp_1k 7070 opsn/a
gzip_1k 2570 opsn/a
gzip_1k (cache ) 6529 opsn/a
gzip_64k 343 opsn/a
gzip_64k (cache)6220 opsn/a
ssl_1k 173 opsn/a
ssl_1k (10 clients, 16 keepalive) 1795 opsn/a
ssl_64k 85 opsn/a
ssl_64k (10 clients, 16 keepalive>155 opsn/a
php_1k 4194 ops1151 ops
php_1k (10 clients, 16 keepalive)7806 ops1508 ops
mediawiki 17 ops5 ops
mediawiki (10 clients, 16 keepalive)17 ops5 ops
mediawiki (proxy cache)3546 ops5 ops
drupal33 ops10 ops
drupal (10 clients, 16 keepalive)30 ops10 ops

and, with PHP acceleration :

TestResin/QuercusApache/PHP/eaccelerator
drupal46 ops43 ops
wiki30 ops17 ops

With more tuning, the PHP performance might match the Resin/Quercus ones, but it should be a wake up call to all the Java detractors. Java IS NOT SLOW !

Technorati Tags: ,

Tags :


Re: Quercus (PHP implementation in Java) is faster than the C version

Our testing of Quercus used with smarty shows that it's about half as fast as the equivalent php5 implementation - so the six times faster statement does not apply in all scenarios...

Re: Quercus (PHP implementation in Java) is faster than the C version

Did you test with the Pro version of Quercus? The Pro version
contains the PHP -> Java bytecode compiler. If you are just using
the free version it will just use a PHP interpreter, so it will not be
faster.

Add a comment

TrackBack