PHP Performance: Additional CPU cores or Faster CPU cores

  Some time ago I received an email from a client experiencing slow performance issues with a LEMP (Linux, Nginx, MySQL and PHP web server). During a full audit, I found that the server’s load average was pretty low (see above screenshot). However, the website was indeed very slow. There were some misconfigurations, but one […]

PHP-FPM tuning: Using ‘pm static’ for max performance

Lets take a very quick look at how best to setup PHP-FPM for high throughput, low latency and a more stable use of CPU and memory. By default, most setups have PHP-FPM’s PM (process manager) string set to dynamic and there’s also the common advice to use ondemand if you suffer from available memory issues. However, lets compare the two management […]

Set PHP realpath_cache_size ‘correctly’

Back in 2012 I started enabling PHP realpath_cache_size and realpath_cache_ttl for the performance benefits. At the time, I followed settings I found here (has since been deleted). It bugged me that I was blindly setting the size of the cache without actually knowing how much storage was being used. In this post I will show you how to […]

Memcache PHP Extensions for Memcached Caching Daemon

Memcached (Memcache Daemon) is a caching daemon designed especially for dynamic web applications to decrease database load by storing objects in memory. It is commonly used to speed up dynamic database-driven websites by caching data and objects in server memory to reduce the number of times the data source must be read. Memcached is free and open-source software, […]

PHP 5.6 EOL (End of Life) – PHP 7 Compatibility Check

Summary: PHP 7.3 benchmark, how to check your PHP scripts/apps for PHP 7 compatibility, upgrade to PHP 7 ASAP, confirm OpCache is enabled/monitored and some php.ini optimization tweaks.   PHP 5.6 and PHP 7.0 to hit EOL this year! reached EOL last Year! (2018) PHP 5.6 was first released back in 2014, with alpha 1 released in January 2014. […]

How to upgrade to PHP 7 on RHEL/CentOS

TL;DR = Upgrade to PHP 7 using Remi’s RPM repository – PHP Configuration wizard. Red Hat Enterprise Linux (RHEL) is a Linux distribution developed by Red Hat targeted toward the commercial market. Red Hat uses strict trademark rules to restrict free re-distribution of its officially supported versions, but still freely provides its source code. Third-party derivatives […]

80% of the web powered by PHP

Today, PHP is used by more than 80% of all the websites whose server-side programming language we know. Popular websites such as Slack, Etsy, Cloudflare, Tesla, Wikipedia, WordPress.com, Tumblr and this website are all powered by PHP. With such a large share of the web, it may or may not surprise you that more than 90% 88% […]

‘Clean’ upgrade to PHP 7.* (CentOS / Debian / Ubuntu)

Earlier this year, I wrote a short article: 80% of the web powered by PHP. Also, in the article it was noted that more than 90% of PHP based websites are still using PHP 5. This remains true today. It must be said however, in the past 6 months, there’s been more upgrades to PHP 5.6 […]

Monitoring PHP Performance and Diagnosing Bottlenecks

Last week, we took a quick look at PHP-FPM, reducing process manager (PM) overhead and maxing out PHP-FPM’s throughput by attempting to keep processes in-memory using pm.static. However, beyond development server benchmarks, on our production servers, we also want to drill down into all services and components called up by each user’s interaction. This allows us the opportunity to diagnose PHP and other […]

PHP Benchmarks: OPcache vs OPcache w/ Performance Tweaks

A few weeks ago I wrote a short article which highlighted GUI solutions for monitoring and controlling PHP OPcache. We all know that enabling PHP OPcache provides massive performances gains (see benchmark graph at the end of article). In addition, since PHP 5.5, OPcache is now enabled by default. With these facts in mind, is it possible […]