Getting good performance from a computer or network is an important part of system administration. This chapter is an overview of some of the factors that contribute to maintaining and 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 Solaris 8 features in the area of managing system performance.
A new system monitoring tool, busstat, provides command line access to the bus-related hardware performance counters in the system. It enables the gathering of system-wide bus performance statistics directly from the system hardware. The current list of supported hardware is SBus, AC and PCI devices. These are all SPARC system devices. Currently, there are no IA supported devices.
The busstat command enables the measurement of system-wide statistics such as memory bank reads/writes, clock cycles, number of interrupts, streaming DVMA read/write transfers etc.
Superuser can use busstat to program these counters. Ordinary users can only read counters programmed previously by superuser.
The busstat command lists the devices in a system that are found to support these hardware performance counters. If no supported devices are found in the system, the following message is displayed:
busstat: No devices available in system. |
See busstat(1M) for more information on using this monitoring tool.
You can use the new cpustat and cputrack commands for monitoring the performance of a system or a process.
The cpustat command gathers system-wide CPU information. This command must be run by the superuser. The cputrack command is similar to the truss command for displaying information about an application or a process. This command can be run by regular users.
Developers can create their own versions of these monitoring tools by using the same library APIs that were used to build the cpustat command.
See cpustat(1M) and cputrack(1) for more information.
The prstat command displays information about active processes on the system. You can specify whether you want information on specific processes, UIDs, CPU IDs, or processor sets. By default, prstat displays information about all processes sorted by CPU usage.
You can display detailed process microstate accounting information with prstat -m, which provides the percentage of time the process has spent processing system traps, text page faults, data page faults, and waiting for CPU, also known as CPU latency time.
See prstat(1M) for more information.
The Interprocess Communication (IPC) Message facility has been made more scalable in the Solaris 8 release by using kmem_alloc(9F) rather than rmalloc(9F) to allocate message text.
Therefore, the previously-documented msginfo_msgssz, msginfo_msgmap, and msginfo_msgseg tunables, which were artifacts of the rmalloc-based implementation, are obsolete in this release.
Use these references to find step-by-step instructions for monitoring system performance.
The performance of a computer system depends upon how the system uses and allocates its resources. It is important to monitor your system's performance on a 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, 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 memory (RAM) on the system. |
Chapter 36, Monitoring Performance (Tasks) describes the tools that display statistics about the activity and the performance of the computer system.
Performance is a broad subject that can't be adequately covered in these chapters. Sun provides performance tuning courses, online performance tuning information and several books are available that cover various aspects of improving performance and tuning your system or network.
For ... |
Go To ... |
---|---|
Performance tuning classes | |
Online performance tuning information | |
Ordering performance tuning documentation by Sun Microsystems Press such as Resource Management |
System or network performance tuning is covered in the following books:
Resource Management by Richard McDougall, Adrian Cockcroft, Evert Hoogendoorn, Enrique Vargas, Tom Bialaski, Sun Microsystems Press, ISBN 0-13-025855-5
Sun Performance and Tuning: SPARC and Solaris, by Adrian Cockcroft, Sun Microsystems Press/PRT Prentice Hall, ISBN 0-13-149642-3
System Performance Tuning, by Mike Loukides, O'Reilly & Associates, Inc.
Managing NFS and NIS, by Hal Stern, O'Reilly & Associates, Inc.
Terms related to processes are described in the table below.
Table 34-1 Process Terminology
Term |
Description |
---|---|
Process |
An instance of program in execution. |
Lightweight process (LWP) |
Is 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, which contains information that has to be in memory all the time and an LWP, which 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. They 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 table below.
Table 34-2 Process Structures
Structure |
Description |
---|---|
proc |
Contains information that pertains to the whole process and has to be in main memory all the time. |
kthread |
Contains information that pertains to one LWP and has to 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 figure below illustrates the relationship of these 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.
The table below describes commands for managing processes.
Table 34-3 Commands for Managing Processes
Use This Command ... |
To ... |
---|---|
ps(1), pgrep(1), and prstat(1M) |
Check the status of active processes on a system, as well as display detailed information about the processes |
List default scheduling policies |
|
Assign processes to a priority class and manage process priorities |
|
Change the priority of a timesharing process |
Another feature enables the control of process groups over processor sets. Using processor sets means process groups can bind to a group of processors rather than to just a single processor. The /usr/sbin/psrset command gives a system administrator control over the creation and management of processor sets. See psrset(1M) for more information.
See Chapter 35, Managing Processes (Tasks) for more information about commands for managing processes.
While your computer is running, counters in the operating system are incremented to keep track of various system activities. System activities that are tracked are:
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 keep track of how your system is performing. These include:
Table 34-4 Performance Monitoring Tools
The ... |
Enable(s) You To ... |
For More Information, See ... |
---|---|---|
sar and sadc utilities |
Collect and report on system activity data | |
ps and prstat commands |
Display information about active processes | |
vmstat and iostat commands |
Summarize system activity data, such as virtual memory statistics, disk usage, and CPU activity | |
swap command |
Display information about available swap space on your system |
"Configuring Additional Swap Space (Tasks)" in System Administration Guide, Volume 1 |
netstat and nfsstat commands |
Display information about network performance |
|
Sun Enterprise SyMON |
Collect system activity data on Sun's EnterpriseTM level systems |