{"id":28276,"date":"2017-12-11T19:41:53","date_gmt":"2017-12-11T17:41:53","guid":{"rendered":"https:\/\/mamchenkov.net\/wordpress\/?p=28276"},"modified":"2017-12-11T19:41:53","modified_gmt":"2017-12-11T17:41:53","slug":"php-fpm-tuning-using-pm-static-for-max-performance","status":"publish","type":"post","link":"https:\/\/mamchenkov.net\/wordpress\/2017\/12\/11\/php-fpm-tuning-using-pm-static-for-max-performance\/","title":{"rendered":"PHP-FPM tuning: Using \u2018pm static\u2019 for Max Performance"},"content":{"rendered":"<!-- google_ad_section_start -->\n<p>&#8220;<a href=\"https:\/\/www.sitepoint.com\/php-fpm-tuning-using-pm-static-max-performance\/\">PHP-FPM tuning: Using \u2018pm static\u2019 for Max Performance<\/a>&#8221; looks at different process management settings in PHP-FPM: static, dynamic, and ondemand, and the way they affect performance.\u00a0 The default &#8211; ondemand &#8211; might work well for you if you have a large server with plenty of resources and not so many actual visitors.\u00a0 Running on a smaller instance, or expecting high spikes of traffic might require you to look into your PHP-FPM configuration and adjust it.\u00a0 The article is just what the doctor ordered.<\/p>\n<p>Personally, I prefer having a dedicated instance for the web server, but that instance being as small as possible.\u00a0 With that, figuring out the correct settings for static process management is easier.\u00a0 It also minimizes all those nasty cases of running out of memory, swapping, and having an excessive CPU utilization.\u00a0 \u00a0Which is especially useful when running on Amazon AWS instances.<\/p>\n<!-- google_ad_section_end -->\n","protected":false},"excerpt":{"rendered":"<!-- google_ad_section_start -->\n<p>&#8220;PHP-FPM tuning: Using \u2018pm static\u2019 for Max Performance&#8221; looks at different process management settings in PHP-FPM: static, dynamic, and ondemand, and the way they affect performance.\u00a0 The default &#8211; ondemand &#8211; might work well for you if you have a large server with plenty of resources and not so many actual visitors.\u00a0 Running on a &hellip; <a href=\"https:\/\/mamchenkov.net\/wordpress\/2017\/12\/11\/php-fpm-tuning-using-pm-static-for-max-performance\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">PHP-FPM tuning: Using \u2018pm static\u2019 for Max Performance<\/span><\/a><\/p>\n<!-- google_ad_section_end -->\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"PHP-FPM tuning: Using \u2018pm static\u2019 for Max Performance #SysAdmin #WebDev #PHP #hosting #performance","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_links_to":"","_links_to_target":""},"categories":[1,6,18,133,62,1334],"tags":[1057,38,1330,2289],"keyring_services":[],"class_list":["post-28276","post","type-post","status-publish","format-standard","hentry","category-general","category-linux","category-programming","category-sysadmin","category-technology","category-web-work","tag-performance","tag-php","tag-web-development","tag-web-hosting"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":27681,"url":"https:\/\/mamchenkov.net\/wordpress\/2017\/06\/14\/async-php-requests-reactive-responses-with-php-fpm\/","url_meta":{"origin":28276,"position":0},"title":"Async PHP Requests &#038; Reactive Responses with PHP-FPM","author":"Leonid Mamchenkov","date":"June 14, 2017","format":false,"excerpt":"https:\/\/speakerdeck.com\/hollodotme\/async-php-requests-and-reactive-responses-with-php-fpm \"Async PHP Requests & Reactive Responses with PHP-FPM\" is talk by\u00a0Holger Woltersdorf, in which he shares the approaches he tried for implementing asynchronous requests in PHP, and how he arrived at\u00a0hollodotme\/fast-cgi-client, which is a\u00a0PHP fast CGI client for sending requests (a)synchronously to PHP-FPM.","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":27865,"url":"https:\/\/mamchenkov.net\/wordpress\/2017\/08\/21\/using-php-fpm-as-a-simple-built-in-async-queue\/","url_meta":{"origin":28276,"position":1},"title":"Using php-fpm as a simple built-in async queue","author":"Leonid Mamchenkov","date":"August 21, 2017","format":false,"excerpt":"Here's an interesting solution for a poor man's asynchronous queue using PHP-FPM: PHP-FPM already acts as a queue for Nginx\/Apache FastCGI clients. While your web-request is running you can just send another FastCGI request to the same PHP-FPM socket asynchronously and non-blocking. This request is immediately executed in another php-fpm\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":26306,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/08\/04\/504-gateway-timeout-error-on-nginx-fastcgi-php-fpm\/","url_meta":{"origin":28276,"position":2},"title":"504 Gateway Timeout error on Nginx + FastCGI (php-fpm)","author":"Leonid Mamchenkov","date":"August 4, 2016","format":false,"excerpt":"\"504 Gateway Timeout\" error is a very common issue when using Nginx with PHP-FPM. \u00a0Usually, that means that it took PHP-FPM longer to generate the response, than Nginx was willing to wait for. \u00a0A few possible reasons for this are: Nginx timeout configuration uses very small values (expecting the responses\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"504","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2016\/08\/504-500x385.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":29034,"url":"https:\/\/mamchenkov.net\/wordpress\/2018\/11\/26\/roadrunner-high-performance-php-application-server-load-balancer-and-process-manager\/","url_meta":{"origin":28276,"position":3},"title":"RoadRunner &#8211; high-performance PHP application server, load-balancer and process manager","author":"Leonid Mamchenkov","date":"November 26, 2018","format":false,"excerpt":"RoadRunner is a high-performance PHP application server, load-balancer and process manager, written in Goland.\u00a0 It sounds like an excellent replacement for the built-in PHP server, and even more than that - it's production-ready.\u00a0 And it works on Windows too. RoadRunner is an open source (MIT licensed) high-performance PHP application server,\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":49042,"url":"https:\/\/mamchenkov.net\/wordpress\/2020\/05\/25\/send-additional-http-headers-to-nginxs-fastcgi\/","url_meta":{"origin":28276,"position":4},"title":"Send additional HTTP headers to Nginx&#8217;s FastCGI","author":"Leonid Mamchenkov","date":"May 25, 2020","format":false,"excerpt":"It's not that often that I come across a useful, but undocumented feature in a major software application.\u00a0 It happened recently, so I'll document it here just for the future self. For a particular setup, I had to send additional HTTP headers (let's use X-GEOIP for this example) to the\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":22791,"url":"https:\/\/mamchenkov.net\/wordpress\/2014\/11\/03\/fpm-build-packages-for-multiple-platforms-deb-rpm-etc-with-great-ease-and-sanity\/","url_meta":{"origin":28276,"position":5},"title":"fpm &#8211; build packages for multiple platforms (deb, rpm, etc) with great ease and sanity","author":"Leonid Mamchenkov","date":"November 3, 2014","format":"link","excerpt":"fpm -\u00a0Effing package management! Build packages for multiple platforms (deb, rpm, etc) with great ease and sanity.","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/28276","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/comments?post=28276"}],"version-history":[{"count":0,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/28276\/revisions"}],"wp:attachment":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/media?parent=28276"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/categories?post=28276"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/tags?post=28276"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/keyring_services?post=28276"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}