{"id":4038,"date":"2023-06-07T14:21:34","date_gmt":"2023-06-07T14:21:34","guid":{"rendered":"https:\/\/www.gubatron.com\/blog\/?p=4038"},"modified":"2023-06-07T14:22:13","modified_gmt":"2023-06-07T14:22:13","slug":"will-using-nice-20-on-nginx-and-php-fpm-make-my-wordpress-site-go-faster","status":"publish","type":"post","link":"https:\/\/www.gubatron.com\/blog\/will-using-nice-20-on-nginx-and-php-fpm-make-my-wordpress-site-go-faster\/","title":{"rendered":"Will using `nice -20` on nginx and php-fpm make my WordPress site go faster?"},"content":{"rendered":"<p>The <code>nice<\/code> command in Unix and Linux systems is used to alter the scheduling priority of processes. A lower nice value means higher priority. However, using <code>nice -20<\/code> to set the highest priority for your PHP-FPM and Nginx processes isn&#8217;t likely to have a significant impact on your WordPress site&#8217;s speed unless your server is very busy with other processes.<\/p>\n<p><strong>If PHP-FPM and Nginx are the primary services running on your server, they are already likely to be using the bulk of available CPU time.<\/strong> On a busy server with lots of competing processes, increasing the priority might give you a minor performance increase, but it could also starve other processes of necessary resources, leading to a less stable system overall.<\/p>\n<p>If you&#8217;re looking to increase your WordPress site&#8217;s speed, you might have better luck with these approaches:<\/p>\n<ol>\n<li><strong>Caching<\/strong>: WordPress plugins like W3 Total Cache or WP Super Cache can drastically improve performance by reducing the number of dynamic page loads.<\/p>\n<\/li>\n<li>\n<p><strong>Optimizing your database<\/strong>: Regularly clean your WordPress database of unnecessary data, and consider using a database optimization plugin.<\/p>\n<\/li>\n<li>\n<p><strong>Using a Content Delivery Network (CDN)<\/strong>: This can speed up delivery of static resources like images and CSS\/JavaScript files.<\/p>\n<\/li>\n<li>\n<p><strong>Upgrading your hosting plan<\/strong>: If your site is getting more traffic than your current hosting plan can handle, upgrading to a better plan with more resources can improve speed.<\/p>\n<\/li>\n<li>\n<p><strong>Optimizing images<\/strong>: Using a plugin to compress and optimize images can significantly speed up page load times.<\/p>\n<\/li>\n<li>\n<p><strong>Keeping WordPress and its plugins up-to-date<\/strong>: Updates often include performance improvements, in addition to new features and security fixes.<\/p>\n<\/li>\n<li>\n<p><strong>Removing unnecessary plugins<\/strong>: Every plugin adds some overhead to WordPress, so remove any that you don&#8217;t absolutely need.<\/p>\n<\/li>\n<\/ol>\n<p>Remember, changing the priority of a process should be done with care, as it can have system-wide effects on process scheduling and overall performance. It&#8217;s not a substitute for good application and server optimization.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The nice command in Unix and Linux systems is used to alter the scheduling priority of processes. A lower nice value means higher priority. However, using nice -20 to set the highest priority for your PHP-FPM and Nginx processes isn&#8217;t likely to have a significant impact on your WordPress site&#8217;s speed unless your server is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4001,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","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}},"categories":[43],"tags":[],"class_list":["post-4038","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2022\/12\/progress_image_100_7fdc7b72-6c19-42f5-affe-d055d02d6f8e.webp?fit=1024%2C1024&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5Unzf-138","jetpack-related-posts":[{"id":3591,"url":"https:\/\/www.gubatron.com\/blog\/upgrading-your-wordpress-blog-to-php-7-0-on-ubuntu-xenial\/","url_meta":{"origin":4038,"position":0},"title":"Upgrading your wordpress blog to PHP 7.0 on Ubuntu Xenial","author":"gubatron","date":"September 7, 2016","format":false,"excerpt":"If you're about to upgrade your Ubuntu server to 16.04 (Xenial) you might want to take advantage of the new PHP 7.0 which is as fast or more than Facebook's HHVM, or perhaps during the upgrade process a few things may have broken and perhaps that's why you're here Make\u2026","rel":"","context":"In &quot;Linux&quot;","block_context":{"text":"Linux","link":"https:\/\/www.gubatron.com\/blog\/category\/linux\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3596,"url":"https:\/\/www.gubatron.com\/blog\/how-to-enable-php-fpm-log-output\/","url_meta":{"origin":4038,"position":1},"title":"HOW TO ENABLE PHP FPM LOG OUTPUT","author":"gubatron","date":"September 7, 2016","format":false,"excerpt":"This one had me for the longest time. If you happen to be running a web server with php-fpm, sometimes you will run across an HTTP 500 error and all you will get will be a blank screen. You will look at your server's error log, your vhost error's log\u2026","rel":"","context":"In &quot;Linux&quot;","block_context":{"text":"Linux","link":"https:\/\/www.gubatron.com\/blog\/category\/linux\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3839,"url":"https:\/\/www.gubatron.com\/blog\/nginx-server-configuration-for-a-wordpress-instance-served-from-a-urls-subdirectory\/","url_meta":{"origin":4038,"position":2},"title":"nginx server configuration for a wordpress instance served from a URL&#8217;s subdirectory","author":"gubatron","date":"November 14, 2019","format":false,"excerpt":"You want to serve a wordpress instance on a website's domain url but not at the path's root, you want it under a sub-directory, for example \"blog\", the same as this blog: https:\/\/www.gubatron.com\/blog\u00a0 Here's how my NGINX's server block for 'www.gubatron.com' looks like at the moment (https\/ssl hasn't been configured\u2026","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/www.gubatron.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3517,"url":"https:\/\/www.gubatron.com\/blog\/sysadmin-serve-your-wordpress-cached-pages-with-lighttpd-and-not-php\/","url_meta":{"origin":4038,"position":3},"title":"[SYSADMIN] Serve your WordPress cached pages directly with lighttpd and not PHP","author":"gubatron","date":"June 7, 2016","format":false,"excerpt":"Optimizing Your Wordpress Cache Loads in Lighttpd. If you don't configure your wordpress virtual host properly in lighttpd, your wordpress cache will still make use of PHP. Wouldn't it be nice if all those cached requests were served directy from the webserver as the static files that they are, bypassing\u2026","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/www.gubatron.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1457,"url":"https:\/\/www.gubatron.com\/blog\/map-commands-to-servers-via-ssh\/","url_meta":{"origin":4038,"position":4},"title":"Quick N Dirty way to Map Commands to remote servers via ssh","author":"gubatron","date":"October 10, 2009","format":false,"excerpt":"You may be running several independent but similar servers at the same time and wasting time by executing commands in all of them one by one. Wouldn't it be nice to send a command to all of them at once? or to monitor all of them at once. The following\u2026","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/www.gubatron.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":566,"url":"https:\/\/www.gubatron.com\/blog\/apache2-enablesendfile\/","url_meta":{"origin":4038,"position":5},"title":"Apache2: EnableSendFile","author":"gubatron","date":"August 7, 2007","format":false,"excerpt":"Aunque no recomiendo apache para servir archivos estaticos (demasiado overhead, es mejor que le eches un ojo a nginx o a lighttpd), encontre hoy una directiva que puede eliminar un poco el overhead al hacer una llamada directa al sistema -> sendfile. De momento lo que hice en uno de\u2026","rel":"","context":"In &quot;Geeklife&quot;","block_context":{"text":"Geeklife","link":"https:\/\/www.gubatron.com\/blog\/category\/geeklife\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts\/4038","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/comments?post=4038"}],"version-history":[{"count":2,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts\/4038\/revisions"}],"predecessor-version":[{"id":4040,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts\/4038\/revisions\/4040"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/media\/4001"}],"wp:attachment":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/media?parent=4038"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/categories?post=4038"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/tags?post=4038"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}