Advanced SUSE Linux Enterprise Server Administration (Course 3038) Chapter 8 Perform a Health Check and Performance Tuning

Similar documents
Exam Name: Red Hat Certified Engineer on Redhat

Sybase Adaptive Server Enterprise on Linux

Linux Hardware Management. Linux System Administration COMP2018 Summer 2017

Exam Actual. Higher Quality. Better Service! QUESTION & ANSWER

Choosing Hardware and Operating Systems for MySQL. Apr 15, 2009 O'Reilly MySQL Conference and Expo Santa Clara,CA by Peter Zaitsev, Percona Inc

RH202. Redhat Certified Technician on Redhat Enterprise Linux 4 (Labs) Exam.

Exam LFCS/Course 55187B Linux System Administration

The kernel constitutes the core part of the Linux operating system. Kernel duties:

Actual4Test. Actual4test - actual test exam dumps-pass for IT exams

The Linux IPL Procedure

SA2 v6 Linux System Administration II Net Configuration, Software, Troubleshooting

Introduction to Linux features for disk I/O

LPI EXAM LPI Level 2 Exam 201, Advanced Level Linux Certification, Part 1 of 2. Buy Full Product.

Question No: 1 In capacity planning exercises, which tools assist in listing and identifying processes of interest? (Choose TWO correct answers.

CompTIA Linux Course Overview. Prerequisites/Audience. Course Outline. Exam Code: XK0-002 Course Length: 5 Days

Linux on zseries Journaling File Systems

CIS 191A Final Exam. Fall CIS 191 Final Exam

Linux Files and the File System

Checking Resource Usage in Fedora (Linux)

At course completion. Overview. Audience profile. Course Outline. : 55187B: Linux System Administration. Course Outline :: 55187B::

File systems and Filesystem quota

Linux+ Guide to Linux Certification, Third Edition. Chapter 2 Linux Installation and Usage

"Charting the Course... MOC B: Linux System Administration. Course Summary

Linux Installation. Prepared by: William Zereneh

Exam Questions RH202

Choosing and Tuning Linux File Systems

FEATURES Journaling File Systems Advanced Linux file systems are bigger, faster, and more reliable by Steve Best

Resource Management on a Mixed Processor Linux Cluster. Haibo Wang. Mississippi Center for Supercomputing Research

We guarantee you can pass any IT certification exam at your first attempt with just hours study of our guides.

client X11 Linux workstation

Prerequisites: General computing knowledge and experience. No prior knowledge with Linux is required. Supported Distributions:

Novell SUSE Linux Enterprise Server

CIT 470: Advanced Network and System Administration. Topics. What is performance testing? Performance Monitoring

exam.30q. Number: Passing Score: 800 Time Limit: 120 min File Version: 1 LPI

Exam : 1Z Title : Enterprise Linux System Administration. Version : DEMO

Mission-Critical Enterprise Linux. April 17, 2006

SA3 E7 Advanced Linux System Administration III Internet Network Services and Security

VERITAS Foundation Suite TM 2.0 for Linux PERFORMANCE COMPARISON BRIEF - FOUNDATION SUITE, EXT3, AND REISERFS WHITE PAPER

Maximizing NFS Scalability

"Charting the Course... Enterprise Linux System Administration Course Summary

A whitepaper from Sybase, an SAP Company. SQL Anywhere I/O Requirements for Windows and Linux

Certification. System Initialization and Services

Oracle Linux 7: System Administration Ed 2 Duration: 5 Days

CompTIA Linux+ Guide to Linux Certification Fourth Edition. Chapter 2 Linux Installation and Usage

Linux for UNIX Administrators

Initialization: runlevels

LPI201 LPIC-2 Exam Prep (Course 1) (LPI201) HL965S

RH133. Red Hat Linux System Administration

IBM Remote Support Manger for Storage

Community Enterprise Operating System (CentOS 7) Courses

Oracle Linux System AdministrationNEW

Part 1 : Getting Familiar with Linux. Hours. Part II : Administering Red Hat Enterprise Linux

Oracle Linux 5 & 6 System Administration TOD

HP-UX System Administration Course Overview. Skills Gained. Who will the Course Benefit?

Open Benchmark Phase 3: Windows NT Server 4.0 and Red Hat Linux 6.0

Parallels Virtuozzo Containers 4.6 for Linux Readme

Oracle Linux 5 & 6 System Administration

1 LINUX KERNEL & DEVICES

CS5460: Operating Systems Lecture 20: File System Reliability

Lab 3a Using the vi editor

Course 55187B Linux System Administration

Rocket RAID 2644 SAS Controller opensuse Linux Installation Guide

Catalogic DPX TM 4.3. ECX 2.0 Best Practices for Deployment and Cataloging

Windows Hardware Performance Tuning for Nastran. Easwaran Viswanathan (Siemens PLM Software)

KillTest 䊾 䞣 催 ࢭ ད ᅌ㖦䊛 ᅌ㖦䊛 NZZV ]]] QORRZKYZ TKZ ϔᑈܡ䊏 ᮄ ࢭ

An Oracle White Paper September Optimizing Oracle Database Performance on Oracle Linux with Flash

Oracle - Oracle Linux 5 6 System Administration Ed 3

System Administration. Startup Process

Oracle Linux 7: System Administration Ed 2 NE

Critical Analysis and last hour guide for RHCSA/RHCE Enterprise 7

Conoscere e ottimizzare l'i/o su Linux. Andrea Righi -

Partitioning and Formatting Guide

Database Hardware Selection Guidelines

Computer Systems Laboratory Sungkyunkwan University

p5 520 server Robust entry system designed for the on demand world Highlights

Linux Installation Planning

CL030 is a csage Certification Preparatory Course!

I/O Management and Disk Scheduling. Chapter 11

Actual4Test. Actual4test - actual test exam dumps-pass for IT exams

Exam Questions Demo LPI. Exam Questions Linux Networking Administration.

The table below lists the domains measured by this examination and the extent to which they are represented in the examination.

IBM Remote Support Manger for Storage

Modern RAID Technology. RAID Primer A Configuration Guide

Linux Performance Tuning

PARALLELS SERVER 4.0 FOR MAC BARE METAL EDITION README

Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition

Vendor: RedHat. Exam Code: RH133. Exam Name: Red Hat Linux System Administration. Version: Demo

Testpassport.

Linux Journaling File System: ext3 Shangyou zeng Physics & Astronomy Dept., Ohio University Athens, OH, 45701

What's New in SUSE LINUX Enterprise Server 9

HP-UX System Administration

The TinyHPC Cluster. Mukarram Ahmad. Abstract

Production Installation and Configuration. Openfiler NSA

Nested Home Lab Setting up Shared Storage

Veritas Storage Foundation Basic - Technical FAQ January 2009

SysadminSG RHCSA Study Guide

Manage Directories and Files in Linux. Objectives. Understand the Filesystem Hierarchy Standard (FHS)

Z-Drive R4 and 4500 Linux Device Driver

Benchmark Study: A Performance Comparison Between RHEL 5 and RHEL 6 on System z

<Insert Picture Here> Filesystem Features and Performance

Transcription:

Advanced SUSE Linux Enterprise Server Administration (Course 3038) Chapter 8 Perform a Health Check and Performance Tuning

Objectives Find Performance Bottlenecks Reduce System and Memory Load Optimize the Storage System Tune the Network Performance Advanced SUSE Linux Enterprise Server Administration (Course 3038) 2

Find Performance Bottlenecks Questions that can help you to find the performance bottleneck What kind of server is affected? What are the exact symptoms of a problem? Does the problem occur at specific times of the day or the week? When and how did the problem start? Who is experiencing the problems? Can the problem be reproduced? Advanced SUSE Linux Enterprise Server Administration (Course 3038) 3

Find Performance Bottlenecks (continued) Objectives Analyze Processes and Processor Utilization Analyze Memory Utilization and Performance Analyze Storage Performance Analyze Network Utilization and Performance Advanced SUSE Linux Enterprise Server Administration (Course 3038) 4

Analyze Processes and Processor Utilization You should look at the processor utilization Measure processor utilization using the system load Use commands such as top or uptime Linux is a multiprocessing operating system CPU can handle one process at a time Kernel puts the running processes into a queue Load value Average number of waiting processes in the process queue in a specific amount of time A process does not always require CPU time CPU waits for I/O processes Advanced SUSE Linux Enterprise Server Administration (Course 3038) 5

Analyze Processes and Processor Utilization (continued) Advanced SUSE Linux Enterprise Server Administration (Course 3038) 6

Analyze Memory Utilization and Performance Applications have to be loaded into memory Before they can be executed by the CPU Memory is controlled by the Memory Management system of the Linux kernel Types of memory Physical memory Swap memory Command free Displays utilization of physical and swap memory Advanced SUSE Linux Enterprise Server Administration (Course 3038) 7

Analyze Memory Utilization and Performance (continued) Command free output example Performance of the whole system is affected When a lot of swap space has to be used Use top command to find programs that use a lot of memory Command vmstat Displays the activity of swap memory Advanced SUSE Linux Enterprise Server Administration (Course 3038) 8

Analyze Memory Utilization and Performance (continued) Command vmstat output example Advanced SUSE Linux Enterprise Server Administration (Course 3038) 9

Analyze Memory Utilization and Performance (continued) Advanced SUSE Linux Enterprise Server Administration (Course 3038) 10

Analyze Storage Performance Can be an issue On systems that face heavy hard disk utilization Discard problems with a too-high system load Or a lack of physical memory System where performance problems are caused by the disk subsystem usually shows Relatively low network and CPU utilization High activity of the installed disks That is not caused by memory paging or swapping Advanced SUSE Linux Enterprise Server Administration (Course 3038) 11

Analyze Storage Performance (continued) Command vmstat Displays the activity of the disk subsystem Example: almost no disk operations Advanced SUSE Linux Enterprise Server Administration (Course 3038) 12

Analyze Storage Performance (continued) Example: high utilization of the disk subsystem Command iostat Determines the average time a program has to wait for data from the disk Syntax iostat -x 1 /dev/hda Advanced SUSE Linux Enterprise Server Administration (Course 3038) 13

Analyze Storage Performance Example: low I/O load (continued) Advanced SUSE Linux Enterprise Server Administration (Course 3038) 14

Analyze Storage Performance Example: high I/O load (continued) Advanced SUSE Linux Enterprise Server Administration (Course 3038) 15

Analyze Storage Performance (continued) Advanced SUSE Linux Enterprise Server Administration (Course 3038) 16

Analyze Network Utilization and Performance Network connection can be a performance bottleneck Monitor network with KDE System Guard Types of sensors Receiver Transmitter Network services can interfere with performance DNS Proxy NFS Advanced SUSE Linux Enterprise Server Administration (Course 3038) 17

Analyze Network Utilization and Performance (continued) Advanced SUSE Linux Enterprise Server Administration (Course 3038) 18

Analyze Network Utilization and Performance (continued) Advanced SUSE Linux Enterprise Server Administration (Course 3038) 19

Analyze Network Utilization and Performance (continued) Advanced SUSE Linux Enterprise Server Administration (Course 3038) 20

Exercise 8-1 Analyze System Performance In this exercise, you will do the following: Part I: Analyze Processor Utilization Part II: Analyze Memory Utilization Part III: Analyze Hard Disk Utilization Part IV: Analyze Network Utilization Advanced SUSE Linux Enterprise Server Administration (Course 3038) 21

Reduce System and Memory Load Objectives Analyze CPU Intensive Applications Run Only Required Software Keep Your Software Up To Date Optimize Swap Partitions Change Hardware Components Advanced SUSE Linux Enterprise Server Administration (Course 3038) 22

Analyze CPU Intensive Applications High system and memory load Often caused by single application top utility Used to find out which process uses the most resources on your system Sometimes a process uses a lot of system resources Because of a faulty implementation Determine this by restarting the process Advanced SUSE Linux Enterprise Server Administration (Course 3038) 23

Run Only Required Software Run a server system without X Saves memory and CPU utilization Switch to runlevel 3 manually init 3 Set the default runlevel to 3 in file /etc/initab id:3:initdefault: Reduce the number of daemon processes Get an overview of the current service configuration chkconfig l Remove a service from the init process chkconfig apache2 off Advanced SUSE Linux Enterprise Server Administration (Course 3038) 24

Run Only Required Software (continued) Reduce the number of daemon processes (continued) Re-enable a service chkconfig apache2 3 Stop a running instance of apache2 rcapache2 stop Advanced SUSE Linux Enterprise Server Administration (Course 3038) 25

Keep Your Software Up to Date Reasons Security issues caused by outdated software Up to date software can improve performance Implementation errors Can lead to a high utilization of system resources Advanced SUSE Linux Enterprise Server Administration (Course 3038) 26

Optimize Swap Partitions On a system with a lot of swapping Add more main memory to enhance performance Make sure you have enough available swap space Old rule: you should have double the size of the physical memory as swap space Key to speeding up the swap space Spread it over several disks Every swap partition has an entry in the file /etc/fstab Priority 1 means kernel can use partitions in parallel Drives should run at the same speed Advanced SUSE Linux Enterprise Server Administration (Course 3038) 27

Change Hardware Components Upgrade the CPU If your system shows a high system load But all other parameters look normal Consider the following before upgrading the CPU Are there significantly faster CPUs available? Are the rest of the system components fast enough for the new CPU? Is the system going to be replaced in the near future? Are other, faster systems available in your organization that could be used instead of the current system? Advanced SUSE Linux Enterprise Server Administration (Course 3038) 28

Change Hardware Components (continued) Upgrade the memory Usually means installing more physical memory How much additional memory you should install Look at the amount of swap space used by the system When the performance problems occur Compare the cost of a memory upgrade With the cost of installing a new system Additional physical memory means more swap space More than 1 GB of swap space does not increase performance significantly Advanced SUSE Linux Enterprise Server Administration (Course 3038) 29

Exercise 8-2 Reduce Resource Utilization In this exercise, you will practice reducing resource utilization Advanced SUSE Linux Enterprise Server Administration (Course 3038) 30

Optimize the Storage System Objectives Configure IDE Drives with hdparm Tune Kernel Parameters Tune File System Access Change Hardware Components Advanced SUSE Linux Enterprise Server Administration (Course 3038) 31

Configure IDE Drives with hdparm Tool hdparm Tunes some settings of IDE hard drives Syntax hdparm -i /dev/had Direct Memory Access (DMA) Data from a disk can be written directly to the main memory of a system without CPU utilization Check the current status of the DMA hdparm -d /dev/had Enable DMA hdparm -d 1 /dev/hda Advanced SUSE Linux Enterprise Server Administration (Course 3038) 32

Configure IDE Drives with hdparm (continued) Advanced SUSE Linux Enterprise Server Administration (Course 3038) 33

Configure IDE Drives with hdparm (continued) Measure the transfer performance of a hard disk hdparm -t /dev/had All changes that are made with hdparm Are active only until the next reboot Make changes permanent by adding them to /etc/init.d/boot.local Advanced SUSE Linux Enterprise Server Administration (Course 3038) 34

Tune Kernel Parameters Tune the IO scheduler Collects requests from the processes and hands them over to the hardware drivers Configure scheduler parameter in file /sys/block/device/queue/iosched/quantum Use echo 6 > /sys/block/hda/queue/iosched/quantum Tradeoff between data throughput and latency Lower value = Shorter latency but lower data throughput Higher value = Longer latency but higher data throughput Advanced SUSE Linux Enterprise Server Administration (Course 3038) 35

Tune Kernel Parameters (continued) Change the read-ahead parameter Read-ahead basically means More data from a file is read than requested by an application Set the read-ahead parameter in the file /sys/block/device/queue/read_ahead_kb Use echo 256 > /sys/block/device/queue/read_ahead_kb Larger values can lead to a better overall throughput With the drawback of a higher latency Advanced SUSE Linux Enterprise Server Administration (Course 3038) 36

Tune Kernel Parameters (continued) Change the swappiness parameter Affects both the memory and the I/O performance Determines when a system starts to swap out data to the disk Can be set in the file /proc/sys/vm/swappiness Use echo 40 > /proc/sys/vm/swappiness Advanced SUSE Linux Enterprise Server Administration (Course 3038) 37

Tune File System Access Disable atime update For every file Linux stores the following information: When the file was created (ctime) When the file was modified the last time (mtime) When the file was accessed the last time (atime) Kernel needs to update the atime attribute Every time a file is accessed If the atime attribute is not important to you You can mount a data partition with the noatime option Advanced SUSE Linux Enterprise Server Administration (Course 3038) 38

Tune File System Access (continued) Implement File System Dependent Tuning Options Mount a Reiser File System with the notail option Syntax Configure the journaling mode of Ext3 Modes data=journal data=ordered data=writeback Syntax Advanced SUSE Linux Enterprise Server Administration (Course 3038) 39

Change Hardware Components From a performance perspective A true SCSI hardware RAID system might be the best choice Compare the costs and the estimated advantages of an upgrade With the purchase of a new system Hardware upgrade always has the risk of creating a new performance bottleneck Advanced SUSE Linux Enterprise Server Administration (Course 3038) 40

Exercise 8-3 Tune an IDE Hard Drive with hdparm In this exercise, you will tune your IDE hard drive. Advanced SUSE Linux Enterprise Server Administration (Course 3038) 41

Tune the Network Performance Objectives Change Kernel Network Parameters Change Your Network Environment Advanced SUSE Linux Enterprise Server Administration (Course 3038) 42

Change Kernel Network Parameters Parameters can be set with the sysctl command You have to be the root user The most important command line parameter is -w You can also access the kernel parameters from the proc file system Which is mounted under /proc Advanced SUSE Linux Enterprise Server Administration (Course 3038) 43

Change Kernel Network Parameters (continued) Advanced SUSE Linux Enterprise Server Administration (Course 3038) 44

Change Kernel Network Parameters (continued) Advanced SUSE Linux Enterprise Server Administration (Course 3038) 45

Change Your Network Environment Suggestions for improving network performance Monitor all other system components Limit the collision domain Check cable quality Check both sides of a connection Change network adapters Upgrade to a faster network type Advanced SUSE Linux Enterprise Server Administration (Course 3038) 46

Summary Regular monitoring of your SLES system Key to identifying bottlenecks Monitor the system load and CPU utilization Processes that use more physical memory than they need (called a memory leak) Lead to reduced performance Disk subsystem may be a bottleneck Malfunctioning, slow, or misconfigured network interfaces can cause performance bottlenecks Advanced SUSE Linux Enterprise Server Administration (Course 3038) 47

Summary (continued) DNS, Proxy, and NFS servers on your network Can indirectly lead to reduced network performance Common solutions to most performance problems Restarting CPU-intensive processes Running SLES without X Reducing the number of running daemon processes Obtaining software updates Using multiple swap partitions Upgrading the CPU Increasing the swap Upgrading the system memory Advanced SUSE Linux Enterprise Server Administration (Course 3038) 48

Summary (continued) Many disk-related performance problems Can be solved by changing a kernel parameter Can disable atime updates for mounted file systems And configure ext3 journaling modes If software-based solutions do not lead to improved disk performance You will need to upgrade your disk hardware Many network-related problems May be solved by changing a kernel parameter in the /proc directory Advanced SUSE Linux Enterprise Server Administration (Course 3038) 49