php-windows Digest 17 Oct 2011 07:41:07 -0000 Issue 3976

Topics (messages 30707 through 30714):

Re: PHP 64-bit binaries?
        30707 by: Justin Dearing
        30708 by: Pierre Joye
        30709 by: Tomasz Krawczyk
        30710 by: Pierre Joye
        30711 by: Lester Caine
        30712 by: Ferenc Kovacs
        30713 by: Pierre Joye
        30714 by: Lester Caine

Administrivia:

To subscribe to the digest, e-mail:
        php-windows-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-windows-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-wind...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
On Sun, Oct 16, 2011 at 9:12 AM, Pierre Joye <pierre....@gmail.com> wrote:

> PHP is slower in 64bit than in 32bit modes. Databases (be oracle,
> mysql or other) are another stories and many of them are faster.
> However one does not have to run php in 64bit mode to talk to database
> servers running in 64bit mode.
>
> Those are good points, but sometimes 64 bit php would make sense. For
example, what if I had a script that I ran from the command line that edited
xml files that were more than 3 gigabytes in size? Lets assume that this was
the only way to get this data, and this script was putting the data in a
database. I would not be able to do that operation in 32 bit php because the
entire xml file could not be loaded into memory.

The above example is more feasible then many would think (sometimes you have
no control over the format of the data you get). There are also other cases
where the memory address limitations of a 32 bit process could come into
play.

Justin

--- End Message ---
--- Begin Message ---
hi Justin!

On Sun, Oct 16, 2011 at 3:57 PM, Justin Dearing <zippy1...@gmail.com> wrote:
> On Sun, Oct 16, 2011 at 9:12 AM, Pierre Joye <pierre....@gmail.com> wrote:
>
>> PHP is slower in 64bit than in 32bit modes. Databases (be oracle,
>> mysql or other) are another stories and many of them are faster.
>> However one does not have to run php in 64bit mode to talk to database
>> servers running in 64bit mode.
>>
>> Those are good points, but sometimes 64 bit php would make sense. For
> example, what if I had a script that I ran from the command line that edited
> xml files that were more than 3 gigabytes in size? Lets assume that this was
> the only way to get this data, and this script was putting the data in a
> database. I would not be able to do that operation in 32 bit php because the
> entire xml file could not be loaded into memory.

Well, right. The only advantage is the largest maximal available
memory. But I'd to say that if one is processing GB of XML data using
DOM, then he should seriously consider xmlreader and xmlwriter. They
are stream based parser and used a constant relatively low memory foot
print.

For the wincache example given above, if an app needs more than a
couple of GB for its user cache, solution like memcache should
seriously be considered. Opcode cache will certainly reach this value
in most cases :)

Cheers,
--
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

--- End Message ---
--- Begin Message ---
W dniu 2011-10-16 16:07, Pierre Joye pisze:
hi Justin!

Well, right. The only advantage is the largest maximal available
memory. But I'd to say that if one is processing GB of XML data using
DOM, then he should seriously consider xmlreader and xmlwriter. They
are stream based parser and used a constant relatively low memory foot
print.

For the wincache example given above, if an app needs more than a
couple of GB for its user cache, solution like memcache should
seriously be considered. Opcode cache will certainly reach this value
in most cases :)

Cheers,
--
Pierre


Hi!

I was also thinking about x64 php.
Guys, you said that 64 bit PHP is slightly slower than 32 bit, but there might be areas where x64 will be faster. Let's imagine site basing on image or video processing. That kind of site could take advantage of x64.

Lester gave us a link to unofficial x64 PHP, so compilation is possible. Maybe it is a time to start publishing x64 alpha versions of PHP, collect bugs information and so on.

regards
Tomasz

--- End Message ---
--- Begin Message ---
On Sun, Oct 16, 2011 at 5:16 PM, Tomasz Krawczyk <tomkr...@gmail.com> wrote:

> I was also thinking about x64 php.
> Guys, you said that 64 bit PHP is slightly slower than 32 bit, but there
> might be areas where x64 will be faster. Let's imagine site basing on image
> or video processing. That kind of site could take advantage of x64.

I would not suggest to use php to process videos but to spawn the
processing to 3rd party servers using better tools.

As for images, for web images, x64 provides little gains except for
very few cases.

> Lester gave us a link to unofficial x64 PHP, so compilation is possible.
> Maybe it is a time to start publishing x64 alpha versions of PHP, collect
> bugs information and so on.

Not until libs have better support. We did that in the past and users
automatically used them instead of using the stable x86 builds. It
caused more work for no gain as we do not have the resources now to
fix all libs.

However, that does not mean we are not working on that but it is not
in the 5.4 roadmap.

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

--- End Message ---
--- Begin Message ---
Pierre Joye wrote:
hi,

On Sun, Oct 16, 2011 at 12:24 AM, Lester Caine<les...@lsces.co.uk>  wrote:
Keith Davis wrote:

 From everything that I've heard, there is not much benefit to a x64

binary for PHP.

Running all 64bit including the database, I'm seeing a reasonable
performance improvement over a pure 32 bit set-up on the same AMD 64bit
hardware using 64bit vista order of 10 to 15% faster. It was also worth
pointing out that the same hardware runs a good 50% faster again on a 64bit
Linux OS. I think this shows that the OS is the problem rather than the
64bit software, but the Linux OS does seem to use the multiple cores more
efficiently. I've not tested both with a 64 bit version of Windows7, the
full 64bit setup installed and ran, so I've not bothered swapping to all
32bit.

PHP is slower in 64bit than in 32bit modes. Databases (be oracle,
mysql or other) are another stories and many of them are faster.
However one does not have to run php in 64bit mode to talk to database
servers running in 64bit mode.

That being said, the main issues are not only for php but many
libraries used by php. They did not support windows 64bit very well
and they have not been tested enough to be ran on production servers
safely (by all means).

I think that perhaps the thing that is different in all my testing is that eaccelerator is enabled. That is compiled 64bit as are all the other additional libraries I use, such as imagemagick and the firebird client. I need to produce a set of publishable performance figures on the machine that I've been testing on, but that would take some time as I am more than happy with the current all 64bit setup. Testing each bit as 32bit or 64bit would take some work, but I will endeavour just to switch the php section ... if I can get 32bit versions of all the libraries currently being used with it.

Mixing 32bit and 64bit just seems totally wrong to me ... and I am not seeing any unexplainable problems with my current setup, which has been running since I first posted the 64bit links without even having to reboot windows. Something I still have to do on customer sites with the 32bit setups :(

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--- End Message ---
--- Begin Message ---
On Sun, Oct 16, 2011 at 10:46 PM, Lester Caine <les...@lsces.co.uk> wrote:

> Pierre Joye wrote:
>
>> hi,
>>
>> On Sun, Oct 16, 2011 at 12:24 AM, Lester Caine<les...@lsces.co.uk>
>>  wrote:
>>
>>> Keith Davis wrote:
>>>
>>>>
>>>>>  From everything that I've heard, there is not much benefit to a x64
>>>>>
>>>>
>>>> binary for PHP.
>>>>
>>>
>>> Running all 64bit including the database, I'm seeing a reasonable
>>> performance improvement over a pure 32 bit set-up on the same AMD 64bit
>>> hardware using 64bit vista order of 10 to 15% faster. It was also worth
>>> pointing out that the same hardware runs a good 50% faster again on a
>>> 64bit
>>> Linux OS. I think this shows that the OS is the problem rather than the
>>> 64bit software, but the Linux OS does seem to use the multiple cores more
>>> efficiently. I've not tested both with a 64 bit version of Windows7, the
>>> full 64bit setup installed and ran, so I've not bothered swapping to all
>>> 32bit.
>>>
>>
>> PHP is slower in 64bit than in 32bit modes. Databases (be oracle,
>> mysql or other) are another stories and many of them are faster.
>> However one does not have to run php in 64bit mode to talk to database
>> servers running in 64bit mode.
>>
>> That being said, the main issues are not only for php but many
>> libraries used by php. They did not support windows 64bit very well
>> and they have not been tested enough to be ran on production servers
>> safely (by all means).
>>
>
> I think that perhaps the thing that is different in all my testing is that
> eaccelerator is enabled. That is compiled 64bit as are all the other
> additional libraries I use, such as imagemagick and the firebird client. I
> need to produce a set of publishable performance figures on the machine that
> I've been testing on, but that would take some time as I am more than happy
> with the current all 64bit setup. Testing each bit as 32bit or 64bit would
> take some work, but I will endeavour just to switch the php section ... if I
> can get 32bit versions of all the libraries currently being used with it.
>
> Mixing 32bit and 64bit just seems totally wrong to me ... and I am not
> seeing any unexplainable problems with my current setup, which has been
> running since I first posted the 64bit links without even having to reboot
> windows. Something I still have to do on customer sites with the 32bit
> setups :(


did you checked your "Program Files (x86)" directory lately?
for windows it is common that there are apps without 64bit versions. :(

-- 
Ferenc Kovács
@Tyr43l - http://tyrael.hu

--- End Message ---
--- Begin Message ---
On Sun, Oct 16, 2011 at 10:46 PM, Lester Caine <les...@lsces.co.uk> wrote:

> Mixing 32bit and 64bit just seems totally wrong to me ...

There is nothing wrong here but a totally normal configuration.

If one takes care of performances, the database server(s) are separate
servers anyway. And they are totally unrelated to the clients
connecting to them.

> and I am not
> seeing any unexplainable problems with my current setup, which has been
> running since I first posted the 64bit links without even having to reboot
> windows. Something I still have to do on customer sites with the 32bit
> setups :(

I see literally dozen. Many libraries do even claim no support for
win64 as it is totally untested and could suffer from many unknown
issues (including security ones). We have discussed that in the past
already and I would really appreciate that you stop to say that there
is no issue as it is totally misleading.

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

--- End Message ---
--- Begin Message ---
Ferenc Kovacs wrote:
did you checked your "Program Files (x86)" directory lately?
for windows it is common that there are apps without 64bit versions. :(

If these machines had to run anything other than the Apache/PHP/Firebird stack that might be relevant, but my hands are tied by the customer to provide a Windows based server rather than the preferred Linux setup. Most other things are simply removed since they are not required, just leaving only the code required to run the stack.

Yes Pierre - on the larger systems we run multiple machines, but on sites that only require a single computer, a single clean stack is also nice, with everything in the one base directory and without the agro of deciding if this is a 32bit or 64bit program. Everything running on the Linux boxes is 64 bit, and everything is built from the same code base, so I will continue to use a single 64bit stack ... and when problems arise then I will deal with them, but nothing is giving me a problem currently ...

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--- End Message ---

Reply via email to