Let's look at the many "flavors" of PHP, why they are there, how they work and when to use them. We'll also dive a little into the PHP core design pattern of using SAPIs to access the true core application.
Working with files in PHP can be a fun and a frustrating task; one you never know when you'll be asked to do. In our first beginner PHP talk, we'll go over how to work with files and some of the most common built in functions to help accomplish your tasks.
Hosting van Drupal gemeentesites @ DrupalJam 2014Bas van der Zalm
The presentation is about the hosting requirements and setup for local goverments using the Drupal for Goverments Drupal distribution based on the Top Tasks principle. The presentation was done by Bas van der Zalm from Webscale at DrupalJam 2014 in Maarssen, The Netherlands.
Composer has triggered a renaissance in the PHP community, it has changed the way we deal with other people’s code and it has changed the way we share our code. We are all slowly moving to using Composer, from Wordpress to Joomla and Drupal and frameworks in between. But many of us mistreat composer, follow outdated practices or simply lack a few tricks. In this session i’ll get you the low down on how to use composer the right way.
This document summarizes techniques for scaling PHP applications. It discusses using the latest PHP version and disabling unnecessary extensions to reduce memory usage. It also covers tuning php.ini settings, using PHP accelerators like APC and OPcache, sharing session data across servers, caching with Memcache, and reverse proxying with Nginx. The presenters are Lucas Arruda and Handrus Nogueira, software architects with experience optimizing PHP applications.
This document discusses the strategic plan of Faruki Pulp Mills. It analyzes the company's strengths, weaknesses, opportunities, and threats through a SWOT analysis. It also evaluates the political, economic, social, and technological factors in the industry through a PEST analysis. The document outlines Faruki's mission, objectives, marketing strategies, and sales growth strategies. It proposes evaluating strategies based on greatest yield and developing contingency plans with alternative businesses to mitigate risks.
This document provides an overview and instructions for creating and configuring applications using the FPM (Framework for Programming Models) in SAP. It covers basic topics like creating simple applications and configuring toolbars and headers, as well as more advanced topics like using variants, subroadmaps, application parameters, dynamic adjustments, and composite UIBBs. The document is intended to serve as a cookbook for both new and experienced FPM developers. It provides code examples and explains key classes, interfaces, and events involved in FPM application development.
Let's look at the many "flavors" of PHP, why they are there, how they work and when to use them. We'll also dive a little into the PHP core design pattern of using SAPIs to access the true core application.
Working with files in PHP can be a fun and a frustrating task; one you never know when you'll be asked to do. In our first beginner PHP talk, we'll go over how to work with files and some of the most common built in functions to help accomplish your tasks.
Hosting van Drupal gemeentesites @ DrupalJam 2014Bas van der Zalm
The presentation is about the hosting requirements and setup for local goverments using the Drupal for Goverments Drupal distribution based on the Top Tasks principle. The presentation was done by Bas van der Zalm from Webscale at DrupalJam 2014 in Maarssen, The Netherlands.
Composer has triggered a renaissance in the PHP community, it has changed the way we deal with other people’s code and it has changed the way we share our code. We are all slowly moving to using Composer, from Wordpress to Joomla and Drupal and frameworks in between. But many of us mistreat composer, follow outdated practices or simply lack a few tricks. In this session i’ll get you the low down on how to use composer the right way.
This document summarizes techniques for scaling PHP applications. It discusses using the latest PHP version and disabling unnecessary extensions to reduce memory usage. It also covers tuning php.ini settings, using PHP accelerators like APC and OPcache, sharing session data across servers, caching with Memcache, and reverse proxying with Nginx. The presenters are Lucas Arruda and Handrus Nogueira, software architects with experience optimizing PHP applications.
This document discusses the strategic plan of Faruki Pulp Mills. It analyzes the company's strengths, weaknesses, opportunities, and threats through a SWOT analysis. It also evaluates the political, economic, social, and technological factors in the industry through a PEST analysis. The document outlines Faruki's mission, objectives, marketing strategies, and sales growth strategies. It proposes evaluating strategies based on greatest yield and developing contingency plans with alternative businesses to mitigate risks.
This document provides an overview and instructions for creating and configuring applications using the FPM (Framework for Programming Models) in SAP. It covers basic topics like creating simple applications and configuring toolbars and headers, as well as more advanced topics like using variants, subroadmaps, application parameters, dynamic adjustments, and composite UIBBs. The document is intended to serve as a cookbook for both new and experienced FPM developers. It provides code examples and explains key classes, interfaces, and events involved in FPM application development.
The document discusses developing targeted digital marketing personas, channels, and content. It covers defining personas, understanding buyer journeys and lead qualification, and developing relevant B2B content. Examples are provided of different types of content that can be created and distributed across various channels to engage identified personas at different stages of the buyer journey.
Dockerizing Symfony Applications - Symfony Live Berlin 2014D
This document discusses Dockerizing Symfony applications. It introduces Docker containers as a lightweight virtualization method using Linux namespaces and union filesystems. It then demonstrates how to containerize the components of a sample Symfony app - Redis, PHP-FPM, Nginx - connecting them using Docker links and volumes. Fig is introduced as a tool to define and run multi-container Docker environments using a YAML configuration file, making management of the Symfony app containers easier. Hosting challenges are mentioned along with an invitation to join Giantswarm's private beta for container management.
Fpm module 02 initiation and integration april 11 2013melvinchien
The document provides an overview of project initiation and integration management. It discusses initiating a project, which includes developing a project charter and business case. Key outputs of initiation include assigning a project manager, identifying stakeholders, and getting signatures on the project charter. The document also discusses developing the project management plan, which coordinates all planning efforts. It consolidates subsidiary plans such as the scope, schedule, cost, quality, and risk management plans. Finally, the document discusses project integration management processes like developing the project charter and management plan, directing work, monitoring and controlling work, and performing integrated change control.
The document discusses configuring Nginx and PHP-FPM for high performance websites. Some key points:
- Nginx is a lightweight and fast HTTP server that is well-suited for high traffic loads. It can be used as a web server, reverse proxy, load balancer, and more.
- PHP-FPM (PHP FastCGI Process Manager) runs PHP processes as a pool that is separate from the web server for better isolation and performance. Nginx communicates with PHP-FPM via FastCGI.
- Benchmark results show Nginx performing better than Apache, especially under high concurrency loads. Caching with Nginx and Memcached can further improve
The document summarizes a transition from a LAMP stack (Linux, Apache, MySQL, PHP) to a LNLP stack (Linux, Nginx, NoSQL, PHP-FPM). It discusses moving from Apache to Nginx as the web server for improved performance under load. It also discusses moving from MySQL to a NoSQL database like MongoDB for flexibility with data structures and large datasets. Finally, it discusses moving from mod_php to PHP-FPM to improve PHP performance and flexibility. Steps are provided to install and configure Nginx, PHP-FPM and MongoDB on Ubuntu. Benchmark results show improved request throughput and reduced response times with the new stack configuration.
The document discusses the benefits of exercise for mental health. Regular physical activity can help reduce anxiety and depression and improve mood and cognitive functioning. Exercise causes chemical changes in the brain that may help protect against mental illness and improve symptoms.
This document discusses using Nginx as a web server with PHP. It provides configuration examples for using Nginx with PHP-FPM to pass PHP requests. Benchmarks show Nginx performs better than Apache. It also discusses using Nginx as a reverse proxy cache, and provides configuration examples to cache content and pass caching controls from PHP.
Supercharging your PHP pages with mod_lsapi in CloudLinux OSCloudLinux
We’ve got big news - mod_lsapi is the fastest and most reliable way to serve PHP pages with Apache. It is a drop-in replacement for SuPHP, FCGID, RUID2, and ITK, has a low memory footprint and understands PHP directives from .htaccess files. It also supports PHP accelerators. It is fully compatible with PHP Selector, which allows end users to select the specific version of PHP they need. Here, learn more about this new production-ready feature, how it works and why it is so powerful.
High performance PHP: Scaling and getting the most out of your infrastructuremkherlakian
This document discusses various techniques for optimizing PHP application performance, including network optimization using load balancers, database scaling using replication and caching, application optimization using profiling and caching, and server optimization using clustering. It recommends using tools like Xdebug and Zend Server's code tracing and profiling to identify bottlenecks and optimize applications. The overall message is that a holistic approach considering the network, databases, applications and servers is needed to achieve high performance PHP applications.
This document discusses techniques for scaling web applications using Nginx, Memcached, PHP-FPM and APC. It introduces Nginx as an alternative to Apache for serving static files and routing requests to backend servers. PHP-FPM is presented as a way to run PHP processes separately from the web server for improved performance. Memcached is described as a fast caching solution to store frequently accessed content like database queries. APC provides opcode caching to speed up PHP execution. Benchmarking and monitoring tools like New Relic are recommended to identify bottlenecks.
This document discusses PHP file includes and requires and how the PHP opcode cache handles them. It covers how PHP resolves include paths, checks if a file has already been included, and validates file timestamps when revalidating paths. It also discusses using the opcode cache status to view cache metrics and how to invalidate files from the cache.
This document discusses setting up a PHP development environment using Docker containers. It describes using Docker to run PHP, Apache/Nginx, MySQL, and Memcached services in separate containers linked together. Custom Docker images are built for the PHP application code and for adding development tools. Linked volumes and DNS aliases allow for easy access and configuration across containers. Docker Compose is used to define and run the multi-container app stack.
The document discusses using alternative infrastructures like Nginx and Redis instead of traditional Apache and MySQL. It describes building a Twitter clone called "Retwis" using Sinatra and Redis, and compares the performance of Nginx to Apache when serving static and dynamic content. Nginx generally outperforms Apache, especially for static files, due to its asynchronous and event-based architecture avoiding context switches. Load testing revealed issues with current practices for MySQL dumps and load testing that do not properly simulate high concurrency or isolate variables.
This document discusses using Docker to deploy PHP projects. It begins with an overview of some common challenges in deploying PHP projects, like different PHP version requirements across projects. It then introduces Docker and some of its key concepts like containers, images, and layered filesystems. The remainder of the document provides examples of basic Docker commands for pulling images, running containers, and listing containers. The goal is to illustrate how Docker can help isolate environments for different PHP projects and more easily manage varying PHP version requirements.
CFEngine Roadshow Maiden Voyage Cohesion TechsessieMartin Simons
The CFEngiine Roadshow is a live demonstration of the power of CFEngine. In this demonstration I bought up and configured into the desired state 17 virtual machines.
- apt-cacher
- nfs server
- CFEngine hub
- java tomcat7 webservers
The content of the demonstration is Open Source, https://github.com/Webhuis/CFEngine-Roadshow
The CFEngine Roadshow will be extended with utility servers and other application servers in the near future and will be present at T-Dose: http://www.t-dose.org/2014/schedule
Any contribution and improvement is appreciated.
The purpose of the CFEngine Roadshow is to develop a complete coherent working setup for a CFEngine3 implementation, that works out of the box.
Wido den Hollander, CTO bij PCextreme, zal vertellen hoe IPv6 ingezet kan worden in hosting omgevingen. Niet op netwerkniveau, maar op server niveau, waar de ondersteuning voor applicaties voor IPv6 nog flink verbeterd kan worden. IPv6 heeft de toekomst, daar is iedereen het wel over eens.
The document discusses developing targeted digital marketing personas, channels, and content. It covers defining personas, understanding buyer journeys and lead qualification, and developing relevant B2B content. Examples are provided of different types of content that can be created and distributed across various channels to engage identified personas at different stages of the buyer journey.
Dockerizing Symfony Applications - Symfony Live Berlin 2014D
This document discusses Dockerizing Symfony applications. It introduces Docker containers as a lightweight virtualization method using Linux namespaces and union filesystems. It then demonstrates how to containerize the components of a sample Symfony app - Redis, PHP-FPM, Nginx - connecting them using Docker links and volumes. Fig is introduced as a tool to define and run multi-container Docker environments using a YAML configuration file, making management of the Symfony app containers easier. Hosting challenges are mentioned along with an invitation to join Giantswarm's private beta for container management.
Fpm module 02 initiation and integration april 11 2013melvinchien
The document provides an overview of project initiation and integration management. It discusses initiating a project, which includes developing a project charter and business case. Key outputs of initiation include assigning a project manager, identifying stakeholders, and getting signatures on the project charter. The document also discusses developing the project management plan, which coordinates all planning efforts. It consolidates subsidiary plans such as the scope, schedule, cost, quality, and risk management plans. Finally, the document discusses project integration management processes like developing the project charter and management plan, directing work, monitoring and controlling work, and performing integrated change control.
The document discusses configuring Nginx and PHP-FPM for high performance websites. Some key points:
- Nginx is a lightweight and fast HTTP server that is well-suited for high traffic loads. It can be used as a web server, reverse proxy, load balancer, and more.
- PHP-FPM (PHP FastCGI Process Manager) runs PHP processes as a pool that is separate from the web server for better isolation and performance. Nginx communicates with PHP-FPM via FastCGI.
- Benchmark results show Nginx performing better than Apache, especially under high concurrency loads. Caching with Nginx and Memcached can further improve
The document summarizes a transition from a LAMP stack (Linux, Apache, MySQL, PHP) to a LNLP stack (Linux, Nginx, NoSQL, PHP-FPM). It discusses moving from Apache to Nginx as the web server for improved performance under load. It also discusses moving from MySQL to a NoSQL database like MongoDB for flexibility with data structures and large datasets. Finally, it discusses moving from mod_php to PHP-FPM to improve PHP performance and flexibility. Steps are provided to install and configure Nginx, PHP-FPM and MongoDB on Ubuntu. Benchmark results show improved request throughput and reduced response times with the new stack configuration.
The document discusses the benefits of exercise for mental health. Regular physical activity can help reduce anxiety and depression and improve mood and cognitive functioning. Exercise causes chemical changes in the brain that may help protect against mental illness and improve symptoms.
This document discusses using Nginx as a web server with PHP. It provides configuration examples for using Nginx with PHP-FPM to pass PHP requests. Benchmarks show Nginx performs better than Apache. It also discusses using Nginx as a reverse proxy cache, and provides configuration examples to cache content and pass caching controls from PHP.
Supercharging your PHP pages with mod_lsapi in CloudLinux OSCloudLinux
We’ve got big news - mod_lsapi is the fastest and most reliable way to serve PHP pages with Apache. It is a drop-in replacement for SuPHP, FCGID, RUID2, and ITK, has a low memory footprint and understands PHP directives from .htaccess files. It also supports PHP accelerators. It is fully compatible with PHP Selector, which allows end users to select the specific version of PHP they need. Here, learn more about this new production-ready feature, how it works and why it is so powerful.
High performance PHP: Scaling and getting the most out of your infrastructuremkherlakian
This document discusses various techniques for optimizing PHP application performance, including network optimization using load balancers, database scaling using replication and caching, application optimization using profiling and caching, and server optimization using clustering. It recommends using tools like Xdebug and Zend Server's code tracing and profiling to identify bottlenecks and optimize applications. The overall message is that a holistic approach considering the network, databases, applications and servers is needed to achieve high performance PHP applications.
This document discusses techniques for scaling web applications using Nginx, Memcached, PHP-FPM and APC. It introduces Nginx as an alternative to Apache for serving static files and routing requests to backend servers. PHP-FPM is presented as a way to run PHP processes separately from the web server for improved performance. Memcached is described as a fast caching solution to store frequently accessed content like database queries. APC provides opcode caching to speed up PHP execution. Benchmarking and monitoring tools like New Relic are recommended to identify bottlenecks.
This document discusses PHP file includes and requires and how the PHP opcode cache handles them. It covers how PHP resolves include paths, checks if a file has already been included, and validates file timestamps when revalidating paths. It also discusses using the opcode cache status to view cache metrics and how to invalidate files from the cache.
This document discusses setting up a PHP development environment using Docker containers. It describes using Docker to run PHP, Apache/Nginx, MySQL, and Memcached services in separate containers linked together. Custom Docker images are built for the PHP application code and for adding development tools. Linked volumes and DNS aliases allow for easy access and configuration across containers. Docker Compose is used to define and run the multi-container app stack.
The document discusses using alternative infrastructures like Nginx and Redis instead of traditional Apache and MySQL. It describes building a Twitter clone called "Retwis" using Sinatra and Redis, and compares the performance of Nginx to Apache when serving static and dynamic content. Nginx generally outperforms Apache, especially for static files, due to its asynchronous and event-based architecture avoiding context switches. Load testing revealed issues with current practices for MySQL dumps and load testing that do not properly simulate high concurrency or isolate variables.
This document discusses using Docker to deploy PHP projects. It begins with an overview of some common challenges in deploying PHP projects, like different PHP version requirements across projects. It then introduces Docker and some of its key concepts like containers, images, and layered filesystems. The remainder of the document provides examples of basic Docker commands for pulling images, running containers, and listing containers. The goal is to illustrate how Docker can help isolate environments for different PHP projects and more easily manage varying PHP version requirements.
CFEngine Roadshow Maiden Voyage Cohesion TechsessieMartin Simons
The CFEngiine Roadshow is a live demonstration of the power of CFEngine. In this demonstration I bought up and configured into the desired state 17 virtual machines.
- apt-cacher
- nfs server
- CFEngine hub
- java tomcat7 webservers
The content of the demonstration is Open Source, https://github.com/Webhuis/CFEngine-Roadshow
The CFEngine Roadshow will be extended with utility servers and other application servers in the near future and will be present at T-Dose: http://www.t-dose.org/2014/schedule
Any contribution and improvement is appreciated.
The purpose of the CFEngine Roadshow is to develop a complete coherent working setup for a CFEngine3 implementation, that works out of the box.
Wido den Hollander, CTO bij PCextreme, zal vertellen hoe IPv6 ingezet kan worden in hosting omgevingen. Niet op netwerkniveau, maar op server niveau, waar de ondersteuning voor applicaties voor IPv6 nog flink verbeterd kan worden. IPv6 heeft de toekomst, daar is iedereen het wel over eens.
Linux Nijmegen - Webserver (LAMP stack) opzetten met VirtualbBox & VagrantPeter Martin
Veel webservers draaien op basis van LAMP (Linux, Apache, MySQL en PHP). Een LAMP stack is eenvoudig op te zetten. In deze presentatie wordt een LAMP stack opgezet in een virtuele omgeving mbv VirtualBox, Vagrant en een Vagrant Box.
New Relic in de praktijk, zoals wij het bij Level27 toepassen voor onze klanten.
Diagnose stellen voor performance websites. Traces, errors, notes, koppeling met Jira, ...
This is a compair between Ansible and Docker and how Vagrant can play a part within this. The goal is to get more insight about how to set up a test environment with deployment tools.
Presentatie door Robin Poort gegeven tijdens de Joomla! Performance Expert Sessie op 23 juni 2017 in Bussum: https://perfectwebteam.nl/expert-sessie/joomla-performance
Hoe start je met infobright columnbased database?
Het laden van hele grote files naar infobright met behulp van pentaho data-integration.
Daan Blinde, november 2009
2. PHP-FPM vs MOD_PHP - Drupal/DVG Performance
AGENDA
● WIE ZIJN WIJ?
● HOE WERKT EEN WEBSERVER?
○ Apache
○ Nginx
● MOD_PHP - PHP-FPM
○ MOD_PHP
○ PHP-FPM
● CACHING (UITSTAP)
● BENCHMARKS
● CONCLUSIE
● WEBSCALE AANPAK
PHP-FPM vs MOD_PHP - Drupal/DVG Performance
3. WIE ZIJN WIJ?
● Webscale
○ Hosting sinds 2001
○ Hosting voor professionals
○ Gespecialiseerd in PHP frameworks
■ zoals Drupal
■ maar ook Symfony, Wordpress, Typo3 & Magento
○ ISO 9001 en 27001 NL datacenters
○ CISSP management
○ 100% open source
○ 300+ managed servers
○ 200+ Drupal sites
○ Webscale werkt voor:
■ Rijksoverheid, Gemeenten, Graydon, Jaguar Land Rover
○ Webscale werkt met:
■ Cipix, d-Media, Merge, ezCompany
PHP-FPM vs MOD_PHP - Drupal/DVG PerformancePHP-FPM vs MOD_PHP - Drupal/DVG Performance
4. HOE WERKT EEN WEBSERVER?
● Client/Server Model
● HTTP of HTTPS(HTTP over SSL)
DRUPAL
WEBSERVER
BROWSER
CLIENT
HTTP-REQUEST
HTTP-RESPONSE
PHP-FPM vs MOD_PHP - Drupal/DVG PerformancePHP-FPM vs MOD_PHP - Drupal/DVG Performance
5. HOE WERKT APACHE?
● Apache kent een tweetal modes waarin deze kan draaien:
○ PREFORK: Request per proces.
httpd
listener
:80
:443
DRUPAL
WEBSERVER
HTTPD-PROCESS
HTTPD-PROCESS
HTTPD-PROCESS
PHP-FPM vs MOD_PHP - Drupal/DVG PerformancePHP-FPM vs MOD_PHP - Drupal/DVG Performance
6. HOE WERKT APACHE?
● Apache kent een tweetal modes waarin deze kan draaien:
○ WORKER: Ieder proces meerdere requests dmv threads.
httpd
listener
:80
:443
DRUPAL
WEBSERVER
HTTPD-PROCESS
THREAD
THREAD
THREAD
HTTPD-PROCESS
THREAD
THREAD
THREAD
PHP-FPM vs MOD_PHP - Drupal/DVG PerformancePHP-FPM vs MOD_PHP - Drupal/DVG Performance
7. HOE WERKT NGINX?
● Asynchronous, non-blocking, event-driven connection-handling algorithm.
○ C10K challenge
○ Meerdere worker-processen (vaste waarde).
○ Iedere worker heeft een “event-loop”, welke nieuwe events registreert.
○ De worker haalt de events asynchroon uit de “event-loop” en verwerkt deze.
○ Hierdoor worden de requests non-blocking afgehandeld.
nginx
master
:80
:443
WORKER-Process 1
WORKER-Process 2
WORKER-Process 3
DRUPAL
WEBSERVER
PHP-FPM vs MOD_PHP - Drupal/DVG PerformancePHP-FPM vs MOD_PHP - Drupal/DVG Performance
8. NGINX VS APACHE
PROs Nginx t.o.v. Apache:
○ Schaalt enorm ver, zelfs met lage resources.
○ CPU en memory verbruik zeer consistent.
○ Eenvoudigere inschatting benodigde resources.
○ Kan meer concurrent connecties aan dan Apache.
○ Eenvoudiger in te zetten als proxy-server.
CONs Nginx t.o.v. Apache:
○ Geen native dynamic-content processing (dus geen mod_php). *
○ Geen .htaccess ondersteuning. *
* Dit maakt de worker ook zo klein en snel.
* Ook dit is bewust, waardoor er geen “traversal” over het Filesystem nodig is.
PHP-FPM vs MOD_PHP - Drupal/DVG PerformancePHP-FPM vs MOD_PHP - Drupal/DVG Performance
9. MOD_PHP vs PHP-FPM
● Mod_php alleen mogelijk bij Apache
● Apache biedt keuze uit:
○ mod_php
○ mod_fastcgi (voor het aanspreken van php-fpm)
● Nginx alleen php-fpm mogelijk
● Mod_php = embedded
● Php-fpm = daemon
PHP-FPM vs MOD_PHP - Drupal/DVG PerformancePHP-FPM vs MOD_PHP - Drupal/DVG Performance
10. MOD_PHP (alleen apache)
● MOD_PHP:
httpd
listener
:80
:443
DRUPAL
WEBSERVER
HTTPD-PROCESS
HTTPD-PROCESS
HTTPD-PROCESS
mod_php
mod_php
mod_php
● PROs:
○ PHP uitgevoerd door Apache zelf.
○ Geen externe processen nodig.
○ PHP configuratie aanpasbaar via
.htaccess
● CONs:
○ Apache Memory-footprint groter.
○ PHP-interpeter voor non-PHP
content.
○ Rechten op bestanden gelijk aan
webserver. (www-data).
PHP-FPM vs MOD_PHP - Drupal/DVG PerformancePHP-FPM vs MOD_PHP - Drupal/DVG Performance
11. MOD_PHP
● MOD_PHP:
PROs:
○ Eenvoudiger in beheer.
○ Voor veel sites vaak al voldoende.
○ Bij PHP-only sites is het snel.
CONs:
○ Memory-footprint.
○ Lastig met bestandrechten.
○ Restart apache nodig voor wijzigingen in php.ini.
○ Gaat slecht om met php crashes.
PHP-FPM vs MOD_PHP - Drupal/DVG PerformancePHP-FPM vs MOD_PHP - Drupal/DVG Performance
12. PHP-FPM I.C.M. APACHE
● MOD_FASTCGI:
httpd
listener
:80
:443
DRUPAL
WEBSERVER
HTTPD-PROCESS
HTTPD-PROCESS
● PROs:
○ PHP-code geisoleerd van Apache.
○ Static-content niet via PHP.
○ Rechten op bestanden instelbaar.
● CONs:
○ Geen php-configuratie in .htaccess.
○ Extern process nodig.
HTTPD-PROCESS
mod_fastcgi
PHP-FPM
PHP-FPM vs MOD_PHP - Drupal/DVG PerformancePHP-FPM vs MOD_PHP - Drupal/DVG Performance
13. PHP-FPM I.C.M. NGINX
nginx
master
:80
:443
WORKER-Process 1
WORKER-Process 2
DRUPAL
WEBSERVER WORKER-Process 3
● Nginx heeft zelf geen native dynamic-content processing.
● Daarom Nginx als proxy, php-requests doorzetten naar php-fpm.
PHP-FPM
PHP-FPM vs MOD_PHP - Drupal/DVG PerformancePHP-FPM vs MOD_PHP - Drupal/DVG Performance
14. pool site02pool site01
PHP-FPM
● FPM - FastCGI Process Manager:
PHP-FPM: Master process
PHP-FPM-Worker:
pool site01
PHP-FPM-Worker:
pool site01
PHP-FPM-Worker:
pool site01
PHP-FPM-Worker:
pool site02
PHP-FPM vs MOD_PHP - Drupal/DVG PerformancePHP-FPM vs MOD_PHP - Drupal/DVG Performance
PHP-FPM-Worker:
pool site02
15. PHP-FPM
● FPM - FastCGI Process Manager:
PROs:
○ Meerdere PHP-Workers (zelfs over meerdere servers).
○ Worker-pools met eigen uids/gids.
○ Meerdere php.ini opties.
○ Logging en slowlogging.
○ Status-interface.
○ Emergency restart.
○ Gracefull php-reload
○ Security.
CONs:
○ Complexer om te beheren
○ Niet altijd sneller dan mod_php
PHP-FPM vs MOD_PHP - Drupal/DVG PerformancePHP-FPM vs MOD_PHP - Drupal/DVG Performance
16. CACHING (UITSTAP)
● Caching houdt opgevraagde resources in memory.
● Hierdoor hoeft het (trage) filesystem niet telkens aangesproken te worden.
● Verbeterde responsiveness van jouw sites.
● Betere performance op dezelfde hardware.
● PHP code hoeft niet opnieuw gecompiled te worden door de PHP-Interpreter.
● Verschillende oplossingen voor caching:
○ Browser-caching.
○ Apache-content-caching.
○ Nginx-content-caching en micro-caching.
○ Varnish.
● Caching via de (web)applicatie:
○ Memcached
○ Redis
PHP-FPM vs MOD_PHP - Drupal/DVG PerformancePHP-FPM vs MOD_PHP - Drupal/DVG Performance
19. BENCHMARKS
Test 01 - ‘It Works!’:
○ Enkele html pagina met “It Works!” om baseline te bepalen.
○ Apache-mpm-prefork: ab -n10000 -c100
Wheezy Jessie
4.546 3.586
3.556 3.228
3.531 2.971
3.464 3.117
3.637 3.214
PHP-FPM vs MOD_PHP - Drupal/DVG PerformancePHP-FPM vs MOD_PHP - Drupal/DVG Performance
20. BENCHMARKS
Test 01 - ‘It Works!’:
○ Enkele html pagina met “It Works!” om baseline te bepalen.
○ Nginx: ab -n10000 -c100
Wheezy Jessie
2.255 1.44
2.335 1.445
2.239 1.457
2.18 1.432
2.199 1.429
PHP-FPM vs MOD_PHP - Drupal/DVG PerformancePHP-FPM vs MOD_PHP - Drupal/DVG Performance
21. BENCHMARKS
Test 01 - ‘It Works!’:
○ Enkele html pagina met “It Works!” om baseline te bepalen.
○ Varnish met Apache-backend: ab -n10000 -c100
Wheezy Jessie
2.624 1.653
2.608 1.666
2.635 1.686
2.601 1.664
2.617 1.639
PHP-FPM vs MOD_PHP - Drupal/DVG PerformancePHP-FPM vs MOD_PHP - Drupal/DVG Performance
22. BENCHMARKS
Test 02 - DvG Installatie met test-data’:
○ Apache mod-php: ab -n1000 -c20
Wheezy Jessie
236.95 91.668
235.972 91.503
Dit is een extreme belasting!
Load op server werd
onbruikbaar hoog.
PHP-FPM vs MOD_PHP - Drupal/DVG PerformancePHP-FPM vs MOD_PHP - Drupal/DVG Performance
23. BENCHMARKS
Test 02 - DvG Installatie met test-data’:
○ Apache php-fpm: ab -n1000 -c20
Dit is een extreme belasting!
Load op server werd
onbruikbaar hoog.
Wheezy Jessie
237.328 86.504
238.103 84.998
PHP-FPM vs MOD_PHP - Drupal/DVG PerformancePHP-FPM vs MOD_PHP - Drupal/DVG Performance
24. BENCHMARKS
Test 02 - DvG Installatie met test-data’:
○ Nginx php-fpm: ab -n1000 -c20
Dit is een extreme belasting!
Load op server werd
onbruikbaar hoog.
PHP-FPM vs MOD_PHP - Drupal/DVG PerformancePHP-FPM vs MOD_PHP - Drupal/DVG Performance
Wheezy Jessie
235.874 85.692
234.788 85.026
25. BENCHMARKS
Test 03 - DvG Installatie met test-data’:
○ Varnish met Nginx & php-fpm: ab -n1000 -c20
Dit is een extreme belasting!
Load op server blijft rustig.
Wheezy Jessie
2.208 2.019
2.208 2.03
PHP-FPM vs MOD_PHP - Drupal/DVG PerformancePHP-FPM vs MOD_PHP - Drupal/DVG Performance
26. BENCHMARKS
Test 03 - DvG Installatie met test-data’:
○ Varnish met Nginx & php-fpm: ab -n10000 -c100
Dit is een ZEER extreme belasting!
Load op server blijft rustig.
Wheezy Jessie
21.974 19.066
22.386 18.949
PHP-FPM vs MOD_PHP - Drupal/DVG PerformancePHP-FPM vs MOD_PHP - Drupal/DVG Performance
27. CONCLUSIE
Conclusie van onze benchmarks:
● Nieuwe Debian 8.1 (Jessie) biedt al flinke performance-winst
● Apache 2.4 is weer sneller dan Apache 2.2
● Nginx 1.6 is weer sneller dan Nginx 1.2
● Verschil mod-php VS php-fpm minimaal, maar FPM bied meer mogelijkheden.
● Keuze belangrijker voor Ops dan Devs.
● Voor echte winst is caching (Varnish) onmiskenbaar.
De toekomst brengt nog meer verbeteringen:
● PHP-7
● HHVM (HipHop Virtual Machine, ontwikkeld door Facebook)
● Apache-mpm-event
PHP-FPM vs MOD_PHP - Drupal/DVG PerformancePHP-FPM vs MOD_PHP - Drupal/DVG Performance
28. WEBSCALE AANPAK
● Optimalisatie op meer dan alleen webservers en php:
○ Oplossingen en implementatie toegespitst op behoeften van de klant.
○ Houdt nauwlettend trends in de gaten, om pro-actief aanpassingen door te voeren.
○ Monitoring om pro- en in geval van calamiteit re-actief in te grijpen.
○ Samen met de klant in dialoog voor beste performance en availability.
○ Security staat hoog in ons vaandel.
○ Mysql-Server tuning en optimalisatie.
○ Linux kernel-tuning.
○ Verdeling resources over hypervisors, storage en datacentrum.
PHP-FPM vs MOD_PHP - Drupal/DVG PerformancePHP-FPM vs MOD_PHP - Drupal/DVG Performance