[PHP-DEV] RE: ZTS improvement idea

2019-03-04 Thread Anatol Belski
Hi Dmitry, > -Original Message- > From: Dmitry Stogov > Sent: Friday, February 15, 2019 8:12 AM > To: Anatol Belski ; Joe Watkins ; Bob > Weinand ; Nikita Popov ; z...@php.net > Cc: PHP internals > Subject: Re: ZTS improvement idea > > Hi Anatol, > > On 2/14/19 8:44 PM, Anatol Belski w

[PHP-DEV] RE: ZTS improvement idea

2019-02-18 Thread Anatol Belski
Hi Nikita, > I think we need to distinguish two cases: > > 1. Globals that are local to a DSO. The majority of globals in extensions is > of this > kind. While it is currently common to declare these globals in an exported > header, they really shouldn't be. We should move these towards ZEND_TLS

[PHP-DEV] Re: ZTS improvement idea

2019-02-16 Thread Nikita Popov
On Sat, Feb 16, 2019 at 7:51 AM Anatol Belski wrote: > Hi Dmitry, > > > > I thought about it as well. The reason for the additional dereference > > > levels is probably ,that every globals structure has its own size. > > > That way, it needs to go on the heap. > > > > Not necessary. In case all t

[PHP-DEV] RE: ZTS improvement idea

2019-02-15 Thread Anatol Belski
Hi Dmitry, > > I thought about it as well. The reason for the additional dereference > > levels is probably ,that every globals structure has its own size. > > That way, it needs to go on the heap. > > Not necessary. In case all the structures are known at MINIT time, we may > realloc()-ate the w

[PHP-DEV] RE: ZTS improvement idea

2019-02-15 Thread Anatol Belski
> -Original Message- > From: Dmitry Stogov > Sent: Thursday, February 14, 2019 11:21 PM > To: Anatol Belski ; Nikita Popov > Cc: Joe Watkins ; Bob Weinand ; > Nikita Popov ; z...@php.net; PHP internals > > Subject: Re: ZTS improvement idea > > > > On 2/14/19 8:55 PM, Anatol Belski w

Re: [PHP-DEV] Re: ZTS improvement idea

2019-02-15 Thread Rowan Collins
On Fri, 15 Feb 2019 at 07:26, Benjamin Eberlei wrote: > This is like the 80% use-case of threading, Multiple HTTP requests, multiple > long running SQL queries. An API like parallel would allow each and everyone > of us to make controllers faster today without a large effort. > > I think an exp

Re: [PHP-DEV] Re: ZTS improvement idea

2019-02-15 Thread Pierre Joye
Hi Benjamin, On Fri, Feb 15, 2019, 2:26 PM Benjamin Eberlei > Async.io is used for scalability In languages with entirely different > architectures than PHP. > > Node.js isn't well suited to monolithic applications such as Wordpress, > Magento and the fast amount of applicatoins that people are b

Re: [PHP-DEV] Re: ZTS improvement idea

2019-02-14 Thread Benjamin Eberlei
On Thu, Feb 14, 2019 at 11:05 PM Zeev Suraski wrote: > On Thu, Feb 14, 2019 at 7:27 PM Levi Morrison wrote: > > > To all internals, but especially to Zeev and Dmitry, > > > > Having a JIT which does not support ZTS is a bit short-sighted. > > > I don't think anybody's advocating for not having Z

[PHP-DEV] Re: ZTS improvement idea

2019-02-14 Thread Dmitry Stogov
On 2/14/19 8:55 PM, Anatol Belski wrote: > Hi Nikita, > >> -Original Message- >> From: Nikita Popov >> Sent: Wednesday, February 13, 2019 1:02 AM >> To: Dmitry Stogov >> Cc: Joe Watkins ; Bob Weinand ; >> Nikita Popov ; Anatol Belski (a...@php.net) ; >> z...@php.net; PHP internals >>

[PHP-DEV] Re: ZTS improvement idea

2019-02-14 Thread Dmitry Stogov
Hi Anatol, On 2/14/19 8:44 PM, Anatol Belski wrote: > Hi Dmitry, > >> -Original Message- >> From: Dmitry Stogov >> Sent: Wednesday, February 13, 2019 12:26 AM >> To: Joe Watkins ; Bob Weinand ; >> Nikita Popov ; Anatol Belski (a...@php.net) ; >> z...@php.net >> Cc: PHP internals >> Subj

Re: [PHP-DEV] Re: ZTS improvement idea

2019-02-14 Thread Pierre Joye
Good morning, Again a long reply from me, sorry :) There are a few things I would like to clarify from my perspective.On Windows, historically (for years), the only usable webserver was Apache. And the only way to work with it for years as well was mod_php. Given the Apache's design, it requires

Re: [PHP-DEV] Re: ZTS improvement idea

2019-02-14 Thread Larry Garfield
On Thursday, February 14, 2019 4:33:27 PM CST Zeev Suraski wrote: > On Thu, Feb 14, 2019 at 7:57 PM Larry Garfield > > wrote: > > Data point: At Platform.sh (web host), we've been running ZTS builds of > > 7.1, > > 7.2, and 7.3 exclusively for a while now. We don't even offer non-ZTS > > version

Re: [PHP-DEV] Re: ZTS improvement idea

2019-02-14 Thread Zeev Suraski
On Thu, Feb 14, 2019 at 7:57 PM Larry Garfield wrote: > Data point: At Platform.sh (web host), we've been running ZTS builds of > 7.1, > 7.2, and 7.3 exclusively for a while now. We don't even offer non-ZTS > versions of those releases. I presume you haven't been using a threaded Web server mo

Re: [PHP-DEV] Re: ZTS improvement idea

2019-02-14 Thread Zeev Suraski
On Thu, Feb 14, 2019 at 7:27 PM Levi Morrison wrote: > To all internals, but especially to Zeev and Dmitry, > > Having a JIT which does not support ZTS is a bit short-sighted. I don't think anybody's advocating for not having ZTS support for JIT. I am questioning the portof the absence of ZTS

Re: [PHP-DEV] Re: ZTS improvement idea

2019-02-14 Thread Larry Garfield
On Thursday, February 14, 2019 9:59:18 AM CST Rowan Collins wrote: > On Thu, 14 Feb 2019 at 15:47, Christoph M. Becker wrote: > > On 14.02.2019 at 12:56, Zeev Suraski wrote: > > > On Wed, Feb 13, 2019 at 11:26 AM Joe Watkins wrote: > > >> The ZTS build is very commonly used in Windows today > > >

[PHP-DEV] RE: ZTS improvement idea

2019-02-14 Thread Anatol Belski
Hi Nikita, > -Original Message- > From: Nikita Popov > Sent: Wednesday, February 13, 2019 1:02 AM > To: Dmitry Stogov > Cc: Joe Watkins ; Bob Weinand ; > Nikita Popov ; Anatol Belski (a...@php.net) ; > z...@php.net; PHP internals > Subject: Re: ZTS improvement idea > > On Wed, Feb 13,

[PHP-DEV] RE: ZTS improvement idea

2019-02-14 Thread Anatol Belski
Hi Dmitry, > -Original Message- > From: Dmitry Stogov > Sent: Wednesday, February 13, 2019 12:26 AM > To: Joe Watkins ; Bob Weinand ; > Nikita Popov ; Anatol Belski (a...@php.net) ; > z...@php.net > Cc: PHP internals > Subject: ZTS improvement idea > > Hi, > > > > > After JIT+ZTS re

Re: [PHP-DEV] Re: ZTS improvement idea

2019-02-14 Thread Levi Morrison
To all internals, but especially to Zeev and Dmitry, Having a JIT which does not support ZTS is a bit short-sighted. Think about it. You want to add a JIT partly so that PHP will be better at non-web, CPU intensive tasks. If the JIT is successful, eventually you will want parallelism in that domai

Re: [PHP-DEV] Re: ZTS improvement idea

2019-02-14 Thread Zeev Suraski
On Thu, Feb 14, 2019 at 6:13 PM Joe Watkins wrote: > EXACTLY > > Sorry I didn't answer in full, but I've been listening to people say its > not important for so long, I'm pretty tired of it by now. > Joe, all, Again, ISAPI was super important until one day, it wasn't. If the main reason ZTS is

Re: [PHP-DEV] Re: ZTS improvement idea

2019-02-14 Thread Joe Watkins
EXACTLY Sorry I didn't answer in full, but I've been listening to people say its not important for so long, I'm pretty tired of it by now. We are talking about merging a thing that has the ability to make some maths faster, at huge cost to the project, in two days I wrote a new extension called p

Re: [PHP-DEV] Re: ZTS improvement idea

2019-02-14 Thread Zeev Suraski
On Thu, Feb 14, 2019 at 5:59 PM Rowan Collins wrote: > All that being said, it would be nice if ZTS became more mainstream, so > more people had access to userland threading / parallel processing > extensions. I think the most promising parallel processing paradigms today are based on asynchron

Re: [PHP-DEV] Re: ZTS improvement idea

2019-02-14 Thread Rowan Collins
On Thu, 14 Feb 2019 at 15:47, Christoph M. Becker wrote: > On 14.02.2019 at 12:56, Zeev Suraski wrote: > > > On Wed, Feb 13, 2019 at 11:26 AM Joe Watkins wrote: > > > >> The ZTS build is very commonly used in Windows today > > > > Any idea why? > > windows.php.net: > > | With Apache you have to

Re: [PHP-DEV] Re: ZTS improvement idea

2019-02-14 Thread Zeev Suraski
On Thu, Feb 14, 2019 at 5:47 PM Christoph M. Becker wrote: > On 14.02.2019 at 12:56, Zeev Suraski wrote: > > > On Wed, Feb 13, 2019 at 11:26 AM Joe Watkins wrote: > > > >> The ZTS build is very commonly used in Windows today > > > > Any idea why? > > windows.php.net: > > | With Apache you have t

Re: [PHP-DEV] Re: ZTS improvement idea

2019-02-14 Thread Christoph M. Becker
On 14.02.2019 at 12:56, Zeev Suraski wrote: > On Wed, Feb 13, 2019 at 11:26 AM Joe Watkins wrote: > >> The ZTS build is very commonly used in Windows today > > Any idea why? windows.php.net: | With Apache you have to use the Thread Safe (TS) versions of PHP. -- Christoph M. Becker -- PHP

Re: [PHP-DEV] Re: ZTS improvement idea

2019-02-14 Thread Joe Watkins
Packages such as xampp, which are very widely used, bundle a thread safe interpreter. It's a fact that ZTS is important on Windows. Cheers Joe On Thu, 14 Feb 2019 at 16:22, Rowan Collins wrote: > On Thu, 14 Feb 2019 at 11:57, Zeev Suraski wrote: > > > On Wed, Feb 13, 2019 at 11:26 AM Joe Watk

Re: [PHP-DEV] Re: ZTS improvement idea

2019-02-14 Thread Zeev Suraski
On Thu, Feb 14, 2019 at 5:22 PM Rowan Collins wrote: > On Thu, 14 Feb 2019 at 11:57, Zeev Suraski wrote: > > > On Wed, Feb 13, 2019 at 11:26 AM Joe Watkins wrote: > > > > > The ZTS build is very commonly used in Windows today > > > > > > > Any idea why? > > > > > https://windows.php.net/ curren

Re: [PHP-DEV] Re: ZTS improvement idea

2019-02-14 Thread Rowan Collins
On Thu, 14 Feb 2019 at 11:57, Zeev Suraski wrote: > On Wed, Feb 13, 2019 at 11:26 AM Joe Watkins wrote: > > > The ZTS build is very commonly used in Windows today > > > > Any idea why? > https://windows.php.net/ currently recommends using an NTS build with FastCGI, but there is (or was?) also

Re: [PHP-DEV] Re: ZTS improvement idea

2019-02-14 Thread Zeev Suraski
On Wed, Feb 13, 2019 at 11:26 AM Joe Watkins wrote: > The ZTS build is very commonly used in Windows today > Any idea why? Zeev

[PHP-DEV] Re: ZTS improvement idea

2019-02-13 Thread Dmitry Stogov
Hi Joe, On 2/13/19 12:26 PM, Joe Watkins wrote: > Morning all, > > I'm very pleased to see effort going into this, and the resulting ideas. > > I don't have anything to add about the implementation. > > Since most people are not interested in ZTS, there aren't going to be > many voices pushing

[PHP-DEV] Re: ZTS improvement idea

2019-02-13 Thread Dmitry Stogov
Hi Nikita, On 2/13/19 12:02 PM, Nikita Popov wrote: > On Wed, Feb 13, 2019 at 9:26 AM Dmitry Stogov > wrote: > > Hi, > > > After JIT+ZTS related discussion with Joe and Bob, and some related > analyzes. > > I came to more or less formed design idea and

[PHP-DEV] Re: ZTS improvement idea

2019-02-13 Thread Joe Watkins
Morning all, I'm very pleased to see effort going into this, and the resulting ideas. I don't have anything to add about the implementation. Since most people are not interested in ZTS, there aren't going to be many voices pushing you to actually make changes, so I want to be that voice. The ZT

[PHP-DEV] Re: ZTS improvement idea

2019-02-13 Thread Nikita Popov
On Wed, Feb 13, 2019 at 9:26 AM Dmitry Stogov wrote: > Hi, > > > After JIT+ZTS related discussion with Joe and Bob, and some related > analyzes. > > I came to more or less formed design idea and described it at > https://wiki.php.net/zts-improvement > > This is not an RFC and I'm not sure, if I l