Red_Hat_Enterprise_Linux-6-Performance_Tuning_Guide-en-US.pdf

(588 KB) Pobierz
Red Hat Enterprise Linux 6
Performance Tuning Guide
Optimizing subsystem throughput in Red Hat Enterprise Linux 6
Red Hat Subject Matter Experts
817139409.015.png 817139409.016.png 817139409.017.png 817139409.018.png 817139409.001.png 817139409.002.png
Performance Tuning Guide
Red Hat Enterprise Linux 6 Performance Tuning Guide
Optimizing subsystem throughput in Red Hat Enterprise Linux 6
Edition 1.0
Author
Red Hat Subject Matter Experts
Editor
Don Domingo
Editor
Laura Bailey
Copyright © 2011 Red Hat, Inc. and others.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons
Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available
at http://creativecommons.org/licenses/by-sa/3.0/ . In accordance with CC-BY-SA, if you distribute this
document or an adaptation of it, you must provide the URL for the original version.
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, MetaMatrix, 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.
All other trademarks are the property of their respective owners.
1801 Varsity Drive
Raleigh, NC 27606-2072 USA
Phone: +1 919 754 3700
Phone: 888 733 4281
Fax: +1 919 754 3701
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.
817139409.003.png 817139409.004.png 817139409.005.png
1. Document Conventions ................................................................................................... v
1.1. Typographic Conventions ...................................................................................... v
1.2. Pull-quote Conventions ........................................................................................ vi
1.3. Notes and Warnings ............................................................................................ vii
2. Getting Help and Giving Feedback ................................................................................. vii
2.1. Do You Need Help? ............................................................................................ vii
2.2. We Need Feedback! ........................................................................................... viii
1.1. Audience ..................................................................................................................... 1
1.2. Horizontal Scalability .................................................................................................... 2
1.2.1. Parallel Computing ............................................................................................ 2
1.3. Distributed Systems ...................................................................................................... 3
1.3.1. Communication .................................................................................................. 3
1.3.2. Storage ............................................................................................................. 4
1.3.3. Converged Networks ......................................................................................... 6
2.1. 64-Bit Support .............................................................................................................. 7
2.2. Ticket Spinlocks ........................................................................................................... 7
2.3. Dynamic List Structure ................................................................................................. 8
2.4. Tickless Kernel ............................................................................................................. 8
2.5. Control Groups ............................................................................................................ 9
2.6. Storage and File System Improvements ...................................................................... 10
3.1. The proc File System ................................................................................................. 13
3.2. GNOME and KDE System Monitors ............................................................................ 13
3.3. Built-in Command-line Monitoring Tools ....................................................................... 14
3.4. Tuned and ktune ........................................................................................................ 15
3.5. Application Profilers .................................................................................................... 15
3.5.1. SystemTap ...................................................................................................... 15
3.5.2. OProfile ........................................................................................................... 16
3.5.3. Valgrind ........................................................................................................... 16
3.5.4. Perf ................................................................................................................. 17
3.6. Red Hat Enterprise MRG ............................................................................................ 17
4.1. CPU and NUMA Topology .......................................................................................... 19
4.1.1. Using numactl and libnuma .............................................................................. 21
4.2. NUMA and Multi-Core Support .................................................................................... 22
4.3. NUMA enhancements in Red Hat Enterprise Linux 6 .................................................... 24
4.3.1. Bare-metal and scalability optimizations ............................................................ 25
4.3.2. Virtualization optimizations ............................................................................... 25
4.4. CPU Scheduler .......................................................................................................... 26
4.4.1. Realtime scheduling policies ............................................................................ 26
4.4.2. Normal scheduling policies ............................................................................... 27
4.4.3. Policy Selection ............................................................................................... 27
4.5. Tuned IRQs ............................................................................................................... 28
5.1. Huge Translation Lookaside Buffer (HugeTLB) ............................................................. 31
5.2. Huge Pages and Transparent Huge Pages .................................................................. 31
5.3. Capacity Tuning ......................................................................................................... 32
5.4. Tuning Virtual Memory ................................................................................................ 34
iii
817139409.006.png 817139409.007.png 817139409.008.png
Performance Tuning Guide
6.1. Features .................................................................................................................... 37
6.2. Analysis ..................................................................................................................... 37
6.3. Tools .......................................................................................................................... 39
6.4. Configuration .............................................................................................................. 43
6.4.1. Completely Fair Queuing (CFQ) ....................................................................... 43
6.4.2. Deadline I/O Scheduler .................................................................................... 45
6.4.3. Noop ............................................................................................................... 45
7.1. Tuning Considerations for File Systems ....................................................................... 49
7.1.1. Formatting Options .......................................................................................... 49
7.1.2. Mount Options ................................................................................................. 50
7.1.3. File system maintenance .................................................................................. 51
7.1.4. Application Considerations ............................................................................... 51
7.2. Profiles for file system performance ............................................................................. 51
7.3. File Systems .............................................................................................................. 52
7.3.1. The Ext4 File System ...................................................................................... 52
7.4. The XFS File System ................................................................................................. 52
7.4.1. Basic tuning for XFS ........................................................................................ 53
7.4.2. Advanced tuning for XFS ................................................................................. 53
7.5. Clustering .................................................................................................................. 56
7.5.1. Global File System 2 ....................................................................................... 56
8.1. Network Performance Enhancements .......................................................................... 59
8.2. Optimized Network Settings ........................................................................................ 60
8.3. Overview of Packet Reception .................................................................................... 62
8.4. Resolving Common Queuing/Frame Loss Issues .......................................................... 63
8.4.1. NIC Hardware Buffer ....................................................................................... 63
8.4.2. Socket Queue ................................................................................................. 64
8.5. Multicast Considerations ............................................................................................. 65
iv
817139409.009.png 817139409.010.png 817139409.011.png
Preface
1. Document Conventions
This manual uses several conventions to highlight certain words and phrases and draw attention to
specific pieces of information.
In PDF and paper editions, this manual uses typefaces drawn from the Liberation Fonts 1 set. The
Liberation Fonts set is also used in HTML editions if the set is installed on your system. If not,
alternative but equivalent typefaces are displayed. Note: Red Hat Enterprise Linux 5 and later includes
the Liberation Fonts set by default.
1.1. Typographic Conventions
Four typographic conventions are used to call attention to specific words and phrases. These
conventions, and the circumstances they apply to, are as follows.
Mono-spaced Bold
Used to highlight system input, including shell commands, file names and paths. Also used to highlight
keycaps and key combinations. For example:
To see the contents of the file my_next_bestselling_novel in your current
working directory, enter the cat my_next_bestselling_novel command at the
shell prompt and press Enter to execute the command.
The above includes a file name, a shell command and a keycap, all presented in mono-spaced bold
and all distinguishable thanks to context.
Key combinations can be distinguished from keycaps by the hyphen connecting each part of a key
combination. For example:
Press Enter to execute the command.
Press Ctrl + Alt + F2 to switch to the first virtual terminal. Press Ctrl + Alt + F1 to
return to your X-Windows session.
The first paragraph highlights the particular keycap to press. The second highlights two key
combinations (each a set of three keycaps with each set pressed simultaneously).
If source code is discussed, class names, methods, functions, variable names and returned values
mentioned within a paragraph will be presented as above, in mono-spaced bold . For example:
File-related classes include filesystem for file systems, file for files, and dir for
directories. Each class has its own associated set of permissions.
Proportional Bold
This denotes words or phrases encountered on a system, including application names; dialog box text;
labeled buttons; check-box and radio button labels; menu titles and sub-menu titles. For example:
Choose System
Mouse from the main menu bar to launch Mouse
Preferences . In the Buttons tab, click the Left-handed mouse check box and click
Preferences
®
®
v
817139409.012.png 817139409.013.png 817139409.014.png
 
Zgłoś jeśli naruszono regulamin