System Administration Guide: Advanced Administration

Chapter 11 Managing System Performance (Overview)

Achieving good performance from a computer or network is an important part of system administration. This chapter provides an overview of some factors that contribute to managing the performance of the computer systems in your care.

This is a list of the overview information in this chapter.

What's New in Managing System Performance?

This section describes new or changed features in managing system performance in the Oracle Solaris release. For a complete listing of new features and a description of Oracle Solaris releases, see the Oracle Solaris 10 9/10 What’s New.

Enhanced pfiles Tool

Oracle Solaris 10: The /proc file system has been enhanced to include file name information in the /proc/pic/path directory. This information is used by pfiles to display file names for each file in the process. This change provides new insight into process behavior. For more information, see How to Display Information About Processes and the proc(1) man page.

CPU Performance Counters

Oracle Solaris 10: The CPU Performance Counter (CPC) system has been updated to give better access to the performance analysis features available in the SPARC and x86 platforms that run the Oracle Solaris OS.

The CPC commands cpustat and cputrack have enhanced, command-line syntax for specifying CPU information. For example, in previous versions of the Oracle Solaris OS, you were required to specify two counters. The configuration of both commands now allows you to specify only one counter, as shown in the following example:


# cputrack -c pic0=Cycle_cnt ls -d .
time lwp      event      pic0      pic1
.
0.034   1       exit    841167 

For simple measurements, you can even omit the counter configuration, as shown in the following example:


# cputrack -c Cycle_cnt ls -d .
   time lwp      event      pic0      pic1
  .
  0.016   1       exit    850736 

For more information on using the cpustat command, see the cpustat(1M) man page. For more information on using the cputrack command, see the cputrack(1) man page.

Where to Find System Performance Tasks

System Performance Task 

For More Information 

Manage processes 

Chapter 12, Managing System Processes (Tasks)

Monitor system performance 

Chapter 13, Monitoring System Performance (Tasks)

Change tunable parameters 

Oracle Solaris Tunable Parameters Reference Manual

Manage System Performance Tasks 

Chapter 2, Projects and Tasks (Overview), in System Administration Guide: Oracle Solaris Containers-Resource Management and Oracle Solaris Zones

Manage Processes With FX and FS Schedulers 

Chapter 8, Fair Share Scheduler (Overview), in System Administration Guide: Oracle Solaris Containers-Resource Management and Oracle Solaris Zones

System Performance and System Resources

The performance of a computer system depends upon how the system uses and allocates its resources. Monitor your system's performance regularly so that you know how it behaves under normal conditions. You should have a good idea of what to expect, and be able to recognize a problem when it occurs.

System resources that affect performance are described in the following table.

System Resource 

Description 

Central processing unit (CPU) 

The CPU processes instructions by fetching instructions from memory and executing them.  

Input/output (I/O) devices 

I/O devices transfer information into and out of the computer. Such a device could be a terminal and keyboard, a disk drive, or a printer.  

Memory 

Physical (or main) memory is the amount of random access memory (RAM) on the system.  

Chapter 13, Monitoring System Performance (Tasks) describes the tools that display statistics about the system's activity and performance.

Processes and System Performance

The following table describes terms that are related to processes.

Table 11–1 Process Terminology

Term 

Description 

Process  

Any system activity or job. Each time you boot a system, execute a command, or start an application, the system activates one or more processes. 

Lightweight process (LWP)  

A virtual CPU or execution resource. LWPs are scheduled by the kernel to use available CPU resources based on their scheduling class and priority. LWPs include a kernel thread and an LWP. A kernel thread contains information that has to be in memory all the time. An LWP contains information that is swappable. 

Application thread  

A series of instructions with a separate stack that can execute independently in a user's address space. Application threads can be multiplexed on top of LWPs. 

A process can consist of multiple LWPs and multiple application threads. The kernel schedules a kernel-thread structure, which is the scheduling entity in the SunOS environment. Various process structures are described in the following table.

Table 11–2 Process Structures

Structure 

Description 

proc

Contains information that pertains to the whole process and must be in main memory all the time 

kthread

Contains information that pertains to one LWP and must be in main memory all the time 

user

Contains the “per process” information that is swappable 

klwp

Contains the “per LWP process” information that is swappable 

The following figure illustrates the relationships among these process structures.

Figure 11–1 Relationships Among Process Structures

The preceding text in the table describes the graphic.

Most process resources are accessible to all the threads in the process. Almost all process virtual memory is shared. A change in shared data by one thread is available to the other threads in the process.

About Monitoring System Performance

While your computer is running, counters in the operating system are incremented to track various system activities.

System activities that are tracked are as follows:

Monitoring Tools

The Oracle Solaris software provides several tools to help you track how your system is performing. The following table describes these tools.

Table 11–3 Performance Monitoring Tools

Command 

Description 

For More Information 

cpustat and cputrack commands

Monitors performance of a system or a process using CPU performance counters. 

cpustat(1M) and cputrack(1)

netstat and nfsstat commands

Displays information about network performance. 

netstat(1M) and nfsstat(1M)

ps and prstat commands

Displays information about active processes. 

Chapter 12, Managing System Processes (Tasks)

sar and sadc commands

Collects and reports on system activity data. 

Chapter 13, Monitoring System Performance (Tasks)

Sun Enterprise SyMON 

Collects system activity data on Sun's enterprise-level systems. 

Sun Enterprise SyMON 2.0.1 Software User's Guide

swap command

Displays information about available swap space on your system. 

Chapter 20, Configuring Additional Swap Space (Tasks), in System Administration Guide: Devices and File Systems

vmstat and iostat commands

Summarizes system activity data, such as virtual memory statistics, disk usage, and CPU activity. 

Chapter 13, Monitoring System Performance (Tasks)

cputrack and cpustat commands

Assists in accessing hardware performance counter facilities provided by microprocessors. 

cputrack(1) and cpustat(1M) man pages

kstat and mpstat commands

Examines the available kernel statistics, or kstats, on the system and reports those statistics which match the criteria specified on the command line. The mpstat command reports processor statistics in tabular form.

kstat(1M) and mpstat(1M) man pages.