SlideShare a Scribd company logo
PHP Performance on Windows

 Mark Brown, Ruslan Yakushev
 Microsoft
A Little History

2006     • PHP on Win/IIS = Big Joke



2007     • IIS FastCGI



2008     • windows.php.net
         • PHP 5.3


2009     • PHP 5.3 Release
         • WinCache 1.0


2010     • FastCGI 1.5
         • WinCache 1.1
PHP Community and Microsoft
• “PHP on Windows” project involves:
  – PHP core developers
  – PHP installer developers
  – PHP documentation team
  – PHP community and influentials
  – PHP applications communities (WordPress,
    Joomla, Drupal, others)
  – Many others…
CGI  FASTCGI
CGI vs FastCGI
• (CGI on Windows) == SLOW !!!
  – New PHP process per request
• FastCGI == (CGI on steroids)
  – Re-use PHP processes in a process pool
  – Single-threaded execution environment
  – Use Non-Thread Safe PHP with IIS FastCGI
• PHP ISAPI?
  – Stay away!!! Use FastCGI instead
  – No ISAPI support in 5.3 anyway
CGI vs. FastCGI
CGI vs. FastCGI
CGI Processes           FastCGI processes
FastCGI 1.5
• New features:
   – Auto-tuning of maxIntances for optimal performance
   – Automatic recycling of PHP processes with config
     change MonitorChangesTo setting
   – No more restarts with changes to php.ini
• Consistent set of features across all IIS versions:
   – For IIS 7.5 in WS08 R2 – new features are included
   – For IIS 7.0 in WS08 – install the FastCGI update
     (http://www.iis.net/expand/FastCGI)
   – For IIS 5.1 & 6.0 – install FastCGI 1.5 extension
IIS FastCGI and PHP Setup - automated
• Use the easiest option - Web Platform Installer!



                                   




     Get Web Platform Installer from http://www.microsoft.com/web/php/
Add PHP installer option
IIS FastCGI & PHP Setup - manual
• Follow the instructions on php.net:
• IIS 5.1 and IIS 6.0:
   – php.net/manual/en/install.windows.iis6.php
• IIS 7 and later:
   – php.net/manual/en/install.windows.iis7.php
• PHP configuration
   – php.net/manual/en/install.windows.manual.php
PHP 5.2  PHP 5.3
PHP 5.3 improvements
• PHP 5.3 improvements:
  – Using VC9 compiler (PHP 5.2 used VC6)
  – Optimized API calls (using Win32 instead of POSIX)
  – All PHP libraries built from the source code
  – Compatibility fixes
• Windows builds are available at:
  – http://windows.php.net/

 From: http://ilia.ws/files/Confoo2010_PHP53.pdf
 “Substantial performance improvements on Windows (40% +)”
WINCACHE
WinCache 1.0
• PHP Accelerator optimized for Windows
  – Opcode cache
  – File cache
  – Resolve path cache
• Download from:
  – http://www.iis.net/expand/WinCacheForPhp
• Contributed by MS to PECL:
  – Source code on http://pecl.php.net/wincache/
  – Documentation on http://www.php.net/wincache/
  – BSD license

           Contributions are welcome!
Why use opcode cache?



To serve an index.php in WordPress, PHP has to read, parse,   compile and
                       execute more than 100 PHP files!
WinCache in action




Just add extension=php_wincache.dll in php.ini.
No app code changes necessary!
WinCache and CPU usage
• WinCache significantly
  reduces CPU load
• Use FastCGI
  maxInstances setting to
  load CPU more
• Set maxInstances to 0
  to enable auto tuning
WinCache and CPU usage




  Increased FastCGI maxInstances from 4 (default) to 10
WinCache 1.1 User Cache API:
• Stores app data in shared memory
• Function by function compatible with APC
WinCache 1.1 – Session Handler
• Stores PHP session data in shared memory
• Enabled in php.ini :
  session.save_handler = wincache
• Session storage is not persistent in beta, but
  will be in RC:
  – Use the code snapshot to try it out.
WinCache 1.1 user cache in action




 Instructions on how to configure WordPress to use WinCache user cache:
  http://ruslany.net/2010/03/make-wordpress-faster-on-iis-with-wincache-1-1/
WinCache statistics script




Always restrict access to wincache.php by using built-in
    authentication or web server authentication!
What’s next?
• Popular PHP applications to adopt WinCache:
  – Joomla 1.6
  – Drupal cacherouter module
  – Sugar CRM
• WinCache improvements:
  – File change notifications support
  – Function hooks
Summary
• In 3 years Windows/IIS has become a great option
  for hosting PHP applications
• In 2 years the PHP performance on Windows has
  improved considerably.
PHP on Windows - Contacts
• Pierre Joye
                                     • Venkat Raman Don
• (PHP Core Developer)
   – pajoye@php.net
                                     • (IIS and WinCache Tester)
                                        – donraman@microsoft.com
   – http://twitter.com/PierreJoye
                                        – http://blogs.iis.net/donraman
                                     • Mark Brown
• Kanwaljeet Singla
                                     • (Web Platform)
• (IIS and WinCache                     – twitter.com/markjbrown
  Developer)                            – blogs.msdn.com/markbrown/
   – ksingla@microsoft.com
   – http://twitter.com/kjsingla
                                     • Ruslan Yakushev
   – http://blogs.iis.net/ksingla/   • (IIS Program Manager)
                                        – ruslany@microsoft.com
                                        – http://twitter.com/ruslany
                                        – http://ruslany.net/
PHP on Windows - resources
•   http://windows.php.net/
•   http://php.iis.net/
•   php.windows mailing list
•   http://forums.iis.net/
Test setup
•   Quad core CPU + 4 GB RAM
•   Windows Server 2008 with IIS 7.0 and FastCGI
•   PHP 5.3.2
•   WinCache 1.1 beta
•   WordPress 2.9.2
•   + Load Generator and MySQL on the same box

More Related Content

What's hot

Ducky USB - Indicators of Compromise (IOCs)
Ducky USB - Indicators of Compromise (IOCs)Ducky USB - Indicators of Compromise (IOCs)
Ducky USB - Indicators of Compromise (IOCs)
Brent Muir
 
Comparison between Oracle JDK, Oracle OpenJDK, and Red Hat OpenJDK
Comparison between Oracle JDK, Oracle OpenJDK, and Red Hat OpenJDKComparison between Oracle JDK, Oracle OpenJDK, and Red Hat OpenJDK
Comparison between Oracle JDK, Oracle OpenJDK, and Red Hat OpenJDK
Firmansyah, SCJP, OCEWCD, OCEWSD, TOGAF, OCMJEA, CEH
 
Alles was Sie über HCL Notes 14 wissen müssen
Alles was Sie über HCL Notes 14 wissen müssenAlles was Sie über HCL Notes 14 wissen müssen
Alles was Sie über HCL Notes 14 wissen müssen
panagenda
 
Mocking your Microservices with Mock Server
Mocking your Microservices with Mock ServerMocking your Microservices with Mock Server
Mocking your Microservices with Mock Server
Jaap Coomans
 
Web Design Services Presentation
Web Design Services PresentationWeb Design Services Presentation
Web Design Services Presentation
Think Tank Creative
 
Oracle R12 EBS Performance Tuning
Oracle R12 EBS Performance TuningOracle R12 EBS Performance Tuning
Oracle R12 EBS Performance Tuning
Scott Jenner
 
SharePoint Building Blocks for your Intranet - Mark Kashman
SharePoint Building Blocks for your Intranet - Mark KashmanSharePoint Building Blocks for your Intranet - Mark Kashman
SharePoint Building Blocks for your Intranet - Mark Kashman
Christian Buckley
 
MySQL Monitoring using Prometheus & Grafana
MySQL Monitoring using Prometheus & GrafanaMySQL Monitoring using Prometheus & Grafana
MySQL Monitoring using Prometheus & Grafana
YoungHeon (Roy) Kim
 
Oracle architecture
Oracle architectureOracle architecture
Oracle architecture
Soumya Das
 
Apache Knox - Hadoop Security Swiss Army Knife
Apache Knox - Hadoop Security Swiss Army KnifeApache Knox - Hadoop Security Swiss Army Knife
Apache Knox - Hadoop Security Swiss Army Knife
DataWorks Summit
 
Dns server setup on ubuntu vps (master+slave)
Dns server setup on ubuntu vps (master+slave)Dns server setup on ubuntu vps (master+slave)
Dns server setup on ubuntu vps (master+slave)
Vijay Sharma
 
Access Data from XPages with the Relational Controls
Access Data from XPages with the Relational ControlsAccess Data from XPages with the Relational Controls
Access Data from XPages with the Relational Controls
Teamstudio
 
IBM Lotus Domino Domain Monitoring (DDM)
IBM Lotus Domino Domain Monitoring (DDM)IBM Lotus Domino Domain Monitoring (DDM)
IBM Lotus Domino Domain Monitoring (DDM)
Austin Chang
 
Amazon RDS with Amazon Aurora | AWS Public Sector Summit 2016
Amazon RDS with Amazon Aurora | AWS Public Sector Summit 2016Amazon RDS with Amazon Aurora | AWS Public Sector Summit 2016
Amazon RDS with Amazon Aurora | AWS Public Sector Summit 2016
Amazon Web Services
 
Git branch stregagy & case study
Git branch stregagy & case studyGit branch stregagy & case study
Git branch stregagy & case study
Woo Jin Kim
 
JBoss EAP / WildFly, State of the Union
JBoss EAP / WildFly, State of the UnionJBoss EAP / WildFly, State of the Union
JBoss EAP / WildFly, State of the Union
Dimitris Andreadis
 
Unidad 10 - Puesta en marcha del sistema
Unidad 10 - Puesta en marcha del sistemaUnidad 10 - Puesta en marcha del sistema
Unidad 10 - Puesta en marcha del sistema
vverdu
 
Oracle soa suite 12c upgrade types
Oracle soa suite 12c upgrade typesOracle soa suite 12c upgrade types
Oracle soa suite 12c upgrade types
K Kumar Guduru
 
Version Control System
Version Control SystemVersion Control System
Version Control System
guptaanil
 
Estratégia de backup - RMAN
Estratégia de backup - RMANEstratégia de backup - RMAN
Estratégia de backup - RMAN
Eduardo Legatti
 

What's hot (20)

Ducky USB - Indicators of Compromise (IOCs)
Ducky USB - Indicators of Compromise (IOCs)Ducky USB - Indicators of Compromise (IOCs)
Ducky USB - Indicators of Compromise (IOCs)
 
Comparison between Oracle JDK, Oracle OpenJDK, and Red Hat OpenJDK
Comparison between Oracle JDK, Oracle OpenJDK, and Red Hat OpenJDKComparison between Oracle JDK, Oracle OpenJDK, and Red Hat OpenJDK
Comparison between Oracle JDK, Oracle OpenJDK, and Red Hat OpenJDK
 
Alles was Sie über HCL Notes 14 wissen müssen
Alles was Sie über HCL Notes 14 wissen müssenAlles was Sie über HCL Notes 14 wissen müssen
Alles was Sie über HCL Notes 14 wissen müssen
 
Mocking your Microservices with Mock Server
Mocking your Microservices with Mock ServerMocking your Microservices with Mock Server
Mocking your Microservices with Mock Server
 
Web Design Services Presentation
Web Design Services PresentationWeb Design Services Presentation
Web Design Services Presentation
 
Oracle R12 EBS Performance Tuning
Oracle R12 EBS Performance TuningOracle R12 EBS Performance Tuning
Oracle R12 EBS Performance Tuning
 
SharePoint Building Blocks for your Intranet - Mark Kashman
SharePoint Building Blocks for your Intranet - Mark KashmanSharePoint Building Blocks for your Intranet - Mark Kashman
SharePoint Building Blocks for your Intranet - Mark Kashman
 
MySQL Monitoring using Prometheus & Grafana
MySQL Monitoring using Prometheus & GrafanaMySQL Monitoring using Prometheus & Grafana
MySQL Monitoring using Prometheus & Grafana
 
Oracle architecture
Oracle architectureOracle architecture
Oracle architecture
 
Apache Knox - Hadoop Security Swiss Army Knife
Apache Knox - Hadoop Security Swiss Army KnifeApache Knox - Hadoop Security Swiss Army Knife
Apache Knox - Hadoop Security Swiss Army Knife
 
Dns server setup on ubuntu vps (master+slave)
Dns server setup on ubuntu vps (master+slave)Dns server setup on ubuntu vps (master+slave)
Dns server setup on ubuntu vps (master+slave)
 
Access Data from XPages with the Relational Controls
Access Data from XPages with the Relational ControlsAccess Data from XPages with the Relational Controls
Access Data from XPages with the Relational Controls
 
IBM Lotus Domino Domain Monitoring (DDM)
IBM Lotus Domino Domain Monitoring (DDM)IBM Lotus Domino Domain Monitoring (DDM)
IBM Lotus Domino Domain Monitoring (DDM)
 
Amazon RDS with Amazon Aurora | AWS Public Sector Summit 2016
Amazon RDS with Amazon Aurora | AWS Public Sector Summit 2016Amazon RDS with Amazon Aurora | AWS Public Sector Summit 2016
Amazon RDS with Amazon Aurora | AWS Public Sector Summit 2016
 
Git branch stregagy & case study
Git branch stregagy & case studyGit branch stregagy & case study
Git branch stregagy & case study
 
JBoss EAP / WildFly, State of the Union
JBoss EAP / WildFly, State of the UnionJBoss EAP / WildFly, State of the Union
JBoss EAP / WildFly, State of the Union
 
Unidad 10 - Puesta en marcha del sistema
Unidad 10 - Puesta en marcha del sistemaUnidad 10 - Puesta en marcha del sistema
Unidad 10 - Puesta en marcha del sistema
 
Oracle soa suite 12c upgrade types
Oracle soa suite 12c upgrade typesOracle soa suite 12c upgrade types
Oracle soa suite 12c upgrade types
 
Version Control System
Version Control SystemVersion Control System
Version Control System
 
Estratégia de backup - RMAN
Estratégia de backup - RMANEstratégia de backup - RMAN
Estratégia de backup - RMAN
 

Similar to Php Performance On Windows

Rev it up with php on windows
Rev it up with php on windowsRev it up with php on windows
Rev it up with php on windows
Josh Holmes
 
PHP on Windows - What's New
PHP on Windows - What's NewPHP on Windows - What's New
PHP on Windows - What's New
ZendCon
 
PHP and FastCGI Performance Optimizations
PHP and FastCGI Performance OptimizationsPHP and FastCGI Performance Optimizations
PHP and FastCGI Performance Optimizations
Alessandro Pilotti
 
Wordpress On Windows
Wordpress On WindowsWordpress On Windows
Wordpress On Windows
Josh Holmes
 
Easy Cross-Platform PowerShell Automation with Puppet Bolt
Easy Cross-Platform PowerShell Automation with Puppet BoltEasy Cross-Platform PowerShell Automation with Puppet Bolt
Easy Cross-Platform PowerShell Automation with Puppet Bolt
Puppet
 
Open Audit
Open AuditOpen Audit
Open Audit
ncspa
 
Cooking with Chef on Windows
Cooking with Chef on WindowsCooking with Chef on Windows
Cooking with Chef on Windows
Julian Dunn
 
Microsoft WebsiteSpark & Windows Platform Installer
Microsoft WebsiteSpark & Windows Platform InstallerMicrosoft WebsiteSpark & Windows Platform Installer
Microsoft WebsiteSpark & Windows Platform Installer
George Kanellopoulos
 
I5 - Bring yourself up to speed with power shell
I5 -  Bring yourself up to speed with power shellI5 -  Bring yourself up to speed with power shell
I5 - Bring yourself up to speed with power shell
SPS Paris
 
Chocolatey for Organizations: Easily Manage Software - PowerShell Summit 2019
Chocolatey for Organizations: Easily Manage Software - PowerShell Summit 2019Chocolatey for Organizations: Easily Manage Software - PowerShell Summit 2019
Chocolatey for Organizations: Easily Manage Software - PowerShell Summit 2019
Rob Reynolds
 
Wordpress on Windows
Wordpress on WindowsWordpress on Windows
Wordpress on Windows
Josh Holmes
 
Microsoft loves PHP. Seriously.
Microsoft loves PHP. Seriously.Microsoft loves PHP. Seriously.
Microsoft loves PHP. Seriously.
Jenna Hoffman
 
IWMW 1999: Browser management
IWMW 1999: Browser managementIWMW 1999: Browser management
IWMW 1999: Browser management
IWMW
 
Patch Management on Windows with Puppet
Patch Management on Windows with PuppetPatch Management on Windows with Puppet
Patch Management on Windows with Puppet
Puppet
 
DrupalCon 2011 Highlight
DrupalCon 2011 HighlightDrupalCon 2011 Highlight
DrupalCon 2011 Highlight
Supakit Kiatrungrit
 
Northeast PHP - High Performance PHP
Northeast PHP - High Performance PHPNortheast PHP - High Performance PHP
Northeast PHP - High Performance PHP
Jonathan Klein
 
Php Presentation
Php PresentationPhp Presentation
Php Presentation
Manish Bothra
 
Chocolatey - Software Automation for Windows (and sneak peak of Central Mana...
 Chocolatey - Software Automation for Windows (and sneak peak of Central Mana... Chocolatey - Software Automation for Windows (and sneak peak of Central Mana...
Chocolatey - Software Automation for Windows (and sneak peak of Central Mana...
Rob Reynolds
 
OpenStack Summit 2013 Hong Kong - OpenStack and Windows
OpenStack Summit 2013 Hong Kong - OpenStack and WindowsOpenStack Summit 2013 Hong Kong - OpenStack and Windows
OpenStack Summit 2013 Hong Kong - OpenStack and Windows
Alessandro Pilotti
 
ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)
ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)
ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)
Nexcess.net LLC
 

Similar to Php Performance On Windows (20)

Rev it up with php on windows
Rev it up with php on windowsRev it up with php on windows
Rev it up with php on windows
 
PHP on Windows - What's New
PHP on Windows - What's NewPHP on Windows - What's New
PHP on Windows - What's New
 
PHP and FastCGI Performance Optimizations
PHP and FastCGI Performance OptimizationsPHP and FastCGI Performance Optimizations
PHP and FastCGI Performance Optimizations
 
Wordpress On Windows
Wordpress On WindowsWordpress On Windows
Wordpress On Windows
 
Easy Cross-Platform PowerShell Automation with Puppet Bolt
Easy Cross-Platform PowerShell Automation with Puppet BoltEasy Cross-Platform PowerShell Automation with Puppet Bolt
Easy Cross-Platform PowerShell Automation with Puppet Bolt
 
Open Audit
Open AuditOpen Audit
Open Audit
 
Cooking with Chef on Windows
Cooking with Chef on WindowsCooking with Chef on Windows
Cooking with Chef on Windows
 
Microsoft WebsiteSpark & Windows Platform Installer
Microsoft WebsiteSpark & Windows Platform InstallerMicrosoft WebsiteSpark & Windows Platform Installer
Microsoft WebsiteSpark & Windows Platform Installer
 
I5 - Bring yourself up to speed with power shell
I5 -  Bring yourself up to speed with power shellI5 -  Bring yourself up to speed with power shell
I5 - Bring yourself up to speed with power shell
 
Chocolatey for Organizations: Easily Manage Software - PowerShell Summit 2019
Chocolatey for Organizations: Easily Manage Software - PowerShell Summit 2019Chocolatey for Organizations: Easily Manage Software - PowerShell Summit 2019
Chocolatey for Organizations: Easily Manage Software - PowerShell Summit 2019
 
Wordpress on Windows
Wordpress on WindowsWordpress on Windows
Wordpress on Windows
 
Microsoft loves PHP. Seriously.
Microsoft loves PHP. Seriously.Microsoft loves PHP. Seriously.
Microsoft loves PHP. Seriously.
 
IWMW 1999: Browser management
IWMW 1999: Browser managementIWMW 1999: Browser management
IWMW 1999: Browser management
 
Patch Management on Windows with Puppet
Patch Management on Windows with PuppetPatch Management on Windows with Puppet
Patch Management on Windows with Puppet
 
DrupalCon 2011 Highlight
DrupalCon 2011 HighlightDrupalCon 2011 Highlight
DrupalCon 2011 Highlight
 
Northeast PHP - High Performance PHP
Northeast PHP - High Performance PHPNortheast PHP - High Performance PHP
Northeast PHP - High Performance PHP
 
Php Presentation
Php PresentationPhp Presentation
Php Presentation
 
Chocolatey - Software Automation for Windows (and sneak peak of Central Mana...
 Chocolatey - Software Automation for Windows (and sneak peak of Central Mana... Chocolatey - Software Automation for Windows (and sneak peak of Central Mana...
Chocolatey - Software Automation for Windows (and sneak peak of Central Mana...
 
OpenStack Summit 2013 Hong Kong - OpenStack and Windows
OpenStack Summit 2013 Hong Kong - OpenStack and WindowsOpenStack Summit 2013 Hong Kong - OpenStack and Windows
OpenStack Summit 2013 Hong Kong - OpenStack and Windows
 
ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)
ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)
ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)
 

Recently uploaded

Cassandra to ScyllaDB: Technical Comparison and the Path to Success
Cassandra to ScyllaDB: Technical Comparison and the Path to SuccessCassandra to ScyllaDB: Technical Comparison and the Path to Success
Cassandra to ScyllaDB: Technical Comparison and the Path to Success
ScyllaDB
 
Getting Started Using the National Research Platform
Getting Started Using the National Research PlatformGetting Started Using the National Research Platform
Getting Started Using the National Research Platform
Larry Smarr
 
ThousandEyes New Product Features and Release Highlights: June 2024
ThousandEyes New Product Features and Release Highlights: June 2024ThousandEyes New Product Features and Release Highlights: June 2024
ThousandEyes New Product Features and Release Highlights: June 2024
ThousandEyes
 
The "Zen" of Python Exemplars - OTel Community Day
The "Zen" of Python Exemplars - OTel Community DayThe "Zen" of Python Exemplars - OTel Community Day
The "Zen" of Python Exemplars - OTel Community Day
Paige Cruz
 
Move Auth, Policy, and Resilience to the Platform
Move Auth, Policy, and Resilience to the PlatformMove Auth, Policy, and Resilience to the Platform
Move Auth, Policy, and Resilience to the Platform
Christian Posta
 
CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My IdentityCNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
Cynthia Thomas
 
Brightwell ILC Futures workshop David Sinclair presentation
Brightwell ILC Futures workshop David Sinclair presentationBrightwell ILC Futures workshop David Sinclair presentation
Brightwell ILC Futures workshop David Sinclair presentation
ILC- UK
 
Chapter 6 - Test Tools Considerations V4.0
Chapter 6 - Test Tools Considerations V4.0Chapter 6 - Test Tools Considerations V4.0
Chapter 6 - Test Tools Considerations V4.0
Neeraj Kumar Singh
 
Call Girls Chennai ☎️ +91-7426014248 😍 Chennai Call Girl Beauty Girls Chennai...
Call Girls Chennai ☎️ +91-7426014248 😍 Chennai Call Girl Beauty Girls Chennai...Call Girls Chennai ☎️ +91-7426014248 😍 Chennai Call Girl Beauty Girls Chennai...
Call Girls Chennai ☎️ +91-7426014248 😍 Chennai Call Girl Beauty Girls Chennai...
anilsa9823
 
APJC Introduction to ThousandEyes Webinar
APJC Introduction to ThousandEyes WebinarAPJC Introduction to ThousandEyes Webinar
APJC Introduction to ThousandEyes Webinar
ThousandEyes
 
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc
 
Fuxnet [EN] .pdf
Fuxnet [EN]                                   .pdfFuxnet [EN]                                   .pdf
Fuxnet [EN] .pdf
Overkill Security
 
Day 4 - Excel Automation and Data Manipulation
Day 4 - Excel Automation and Data ManipulationDay 4 - Excel Automation and Data Manipulation
Day 4 - Excel Automation and Data Manipulation
UiPathCommunity
 
Chapter 2 - Testing Throughout SDLC V4.0
Chapter 2 - Testing Throughout SDLC V4.0Chapter 2 - Testing Throughout SDLC V4.0
Chapter 2 - Testing Throughout SDLC V4.0
Neeraj Kumar Singh
 
A Deterministic Walk Down TigerBeetle’s main() Street
A Deterministic Walk Down TigerBeetle’s main() StreetA Deterministic Walk Down TigerBeetle’s main() Street
A Deterministic Walk Down TigerBeetle’s main() Street
ScyllaDB
 
ASIMOV: Enterprise RAG at Dialog Axiata PLC
ASIMOV: Enterprise RAG at Dialog Axiata PLCASIMOV: Enterprise RAG at Dialog Axiata PLC
ASIMOV: Enterprise RAG at Dialog Axiata PLC
Zilliz
 
intra-mart Accel series 2024 Spring updates_En
intra-mart Accel series 2024 Spring updates_Enintra-mart Accel series 2024 Spring updates_En
intra-mart Accel series 2024 Spring updates_En
NTTDATA INTRAMART
 
Chapter 1 - Fundamentals of Testing V4.0
Chapter 1 - Fundamentals of Testing V4.0Chapter 1 - Fundamentals of Testing V4.0
Chapter 1 - Fundamentals of Testing V4.0
Neeraj Kumar Singh
 
Cyber Recovery Wargame
Cyber Recovery WargameCyber Recovery Wargame
Cyber Recovery Wargame
Databarracks
 
An Introduction to All Data Enterprise Integration
An Introduction to All Data Enterprise IntegrationAn Introduction to All Data Enterprise Integration
An Introduction to All Data Enterprise Integration
Safe Software
 

Recently uploaded (20)

Cassandra to ScyllaDB: Technical Comparison and the Path to Success
Cassandra to ScyllaDB: Technical Comparison and the Path to SuccessCassandra to ScyllaDB: Technical Comparison and the Path to Success
Cassandra to ScyllaDB: Technical Comparison and the Path to Success
 
Getting Started Using the National Research Platform
Getting Started Using the National Research PlatformGetting Started Using the National Research Platform
Getting Started Using the National Research Platform
 
ThousandEyes New Product Features and Release Highlights: June 2024
ThousandEyes New Product Features and Release Highlights: June 2024ThousandEyes New Product Features and Release Highlights: June 2024
ThousandEyes New Product Features and Release Highlights: June 2024
 
The "Zen" of Python Exemplars - OTel Community Day
The "Zen" of Python Exemplars - OTel Community DayThe "Zen" of Python Exemplars - OTel Community Day
The "Zen" of Python Exemplars - OTel Community Day
 
Move Auth, Policy, and Resilience to the Platform
Move Auth, Policy, and Resilience to the PlatformMove Auth, Policy, and Resilience to the Platform
Move Auth, Policy, and Resilience to the Platform
 
CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My IdentityCNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
 
Brightwell ILC Futures workshop David Sinclair presentation
Brightwell ILC Futures workshop David Sinclair presentationBrightwell ILC Futures workshop David Sinclair presentation
Brightwell ILC Futures workshop David Sinclair presentation
 
Chapter 6 - Test Tools Considerations V4.0
Chapter 6 - Test Tools Considerations V4.0Chapter 6 - Test Tools Considerations V4.0
Chapter 6 - Test Tools Considerations V4.0
 
Call Girls Chennai ☎️ +91-7426014248 😍 Chennai Call Girl Beauty Girls Chennai...
Call Girls Chennai ☎️ +91-7426014248 😍 Chennai Call Girl Beauty Girls Chennai...Call Girls Chennai ☎️ +91-7426014248 😍 Chennai Call Girl Beauty Girls Chennai...
Call Girls Chennai ☎️ +91-7426014248 😍 Chennai Call Girl Beauty Girls Chennai...
 
APJC Introduction to ThousandEyes Webinar
APJC Introduction to ThousandEyes WebinarAPJC Introduction to ThousandEyes Webinar
APJC Introduction to ThousandEyes Webinar
 
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
 
Fuxnet [EN] .pdf
Fuxnet [EN]                                   .pdfFuxnet [EN]                                   .pdf
Fuxnet [EN] .pdf
 
Day 4 - Excel Automation and Data Manipulation
Day 4 - Excel Automation and Data ManipulationDay 4 - Excel Automation and Data Manipulation
Day 4 - Excel Automation and Data Manipulation
 
Chapter 2 - Testing Throughout SDLC V4.0
Chapter 2 - Testing Throughout SDLC V4.0Chapter 2 - Testing Throughout SDLC V4.0
Chapter 2 - Testing Throughout SDLC V4.0
 
A Deterministic Walk Down TigerBeetle’s main() Street
A Deterministic Walk Down TigerBeetle’s main() StreetA Deterministic Walk Down TigerBeetle’s main() Street
A Deterministic Walk Down TigerBeetle’s main() Street
 
ASIMOV: Enterprise RAG at Dialog Axiata PLC
ASIMOV: Enterprise RAG at Dialog Axiata PLCASIMOV: Enterprise RAG at Dialog Axiata PLC
ASIMOV: Enterprise RAG at Dialog Axiata PLC
 
intra-mart Accel series 2024 Spring updates_En
intra-mart Accel series 2024 Spring updates_Enintra-mart Accel series 2024 Spring updates_En
intra-mart Accel series 2024 Spring updates_En
 
Chapter 1 - Fundamentals of Testing V4.0
Chapter 1 - Fundamentals of Testing V4.0Chapter 1 - Fundamentals of Testing V4.0
Chapter 1 - Fundamentals of Testing V4.0
 
Cyber Recovery Wargame
Cyber Recovery WargameCyber Recovery Wargame
Cyber Recovery Wargame
 
An Introduction to All Data Enterprise Integration
An Introduction to All Data Enterprise IntegrationAn Introduction to All Data Enterprise Integration
An Introduction to All Data Enterprise Integration
 

Php Performance On Windows

  • 1. PHP Performance on Windows Mark Brown, Ruslan Yakushev Microsoft
  • 2. A Little History 2006 • PHP on Win/IIS = Big Joke 2007 • IIS FastCGI 2008 • windows.php.net • PHP 5.3 2009 • PHP 5.3 Release • WinCache 1.0 2010 • FastCGI 1.5 • WinCache 1.1
  • 3. PHP Community and Microsoft • “PHP on Windows” project involves: – PHP core developers – PHP installer developers – PHP documentation team – PHP community and influentials – PHP applications communities (WordPress, Joomla, Drupal, others) – Many others…
  • 5. CGI vs FastCGI • (CGI on Windows) == SLOW !!! – New PHP process per request • FastCGI == (CGI on steroids) – Re-use PHP processes in a process pool – Single-threaded execution environment – Use Non-Thread Safe PHP with IIS FastCGI • PHP ISAPI? – Stay away!!! Use FastCGI instead – No ISAPI support in 5.3 anyway
  • 7. CGI vs. FastCGI CGI Processes FastCGI processes
  • 8. FastCGI 1.5 • New features: – Auto-tuning of maxIntances for optimal performance – Automatic recycling of PHP processes with config change MonitorChangesTo setting – No more restarts with changes to php.ini • Consistent set of features across all IIS versions: – For IIS 7.5 in WS08 R2 – new features are included – For IIS 7.0 in WS08 – install the FastCGI update (http://www.iis.net/expand/FastCGI) – For IIS 5.1 & 6.0 – install FastCGI 1.5 extension
  • 9. IIS FastCGI and PHP Setup - automated • Use the easiest option - Web Platform Installer!  Get Web Platform Installer from http://www.microsoft.com/web/php/
  • 11. IIS FastCGI & PHP Setup - manual • Follow the instructions on php.net: • IIS 5.1 and IIS 6.0: – php.net/manual/en/install.windows.iis6.php • IIS 7 and later: – php.net/manual/en/install.windows.iis7.php • PHP configuration – php.net/manual/en/install.windows.manual.php
  • 12. PHP 5.2  PHP 5.3
  • 13. PHP 5.3 improvements • PHP 5.3 improvements: – Using VC9 compiler (PHP 5.2 used VC6) – Optimized API calls (using Win32 instead of POSIX) – All PHP libraries built from the source code – Compatibility fixes • Windows builds are available at: – http://windows.php.net/ From: http://ilia.ws/files/Confoo2010_PHP53.pdf “Substantial performance improvements on Windows (40% +)”
  • 15. WinCache 1.0 • PHP Accelerator optimized for Windows – Opcode cache – File cache – Resolve path cache • Download from: – http://www.iis.net/expand/WinCacheForPhp • Contributed by MS to PECL: – Source code on http://pecl.php.net/wincache/ – Documentation on http://www.php.net/wincache/ – BSD license Contributions are welcome!
  • 16. Why use opcode cache? To serve an index.php in WordPress, PHP has to read, parse, compile and execute more than 100 PHP files!
  • 17. WinCache in action Just add extension=php_wincache.dll in php.ini. No app code changes necessary!
  • 18. WinCache and CPU usage • WinCache significantly reduces CPU load • Use FastCGI maxInstances setting to load CPU more • Set maxInstances to 0 to enable auto tuning
  • 19. WinCache and CPU usage Increased FastCGI maxInstances from 4 (default) to 10
  • 20. WinCache 1.1 User Cache API: • Stores app data in shared memory • Function by function compatible with APC
  • 21. WinCache 1.1 – Session Handler • Stores PHP session data in shared memory • Enabled in php.ini : session.save_handler = wincache • Session storage is not persistent in beta, but will be in RC: – Use the code snapshot to try it out.
  • 22. WinCache 1.1 user cache in action Instructions on how to configure WordPress to use WinCache user cache: http://ruslany.net/2010/03/make-wordpress-faster-on-iis-with-wincache-1-1/
  • 23. WinCache statistics script Always restrict access to wincache.php by using built-in authentication or web server authentication!
  • 24. What’s next? • Popular PHP applications to adopt WinCache: – Joomla 1.6 – Drupal cacherouter module – Sugar CRM • WinCache improvements: – File change notifications support – Function hooks
  • 25. Summary • In 3 years Windows/IIS has become a great option for hosting PHP applications • In 2 years the PHP performance on Windows has improved considerably.
  • 26. PHP on Windows - Contacts • Pierre Joye • Venkat Raman Don • (PHP Core Developer) – pajoye@php.net • (IIS and WinCache Tester) – donraman@microsoft.com – http://twitter.com/PierreJoye – http://blogs.iis.net/donraman • Mark Brown • Kanwaljeet Singla • (Web Platform) • (IIS and WinCache – twitter.com/markjbrown Developer) – blogs.msdn.com/markbrown/ – ksingla@microsoft.com – http://twitter.com/kjsingla • Ruslan Yakushev – http://blogs.iis.net/ksingla/ • (IIS Program Manager) – ruslany@microsoft.com – http://twitter.com/ruslany – http://ruslany.net/
  • 27. PHP on Windows - resources • http://windows.php.net/ • http://php.iis.net/ • php.windows mailing list • http://forums.iis.net/
  • 28. Test setup • Quad core CPU + 4 GB RAM • Windows Server 2008 with IIS 7.0 and FastCGI • PHP 5.3.2 • WinCache 1.1 beta • WordPress 2.9.2 • + Load Generator and MySQL on the same box