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.
This section describes new or changed features in managing system performance in the Solaris release.
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.
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 Solaris Operating System.
The CPC commands cpustat and cputrack have enhanced, command-line syntax for specifying CPU information. For example, in previous versions of the 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.
System Performance Task |
For More Information |
---|---|
Manage processes | |
Monitor system performance | |
Change Solaris tunable parameters | |
Manage System Performance Tasks | |
Manage Processes With FX and FS Schedulers |
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.
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.
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.
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:
Central processing unit (CPU) utilization
Buffer usage
Disk and tape input/output (I/O) activity
Terminal device activity
System call activity
Context switching
File access
Queue activity
Kernel tables
Interprocess communication
Paging
Free memory and swap space
Kernel memory allocation (KMA)
The 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. | |
netstat and nfsstat commands |
Displays information about network performance | |
ps and prstat commands |
Displays information about active processes | |
sar and sadc commands |
Collects and reports on system activity data | |
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 | |
vmstat and iostat commands |
Summarizes system activity data, such as virtual memory statistics, disk usage, and CPU activity | |
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. |