RE: [PHP-DEV] ZTS - why are you using it?

From: Date: Tue, 29 Jan 2013 11:10:09 +0000
Subject: RE: [PHP-DEV] ZTS - why are you using it?
References: 1 2  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
> The other main reason from my side to keep ZTS is Windows. Windows
cannot
> perform well using process based SAPI.

Windows actually works quite well with FastCGI.  So well Microsoft even
created their own version for IIS.  It's outperforming the ISAPI module by
a wide margin.

Other than Apache/Windows not having FastCGI support(*), I really can't
imagine any situation where using ZTS inside of a Web Server context makes
any sense at all.  I wouldn't call it a new trend, it's both old (I've
been pushing for it since at least 2006, probably earlier) and with very
solid technical reasons (faster, more reliable).

> Yes, TSRM is horrible and does not match modern thread safe
implementation
> (APC does it better for its usage f.e. using rwlock).

Note that I wasn't talking about the implementation of ZTS, but why you
would want to use it in the first place.  I actually think that using
thread local storage is much better than using locks - but if you can make
the whole problem disappear because there's no need for thread safety,
that's even better.  Why heavily invest in something unless there's a very
good reason to use it?

Zeev

(*) Apache actually does have a good FastCGI implementation available in
Zend Server for Windows (including the free CE version).  Using it is
faster and more reliable than using mod_php on Windows.


Thread (55 messages)

« previous php.internals (#65350) next »