Jiapeng Xiu Chapter 3 Memory Management Chapter 3 Memory Management —— Solaris Memory Monitor.

Slides:



Advertisements
Similar presentations
Chapter 9: Virtual Memory
Advertisements

Paging: Design Issues. Readings r Silbershatz et al: ,
Operating System Structures
Liu Meihua Chapter 3 Memory management Chapter 3 Memory management —— 3.5 Kernel Memory.
Objectives Overview Define an operating system
Chap 2 System Structures.
Operating-System Structures
Zhao Xia Chapter 2 Process , thread, and scheduling Chapter 2 Process , thread, and scheduling —— Solaris Multithreaded Process.
4 1 4 C H A P T E R Software: Systems and Application Software.
MCTS GUIDE TO MICROSOFT WINDOWS 7 Chapter 10 Performance Tuning.
© Neeraj Suri EU-NSF ICT March 2006 Budapesti Műszaki és Gazdaságtudományi Egyetem Méréstechnika és Információs Rendszerek Tanszék Zoltán Micskei
Chapter 10: File-System Interface
UNIX Chapter 01 Overview of Operating Systems Mr. Mohammad A. Smirat.
11/15/2005Comp 120 Fall November Seven Classes to Go! Questions! VM and Making Programs Go.
Memory Management Policies: UNIX
Chapter 14 Chapter 14: Server Monitoring and Optimization.
Chapter 3 Memory Management
Cs238 Lecture 3 Operating System Structures Dr. Alan R. Davis.
OPERATING SYSTEMS Introduction
Memory Management April 28, 2000 Instructor: Gary Kimura.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 2: Operating-System Structures Modified from the text book.
Page 1 © 2001 Hewlett-Packard Company Tools for Measuring System and Application Performance Introduction GlancePlus Introduction Glance Motif Glance Character.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Chapter 8 Operating Systems and Utility Programs By: James Granahan.
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.
Windows 2000 Memory Management Computing Department, Lancaster University, UK.
With Microsoft Windows 7© 2012 Pearson Education, Inc. Publishing as Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Windows 7.
MCTS Guide to Microsoft Windows 7
Guide to Linux Installation and Administration, 2e1 Chapter 8 Basic Administration Tasks.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 8: Main Memory.
Page 1 © 2001 Hewlett-Packard Company Tools for Measuring System and Application Performance Introduction GlancePlus Introduction Glance Motif Glance Character.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Operating.
Managing Processes CSCI N321 – System and Network Administration Copyright © 2000, 2011 by Scott Orr and the Trustees of Indiana University.
The Linux /proc Filesystem CSE8343 – Fall 2001 Group A1 – Alex MacFarlane, Garrick Williamson, Brad Crabtree.
Chapter 8: Operating Systems and Utility Programs Catherine Gifford Dan Falgares.
®® Microsoft Windows 7 for Power Users Tutorial 9 Evaluating System Performance.
Guide to Linux Installation and Administration, 2e1 Chapter 10 Managing System Resources.
Chapter Eight Exploring the UNIX Utilities. 2 Lesson A Using the UNIX Utilities.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Chapter 9: Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocating Kernel.
Troubleshooting and Performance
OPERATING SYSTEMS Lecture 3: we will explore the role of the operating system in a computer Networks and Communication Department 1.
Operating Systems CMPSC 473 Virtual Memory Management (4) November – Lecture 22 Instructor: Bhuvan Urgaonkar.
Acegene IT Co. Ltd.1 Linux 操作系统 系统优化 周炯上海艾基信息技术有限公司.
Lecture – Performance Performance management on UNIX.
1 © 2003, Cisco Systems, Inc. All rights reserved. CCNA 2 Module 2 Introduction to Routers.
Guide To UNIX Using Linux Third Edition Chapter 8: Exploring the UNIX/Linux Utilities.
OSes: 3. OS Structs 1 Operating Systems v Objectives –summarise OSes from several perspectives Certificate Program in Software Development CSE-TC and CSIM,
OS, , Part I Operating - System Structures Department of Computer Engineering, PSUWannarat Suntiamorntut.
System Administration – Part 2. Devices in UNIX are files: A device can be accessed with different file names All device files are stored in /dev or its.
CSC414 “Introduction to UNIX/ Linux” Lecture 2. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
Chapter 9 Operating Systems Discovering Computers Technology in a World of Computers, Mobile Devices, and the Internet.
BABCA Software Operating Systems (OS) aka Systems Software A set of instructions that coordinate all the activities among computer hardware resources.
Chapter 2. System Structures
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This course explains how to use Mapview, a utility program for the.
1 Structure of Processes Chapter 6 Process State and Transition Data Structure for Process Layout of System Memory THE DESIGN OF THE UNIX OPERATING SYSTEM.
What is a Process ? A program in execution.
Chapter Eight Exploring the UNIX Utilities. 2 Lesson A Using the UNIX Utilities.
Guide to Parallel Operating Systems with Windows 7 and Linux Chapter 10 Operating System Management.
Processes and threads.
MCTS Guide to Microsoft Windows 7
Oracle Solaris Zones Study Purpose Only
O.S Lecture 13 Virtual Memory.
FIGURE 12-1 Memory Hierarchy
Tools.
Unit OS5: Memory Management
Tools.
Presentation transcript:

Jiapeng Xiu Chapter 3 Memory Management Chapter 3 Memory Management —— Solaris Memory Monitor

2 Outline  Quick Introduction to Memory Monitoring  Memory Monitoring Tools  The Vmstat Command  MemTool: Unbundled Memory Tools  Other Memory Tools

3 Quick Introduction to Memory Monitoring  Solaris memory is used for several major functions, including the kernel, processes, and the file system cache.  Solaris memory utilization is summarized,at the global level, the following categories:  Total physical memory available  Memory allocated internally within the Solaris kernel  Memory used for the file system page cache  Memory used by processes  Memory free

4 Several Solaris memory utilities  Total Physical Memory  Command: prtconf  #prtconf  Kernel Memory  Command: sar  # sar -k 1 1

5  Free Memory  Free memory is almost always zero because the buffer cache grows to consume free memory.  Command:vmstat  # vmstat 3  File System Caching Memory  The file system cache uses available free memory to cache files.  To look at the amount of file buffer cache, use the MemTool package.  Command:prtmem--summary of the buffer cache memory  #prtmem Several Solaris memory utilities(Cont.)

6  Memory Shortage Detection  To determine if there is a memory shortage.  Command:vmstat  Swap Space  Solaris swap space has two important states: swap reservation and physical swap allocation.  Two important measures of Solaris space: > The amount of virtual swap space that is configured and available for reservations. > The amount of physical swap space that is configured and available for physical page-outs. Several Solaris memory utilities(Cont.)

7  Virtual Swap Space  The amount of virtual swap space is the sum of the amount of physical swap space (disk swap space) plus the amount of memory that Solaris can use for swap.  Command:swap –s  #swap -s  Physical Swap Space  The amount of physical swap space configured is simply the amount of physical disk.  Command:swap –l Several Solaris memory utilities(Cont.)

8 Outline  Quick Introduction to Memory Monitoring  Memory Monitoring Tools  The Vmstat Command  MemTool: Unbundled Memory Tools  Other Memory Tools

9 Memory Monitoring Tools  Many Solaris tools can help us to understand the memory behavior, We have two basic objectives in looking at Solaris memory:  to find out where all of the memory is allocated.  to look at memory (or paging) activity.

10 Solaris Memory Monitoring Commands ToolLocation of ToolCapabilities for Memory Utilization Reporting Paging Activity Reporting vmstat/usr/binBasicSystem wide only ps/usr/binProcess size — swap/usr/binSwap allocation — wsmEngineering/freeWorking set size — ipcs/usr/binSysV shared memory — MemToolEngineering/downloadProcess/file system cache — memstatEngineering/downloadSame as vmstatBreakout of paging for file systems, applications, and libraries pmap/usr/proc/binProcess address map — pmap -x/usr/proc/binProcess physical memory utilization, including the amount of memory shared among processes — crash/usr/bin/crashKernel memory utilities — dbxSPARCworksMemory leaks —

11 Outline  Quick Introduction to Memory Monitoring  Memory Monitoring Tools  The Vmstat Command  MemTool: Unbundled Memory Tools  Other Memory Tools

12 The Vmstat Command  The Solaris vmstat utility summarizes various functions within the virtual memory system, including:  systemwide free memory  paging counters  disk activity  system calls  CPU utilization

13 The output of vmstat with explaination

14 Process Memory Usage, ps, and the pmap Command  The memory usage of a process can be categorized into two classes  Virtual memory usage  Physical memory usage  We refer to the physical memory usage of a process as its resident set size, often abbreviated RSS.  We can use the ps command to display a process's virtual and physical memory usage.

15 Process Memory Usage, ps, and the pmap Command (Cont.)  Example:  # ps -e -opid,vsz,rss,args  PID VSZ RSS COMMAND  ps -a -opid,vsz,rss,args  sh  sh  telnet donan  telnet donan  telnet firefly  telnet devnull  telnet firefly.eng  telnet devnull

16 Process Memory Usage, ps, and the pmap Command (Cont.)  The memory use is separated into three categories: Private, shared and partially shared.  The pmap command provides a mechanism for a detailed look at a process ’ s memory utilization.  how much memory is resident  how much of that is shared  how much private memory a process has

17 Outline  Quick Introduction to Memory Monitoring  Memory Monitoring Tools  The Vmstat Command  MemTool: Unbundled Memory Tools  Other Memory Tools

18 Unbundled Memory Tools  MemTool was developed to provide a more in-depth look at where memory has been allocated on a Solaris system.  Using these tools, we can find out where every page of memory is, and in what proportions.

19 MemTool Utilities The MemTool package provides command-line, GUI, and character tools, as listed in Table. ToolInterfaceDescription mempsCLIDumps process summary and file system cache memory (-m). prtmemCLIDisplays a systemwide summary of memory allocation. prtswapCLI Displays a systemwide detailed description of swap allocation. Both virtual and physical swap allocation are shown. memtoolGUIIs a comprehensive GUI for UFS and process memory. memCUIIs a Curses interface for UFS and process memory.

20 Command-Line Tools  System Memory Summary: prtmem  Show a systemwide summary of memory utilization, categorized into seven major groups.  # prtmem  Total memory: 241 Megabytes  Kernel Memory: 39 Megabytes  Application: 106 Megabytes  Executable & libs: 36 Megabytes  File Cache: 3 Megabytes  Free, file cache: 58 Megabytes  Free, free: 0 Megabytes

21 Command-Line Tools (Cont.)  File System Cache Memory: memps -m  Memtool provides a list showing where the pool of filesystem cache memory has been allocated, sorted by vnode.  # memps -m  SunOS devhome 5.7 SunOS_Development sun4u 02/08/100  00:23:12  Size E/F Filename  10232k E /export/ws/local/netscape/netscape  5648k E /export/ws/dist/share/framemaker,v5.5.3/bin/sunxm.s5.sparc/ maker5X.e  2944k F /home/rmc/.netscape/history.dat

22 Command-Line Tools (Cont.)  The prtswap utility shows the three main states of swap and the way in which that state affects the virtual and physical swap configured.

23 The MemTool GUI  The MemTool GUI provides an easy method for invoking most of the functionality of the MemTool command line interfaces. Invoke the GUI as the root user to see all of the process and file information.  The MemTool GUI offers three basic modes:  buffer cache memory  process memory  process/buffer cache mapping matrix.

24 The MemTool GUI (Cont.)  The initial screen shows the contents of the file system cache, including each entry in the UFS file system cache.  The second mode of the MemTool GUI is the process memory display which shows the process table with a memory summary for each process.  The process matrix shows the relationship between processes and mapped files. The matrix can be used to show the total memory usage of a group of processes.

25 Outline  Quick Introduction to Memory Monitoring  Memory Monitoring Tools  The Vmstat Command  MemTool: Unbundled Memory Tools  Other Memory Tools

26 The Workspace Monitor Utility: WSM  The wsm command is invoked against a single process.  It shows a live status of a processes memory map and lists the amount of memory that has been read or written to in the sampled interval.  This information is particularly useful for determining how much memory a process is using at any given instant.  # wsm -p 732 -t 10

27 An Extended vmstat Command: memstat  memstat shows the paging activity, page- ins, page-outs, and page-frees separated into three classes:  file system paging  anonymous memory paging  executable/shared library paging

28 An Extended vmstat Command: memstat (Cont.)

29 End