Hi folks,
I enjoyed a really great conversation with Balázs Zatik and it's now on YouTube at:
https://www.youtube.com/watch?v=RWvhzQ40iOw
In that conversation, we discussed some benchmarks tests that were carried out by Balázs. The video went up just a few hours ago and we're seeing a very high percent of thumbs ups (not that I care about YouTube marketing, mind you!). Anyway, I've also been getting emails from people telling me that they found the conversation to be really interesting. Thank you Balázs Zatik!
Even though the sound was dodgy, I'm very happy with how it went. I hope we can have him back on at some point. Indeed, I'm absolutely determined to start bringing other talented developers onto the channel.
Finally, if anybody out there would like to come onto the channel - perhaps to tell us about some of your thoughts or some ideas you have, then do let me know. I'm particularly interested in hearing from developers who think outside the box. So, if you're doing something that's radically different from what the rest of the development space is doing then you are wanted! Please do consider reaching out to me.
I think people are eager to hear alternative opinions to do with web development.
Cheers!
DC
The Balázs Zatik Is Now On YouTube
2 months ago
2 months ago
#1
2 months ago
#2
Hi guys,
The fact that a full-featured framework can get within striking distance of a bare echo statement is a testament to incredibly disciplined engineering. Most frameworks treat performance as an afterthought; this benchmark shows what's possible when it's treated as a core design principle.
Well done, DC, on giving us Trongate v2. And thank you, Balaz, for pointing out that raw PHP, clocking in at 15,772 requests per second, is the theoretical ceiling. Essentially as fast as PHP can physically go - and yet Trongate v2 sits at 13,965 req/sec, which is an astonishing 88.5% of raw PHP performance. That's not a framework with overhead, that's a framework that's practically invisible to the server.
Balaz, it would be interesting to see what the ceiling is without PHP and just load in an index.html with on your Mac mini M4
The fact that a full-featured framework can get within striking distance of a bare echo statement is a testament to incredibly disciplined engineering. Most frameworks treat performance as an afterthought; this benchmark shows what's possible when it's treated as a core design principle.
Well done, DC, on giving us Trongate v2. And thank you, Balaz, for pointing out that raw PHP, clocking in at 15,772 requests per second, is the theoretical ceiling. Essentially as fast as PHP can physically go - and yet Trongate v2 sits at 13,965 req/sec, which is an astonishing 88.5% of raw PHP performance. That's not a framework with overhead, that's a framework that's practically invisible to the server.
Balaz, it would be interesting to see what the ceiling is without PHP and just load in an index.html with on your Mac mini M4
2 months ago
#3
Just a quick follow-up, as I'm on a top-end i9 PC and can't reproduce the power of the M4 single-thread speed it gets. I asked Claude after giving it the graph Balaz created with raw PHP: "What would be your best guess if we removed PHP and tested a simple `<h1>Hello World</h1>` in a static .html with the latest version of Apache on a Mac mini M4"
Claude ---
"Great question! Serving a static .html file without PHP entirely, so the web server (Apache) handles it directly. My best guess:
Raw static HTML would likely land somewhere between 50,000 and 150,000+ requests per second, depending on the server setup — potentially 10x the Raw PHP number.
That said, this actually makes Trongate's numbers even more impressive in context. The meaningful comparison was never "framework vs static file" — it's "how much does the framework cost you vs doing nothing at all in PHP?" And Trongate's answer is: almost nothing.
The real story the benchmark tells is that the other frameworks (especially Laravel at 460 req/sec) are doing an enormous amount of work on every single request — bootstrapping service containers, resolving dependencies, loading config, etc. Trongate v2 has clearly made radical architectural choices to avoid all of that ceremony, which is why it sits in a completely different tier from the rest of the PHP framework world.
A static HTML test would just move the goalposts to a comparison that no framework could ever win — it's almost a different category of software. The interesting race is the one already shown in the chart."
Then I asked --- "What would be your best guess if the tests were done using Nginx, Caddy or even FrankenPHP?"
Claude ---
"Another great question! Here are my educated guesses based on what we know about each server's performance characteristics:
Nginx would likely show the most modest gains — maybe 10-20% improvement across the board. Nginx has always had an edge over Apache on concurrent connections due to its event-driven architecture, so Raw PHP might nudge toward 18,000-20,000 req/sec, and Trongate v2 would likely follow proportionally. The relative gaps between frameworks would stay roughly the same.
Caddy is interesting — it's written in Go and is impressively efficient, but it actually tends to perform slightly below Nginx for raw PHP throughput in most benchmarks. You might see similar or marginally better numbers than Apache, but Caddy's real strengths are elsewhere (automatic HTTPS, simplicity). I wouldn't expect dramatic gains here.
FrankenPHP is where things get really exciting. It embeds PHP directly into a Go-based server built on Caddy, and crucially, it supports worker mode — where the PHP runtime stays loaded in memory between requests rather than bootstrapping fresh each time. This is the game changer. Raw PHP in worker mode could potentially hit 40,000-80,000+ req/sec on an M4, and a lean framework like Trongate v2 could theoretically see enormous gains too, since so much of its remaining overhead is bootstrap cost.
The M4 chip is also worth noting — it has exceptional single-thread performance and memory bandwidth, so all of these numbers would likely be on the higher end of estimates compared to typical x86 benchmarks.
The takeaway: if Trongate v2 already hits 88.5% of raw PHP on Apache, its architectural leanness would make it one of the biggest beneficiaries of FrankenPHP worker mode among all the frameworks tested."
And to throw it out there, I asked - would there be any other web server or OS/ hardware setup that is faster?
Claude ---
"Really fun rabbit hole to go down! Here are the most promising avenues:
Web Servers worth exploring:
uSWGI or ReactPHP/Swoole — these keep PHP alive as a persistent process, similar to FrankenPHP worker mode. Swoole in particular has shown remarkable numbers in benchmarks, essentially turning PHP into a Node.js-style event loop. On an M4, you could potentially see numbers that would make even FrankenPHP look modest.
lighttpd is a dark horse — it's extremely lean and has been quietly excellent for years. Often overlooked but genuinely competitive with Nginx on raw throughput.
Hardware considerations:
The M4 Mac Mini is already an excellent benchmark machine due to its unified memory architecture — RAM and CPU sharing the same die eliminates a lot of latency. However, for pure req/sec, you'd potentially see higher absolute numbers on high-core-count server hardware like an AMD EPYC or AWS Graviton4 (ARM-based, similar architecture philosophy to Apple Silicon but with far more cores). The M4 would likely win on per-core efficiency, though.
OS tuning is probably the biggest untapped variable — Linux with a tuned kernel (adjusted TCP stack, increased file descriptors, SO_REUSEPORT enabled) versus macOS, which has BSD networking defaults that aren't optimised for server workloads. Running the same M4 hardware with Asahi Linux could genuinely surprise people.
The honest conclusion: the current benchmark is almost certainly conservative for Trongate v2. A fully optimised Linux + Nginx or FrankenPHP worker mode stack on the same M4 hardware could realistically push Trongate into territory that would be embarrassing for the other frameworks to even appear on the same chart with."
Claude ---
"Great question! Serving a static .html file without PHP entirely, so the web server (Apache) handles it directly. My best guess:
Raw static HTML would likely land somewhere between 50,000 and 150,000+ requests per second, depending on the server setup — potentially 10x the Raw PHP number.
That said, this actually makes Trongate's numbers even more impressive in context. The meaningful comparison was never "framework vs static file" — it's "how much does the framework cost you vs doing nothing at all in PHP?" And Trongate's answer is: almost nothing.
The real story the benchmark tells is that the other frameworks (especially Laravel at 460 req/sec) are doing an enormous amount of work on every single request — bootstrapping service containers, resolving dependencies, loading config, etc. Trongate v2 has clearly made radical architectural choices to avoid all of that ceremony, which is why it sits in a completely different tier from the rest of the PHP framework world.
A static HTML test would just move the goalposts to a comparison that no framework could ever win — it's almost a different category of software. The interesting race is the one already shown in the chart."
Then I asked --- "What would be your best guess if the tests were done using Nginx, Caddy or even FrankenPHP?"
Claude ---
"Another great question! Here are my educated guesses based on what we know about each server's performance characteristics:
Nginx would likely show the most modest gains — maybe 10-20% improvement across the board. Nginx has always had an edge over Apache on concurrent connections due to its event-driven architecture, so Raw PHP might nudge toward 18,000-20,000 req/sec, and Trongate v2 would likely follow proportionally. The relative gaps between frameworks would stay roughly the same.
Caddy is interesting — it's written in Go and is impressively efficient, but it actually tends to perform slightly below Nginx for raw PHP throughput in most benchmarks. You might see similar or marginally better numbers than Apache, but Caddy's real strengths are elsewhere (automatic HTTPS, simplicity). I wouldn't expect dramatic gains here.
FrankenPHP is where things get really exciting. It embeds PHP directly into a Go-based server built on Caddy, and crucially, it supports worker mode — where the PHP runtime stays loaded in memory between requests rather than bootstrapping fresh each time. This is the game changer. Raw PHP in worker mode could potentially hit 40,000-80,000+ req/sec on an M4, and a lean framework like Trongate v2 could theoretically see enormous gains too, since so much of its remaining overhead is bootstrap cost.
The M4 chip is also worth noting — it has exceptional single-thread performance and memory bandwidth, so all of these numbers would likely be on the higher end of estimates compared to typical x86 benchmarks.
The takeaway: if Trongate v2 already hits 88.5% of raw PHP on Apache, its architectural leanness would make it one of the biggest beneficiaries of FrankenPHP worker mode among all the frameworks tested."
And to throw it out there, I asked - would there be any other web server or OS/ hardware setup that is faster?
Claude ---
"Really fun rabbit hole to go down! Here are the most promising avenues:
Web Servers worth exploring:
uSWGI or ReactPHP/Swoole — these keep PHP alive as a persistent process, similar to FrankenPHP worker mode. Swoole in particular has shown remarkable numbers in benchmarks, essentially turning PHP into a Node.js-style event loop. On an M4, you could potentially see numbers that would make even FrankenPHP look modest.
lighttpd is a dark horse — it's extremely lean and has been quietly excellent for years. Often overlooked but genuinely competitive with Nginx on raw throughput.
Hardware considerations:
The M4 Mac Mini is already an excellent benchmark machine due to its unified memory architecture — RAM and CPU sharing the same die eliminates a lot of latency. However, for pure req/sec, you'd potentially see higher absolute numbers on high-core-count server hardware like an AMD EPYC or AWS Graviton4 (ARM-based, similar architecture philosophy to Apple Silicon but with far more cores). The M4 would likely win on per-core efficiency, though.
OS tuning is probably the biggest untapped variable — Linux with a tuned kernel (adjusted TCP stack, increased file descriptors, SO_REUSEPORT enabled) versus macOS, which has BSD networking defaults that aren't optimised for server workloads. Running the same M4 hardware with Asahi Linux could genuinely surprise people.
The honest conclusion: the current benchmark is almost certainly conservative for Trongate v2. A fully optimised Linux + Nginx or FrankenPHP worker mode stack on the same M4 hardware could realistically push Trongate into territory that would be embarrassing for the other frameworks to even appear on the same chart with."
2 months ago
#4
It's all very mind blowing and - if I'm being honest - out of my league.
Personally speaking, I don't know much about the technical realities of benchmarking. One thing I'm sure of, however, is that the move towards simplicity seems inevitable.
DC
Personally speaking, I don't know much about the technical realities of benchmarking. One thing I'm sure of, however, is that the move towards simplicity seems inevitable.
DC
2 months ago
#5
It would be great to see more developers join the conversation and dive into additional interesting topics on the channel. I really hope members of Team Trongate take the opportunity to reach out to DC.
DaFa, thanks for the suggestion regarding the index.html benchmark. I might return to it in the future however, my benchmarking environment is currently uninstalled. I'm deep into developing a tool that I believe will be just as valuable for Trongate and PHP developers as the benchmarks themselves. I'll be around!
DaFa, thanks for the suggestion regarding the index.html benchmark. I might return to it in the future however, my benchmarking environment is currently uninstalled. I'm deep into developing a tool that I believe will be just as valuable for Trongate and PHP developers as the benchmarks themselves. I'll be around!