Hi!

I've done some performance tests of PHP with and without ZTS (RH7.2 -
pthreads). I've noticed that ZTS is signifcally slower than normal mode. My
machine was able to response for 100reqs/s without ZTS and 95reqs/s with ZTS.
When I turned on turck mmcache (code cache & optimizer) it handled 400reqs/s
without ZTS and 300reqs/s with ZTS. 

I think, that it is not mmcache problem, but ZE problem. Probably parsing cost
is similar in ZTS and normal mode, and it is so large that hide execution cost
difference in ZTS and nonZTS mode. That's why I got  100reqs/s in both ZTS and
nonZTS mode (that gives 10ms/request). 

Difference betwen 300 and 400 reqs/s is only 0.8ms.

10% of it is mmcache (restoring from cache takes 0.14ms in nonZTS and 0.21ms in
ZTS). The rest is script execution overhead.

Actually mmcache doesn't copy any opcodes - it only registers classes and
functions. The same code is called both in ZTS and nonZTS mode. Difference is
50% overhead in ZTS !!!

Does anyone have any suggestions ? Maybe I should use different thread library ?
Maybe TSRM should be rewritten ? 
Does anyone have any similar results (with code caching) ?

regards,
Wojtek

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to