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