Linux Command Tips.

Slides:



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

Tutorial 5 Test1 Review. Q1: Which of the following is an operating system theme or model as defined in lectures?
Using netstat for Performance Analysis
1 Operating Systems and Protection Professor Jennifer Rexford CS 217.
Performance Tuning By Samriti Uppal Dec 1 st, 2004.
MEMORY MANAGEMENT By KUNAL KADAKIA RISHIT SHAH. Memory Memory is a large array of words or bytes, each with its own address. It is a repository of quickly.
OPERATING SYSTEMS Introduction
Process Scheduling. Process The activation of a program. Can have multiple processes of a program Entities associated with a process –Instruction pointer,
Chapter 6 - Implementing Processes, Threads and Resources Kris Hansen Shelby Davis Jeffery Brass 3/7/05 & 3/9/05 Kris Hansen Shelby Davis Jeffery Brass.
Page 1 © 2001 Hewlett-Packard Company Tools for Measuring System and Application Performance Introduction GlancePlus Introduction Glance Motif Glance Character.
© COPYRIGHT 2008 THE INFORMATION SYSTEMS MANAGER, INC. (ISM) Understanding the AIX Performance Data in a PowerVM Partition Pete Weilnau
Jiapeng Xiu Chapter 3 Memory Management Chapter 3 Memory Management —— Solaris Memory Monitor.
Page 1 © 2001 Hewlett-Packard Company Tools for Measuring System and Application Performance Introduction GlancePlus Introduction Glance Motif Glance Character.
Page 1 © 2001 Hewlett-Packard Company Tools for Measuring System and Application Performance Introduction GlancePlus Introduction Glance Motif Glance Character.
1 © 2001, Cisco Systems, Inc. All rights reserved. Session Number Presentation_ID 8.6(2) OVAs UCBU Platform Team.
Hjemmeeksamen 1 INF3190. Oppgave Develop a monitoring/administration tool which allows an administrator to use a client to monitor all processes running.
Chapter 8 Windows Outline Programming Windows 2000 System structure Processes and threads in Windows 2000 Memory management The Windows 2000 file.
© 2005 IBM Software Environment Some Useful System Commands.
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.
Review of Memory Management, Virtual Memory CS448.
C LIENT R EGISTRY OpenEMPI: Operations Support Training SYSNET International, Inc.
Fall 2011 Nassau Community College ITE153 – Operating Systems 1 Session 4 More Hands-on Commands.
Shoehorning Apache Onto Your Box System Sizing tips Sander Temme.
Introduction to Processes CS Intoduction to Operating Systems.
Processes and Threads CS550 Operating Systems. Processes and Threads These exist only at execution time They have fast state changes -> in memory and.
Guide to Linux Installation and Administration, 2e1 Chapter 10 Managing System Resources.
System Troubleshooting TCS Network, System, and Load Monitoring TCS for Developers.
DONE-08 Sizing and Performance Tuning N-Tier Applications Mike Furgal Performance Manager Progress Software
Hp education services education.hp.com 67 CPU Management Version B.02 H4262S Module 5 Slides.
SQLRX – SQL Server Administration – Tips From the Trenches SQL Server Administration – Tips From the Trenches Troubleshooting Reports of Sudden Slowdowns.
Analysis of the ROOT Persistence I/O Memory Footprint in LHCb Ivan Valenčík Supervisor Markus Frank 19 th September 2012.
Acegene IT Co. Ltd.1 Linux 操作系统 系统优化 周炯上海艾基信息技术有限公司.
Lecture – Performance Performance management on UNIX.
Lab 3 + Using the Terminal 1. "Under Linux there are GUIs (graphical user interfaces). where you can point and click and drag, and hopefully get work.
LECTURE 12 Virtual Memory. VIRTUAL MEMORY Just as a cache can provide fast, easy access to recently-used code and data, main memory acts as a “cache”
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.
Help! My Computer is Sluggish Kevin B. O'Brien Washtenaw Linux Users Group.
New flavors of pg_top Michael Paquier Tokyo 2013/07/13
Where'd all my memory go? Joshua Miller SCALE 12x – 22 FEB 2014.
Introduction to Operating Systems Concepts
Virtual Memory Chapter 8.
Linux203Training Module System Mgmt.
Linux 103 Training MOdule Basic System Mgmt.
Lecture 12 Virtual Memory.
Proc File System Sadi Evren SEKER.
Shoehorning Apache Onto Your Box
Linux 202 Training Module Program and Process.
Performance Analysis pmli.
O/S State Diagrams © 2004, D. J. Foreman.
Process and Thread State Diagrams
Architecture Background
Penguin Weight Watchers
Using the Terminal Lab 3+.
Understanding the AIX Performance Data in a PowerVM Partition
Haiyan Meng and Douglas Thain
Assessment Findings System Professional <Insert Consultant Name>
CIT 470: Advanced Network and System Administration
Unit OS5: Memory Management
Process and Thread State Diagrams
Performance Analysis.
CSE 153 Design of Operating Systems Winter 2019
Performance Analysis.
Process and Thread State Diagrams
Buddy Allocation CS 161: Lecture 5 2/11/19.
Process and Thread State Diagrams
Virtual Memory 1 1.
CS Introduction to Operating Systems
Presentation transcript:

Linux Command Tips

Free Memory Free memory reported by free and vmstat command on Linux is not the total memory free. Total memory free is sum of free and cached memory. Cached memory is still technically *free* memory that can be used. The OS just doesn't free it, it keeps it there to help speed up other applications that may need the data there. So when monitoring free memory graph of monitor, we need to look at both ‘Free memory’ and ‘Cached memory’ to see if there is any memory leak or not.

Free Memory For example, let us see the output of free command when test is running: [netstorm@a10ns1 TR4166]$ free -l total used free shared buffers cached Mem: 4139404 1947700 2191704 0 19932 1515404 Low: 1920780 193480 1727300 High: 2218624 1754220 464404 -/+ buffers/cache: 412364 3727040 Swap: 2031608 0 2031608  Total free memory = 2191704 + 1515404 KB = 3707108 KB = 3707 MB (Approx) = 3.7 GB (Approx) Total memory is approx 4 GB

Free Memory Free memory can be verified from vmstat command. [netstorm@a10ns1 TR4166]$ vmstat 5 procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------ r b swpd free buff cache si so bi bo in cs us sy id wa st 0 0 0 2196712 19904 1510560 0 0 25 150 1783 4613 5 8 87 0 0 0 0 0 2195052 19912 1512336 0 0 0 346 4148 10726 5 8 86 0 0

Free Memory Free memory can be verified from vmstat command. [netstorm@a10ns1 TR4166]$ vmstat 5 procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------ r b swpd free buff cache si so bi bo in cs us sy id wa st 0 0 0 2196712 19904 1510560 0 0 25 150 1783 4613 5 8 87 0 0 0 0 0 2195052 19912 1512336 0 0 0 346 4148 10726 5 8 86 0 0

Process Data For example: ps -p 29620 -o vsz,cputime,etime,args Process Data Monitor (cm_ps_data) Used to get process data Elapsed Time in seconds CPU Used Time in seconds Process size in KB Uses following command to get the data ps –p <pid> -o vsz,cputime,etime,args For example: ps -p 29620 -o vsz,cputime,etime,args VSZ TIME ELAPSED COMMAND 439220 00:01:51 1-17:49:09 tomcat VSZ in Kilo-bytes

Process Data Issues in AIX Virtual memory size (VSZ) on AIX In AIX box, virtual memory size (VSZ) is so small, often even smaller then the resident set size (RSS) It's not the virtual memory size. It is actually the size of the data section of the virtual memory of the process. To get VSZ of a process, use svmon -P <pid>, Multiply this by the pagesize (pagesize(1) is a user tool on AIX).

Process/Thread waiting It seems like vmstat r col is different on AIX and LINUX Description of r col in vmstat from AIX manual () - r Average number of kernel threads that are runnable, which includes threads that are running and threads that are waiting for the CPU. If this number is greater than the number of CPUs, there is at least one thread waiting for a CPU and the more threads there are waiting for CPUs, the greater the likelihood of a performance impact. Based on description above we should probably only worry if the r is 150% or number of logical processors NOT 50% . Makes sense ? For Linux, I see conflicting data points " r Number of threads that are running or are runnable."   From here " The number of processes waiting for run time."  (man vmstat - on  NetStorm box FC9)  (ref) NeerajR - can you comment ? on AIX what number would you compare the 'Processes waiting for runtime' value returned in vmstat, as number of processors. lcpu ? On this machine, the 'Processors used' caps out to 4. Do you know why ? Any relation to smt ? I thought it would be 16 ? Also do we have any monitors for lparstat -- there seems to be a lot of information in there $ lparstat System configuration: type=Shared mode=Uncapped smt=4 lcpu=16 mem=32768MB psize=32 ent=1.50 %user  %sys  %wait  %idle physc %entc  lbusy   app  vcsw phint ----- ----- ------ ------ ----- ----- ------   --- ----- -----   6.1   2.1    0.0   91.8  0.18  12.1    1.5 20.71 18378009979 79994303 $ No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.449 / Virus Database: 271.1.1/3433 - Release Date: 02/09/11 19:34:00

THANK YOU