Author Topic: Q&A 2009: PHP 5.3 for Windows: Progress, improvements, what to except. 2 Present  (Read 5863 times)

0 Members and 1 Guest are viewing this topic.

Offline h.janssenTopic starter

  • Microsoft Q&A
  • Irregular
    • View Profile
    • Port25
From the very beginning we started working with the PHP community, and we now sponsor Pierre Joye (Probably the top PHP Windows person out there) to help improve PHP on Windows.
 
Since 5.2.x was pretty much a baked release, we had to start working on the latest development release at the time. PHP 5.3 to be exact. It was our focus to improve PHP on Windows in the following key areas;

    Performance
    Stability
    Portability & Compatibility
    Security
    Enable Platform Features

Our first order of business was to create a version of PHP that was up to date for all of it’s code and could be build by mere mortals such as myself.

Fixing the libraries;

Every Library built from Source
       •   The source code of every library used was tracked down and updated to their latest versions
Tracking dependent projects
       •   Both Security and Features can be kept 100% in sync with other platforms, due to the ability to track the originating source code
Working with the code
       •   It’s now possible to work with the source code of the originating project, and apply modern building techniques and optimizations

Creating a new Build Process;

Created a clean, unified build
       •   Using tools built by the OSTC, we have constructed a better build process which opens many new possibilities, yet can easily adapt to new changes by developers using older technologies.
       •   All parts of PHP are now build, and not just linked from existing and old libraries. This did grow the build system for PHP on Windows significantly
One unified set of properties
       •   Generated project files use a single set of build configuration files, allowing 100% of the code to be built to the same specifications.
Optimizations everywhere
       •   The new process lets us take advantage of high-performance PGO technology to improve the performance of PHP by leaps and bounds.
Limitless opportunities
       •   With the new process, we can now do instrumented builds of the entire stack, allowing us to analyze and improve PHP for any environment
 
Eliminating crufty code, and replacing common functions with their native Windows counterparts;

Eliminated POSIX emulation
      •   Dropped the POSIX emulation libraries, and code has been written to use Win32 APIs correctly.
Choosing the Win32 Way
      •   Implemented features in a way that doesn’t mimic the method on Unix, just the results.
Use native libraries/APIs
      •   Replaced that code with calls to the natively provided APIs.
Targets new OS, gracefully
      •   Recent code changes now allow us to target features on the latest versions of Windows, and provides graceful failure on down-level platforms.

Testing and QA;

       •   Windows is a primary platform
       •   Windows is now a primary platform, and changes which break Windows must be addressed.
       •   Over 98% of tests now pass on Windows, and we’re aiming to close the gap completely.  Prior to this I believe only like 80% passed.
Windows is now represented
       •   Windows developers are now on the security mailing lists, and can take action at the same time.
New Testing Tools
       •   The OSTC has created new tools for testing FastCGI and PHP builds that can be included in the official build process, providing PGO and instrumentation data to the developers.

Releasing PHP, Same day service……….. with a smile or a grimace;

Windows is a primary platform
       •   Windows gets the same ability to push back on Release Dates, and builds are done on both platforms on the same day.
Easy to replicate.
       •   It is now simple for anyone to rebuild the exact same PHP stack on Windows as the release build.
New work on the installer.
       •   New work is being done to improve the installer for the Windows platform.

And all that I wrote here has gone into 5.3.

But this really only gives us a starting point, you cannot fix/optimize/improve anything that you do not have the source code to, or can build easily. A side effect of this work is that we greatly seemed to have improved the performance for PHP on Windows. When running phpbench on the core engine, it is now faster in many cases than Linux. 19% or so faster we see.

Unfortunately phpbench does not really show you how PHP would do in any real world scenarios, and is really only used to get an idea of engine performance. So there are still some issues with IO.

But finally we have a version of PHP that has most of the 5.2x and before issues fixed. So now we are going to go more into the performance updates.

But more about that in a later post.



« Last Edit: February 08, 2010, 10:35:39 AM by subtalk »

Offline gizmola

  • Global Moderator
  • Addict
  • *
  • Gender: Male
    • View Profile
    • GizmoLA.com
I agree 100% with the approach being taken.  In my experience, while there's always been a host of people using Wamp for development, not a lot of people I know are using it in production on a windows server, and as you stated pretty well, there were a number of reasons for that.  I'm glad to see this initiative took on the challenges involved.  This is exactly the type of effort required for people to seriously consider Windows servers running PHP apps. 

Further information on how people can compile PHP for windows would a great next step.

PHP Freaks Forums

« on: »

Tired of these ads? Purchase a supporter subscription to get rid of them.