Red Hat Enterprise Linux 6

Performance Tuning Guide

Optimizing subsystem throughput in Red Hat Enterprise Linux 6

Red Hat Subject Matter Experts

Edited by

Marek Suchánek

Red Hat Customer Content Services

Milan Navratil

Red Hat Customer Content Services

Don Domingo

Red Hat Customer Content Services

Laura Bailey

Red Hat Customer Content Services

Legal Notice

Copyright © 2017 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.


The Performance Tuning Guide describes how to optimize the performance of a system running Red Hat Enterprise Linux 6. It also documents performance-related upgrades in Red Hat Enterprise Linux 6.
While this guide contains procedures that are field-tested and proven, Red Hat recommends that you properly test all planned configurations in a testing environment before applying it to a production environment. You should also back up all your data and pre-tuning configurations.
1. Document Conventions
1.1. Typographic Conventions
1.2. Pull-quote Conventions
1.3. Notes and Warnings
2. Getting Help and Giving Feedback
2.1. Do You Need Help?
2.2. We Need Feedback
1. Overview
1.1. How to read this book
1.1.1. Audience
1.2. Release overview
1.2.1. New features in Red Hat Enterprise Linux 6
1.2.2. Horizontal Scalability
1.2.3. Distributed Systems
2. Red Hat Enterprise Linux 6 Performance Features
2.1. 64-Bit Support
2.2. Ticket Spinlocks
2.3. Dynamic List Structure
2.4. Tickless Kernel
2.5. Control Groups
2.6. Storage and File System Improvements
3. Monitoring and Analyzing System Performance
3.1. The proc File System
3.2. GNOME and KDE System Monitors
3.3. Performance Co-Pilot (PCP)
3.4. irqbalance
3.5. Built-in Command-line Monitoring Tools
3.5.1. Getting Information about Pages paged in and Pages paged out
3.6. Tuned and ktune
3.7. Application Profilers
3.7.1. SystemTap
3.7.2. OProfile
3.7.3. Valgrind
3.7.4. Perf
3.8. Red Hat Enterprise MRG
4. CPU
4.1. CPU Topology
4.1.1. CPU and NUMA Topology
4.1.2. Tuning CPU Performance
4.1.3. Hardware performance policy (x86_energy_perf_policy)
4.1.4. turbostat
4.1.5. numastat
4.1.6. NUMA Affinity Management Daemon (numad)
4.1.7. Dynamic Resource Affinity on Power Architecture
4.2. CPU Scheduling
4.2.1. Realtime scheduling policies
4.2.2. Normal scheduling policies
4.2.3. Policy Selection
4.3. Interrupts and IRQ Tuning
4.4. CPU Frequency Governors
4.5. Enhancements to NUMA in Red Hat Enterprise Linux 6
4.5.1. Bare-metal and Scalability Optimizations
4.5.2. Virtualization Optimizations
5. Memory
5.1. Huge Translation Lookaside Buffer (HugeTLB)
5.2. Huge Pages and Transparent Huge Pages
5.2.1. Configure Huge Pages
5.3. Using Valgrind to Profile Memory Usage
5.3.1. Profiling Memory Usage with Memcheck
5.3.2. Profiling Cache Usage with Cachegrind
5.3.3. Profiling Heap and Stack Space with Massif
5.4. Capacity Tuning
5.5. Tuning Virtual Memory
5.6. KSM
6. Input/Output
6.1. Features
6.2. Analysis
6.3. Tools
6.4. Configuration
6.4.1. Completely Fair Queuing (CFQ)
6.4.2. Deadline I/O Scheduler
6.4.3. Noop
7. File Systems
7.1. Tuning Considerations for File Systems
7.1.1. Formatting Options
7.1.2. Mount Options
7.1.3. File system maintenance
7.1.4. Application Considerations
7.2. Profiles for file system performance
7.3. File Systems
7.3.1. The Ext4 File System
7.3.2. The XFS File System
7.4. CIFS
7.5. Clustering
7.5.1. Global File System 2
8. Networking
8.1. Network Performance Enhancements
8.2. Optimized Network Settings
8.3. Overview of Packet Reception
8.4. Resolving Common Queuing/Frame Loss Issues
8.4.1. NIC Hardware Buffer
8.4.2. Socket Queue
8.5. Multicast Considerations
8.6. Receive-Side Scaling (RSS)
8.7. Receive Packet Steering (RPS)
8.8. Receive Flow Steering (RFS)
8.9. Accelerated RFS
8.10. NIC Offloads
8.10.1. Using NIC Offloads
A. Revision History