Re: Windows build
| From: | Ilia Alshanetsky | Date: | Sun, 07 Jan 2007 02:49:35 +0000 |
| Subject: | Re: Windows build | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-27320@lists.php.net to get a copy of this message | ||
I find that results showing that vc2005 generates better code then the one prepared by the intel compiler extremely usual. Was the test done on a non-intel (amd) machine by any chance?
On 6-Jan-07, at 9:20 PM, Andi Gutmans wrote:
Hi Edin, The 2% surprises me a lot. We got very different results but it might be due to different hardware, OS (we use Windows Server 2003) and different tests. Here's what we got (all non-threadsafe):Ilia Alshanetskyvc2005 intel msvc6bench 9.326 9.378 10.28hello 10.48 11.6 11.28xoops 67.82 69.49 81.34static 16.97 18.4 21.18 qdig 63.52 67.05 69.57 qdig2 14.4 15.61 19.04Btw, today I never recommend running mod_php on Windows and always point people to CGI or existing FastCGI implementations. That said, I understand that you don't want to break things right now and stick to VC 6. Although I know it can work in some cases, I agree with you that running two CRTs is probably not a great idea. While the interfaces of the CRT functions might be identical, I am not sure all the structures are the same and that could cause some ugliness if we get structs like file handlers from the Apache executable passed into PHP and vice-versa. It's something worth looking into but not something one would want to rush for a minor version like 5.2.1. Andi-----Original Message----- From: Edin Kadribasic [mailto:edin@krug.dk] Sent: Saturday, January 06, 2007 1:28 PM To: Andi Gutmans Cc: 'PHP Internals List' Subject: Re: [PHP-DEV] Windows build Hi Andi, Turns out the problem is that Apache is building their binaries using VC6 so wrong CRT gets loaded. The only solution I found was to tell Windows to load Apache with msvcr80.dll instead of msvcr.dll by suppling a manifest file in Apache bin directory. If you crate Apache.exe.manifest that contains: <?xml version='1.0' encoding='UTF-8' standalone='yes'?> <assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'> <dependency>--PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php<dependentAssembly> <assemblyIdentity type='win32' name='Microsoft.VC80.CRT'version='8.0.50608.0' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' /></dependentAssembly></dependency> </assembly> The Apache will load PHP and PHP will be able to load extensions. It probably isn't good idea to force a different C Runtime on Apache like this. Regarding performance, I found that on Zend/bench.php the improvement was only marginal (2%) compared to huge increase (25-30%) when disabling thread support. http://edin.dk/archives/25-Benchmarks.html Edin Andi Gutmans wrote:Hi Edin, Thanks for trying to get this to work! I think eventually it'll be the right move to go to VC8 but I agree that if it risks a successful 5.2.1 release then it mightnot be worthdoing that right now. If you can share with us areproducing case wecan try and look into it and see if we can get it to work.So far wehave concentrated on CLI/CGI/FastCGi because that's themost feasibleway of running, but I agree that you also need to get theother methods to run.For those who are curious, there are some significant performance improvements in VC8. Our tolower() optimization which issignificantis only for VC8, the compiler creates significantly faster code (on par with Intel C/C++ compiler), and I believe some of the CRT functions like time() are also much faster. So I think it'sdefinitelyworth upgrading but it should be well timed. Anyway, let us know and we'll try and dig deeper and help get this puppy ported and update the build. There probably is some work that needs to be done on the 3rd party libs. Thanks. Anditrouble that-----Original Message----- From: Edin Kadribasic [mailto:edin@krug.dk] Sent: Friday, January 05, 2007 7:48 PM To: PHP Internals List Subject: [PHP-DEV] Windows build Hey, It seems that VC++ 8.0 (Visual Studio 2005) brings moreAfter spendingits worth. Mainly the way it deals with the C runtime.I'm throwinghours and hours of trying to figure out the way to make PHP work under Apache on Windows and be able to load extensions,and cli. Itin the towel. I can get PHP to work fine on the command line, both cgidll into aalso works fine under IIS using fastcgi. But loading sapiusing VC++webserver (not using php.exe or php-cgi.exe) works for the sapi itself, but trying to load any extensions via php.ini fails miserably. Sometimes you will get an error that the C runtime was attempted to be loaded in an illegal way, sometime PHP will claim that the extension does not exist, etc. I looked around at other projects and everyone seems to beeliminates all6.0 for their builds (Active state, apache, ...) whichgood old Cthe hassle with bundling C runtime, etc. So I think the best thing for us would be to stick to theunsubscribe,compiler for making the Windows distro. Edin -- PHP Internals - PHP Runtime Development Mailing List Tovisit: http://www.php.net/unsub.php