<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Opcache on Ubuntu Tips</title><link>https://ubuntips.com/tags/opcache/</link><description>Recent content in Opcache on Ubuntu Tips</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Mon, 23 Nov 2026 22:26:42 +0800</lastBuildDate><atom:link href="https://ubuntips.com/tags/opcache/index.xml" rel="self" type="application/rss+xml"/><item><title>clang, PHP 8.4 and the missing zlib: the last round of compiled PHP</title><link>https://ubuntips.com/posts/clang-php-84-and-the-missing-zlib/</link><pubDate>Mon, 23 Nov 2026 22:20:00 +0800</pubDate><guid>https://ubuntips.com/posts/clang-php-84-and-the-missing-zlib/</guid><description>&lt;p&gt;The last two posts asked whether a compiled PHP beats the distribution package. &lt;a href="https://ubuntips.com/posts/is-a-compiled-php-faster/"&gt;First&lt;/a&gt; with &lt;code&gt;-O3 -march=native&lt;/code&gt;, &lt;a href="https://ubuntips.com/posts/everything-on-lto-pgo-made-php-slower/"&gt;then&lt;/a&gt; with LTO and PGO switched on. The answer both times was no. A few CentminMod levers were still unmeasured, so this round covers them: function alignment on its own, &lt;strong&gt;clang instead of GCC&lt;/strong&gt;, and &lt;strong&gt;PHP 8.4 against 8.5&lt;/strong&gt;. Every module is compiled from source this time, igbinary included.&lt;/p&gt;&#10;&lt;p&gt;Short version: &lt;strong&gt;clang is the only build that ever beat the package, by about 3 % on XenForo member pages and nothing elsewhere. PHP 8.4 is slower than 8.5. My earlier source builds were missing zlib.&lt;/strong&gt; The zlib gap biased the earlier comparisons in favour of the source builds, so their conclusions still stand, but you should know about it.&lt;/p&gt;</description></item><item><title>Everything on: LTO, PGO and -march=native made PHP 8.5 slower</title><link>https://ubuntips.com/posts/everything-on-lto-pgo-made-php-slower/</link><pubDate>Mon, 23 Nov 2026 19:30:00 +0800</pubDate><guid>https://ubuntips.com/posts/everything-on-lto-pgo-made-php-slower/</guid><description>&lt;p&gt;The &lt;a href="https://ubuntips.com/posts/is-a-compiled-php-faster/"&gt;last post&lt;/a&gt; compared Sury, Ubuntu&amp;rsquo;s archive, and a source build with &lt;code&gt;-O3 -march=native&lt;/code&gt;, and found nothing: the tracing JIT generates the hot code at run time, so the C compiler barely matters. The obvious follow-up question is fair: &lt;strong&gt;what if you turn on everything?&lt;/strong&gt; LTO, profile-guided optimisation, function alignment, the interposition and PLT switches, and every module compiled from source against the new tree.&lt;/p&gt;&#10;&lt;p&gt;So I did that. The short version: &lt;strong&gt;the more I enabled, the slower it got.&lt;/strong&gt; LTO alone was neutral. PGO, alone or with LTO, cost 5–10 % on the application tiers and 18–25 % on a CPU-only probe.&lt;/p&gt;</description></item><item><title>Is a compiled PHP faster? Four builds, one Xeon, and a JIT that makes the question moot</title><link>https://ubuntips.com/posts/is-a-compiled-php-faster/</link><pubDate>Mon, 23 Nov 2026 16:00:00 +0800</pubDate><guid>https://ubuntips.com/posts/is-a-compiled-php-faster/</guid><description>&lt;p&gt;Every PHP tuning guide eventually says the same thing: compile PHP yourself, with &lt;code&gt;-O3 -march=native&lt;/code&gt;, and build only the extensions you use. It sounds free. My stack is PHP-bound — 92 % of a logged-in XenForo thread page is PHP-FPM CPU — so if any of that were true it would be the largest remaining win on the server.&lt;/p&gt;&#10;&lt;p&gt;It is not true here, and the reason is more interesting than the result: &lt;strong&gt;with the tracing JIT on, the hot code is generated at run time and never passes through the C compiler at all.&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Who compresses a logged-in XenForo page? 12 % of PHP, one fastcgi_param, and a clock that lied</title><link>https://ubuntips.com/posts/who-compresses-a-logged-in-xenforo-page/</link><pubDate>Mon, 23 Nov 2026 14:30:00 +0800</pubDate><guid>https://ubuntips.com/posts/who-compresses-a-logged-in-xenforo-page/</guid><description>&lt;p&gt;Guest pages on my forums are a solved problem. They come out of Angie&amp;rsquo;s FastCGI cache at 125–135k requests per second on the 12-thread test box, and the remaining cost is TLS. The pages that still cost real money are the ones nobody can cache: &lt;strong&gt;logged-in members&lt;/strong&gt;. Every member view runs XenForo end to end, and on this hardware that meant about 260 thread pages per second.&lt;/p&gt;&#10;&lt;p&gt;So this cycle had one question: &lt;strong&gt;what is left on the logged-in path that the server, not the application, can make cheaper?&lt;/strong&gt; My &lt;a href="https://ubuntips.com/posts/one-idempotent-script/"&gt;provisioning script&lt;/a&gt; already does the usual list: OPcache with the tracing JIT, one PHP-FPM worker per CPU thread, persistent database connections, sessions and cache in Valkey, MariaDB&amp;rsquo;s thread pool. Guessing would only re-run old experiments, so I started with a profile.&lt;/p&gt;</description></item><item><title>PHP-FPM, FrankenPHP, RoadRunner or Swoole? The PHP layer decides less than you think</title><link>https://ubuntips.com/posts/php-server-shootout-fpm-frankenphp-swoole/</link><pubDate>Mon, 23 Nov 2026 07:30:00 +0800</pubDate><guid>https://ubuntips.com/posts/php-server-shootout-fpm-frankenphp-swoole/</guid><description>&lt;p&gt;The &lt;a href="https://ubuntips.com/posts/which-web-server-for-a-php-origin/"&gt;last cycle&lt;/a&gt; compared six web servers in front of the same PHP-FPM pool and found that the server core was noise: every nginx-family build landed inside the run-to-run spread, and the 100x factor was the generic page cache. That left the obvious next question.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;If the web server does not decide, does the way PHP itself runs?&lt;/strong&gt;&lt;/p&gt;&#10;&lt;p&gt;PHP-FPM is the default in my &lt;a href="https://ubuntips.com/posts/one-idempotent-script/"&gt;provisioning script&lt;/a&gt;. The alternatives have loud claims: FrankenPHP embeds PHP in a Go server, RoadRunner and Swoole keep the application in memory between requests, Workerman and ReactPHP and AMPHP turn PHP into an event loop, and PHP-CGI is the old baseline everybody replaced. So this cycle put all of them on the same workload, and then put the three applications on the ones that can actually run them unmodified.&lt;/p&gt;</description></item></channel></rss>