Why Webman Outperforms Traditional PHP Frameworks: A Detailed Benchmark

This article compares the high‑performance Webman PHP framework with OpenResty, ThinkPHP6, and traditional FPM setups, detailing architecture, request handling, and extensive ApacheBench benchmark results that show Webman's superior QPS and lower latency.

Open Source Tech Hub
Open Source Tech Hub
Open Source Tech Hub
Why Webman Outperforms Traditional PHP Frameworks: A Detailed Benchmark

Overview

The Webman framework is built on Workerman and uses an event‑driven master‑worker architecture. It is compared with OpenResty (Lua on Nginx) and traditional PHP‑FPM stacks.

Architecture Comparison

OpenResty is a Nginx‑based web server that uses Lua for extensions.
Webman is a Workerman‑based server framework that uses PHP for extensions.

Event‑Driven Model

Both frameworks handle network requests via I/O multiplexing, enabling efficient event processing.

Process Model

Both adopt a master‑worker model: a single master process creates listening sockets and spawns multiple worker processes.

Master process: creates listening sockets, spawns workers, distributes incoming connections.

Worker process: inherits the listening socket, parses HTTP requests, executes scripts and business logic.

Request Flow

Webman

+ 1. Framework receives request
+ 2. Framework executes business logic
+ 3. Framework returns result to client

Traditional PHP‑FPM

- 1. Nginx/Apache receives request
- 2. Passes request to php‑fpm
- 3. php‑fpm initializes environment
- 4. Calls extensions RINIT
- 5. Reads PHP file (opcache may skip)
- 6. Parses & compiles to opcode (opcache may skip)
- 7. Executes opcode
- 8. Framework initialization (container, router, middleware, etc.)
- 9. Connects to DB, Redis
+10. Executes business logic
-11. Closes DB/Redis connections
-12. php‑fpm releases resources
-13. Calls extensions RSHUTDOWN
-14. Returns result to Nginx/Apache
+15. Nginx/Apache returns result to client
Note: Without an Nginx reverse proxy, Webman performs only the three steps above, making it several times faster than traditional stacks.

Extensibility

Webman provides core features only (routing, middleware, session, custom process interface) and relies on the Composer ecosystem for additional components such as illuminate/database , ThinkORM , or Medoo .

Benchmark Setup

Environment

CPU: Intel Xeon E5‑2689 0 @ 2.60 GHz (8 cores)

Memory: 16 GB

OS: Ubuntu 20.04 kernel 4.15.0‑137‑generic (x86_64)

PHP: 7.4.19

ApacheBench Command

ab -n 100000 -c 100 -k http://172.30.237.43:8901/
100 000 total requests, 100 concurrent connections, keep‑alive enabled.

Tested Scenarios

Webman (port 8901)

OpenResty (port 8903)

ThinkPHP 6 (port 8902)

Results – Hello World Endpoint

Webman: QPS: 126,916.60 OpenResty: QPS: 120,807.96 ThinkPHP 6:

QPS: 469.90

Results – Database‑Connected Endpoint

Webman: QPS: 17,316.50 ThinkPHP 6:

QPS: 339.45

External Benchmark Comparison

Data sourced from TechEmpower Round 21 (including database workload).
TechEmpower benchmark chart
TechEmpower benchmark chart
Webman vs. Go web frameworks (with database workload).
Webman vs Go benchmark
Webman vs Go benchmark
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

PHPBenchmarkThinkPHPWebmanWorkerman
Open Source Tech Hub
Written by

Open Source Tech Hub

Sharing cutting-edge internet technologies and practical AI resources.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.