Search results: php performance

PHP performance: oPcache Control Panels

OPcache is a PHP extension that 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+. If you are looking to improve PHP performance, the first step should be to use PHP 7.4+, […]

PHP Performance: Additional CPU cores vs 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 webserver). 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 of the […]

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

Let’s take a very quick look at how best to set up PHP-FPM for high throughput, low latency, and 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, let’s compare the two management […]

PHP Benchmarks: OPcache vs OPcache w/ Performance Tweaks

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

PHP 8 Compatibility Check and Performance Tips.

PHP 7 was first released back on 03 Dec 2015. Yes, I’m sure, it’s been around a while! The PHP team encouraged upgrading to PHP 7, hailing its improvements such as being twice as fast, consistent 64-bit support, removal of old and unsupported SAPIs and extensions, improved fatal error resistance, to name a few. A […]

Linux Performance: Almost Always Add Swap. Part 2: ZRAM

Previously, we looked at how swap space, particularly swapping, can severely slow down Linux performance. We then tweaked Linux kernel parameters to make better use of server memory and to avoid heavy swapping. That article created some debate and good arguments for and against swap space. For example, if you have more than enough memory […]

PHP Monitoring Instrumentation for Laravel Web Artisans

Over the last decade, Laravel has evolved to become an elegant open-source web application framework that’s approachable for beginners and experts alike. There are multiple solutions available to instrument your application on your local dev box, staging, and production, and there are just as many options to monitor these instrumentations. While the Open Telemetry PHP […]

atop – For Linux server performance analysis

We’re all familiar with top, a real-time system monitor. Some prefer htop and previously, I mentioned iotop for use with storage read/write monitoring. Let’s looks at another popular tool for Linux server performance analysis: atop.   Advantages of atop Atop is an ASCII full-screen performance monitor which can log and report the activity of all server processes. […]

PHP memory_limit – understanding and increasing this setting

PHP memory_limit is per-script, just as a highway’s speed limit is per-vehicle. For example, although PHP’s memory limit may be set high to 1GB, that does not mean that scripts will pile up to use that 1GB. Let’s take a quick look at understanding PHP’s memory_limit setting.   PHP memory_limit is a per-script setting PHP.net’s […]