[{"data":1,"prerenderedAt":389},["ShallowReactive",2],{"navigation":3,"/docs/image-variations/fpm-nginx":96,"/docs/image-variations/fpm-nginx-surround":384},[4],{"title":5,"path":6,"stem":7,"children":8,"page":59},"Docs","/docs","docs",[9,25,41,60,80,88],{"title":10,"path":11,"stem":12,"children":13,"icon":24},"Getting Started","/docs/getting-started","docs/1.getting-started/1.index",[14,16,20],{"title":15,"path":11,"stem":12},"Introduction",{"title":17,"path":18,"stem":19},"Quick start","/docs/getting-started/quick-start","docs/1.getting-started/2.quick-start",{"title":21,"path":22,"stem":23},"Running from source","/docs/getting-started/running-from-source","docs/1.getting-started/3.running-from-source","i-lucide-rocket",{"title":26,"path":27,"stem":28,"children":29,"icon":40},"Benchmarks & Methodology","/docs/benchmarks","docs/2.benchmarks/1.index",[30,32,36],{"title":31,"path":27,"stem":28},"Methodology",{"title":33,"path":34,"stem":35},"Reading your results","/docs/benchmarks/reading-your-results","docs/2.benchmarks/2.reading-your-results",{"title":37,"path":38,"stem":39},"Testing from another machine","/docs/benchmarks/testing-from-another-machine","docs/2.benchmarks/3.testing-from-another-machine","i-lucide-flask-conical",{"title":42,"icon":43,"path":44,"stem":45,"children":46,"page":59},"Configuration","i-lucide-settings-2","/docs/configuration","docs/3.configuration",[47,51,55],{"title":48,"path":49,"stem":50},"Adding a real database","/docs/configuration/adding-databases","docs/3.configuration/1.adding-databases",{"title":52,"path":53,"stem":54},"Customizing the image","/docs/configuration/customizing-the-image","docs/3.configuration/2.customizing-the-image",{"title":56,"path":57,"stem":58},"Common tuning strategies","/docs/configuration/common-tuning-strategies","docs/3.configuration/3.common-tuning-strategies",false,{"title":61,"path":62,"stem":63,"children":64,"icon":79},"Image variations","/docs/image-variations","docs/4.image-variations/1.index",[65,67,71,75],{"title":66,"path":62,"stem":63},"Choosing a variation",{"title":68,"path":69,"stem":70},"FPM-NGINX","/docs/image-variations/fpm-nginx","docs/4.image-variations/2.fpm-nginx",{"title":72,"path":73,"stem":74},"FrankenPHP","/docs/image-variations/frankenphp","docs/4.image-variations/3.frankenphp",{"title":76,"path":77,"stem":78},"FPM-Apache","/docs/image-variations/fpm-apache","docs/4.image-variations/4.fpm-apache","i-lucide-layers",{"title":81,"path":82,"stem":83,"children":84,"icon":87},"Community Results","/docs/community-results","docs/5.community-results/1.index",[85],{"title":86,"path":82,"stem":83},"Submitting your results","i-lucide-users",{"title":89,"path":90,"stem":91,"children":92,"icon":95},"FAQ","/docs/faq","docs/6.faq/1.index",[93],{"title":94,"path":90,"stem":91},"Frequently asked questions","i-lucide-circle-help",{"id":97,"title":68,"body":98,"description":377,"extension":378,"links":379,"meta":380,"navigation":326,"path":69,"redirect":379,"seo":381,"sitemap":382,"stem":70,"__hash__":383},"docs/docs/4.image-variations/2.fpm-nginx.md",{"type":99,"value":100,"toc":371},"minimark",[101,114,117,122,128,134,144,148,198,215,219,222,344,353,357,367],[102,103,104,108,109,113],"p",{},[105,106,107],"code",{},"fpm-nginx"," is the ",[110,111,112],"strong",{},"default"," BenchKit image. nginx takes the request, serves static files itself, and hands anything PHP to PHP-FPM over FastCGI. Both processes run in the same container under S6 Overlay, which restarts either one if it fails.",[102,115,116],{},"This is what most Laravel applications run in production, which is what makes it the right baseline for any comparison.",[118,119,121],"h2",{"id":120},"how-it-compares","How it compares",[102,123,124,127],{},[110,125,126],{},"Against FrankenPHP."," FPM-NGINX boots the framework on every request. FrankenPHP can keep your application resident between requests in worker mode, which removes that bootstrap. FPM-NGINX is the more battle-tested of the two, and it is the honest starting point: measure here first, then measure what worker mode changes.",[102,129,130,133],{},[110,131,132],{},"Against FPM-Apache."," Both put PHP-FPM behind a web server over FastCGI, so the PHP side is identical and the difference is usually small. Measure it rather than assume it, and choose Apache when you need Apache.",[102,135,136,139,140,143],{},[110,137,138],{},"The concurrency model is the thing to keep in mind."," A request occupies an FPM worker for its entire duration, including time spent waiting on a database or an API. That makes ",[105,141,142],{},"pm.max_children"," a hard ceiling on concurrency, and it is the single most common reason an FPM run looks worse than it should.",[118,145,147],{"id":146},"run-it","Run it",[149,150,156],"pre",{"className":151,"code":152,"filename":153,"language":154,"meta":155,"style":155},"language-bash shiki shiki-themes github-dark","docker run -p 80:8080 \\\n  -v benchkit-runs:/var/www/html/storage/app/runs \\\n  serversideup/benchkit-laravel:latest\n","Terminal","bash","",[105,157,158,181,192],{"__ignoreMap":155},[159,160,163,167,171,175,178],"span",{"class":161,"line":162},"line",1,[159,164,166],{"class":165},"svObZ","docker",[159,168,170],{"class":169},"sU2Wk"," run",[159,172,174],{"class":173},"sDLfK"," -p",[159,176,177],{"class":169}," 80:8080",[159,179,180],{"class":173}," \\\n",[159,182,184,187,190],{"class":161,"line":183},2,[159,185,186],{"class":173},"  -v",[159,188,189],{"class":169}," benchkit-runs:/var/www/html/storage/app/runs",[159,191,180],{"class":173},[159,193,195],{"class":161,"line":194},3,[159,196,197],{"class":169},"  serversideup/benchkit-laravel:latest\n",[102,199,200,201,204,205,208,209,214],{},"The ",[105,202,203],{},"latest"," tag is this variation. There is no suffix to add. To pin a PHP version, use the version as the tag — ",[105,206,207],{},"8.4"," is this variation on PHP 8.4. ",[210,211,213],"a",{"href":212},"/docs/image-variations#the-full-tag-schema","The full tag schema"," covers every combination.",[118,216,218],{"id":217},"tune-the-pool-before-you-compare","Tune the pool before you compare",[102,220,221],{},"The default pool of 20 workers is not sized for your machine. Size it from memory — each worker holds roughly 40 MB on this image — then run:",[149,223,228],{"className":224,"code":225,"filename":226,"language":227,"meta":155,"style":155},"language-yaml shiki shiki-themes github-dark","services:\n  benchkit:\n    image: serversideup/benchkit-laravel:latest\n    ports:\n      - \"80:8080\"\n    environment:\n      PHP_FPM_PM_CONTROL: \"dynamic\"\n      PHP_FPM_PM_MAX_CHILDREN: \"40\"\n    volumes:\n      - benchkit-runs:/var/www/html/storage/app/runs\n\nvolumes:\n  benchkit-runs:\n","docker-compose.yml","yaml",[105,229,230,240,247,258,266,275,283,294,305,313,321,328,336],{"__ignoreMap":155},[159,231,232,236],{"class":161,"line":162},[159,233,235],{"class":234},"s4JwU","services",[159,237,239],{"class":238},"s95oV",":\n",[159,241,242,245],{"class":161,"line":183},[159,243,244],{"class":234},"  benchkit",[159,246,239],{"class":238},[159,248,249,252,255],{"class":161,"line":194},[159,250,251],{"class":234},"    image",[159,253,254],{"class":238},": ",[159,256,257],{"class":169},"serversideup/benchkit-laravel:latest\n",[159,259,261,264],{"class":161,"line":260},4,[159,262,263],{"class":234},"    ports",[159,265,239],{"class":238},[159,267,269,272],{"class":161,"line":268},5,[159,270,271],{"class":238},"      - ",[159,273,274],{"class":169},"\"80:8080\"\n",[159,276,278,281],{"class":161,"line":277},6,[159,279,280],{"class":234},"    environment",[159,282,239],{"class":238},[159,284,286,289,291],{"class":161,"line":285},7,[159,287,288],{"class":234},"      PHP_FPM_PM_CONTROL",[159,290,254],{"class":238},[159,292,293],{"class":169},"\"dynamic\"\n",[159,295,297,300,302],{"class":161,"line":296},8,[159,298,299],{"class":234},"      PHP_FPM_PM_MAX_CHILDREN",[159,301,254],{"class":238},[159,303,304],{"class":169},"\"40\"\n",[159,306,308,311],{"class":161,"line":307},9,[159,309,310],{"class":234},"    volumes",[159,312,239],{"class":238},[159,314,316,318],{"class":161,"line":315},10,[159,317,271],{"class":238},[159,319,320],{"class":169},"benchkit-runs:/var/www/html/storage/app/runs\n",[159,322,324],{"class":161,"line":323},11,[159,325,327],{"emptyLinePlaceholder":326},true,"\n",[159,329,331,334],{"class":161,"line":330},12,[159,332,333],{"class":234},"volumes",[159,335,239],{"class":238},[159,337,339,342],{"class":161,"line":338},13,[159,340,341],{"class":234},"  benchkit-runs",[159,343,239],{"class":238},[345,346,347],"note",{},[102,348,349,350,352],{},"BenchKit records the pool configuration it can detect and flags any load test that asked for more concurrency than the pool could serve. A run carrying that flag is measuring the pool rather than the server. See ",[210,351,52],{"href":53},".",[118,354,356],{"id":355},"use-it-as-your-baseline","Use it as your baseline",[102,358,359,360,362,363,366],{},"Run your suite here first. Then run it on ",[210,361,72],{"href":73}," and open both in ",[110,364,365],{},"Compare",". Starting anywhere else makes the second number harder to interpret, because you have nothing ordinary to hold it against.",[368,369,370],"style",{},"html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .s4JwU, html code.shiki .s4JwU{--shiki-default:#85E89D}html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}",{"title":155,"searchDepth":183,"depth":183,"links":372},[373,374,375,376],{"id":120,"depth":183,"text":121},{"id":146,"depth":183,"text":147},{"id":217,"depth":183,"text":218},{"id":355,"depth":183,"text":356},"The default BenchKit image, and the baseline every other variation is measured against.","md",null,{},{"title":68,"description":377},{"loc":69},"yXIU8ONQneoWfXittHXtRdhrU166YzsPgPWfq-IIB-k",[385,387],{"title":66,"path":62,"stem":63,"description":386,"children":-1},"BenchKit ships the same application on three web servers and every PHP version it supports. The image tag picks both.",{"title":72,"path":73,"stem":74,"description":388,"children":-1},"Run the same application classic or in Octane worker mode, and measure the difference.",1790284380479]