Optimizing Linux Performance



Similar documents
Web Application s Performance Testing

Linux Profiling and Optimization The Black Art of Linux Performance Tuning. Federico Lucifredi Platform Orchestra Director Novell, INC

PERFORMANCE TUNING ORACLE RAC ON LINUX

SAS Application Performance Monitoring for UNIX

Advanced Linux System Administration on Red Hat

CIT 470: Advanced Network and System Administration. Topics. Performance Monitoring. Performance Monitoring

CIT 668: System Architecture. Performance Testing

VIRTUALIZATION AND CPU WAIT TIMES IN A LINUX GUEST ENVIRONMENT

20 Command Line Tools to Monitor Linux Performance

Delivering Quality in Software Performance and Scalability Testing

These sub-systems are all highly dependent on each other. Any one of them with high utilization can easily cause problems in the other.

KVM PERFORMANCE IMPROVEMENTS AND OPTIMIZATIONS. Mark Wagner Principal SW Engineer, Red Hat August 14, 2011

OS Thread Monitoring for DB2 Server

CS 377: Operating Systems. Outline. A review of what you ve learned, and how it applies to a real operating system. Lecture 25 - Linux Case Study

Virtual Machines. COMP 3361: Operating Systems I Winter

Windows Server Performance Monitoring

MEASURING WORKLOAD PERFORMANCE IS THE INFRASTRUCTURE A PROBLEM?

Removing Performance Bottlenecks in Databases with Red Hat Enterprise Linux and Violin Memory Flash Storage Arrays. Red Hat Performance Engineering

Recommended hardware system configurations for ANSYS users

opensm2 Enterprise Performance Monitoring December 2010 Copyright 2010 Fujitsu Technology Solutions

SIDN Server Measurements

Intel DPDK Boosts Server Appliance Performance White Paper

Gigabit Ethernet Design

Network Diagnostic Tools. Jijesh Kalliyat Sr.Technical Account Manager, Red Hat 15th Nov 2014

Release February 2005

Resource Utilization of Middleware Components in Embedded Systems

Linux Tools for Monitoring and Performance. Khalid Baheyeldin November 2009 KWLUG

Extreme Linux Performance Monitoring Part II

Storage benchmarking cookbook

Chapter 14 Analyzing Network Traffic. Ed Crowley

Computer-System Architecture

Chapter 11 I/O Management and Disk Scheduling

Performance Tuning and Optimizing SQL Databases 2016

Multi-core Programming System Overview

Performance Evaluation of Linux Bridge

Operating Systems. Design and Implementation. Andrew S. Tanenbaum Melanie Rieback Arno Bakker. Vrije Universiteit Amsterdam

Outline. Operating Systems Design and Implementation. Chap 1 - Overview. What is an OS? 28/10/2014. Introduction

Get quick control over your Linux server with server commands

TRACE PERFORMANCE TESTING APPROACH. Overview. Approach. Flow. Attributes

Chapter 3 Operating-System Structures

Configuring Your Computer and Network Adapters for Best Performance

Server Management Tools (ASMT)

Have both hardware and software. Want to hide the details from the programmer (user).

Monitoring, Tracing, Debugging (Under Construction)

10 STEPS TO YOUR FIRST QNX PROGRAM. QUICKSTART GUIDE Second Edition

Storage. The text highlighted in green in these slides contain external hyperlinks. 1 / 14

Application Compatibility Best Practices for Remote Desktop Services

evm Virtualization Platform for Windows

ELEC 377. Operating Systems. Week 1 Class 3

Audit & Tune Deliverables

IBM Tivoli Monitoring Version 6.3 Fix Pack 2. Infrastructure Management Dashboards for Servers Reference

Operating System Tutorial

Davor Guttierrez 3 Gen d.o.o. Optimizing Linux Servers

Distribution One Server Requirements

Virtual Memory Behavior in Red Hat Linux Advanced Server 2.1

Real-Time Scheduling 1 / 39

Determining the Correct Usage of Swap in Linux * 2.6 Kernels

Performance Evaluation of VMXNET3 Virtual Network Device VMware vsphere 4 build

Linux System Administration on Red Hat

About Forum Howtos & FAQs Low graphics Shell Scripts RSS/Feed. nixcraft - insight into linux admin work Home > CentOS. by Vivek Gite 134 comments

Performance Testing. Configuration Parameters for Performance Testing

Proposal for Virtual Private Server Provisioning

The Lagopus SDN Software Switch. 3.1 SDN and OpenFlow. 3. Cloud Computing Technology

Best Practices for Monitoring Databases on VMware. Dean Richards Senior DBA, Confio Software

Example of Standard API

How To Monitor And Test An Ethernet Network On A Computer Or Network Card

Agenda. Enterprise Application Performance Factors. Current form of Enterprise Applications. Factors to Application Performance.

WHITE PAPER FUJITSU PRIMERGY SERVER BASICS OF DISK I/O PERFORMANCE

Notes and terms of conditions. Vendor shall note the following terms and conditions/ information before they submit their quote.

Performance Monitoring and Tuning. Liferay Chicago User Group (LCHIUG) James Lefeu 29AUG2013

Performance Tuning Guidelines for PowerExchange for Microsoft Dynamics CRM

Performance of Software Switching

Objectives. Chapter 2: Operating-System Structures. Operating System Services (Cont.) Operating System Services. Operating System Services (Cont.

theguard! ApplicationManager System Windows Data Collector

Geospatial Server Performance Colin Bertram UK User Group Meeting 23-Sep-2014

CPS104 Computer Organization and Programming Lecture 18: Input-Output. Robert Wagner

TCP Servers: Offloading TCP Processing in Internet Servers. Design, Implementation, and Performance

Cloud Server. Parallels. Key Features and Benefits. White Paper.

How good can databases deal with Netflow data

find model parameters, to validate models, and to develop inputs for models. c 1994 Raj Jain 7.1

Container-based operating system virtualization: a scalable, high-performance alternative to hypervisors

MED 0115 Optimizing Citrix Presentation Server with VMware ESX Server

pc resource monitoring and performance advisor

OPERATING SYSTEM - VIRTUAL MEMORY

Rackspace Cloud Databases and Container-based Virtualization

Knut Omang Ifi/Oracle 19 Oct, 2015

Virtual vs Physical Addresses

farmerswife Contents Hourline Display Lists 1.1 Server Application 1.2 Client Application farmerswife.com

Network Management and Monitoring Software

- An Essential Building Block for Stable and Reliable Compute Clusters

Chapter 2 System Structures

Overlapping Data Transfer With Application Execution on Clusters

Process Description and Control william stallings, maurizio pizzonia - sistemi operativi

Virtualization of Linux based computers: the Linux-VServer project

<Insert Picture Here> Introducing Oracle VM: Oracle s Virtualization Product Strategy

System Resources. To keep your system in optimum shape, you need to be CHAPTER 16. System-Monitoring Tools IN THIS CHAPTER. Console-Based Monitoring

Virtualization. Dr. Yingwu Zhu

Users are Complaining that the System is Slow What Should I Do Now? Part 1

Transcription:

Optimizing Linux Performance

Why is Performance Important Regular desktop user Not everyone has the latest hardware Waiting for an application to open Application not responding Memory errors Extra kernel paging Efficient application simply runs on more systems, is usable by more people

Contd Do more work with fewer resources Run on older hardware Save users time Higher quality of service for more users Need to be a detective to find performance issues, not a hardcore programmer

Linux Unprecedented access to source code v/s proprietary windows Has powerful performance tools Not centralized however Some are distro standardized Most tools are freelanced Specific tool for specific task Multiple tools for same task

Performance Investigation Find a metric, baseline, and target What is the current system performance? What should it be? Webserver example How many page requests per second does it serve? How many should it be serving? Find a similar configured system that performs well and compare

Contd Track down the approximate problem See whether problem has already been solved Bug report results Mailing lists Email the developer

Isolate the problem Contd Run same performance tool on a good system and yours and compare Change one thing at a time Have a changelist with results Always re-measure after optimizing Make sure no new problems crop up

Performance information: CPU Run Queue statistics Processes competing for CPU time I/O blocks Load average Context switches Kernel scheduling Interrupts /proc/interrupts CPU Utilization

Performance Tools: CPU Vmstat (Virtual Memoy Statistics) # processes, CPU utilization, # interrupts, # context switches Oprofile:Details of CPU utilization Top:Swiss army knife of system monitoring

Other top options: d = Delay n = iterations i = do not display processes that are not using any of the cpu Procinfo cleaner output than vmstat

Other procinfo options:procinfo -f runs in full screen -d displays statistics change between samples rather than totals -n sec Number of seconds to stop between each sample Gnome-system-monitor (graphical) Mpstat (Multiprocessor statistics) options Mpstat p {cpu all} Mpstat delay

Sar (System Activity Reporter) Stores information in a binary file to be replayed later

Performance Information: Memory Memory subsystem (Virtual memory) Swapd Total amount of memory currently swapped to disk. Buffers and Cache Too Much physical memory Active v/s Inactive memory Managing paging Processor and high v/s low memory 32 bit addressing more than 1 gb of memory

Performance Tools: Memory Vmstat Swap information, memory free and used Top Run time toggles sort via memory Procinfo Paging information Free How is the system using memory

Slabtop Kernel allocated caches and how full they are Sar /proc/meminfo

Performance Information: Process specific CPU Application runtime Kernel or user or library routines Application profiling Kernel time v/s user time Library time v/s application time Subdividing application time

Ps Dynamic process information Other options -A all options -e all processes r only running processes etc

Performance Tools: Process Specific CPU Time Can be used with the application switch Strace Trace system calls of an application Ltrace Trace library calls of an application Gprof Profile applications (overhead issue, needs to recompile) Oprofile Profile applications process level sampling

Performance Information: I/O Total amount and type (read/write) of disk I/O on a system Which devices are servicing most of the disk Effectiveness of a disk responding to I/O requests Which processes are using a given set of files

Performance Tools: I/O Vmstat Block/sector read/write information Iostat Per device, per partition breakdown Sar Lesser functionality than iostat but can simultaneously record many different types of statistics Lsof Which processes use which file

Performance Information: Network Speed and duplex settings of interfaces Amount of network traffic over each interface Types of IP traffic flowing in and out of the system Amount of each type of IP traffic Which applications are generating IP traffic

Performance Tools: Network Mii-tool and ethtool - Interface configuration information Ifconfig - Configuration and Packet information Ip - Performance statistics Sar - Detailed network information Gkrellm - Graphical real time monitor Iptraf - Specific monitoring Netstat - Sockets and packet information Etherape - Network connection information

Optimizing an application Memory Is memory usage a problem? Top or ps What type of memory is it using? Cat /proc/<pid>/status Large VmStk? Use gdb and find out which function is using most of the stack Large VmExe? Use nm and remove large symbol code Large VmLib? Use /proc/<pid>/map and streamline large library usage Can also use memory profiler of the programming language

Start up time Contd Is application start up time slow? Is loader the problem? Use ld and reduce the number and size of libraries linked Large CPU usage? Use gprof or oprofile to measure critical functions repeatedly Add switches to speed up after looking at gprof information or edit code

Contd I/O Is the disk usage a problem? Run iostat and look for overload Spread these files to multiple disks Which function is causing large amount of disk I/O? Which files are accessed most? Use strace and track system calls, spread this evenly between disks or a faster disk

Network Contd Is network usage a problem? Use ethtool and check the interface limit Use iptraf and look at the traffic Use ifconfig to check for packet errors Use netstat and find out which application is using that port and generating traffic Use strace and find out which application socket is responsible for the traffic