Performance Tuning Guide
Total Page:16
File Type:pdf, Size:1020Kb
Red Hat Enterprise Linux 7 Performance Tuning Guide Optimizing subsystem throughput in Red Hat Enterprise Linux 7 Red Hat Subject Matter ExpertsLaura Bailey Charlie Boyle Red Hat Enterprise Linux 7 Performance Tuning Guide Optimizing subsystem throughput in Red Hat Enterprise Linux 7 Laura Bailey Red Hat Customer Content Services Charlie Boyle Red Hat Customer Content Services Red Hat Subject Matter Experts Edited by Milan Navrátil Red Hat Customer Content Services [email protected] Legal Notice Copyright © 2016 Red Hat, Inc. and others. This document is licensed by Red Hat under the Creative Commons Attribution-ShareAlike 3.0 Unported License. If you distribute this document, or a modified version of it, you must provide attribution to Red Hat, Inc. and provide a link to the original. If the document is modified, all Red Hat trademarks must be removed. Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law. Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries. Linux ® is the registered trademark of Linus Torvalds in the United States and other countries. Java ® is a registered trademark of Oracle and/or its affiliates. XFS ® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries. MySQL ® is a registered trademark of MySQL AB in the United States, the European Union and other countries. Node.js ® is an official trademark of Joyent. Red Hat Software Collections is not formally related to or endorsed by the official Joyent Node.js open source or commercial project. The OpenStack ® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community. All other trademarks are the property of their respective owners. Abstract The Red Hat Enterprise Linux 7 Performance Tuning Guide explains how to optimize Red Hat Enterprise Linux 7 performance. It also documents performance-related upgrades in Red Hat Enterprise Linux 7. The Performance Tuning Guide presents only field-tested and proven procedures. Nonetheless, all prospective configurations should be set up and tested in a testing environment before being applied to a production system. Backing up all data and configuration settings prior to tuning is also recommended. T able of Cont ent s Table of Contents .C .h .a .p . t.e .r . 1. .. I.n .t .r o. .d .u .c .t .i o. n. 3. Who Sho uld Read This Bo o k 3 .C .h .a .p . t.e .r . 2. .. P. e. r. f.o .r .m . a. n. c. e. .M . o. n. .i t.o . r.i n. g. T. o. .o .l s. 4. 2.1. /p ro c 4 2.2. GNOME System Mo nito r 4 2.3. Perfo rmance Co -Pilo t (PCP) 5 2.4. Tuna 5 2.5. Built in co mmand line to o ls 5 2.6 . p erf 7 2.7. turb o stat 7 2.8 . io stat 7 2.9 . irq b alance 7 2.10 . ss 8 2.11. numastat 8 2.12. numad 8 2.13. SystemTap 9 2.14. OPro file 9 2.15. Valg rind 10 .C .h .a .p . t.e .r . 3. .. T. u. .n .e .d . 1. 1. 3.1. Tuned Overview 11 3.2. Perfo rmance Tuning with tuned and tuned -ad m 21 .C .h .a .p . t.e .r . 4. .. C. P. .U . 2. 5. 4.1. Co nsid eratio ns 25 4.2. Mo nito ring and d iag no sing p erfo rmance p ro b lems 30 4.3. Co nfig uratio n sug g estio ns 31 .C .h .a .p . t.e .r . 5. .. M. .e .m . o. r.y . 3. 7. 5.1. Co nsid eratio ns 37 5.2. Mo nito ring and d iag no sing p erfo rmance p ro b lems 37 5.3. Co nfig uring Hug eTLB hug e p ag es 41 5.4. Co nfig uring Transp arent Hug e Pag es 44 5.5. Co nfig uring system memo ry cap acity 44 .C .h .a .p . t.e .r . 6. .. S. t. o. r. a. g. e. .a .n .d . .F .i l.e . S. y. s. t. e. m. .s . 4. 9. 6 .1. Co nsid eratio ns 49 6 .2. Mo nito ring and d iag no sing p erfo rmance p ro b lems 55 6 .3. Co nfig uratio n to o ls 57 .C .h .a .p . t.e .r . 7. .. N. .e .t w. .o .r .k i.n . g. 6. 8. 7.1. Co nsid eratio ns 6 8 7.2. Mo nito ring and d iag no sing p erfo rmance p ro b lems 6 9 7.3. Co nfig uratio n to o ls 70 .A .p .p . e. n. d. i.x . A. .T .o . o. l. R. .e .f e. r.e .n . c. e. 7. 7. A.1. irq b alance 77 A.2. Tuna 78 A.3. ethto o l 8 0 A.4. ss 8 0 A.5. tuned 8 0 A.6 . tuned -ad m 8 1 A.7. p erf 8 2 1 Performance T uning Guide A.7. p erf 8 2 A.8 . Perfo rmance Co -Pilo t (PCP) 8 3 A.9 . vmstat 8 4 A.10 . x8 6 _energ y_p erf_p o licy 8 5 A.11. turb o stat 8 6 A.12. numastat 8 7 A.13. numactl 8 9 A.14. numad 8 9 A.15. OPro file 9 1 A.16 . taskset 9 2 A.17. SystemTap 9 2 .A .p .p . e. n. d. i.x . B. .. .R . e. v. i.s .i o. n. .H . i.s .t .o .r y. 9. 3. 2 Chapt er 1 . Int roduct ion Chapter 1. Introduction See the Release Notes for the latest minor version of Red Hat Enterprise Linux 7 to learn about the newest features. To learn about features introduced in earlier releases, see the Release Notes for respective minor versions of Red Hat Enterprise Linux 7. The Performance Tuning Guide is a comprehensive guide to optimizing the various sub-systems that make up Red Hat Enterprise Linux 7 for specific purposes. This guide also outlines the performance monitoring and tuning tools available in Red Hat Enterprise Linux 7. Before you begin tuning, Red Hat has the following important recommendations: Back up before you configure The default settings in Red Hat Enterprise Linux 7 are suitable for most services running under moderate loads. Improving the performance of a specific sub-system may affect another system adversely. Back up all data and configuration information before you begin tuning your system. Test configuration out of production The procedures documented in the Performance Tuning Guide are tested extensively by Red Hat engineers in both lab and field. Nonetheless, Red Hat recommends testing all planned configurations in a secure testing environment before applying those configurations to production systems. Who Should Read T his Book The Performance Tuning Guide has been written primarily for two distinct but overlapping audiences: System administrators The Performance Tuning Guide documents the effects of each configuration option in detail so that system administrators can optimize Red Hat Enterprise Linux 7 for their specific purpose. Procedures in this guide are suitable for system administrators with Red Hat Certified Engineer (RHCE) certification or an equivalent amount of experience (3–5 years' experience deploying and managing Linux-based systems). System and business analysts This guide explains.