Tag Archives: php

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-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 […]

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 […]

PHP memory_limit – understanding and increasing this setting

PHP memory_limit is per-script, just as a highway speed limit is per-vehicle. What happens when a web host blames PHP memory_limit setting for memory usage issues on a Linux web server. For example, although PHP’s memory limit may be set high to 1GB, that does not mean that scripts will pile up in use to […]

PHP performance: oPcache Control Panels

OPcache is a PHP extension which improves PHP performance by storing precompiled script bytecode in shared memory, thereby removing the need for PHP to load and parse scripts on each request. The extension is built-in for PHP 5.5+ …but, if you are looking to improve PHP performance, the first step should be to use PHP 7+ which […]

PHP Performance: Additional CPU cores vs faster CPU cores

Just over a week ago I received a contact form email detailing slow performance issues with a LAMP (Linux, Apache MySQL, PHP) web server. During the audit phase, I found that the server’s load average was pretty idle. However, the website was indeed very slow. Among a slew of other issues and misconfigurations, one aspect of […]

Set PHP realpath_cache_size ‘correctly’

Over the last few months I’ve started enabling PHP realpath_cache_size and realpath_cache_ttl for the performance benefits. At the time I followed the settings I found here. It bugged me that I was blindly setting the size of the cache without actually know what and how much storage was being used. In this post I will show you […]

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, […]