Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:206 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36238 invoked from network); 24 Mar 2003 12:58:57 -0000 Received: from unknown (HELO wmeler.t1.gda.wp-sa.pl) (212.77.105.136) by pb1.pair.com with SMTP; 24 Mar 2003 12:58:57 -0000 Received: (from wmeler@localhost) by wmeler.t1.gda.wp-sa.pl (8.11.6/8.11.6) id h2OCwLk15259 for internals@lists.php.net; Mon, 24 Mar 2003 13:58:21 +0100 X-Authentication-Warning: wmeler.t1.gda.wp-sa.pl: wmeler set sender to wmeler@wp-sa.pl using -f Date: Mon, 24 Mar 2003 13:58:21 +0100 To: internals@lists.php.net Message-ID: <20030324135821.E31290@wp-sa.pl> Reply-To: wmeler@wp-sa.pl Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Subject: ZTS performance From: wmeler@wp-sa.pl (Wojtek Meler) 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