Administrator > Systems Management

Features

Examining vmstat

Using the tool to help analyze AIX performance.

Systems Management - Using the tool to help analyze AIX performance.

Bookmark and Share Print Email

My favorite coarse-grained tool for monitoring servers is definitely the venerable vmstat. After the eyes have been trained to interpret the data, it's amazing what can be gleaned from this tool.

The Basics
In AIX* 5.1, vmstat has the following syntax options:

vmstat [ -f ] [ -i ] [ -s ] [ -I ] [ -t ]
  [ PhysicalVolume ... ] [ Interval [Count ] ]

From the AIX 5.1 "man" pages, the vmstat command reports statistics about kernel threads, virtual memory, disks, traps and CPU activity. These system-wide (among all processors) statistics are calculated as averages for values expressed as percentages and as sums otherwise. If the vmstat command is invoked without flags, the report contains a summary of activity since system startup. The interval parameter specifies the amount of time between each report in seconds. The first report contains statistics for the time since startup. Subsequent reports contain statistics collected during the interval since the previous report.

Figure 1(see below) shows data collected on an AIX 5.1 server using the command: $ vmstat -It 15 16 (boot line has been removed).

The first three columns in Figure 1 list information about threads. "r" reports the average total number of kernel, kernel-managed and user threads in the global run queue (per second). In a nutshell, non-zero values represent a CPU queue--tasks waiting on busy CPU(s) or tasks waiting because of data-serialization issues.

Conceptually, a thread is a distinct sequence of execution steps performed within a process. Each thread has its own stack, register set, program counter, thread-specific data, thread-local variables, thread-specific signal mask and state information. However, all such threads share the same address space (program text, data and heap), open files pointers, user credentials, management data and I/O with the other threads in the same process.

In AIX, the kernel allows many threads to run at the same time, but there can only be one thread actually executing on each CPU. (Note: Starting with the POWER5* processor, a hardware configuration called simultaneous multithreading allows two threads to be running in each processor core). Every process has at least one thread; some processes have many. The scheduler and dispatcher only work with threads. Threads can be viewed with the ps -emo THREAD command.

AIX has three types of threads: kernel, kernel-managed and user. Kernel threads aren't associated with a user process, and therefore have no user context. They run in kernel mode and have their own kernel stack. These threads are also inexpensive to create and manage, so they're typically used to perform a specific function like asynchronous I/O.

Next page: >>

Page 1 2 3 4 5

Tom Farwell is a technical editor for IBM Systems Magazine, Open Systems edition. He can be reached through www.tomfarwellconsulting.com.

Advertisement



Buyers Guide

Browse products and services for Administrator.







Advertisement