Acegene IT Co. Ltd.1 Linux 操作系统 系统优化 周炯上海艾基信息技术有限公司.

Slides:



Advertisements
Similar presentations
Unix Systems Performance Tuning Project of COSC 513 Name: Qinghui Mu Instructor: Prof. Anvari.
Advertisements

Module 13: Performance Tuning. Overview Performance tuning methodologies Instance level Database level Application level Overview of tools and techniques.
INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Performance And Tuning – Lecture 7 Copyright System Managers LLC 2007 all rights reserved.
Capacity Planning and Predicting Growth for Vista Amy Edwards, Ezra Freeloe and George Hernandez University System of Georgia 2007.
Using netstat for Performance Analysis
Chapter 14 Chapter 14: Server Monitoring and Optimization.
Memory Management 2010.
Performance Tuning By Samriti Uppal Dec 1 st, 2004.
Performance Analysis and Tuning Presented by Carol ThornborrowPresented by Carol Thornborrow.
Measuring Performance Chapter 12 CSE807. Performance Measurement To assist in guaranteeing Service Level Agreements For capacity planning For troubleshooting.
Memory Management April 28, 2000 Instructor: Gary Kimura.
SUSE Linux Enterprise Server Administration (Course 3037) Chapter 1 Introduction to Managing the SUSE Linux Enterprise Server.
RESOURCE MANAGEMENT System Resources. What resources are managed in a computer system?
Module 8: Monitoring SQL Server for Performance. Overview Why to Monitor SQL Server Performance Monitoring and Tuning Tools for Monitoring SQL Server.
Jiapeng Xiu Chapter 3 Memory Management Chapter 3 Memory Management —— Solaris Memory Monitor.
Basics of Operating Systems March 4, 2001 Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard.
Oracle Memory Configuration on Windows Server Configuring Large Memory for Oracle on 32-bit and 64-bit Windows.
By Matthew Smith, John Allred, Chris Fulton. Requirements Relocation Protection Sharing Logical Organization Physical Organization.
Acceleratio Ltd. is a software development company based in Zagreb, Croatia, founded in We create innovative software solutions for SharePoint,
New SA Training Topic 9: Logging, Monitoring, and Performance  Logging  Windows – “Auditing”  Linux – syslog  Monitoring  MRTG  Big Brother  Performance.
Chapter 8 Windows Outline Programming Windows 2000 System structure Processes and threads in Windows 2000 Memory management The Windows 2000 file.
CIT 470: Advanced Network and System AdministrationSlide #1 CIT 470: Advanced Network and System Administration Performance Monitoring.
CIT 470: Advanced Network and System AdministrationSlide #1 CIT 470: Advanced Network and System Administration Performance Monitoring.
Fall 2011 Nassau Community College ITE153 – Operating Systems 1 Session 4 More Hands-on Commands.
Computing and the Web Operating Systems. Overview n What is an Operating System n Booting the Computer n User Interfaces n Files and File Management n.
Hp education services education.hp.com 12 Performance Tools Version B.02 H4262S Module 2 Slides.
Oracle Tuning Considerations. Agenda Why Tune ? Why Tune ? Ways to Improve Performance Ways to Improve Performance Hardware Hardware Software Software.
Guide to Linux Installation and Administration, 2e1 Chapter 10 Managing System Resources.
Troubleshooting and Performance
Hp education services education.hp.com 67 CPU Management Version B.02 H4262S Module 5 Slides.
Lecture – Performance Performance management on UNIX.
Chapter 4 Memory Management Virtual Memory.
Chapter 10 System Monitoring Issues Performance Benchmarks NT Server Services Users and Server Access Information Task Manager for Applications Ram and.
Cosc 4750 Maintenance & Analysis. Maintenance Contracts Annual cost of 10%-12% of component’s list price. On-site maintenance –usually within hours.
OSes: 3. OS Structs 1 Operating Systems v Objectives –summarise OSes from several perspectives Certificate Program in Software Development CSE-TC and CSIM,
Chapter 6: Using The Windows Performance and Reliability Monitor.
UNIX Unit 1- Architecture of Unix - By Pratima.
Linux Operations and Administration Chapter Twenty Advanced Linux Administration.
UNIX & Windows NT Name: Jing Bai ID: Date:8/28/00.
System Administration. Logging in as System Administrator System Admin login (aka superuser, aka root) –login id: root –Default PS1 prompt: # –Home directory:
Linux Kernel Programming (LKP). LKP New sub-course New sub-course We will learn together We will learn together Evaluation of this part of course will.
Performance Analysis. Computer Center, CS, NCTU 2 Help! My system is slow!  slow.pdf.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Guide to Parallel Operating Systems with Windows 7 and Linux Chapter 10 Operating System Management.
Linux I/O Tuning Anshul Gupta. 2 - Performance Gathering Tools -I/O Elevators -File System -Swap and Caches Agenda.
Where'd all my memory go? Joshua Miller SCALE 12x – 22 FEB 2014.
Linux Command Tips.
Linux203Training Module System Mgmt.
Process Management Process Concept Why only the global variables?
Linux 103 Training MOdule Basic System Mgmt.
Proc File System Sadi Evren SEKER.
MCTS Guide to Microsoft Windows 7
Modeling Page Replacement Algorithms
Linux 202 Training Module Program and Process.
Performance Analysis pmli.
Architecture Background
CIT 470: Advanced Network and System Administration
Modeling Page Replacement Algorithms
Outline Module 1 and 2 dealt with processes, scheduling and synchronization Next two modules will deal with memory and storage Processes require data to.
Tools.
Oracle Memory Configuration on Windows Server
CSE451 Memory Management Introduction Autumn 2002
Operating Systems Lecture 1.
Tools.
Introduction to Operating Systems
Lecture 3: Main Memory.
Performance Analysis.
Performance Analysis.
CSE 542: Operating Systems
OPERATING SYSTEMS MEMORY MANAGEMENT BY DR.V.R.ELANGOVAN.
Presentation transcript:

Acegene IT Co. Ltd.1 Linux 操作系统 系统优化 周炯上海艾基信息技术有限公司

Acegene IT Co. Ltd. 2 内容提要 Performance concepts and measurement tools: –CPU –Memory –Disk I/O –Network –Process –Profiling Kernel & Applications

Measurement Tools Linux has measurement tools common to UNIX platforms: –System Activity Reporter: sar Historical database –Virtual Memory Statistics: vmstat, free –I/O Statistics: iostat –Top Resource Consumers: top -c –X-based tools: xosview, gnome- system-monitor, ksysguard, gkrellm

CPU Measurements Identify the CPU statistics and interpret them: –Idle time: %idle –Executing user code: %user –Executing system code: %system –Load average: runq-sz Start with cat /proc/cpuinfo –Total CPU count/speed There are several ways to see the same information, for example: CPU activity

CPU Activity - mpstat # mpstat -P # mpstat -P ALL 1 1 Linux EL (raclinux1) 08/04/2004 CPU %user %nice %system %idle intr/s all What is my CPU doing?: mpstat

CPU Activity - sar # sar -u 2 3 Linux EL (raclinux1) 08/04/ :02:34 AM CPU %user %nice %system %idle 02:02:36 AM all :02:38 AM all :02:40 AM all Average: all # sar -u What is my CPU doing?: sar

CPU Activity - iostat # iostat -c 2 3 Linux EL (raclinux1) 08/04/2004 avg-cpu: %user %nice %sys %idle avg-cpu: %user %nice %sys %idle avg-cpu: %user %nice %sys %idle # iostat -c What is my CPU doing?: iostat

Linux Virtual Memory Each process is assigned a contiguous address space in virtual memory that maps process memory allocations to the real memory –User address space is a contiguous set of pages and is limited to 4GB per process –Physical Address Extension (PAE), allows access to more than 4GB of physical memory RHat: ‘ enterprise ’ kernel (implied SMP) SuSE: 64GB kernel (implied SMP)

Swap Swap space (disk) Physical memory (RAM) Virtual memory Swapped-in pages Swapped-out pages

Measuring Swap How much is available/used? –swapon -s (cat /proc/swaps) –vmstat so: Amount of memory KB/s SWAP OUT to disk si: Amount of memory KB/s SWAP IN from disk swapd : Amount of virtual memory KB reserved Create/Add more? –# mkswap /dev/sdc3 –fstab: /dev/sdc3 swap swap pri=42 0 0

Memory Usage Kernel (not paged) Shared memory Process memory Page cache Buffer cache Kernel modules Dynamically adjusted Paged Paged/locked Not paged

Measure memory utilization and paging. Identify the significant memory statistics. –cat /proc/meminfo (units KB) MemTotal : Total physical memory MemFree : Total free memory LowFree : Free memory below 1GB physical Buffers : Linux Buffer Cache Cached : Linux Page Cache BigFree : Free bigpages memory Measuring Memory Usage Page out Page in

No Free Memory? free command reports a very low number, should I be worried –It ’ s OK if Linux buffer or page cache are big –Look in -/+ buffer/cache row of free for projected free memory –Very useful stat

Memory - sar -B paging statistics -R memory statistics -W swapping statistics #sar -B #sar -R

Acegene IT Co. Ltd. 15 Measuring Disk I/O You should monitor the I/O across all devices and look for ‘ slow ’ devices using: –sar, iostat, vmstat –Archive collected statistics for comparison

Acegene IT Co. Ltd. 16 Network Traffic Check the following sources of network traffic: –Oracle SQL*Net Servicing SQL connections –Interconnect in RAC environment –Network file system –Samba –HTTP server Start with sar -n DEV iptraf also very useful

sar Flags -f read from sar historical file –/var/log/sa/ … -s -e start/end times –-s hh:mm:ss -r memory/swap utilization -c process creation activity -w context switching activity

Acegene IT Co. Ltd. 18 Process Specific Specific process is a suspect: –System call trace: strace –p –Library call trace: ltrace –p –Detailed process statistics: ps –o Try: ps -e -o pid,ppid,pcpu,rss,vsz,pri,wchan,cmd Who has my file open? –lsof [-p <pid] For Process Tree, use pstree –p Not seeing a process, it ’ s probably a thread, try: ps -efm

Acegene IT Co. Ltd. 19 What Does the Kernel Do? It ’ s possible to profile the kernel and identify where it ’ s spending time: –Boot with “profile=2 nmi_watchdog=1” Either in Lilo or Grub or add manually at boottime –Use readprofile -m –Start with readprofile -r (to reset counters) –Very easy to use, but useful only if you see high system time. To profile user applications use oprofile –

Acegene IT Co. Ltd. 20 System Wide RDA (Remote Diagnostic Agent) – ex.html Lshw (Hardware Lister) –

Acegene IT Co. Ltd. 21 Summary: Linux Monitoring Tools Overall tools –sar, vmstat CPU –/proc/cpuinfo, mpstat, top Memory –/proc/meminfo, /proc/slabinfo Disk I/O –iostat, sar Network –iptraf, netstat, mii-tool Individual process debugging –strace, ltrace, lsof

A Q & Q U E S T I O N S A N S W E R S

Acegene IT Co. Ltd. 23 练习 执行下列命令 –sar, vmstat –/proc/cpuinfo, mpstat, top –/proc/meminfo, /proc/slabinfo –iostat, sar –iptraf, netstat, mii-tool –strace, ltrace, lsof