Red_Hat_Enterprise_Linux-7-Virtualization_Tuning_and_Optimization_Guide-en-US.pdf

(1627 KB) Pobierz
Red Hat Enterprise Linux 7
Virtualization Tuning and
Optimization Guide
Optimizing your virtual environment
Dayle Parker
Scott Radvan
Red Hat Subject Matter Experts
Red Hat Enterprise Linux 7 Virtualization Tuning and Optimization Guide
Optimizing your virtual environment
Dayle Parker
Red Hat Engineering Co ntent Services
dayleparker@redhat.co m
Sco tt Radvan
Red Hat Engineering Co ntent Services
sradvan@redhat.co m
Red Hat Subject Matter Experts
Legal Notice
Copyright © 2013-2014 Red Hat, Inc.
T his 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, 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 T orvalds 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.
T he 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
T he Red Hat Enterprise Linux Virtualization T uning and Optimization Guide covers KVM and
virtualization performance. Within this guide you can find tips and suggestions for making full use of
KVM performance features and options for your host systems and virtualized guests.
Table of Contents
Table of Contents
C . . . . . . . Introduction
. .hapter. 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 . . . . . . . .
.
1.1. KVM Overview
2
1.2. KVM Performance Architecture Overview
2
1.3. Virtualization Performance Features and Improvements
2
C . . . . . . . Virt-manager
. .hapter. 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 . . . . . . . .
.
2.1. Introduction
5
2.2. Operating System Details and Devices
5
2.3. CPU Performance Options
6
2.4. Virtual Disk Performance Options
10
C . . . . . . . . . . . .
. .hapter. 3. tuned. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 . . . . . . . .
..
3.1. Introduction
11
3.2. tuned and tuned-adm
11
C . . . . . . Networking
. .hapter. 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 . . . . . . . .
..
4 .1. Introduction
13
4 .2. Networking T uning T ips
13
4 .3. Virtio and vhost_net
13
4 .4. Device Assignment and SR-IOV
14
4 .5. Network T uning T echniques
14
C . . . . . . . Memory
. .hapter. 5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 . . . . . . . .
..
5.1. Introduction
17
5.2. Memory T uning T ips
17
5.3. Memory T uning on Virtual Machines
17
C . . . . . . . Block . .
. .hapter. 6. . . . . . .I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 . . . . . . . .
..
6.1. Introduction
21
6.2. Block I/O T uning
21
6.3. Caching
22
6.4. I/O Mode
22
6.5. Block I/O T uning T echniques
23
C . . . . . . . NUMA
. .hapter. 7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 . . . . . . . .
..
7.1. Introduction
25
7.2. Memory Allocation Policies
25
7.3. Automatic NUMA Balancing
25
7.4. libvirt NUMA T uning
26
7.5. NUMA-Aware Kernel SamePage Merging (KSM)
31
C . . . . . . . Performance Monitoring T . . .
. .hapter. 8. . . . . . . . . . . . . . . . . . . . . . . . .ools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 . . . . . . . .
..
8.1. Introduction
32
8.2. perf kvm
32
8.3. Virtual Performance Monitoring Unit (vPMU)
34
Revision History
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 . . . . . . . .
..
1
Zgłoś jeśli naruszono regulamin