Re: Re[5]: [PHP-DEV] Design of the Zend Engine's Instruction Set

2009-08-21 Thread Basant Kukreja
I have measured Quercus php performance compared to standard php with APC on a ecommerce workload and found that Quercus php performed slower than standard php + APC. Regards, Basant. On Aug 16, 2009, at 11:16 AM, Tom Boutell wrote: Re: the performance of PHP, if it's badly implemented, should

Re: Re[5]: [PHP-DEV] Design of the Zend Engine's Instruction Set

2009-08-21 Thread Basant Kukreja
On Aug 16, 2009, at 2:25 PM, Paul Biggar wrote: I've seen that you talked about branch prediction misses in your paper. Did you ever tried to compile the original PHP with different compilers, for example from intel or sun studio? Did you test or have you ever heard of someone who tested the

[PHP-DEV] Race condition in PDOStatement (patch)

2009-10-20 Thread Basant Kukreja
Hi, There is a race condition in pdo's PDOStatement->ce.default_properties.ref_count. The integer is incremented without any lock around it (or using any other atomic APIs). This causes PDO to crash under stress. Details are given in bug report http://bugs.php.net/bug.php?id=49937&thanks=1 I h

[PHP-DEV] Re: Race condition in PDOStatement (patch)

2009-10-23 Thread Basant Kukreja
I have revised the patch for the race condition. New patch is much less invasive and scope of the change is restricted to pdo only. Details are there in the bug. Patch is attached. Regards, Basant. On Tue, Oct 20, 2009 at 4:03 PM, Basant Kukreja wrote: > Hi, >    There is a race condit

Re: [PHP-DEV] Feedback requested on using #defines to improve the performance of the TSRMG macro

2009-11-05 Thread Basant Kukreja
+1 Regards, Basant. On Thu, Nov 05, 2009 at 05:22:34PM +0530, Arvind Srinivasan wrote: > When compiled for multi-threaded (#ifdef ZTS ) operation, the various > subsystems in PHP use dynamically allocated (ts_allocate_id) > identifiers to index into the thread-local storage for each subsystem. >

[PHP-DEV] open/close calls of include_once/require_once files.

2009-11-12 Thread Basant Kukreja
Hi, When php script includes a script, php engine compiles the included file. When opcode caching extensions e.g apc are used, re-compilation is avoided by apc. But there is a performance problem here. Since php code uses zend_stream_open to open the included file, open/close system call is s

Re: [PHP-DEV] open/close calls of include_once/require_once files.

2009-11-12 Thread Basant Kukreja
On Thu, Nov 12, 2009 at 11:54:55AM -0800, Rasmus Lerdorf wrote: > A couple of notes. > > You make it sound like this happens on all includes. It is only > include_once/require_once that have this problem. Regular > include/require do not. Sorry for making it confusing. I meant only for include_o

[PHP-DEV] safe_address optimization for 64 bit size_t for platforms other than x86_64.

2009-12-14 Thread Basant Kukreja
Hi, On non x86_64 platforms current implementation of safe_address uses doubles for 64 bit php which is very expensive on some architectures e.g sparc. safe_address function calculates nmemb * size + offset and it want to make sure that it output doesn't overflow. My colleague Richard Smith su

Re: [PHP-DEV] PHP Performance in Apache: Multi-Process vs Multi-Threaded

2010-12-14 Thread Basant Kukreja
Hi, I have spent a lot of time last year measuring php performance on multi-threaded vs single threaded fastcgi. I had used iplanet web server (instead of apache) for my measurement. Out of the box single threaded php apps were very close (better) than multi-threaded versions but when we started o