{"id":13760,"date":"2019-04-06T02:26:04","date_gmt":"2019-04-06T02:26:04","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=13760"},"modified":"2019-04-06T02:26:04","modified_gmt":"2019-04-06T02:26:04","slug":"tuned-automatic-performance-tuning-of-centos-rhel-servers","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/04\/06\/tuned-automatic-performance-tuning-of-centos-rhel-servers\/","title":{"rendered":"Tuned \u2013 Automatic Performance Tuning of CentOS\/RHEL Servers"},"content":{"rendered":"<p>To maximize the end-to-end performance of services, applications and databases on a server, system administrators usually carry out custom performance tunning, using various tools, both generic operating system tools as well as third-party tools. One of the most useful performance tuning tools on\u00a0<strong>CentOS\/RHEL\/Fedora Linux<\/strong>\u00a0is\u00a0<strong>Tuned<\/strong>.<\/p>\n<p><strong>Read Also<\/strong>:\u00a0<a href=\"https:\/\/www.tecmint.com\/command-line-tools-to-monitor-linux-performance\/\" target=\"_blank\" rel=\"noopener\">20 Commad Line Tools Monitor Linux Performance<\/a><\/p>\n<p><strong>Tuned<\/strong>\u00a0is a powerful daemon for dynamically auto-tuning Linux server performance based on information it gathers from monitoring use of system components, to squeeze maximum performance out of a server.<\/p>\n<p>It does this by tuning system settings dynamically on the fly depending on system activity, using tuning profiles. Tuning profiles include sysctl configs, disk-elevators configs, transparent hugepages, power management options and your custom scripts.<\/p>\n<p>By default\u00a0<strong>tuned<\/strong>\u00a0will not dynamically adjust system settings, but you can modify how the tuned daemon operates and allow it to dynamically alter settings based on system usage. You can use the\u00a0<strong>tuned-adm<\/strong>command-line tool to manage the daemon once it is running.<\/p>\n<h3>How to Install Tuned on CentOS\/RHEL &amp; Fedora<\/h3>\n<p>On\u00a0<strong>CentOS\/RHEL 7<\/strong>\u00a0and\u00a0<strong>Fedora<\/strong>,\u00a0<strong>tuned<\/strong>\u00a0comes pre-installed and activated by default, but on older version of\u00a0<strong>CentOS\/RHEL 6.x<\/strong>, you need to install it using the following\u00a0<a href=\"https:\/\/www.tecmint.com\/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement\/\" target=\"_blank\" rel=\"noopener\">yum command<\/a>.<\/p>\n<pre># yum install tuned\r\n<\/pre>\n<p>After the installation, you will find following important tuned configuration files.<\/p>\n<ul>\n<li><strong>\/etc\/tuned<\/strong>\u00a0\u2013 tuned configuration directory.<\/li>\n<li><strong>\/etc\/tuned\/tuned-main.conf<\/strong>\u2013 tuned mail configuration file.<\/li>\n<li><strong>\/usr\/lib\/tuned\/<\/strong>\u00a0\u2013 stores a sub-directory for all tuning profiles.<\/li>\n<\/ul>\n<p>Now you can start or manage the\u00a0<strong>tuned<\/strong>\u00a0service using following commands.<\/p>\n<pre><strong>--------------- On RHEL\/CentOS 7 ---------------<\/strong> \r\n# systemctl start tuned\t        \r\n# systemctl enable tuned\t\r\n# systemctl status tuned\t\r\n# systemctl stop tuned\t\t\r\n\r\n<strong>--------------- On RHEL\/CentOS 6 ---------------<\/strong>\r\n# service tuned start\r\n# chkconfig tuned on\r\n# service tuned status\r\n# service tuned stop\r\n<\/pre>\n<p>Now you can control tuned using the\u00a0<strong>tunde-adm<\/strong>\u00a0tool. There are a number of predefined tuning profiles already included for some common use cases. You can check the current active profile with following command.<\/p>\n<pre># tuned-adm active\r\n<\/pre>\n<p>From the output of the above command, the test system (which is a\u00a0<a href=\"https:\/\/www.linode.com\/?r=64ebb9f723fed8b32fda84b6594006df08ad24b6\" target=\"_blank\" rel=\"nofollow noopener\">Linode VPS<\/a>) is optimized for running as a virtual guest.<\/p>\n<div id=\"attachment_29893\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/06\/check-current-tuned-profile.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29893\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/06\/check-current-tuned-profile.png\" alt=\"Check Current Tuned Profile\" width=\"472\" height=\"59\" aria-describedby=\"caption-attachment-29893\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-29893\" class=\"wp-caption-text\">Check Current Tuned Profile<\/p>\n<\/div>\n<p>You can get a list of available tuning profiles using following command.<\/p>\n<pre># tuned-adm list\r\n<\/pre>\n<div id=\"attachment_29894\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/06\/list-available-tuned-profiles-for-various-use-cases.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29894\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/06\/list-available-tuned-profiles-for-various-use-cases.png\" sizes=\"auto, (max-width: 982px) 100vw, 982px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/06\/list-available-tuned-profiles-for-various-use-cases.png 982w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/06\/list-available-tuned-profiles-for-various-use-cases-768x254.png 768w\" alt=\"List Available Tuned Profiles\" width=\"982\" height=\"325\" aria-describedby=\"caption-attachment-29894\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-29894\" class=\"wp-caption-text\">List Available Tuned Profiles<\/p>\n<\/div>\n<p>To switch to any of the available profiles for example\u00a0<strong>throughput-performance<\/strong>\u00a0\u2013 a tuning which results into excellent performance across a variety of common server workloads.<\/p>\n<pre># tuned-adm  profile throughput-performance\r\n# tuned-adm active\r\n<\/pre>\n<div id=\"attachment_29895\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/06\/switch-to-another-tuning-profile.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29895\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/06\/switch-to-another-tuning-profile.png\" alt=\"Switch to Tuning Profile\" width=\"652\" height=\"78\" aria-describedby=\"caption-attachment-29895\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-29895\" class=\"wp-caption-text\">Switch to Tuning Profile<\/p>\n<\/div>\n<p>To use the recommended profile for your system, run the following command.<\/p>\n<pre># tuned-adm recommend\r\n<\/pre>\n<p>And you can disable all tuning as shown.<\/p>\n<pre> \r\n# tuned-adm off\r\n<\/pre>\n<h3>How To Create Custom Tuning Profiles<\/h3>\n<p>You can also create new profiles, we will create a new profile called\u00a0<strong>test-performance<\/strong>\u00a0which will use settings from an existing profile called\u00a0<strong>latency-performance<\/strong>.<\/p>\n<p>Switch into the path which stores sub-directories for all tuning profiles, create a new sub-directory called\u00a0<strong>test-performance<\/strong>\u00a0for your custom tuning profile there.<\/p>\n<pre># cd \/usr\/lib\/tuned\/\r\n# mkdir test-performance\r\n<\/pre>\n<p>Then create a\u00a0<strong>tuned.conf<\/strong>\u00a0configuration file in the directory.<\/p>\n<pre># vim test-performance\/tuned.conf\r\n<\/pre>\n<p>Copy and paste the following configuration in the file.<\/p>\n<pre>[main]\r\ninclude=latency-performance\r\nsummary=Test profile that uses settings for latency-performance tuning profile\r\n<\/pre>\n<p>Save the file and close it.<\/p>\n<p>If you run the tuned-adm list command again, the new tuning profile should exist in the list of available profiles.<\/p>\n<pre># tuned-adm list\r\n<\/pre>\n<div id=\"attachment_29896\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/06\/check-if-new-tuning-profile-is-listed.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29896\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/06\/check-if-new-tuning-profile-is-listed.png\" sizes=\"auto, (max-width: 1032px) 100vw, 1032px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/06\/check-if-new-tuning-profile-is-listed.png 1032w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/06\/check-if-new-tuning-profile-is-listed-768x228.png 768w\" alt=\"Check New Tuned Profile\" width=\"1032\" height=\"306\" aria-describedby=\"caption-attachment-29896\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-29896\" class=\"wp-caption-text\">Check New Tuned Profile<\/p>\n<\/div>\n<p>To activate new tuned profile, issue following command.<\/p>\n<pre># tuned-adm  profile test-performance\r\n<\/pre>\n<p>For more information and further tinkering options, see the\u00a0<strong>tuned<\/strong>\u00a0and\u00a0<strong>tuned-adm<\/strong>\u00a0man pages.<\/p>\n<pre># man tuned\r\n# man tuned-adm\r\n<\/pre>\n<p><strong>Tuned Github repository<\/strong>:\u00a0<a href=\"https:\/\/github.com\/fcelda\/tuned\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/github.com\/fcelda\/tuned<\/a><\/p>\n<p>That\u2019s all for now!\u00a0<strong>Tuned<\/strong>\u00a0is a daemon that monitors usage of system components and dynamically auto-tunes a Linux server for maximum performance. If you have any questions or thoughts to share, use the feedback form below to reach us.<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/tuned-automatic-performance-tuning-of-centos-rhel-servers\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To maximize the end-to-end performance of services, applications and databases on a server, system administrators usually carry out custom performance tunning, using various tools, both generic operating system tools as well as third-party tools. One of the most useful performance tuning tools on\u00a0CentOS\/RHEL\/Fedora Linux\u00a0is\u00a0Tuned. Read Also:\u00a020 Commad Line Tools Monitor Linux Performance Tuned\u00a0is a powerful &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/04\/06\/tuned-automatic-performance-tuning-of-centos-rhel-servers\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Tuned \u2013 Automatic Performance Tuning of CentOS\/RHEL Servers&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-13760","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13760","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=13760"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13760\/revisions"}],"predecessor-version":[{"id":13761,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13760\/revisions\/13761"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=13760"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=13760"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=13760"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}