Achieving good performance from a computer or network is an important part of system administration. This chapter is an overview of some 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 features for managing system performance.
The directory name look-up cache (DNLC) is enhanced to provide improved performance when you access files in large directories with 1000 or more files.
The DNLC is a general file system service that caches the most recently referenced directory names and their associated vnodes. UFS directory entries are stored linearly on disk, which means that locating an entry requires searching each entry for the name. The addition of a new entry requires searching the entire directory to ensure that the name does not exist. To solve this performance problem, the DNLC caches entire directories in memory.
Another feature in this release is the DNLC caching of file objects that have been looked up, but do not exist. This feature is known as negative caching, and is useful because some applications repeatedly test to check if a file exists.
For more information, see Solaris Tunable Parameters Reference Manual.
Two new commands, pargs and preap, improve process debugging. The pargs command can be used to print the arguments and environment variables associated with a live process or core file. The preap command can be used to remove defunct (zombie) processes.
The pargs command solves a long-standing problem of being unable to display all the arguments that are passed to a process with the ps command. Use the pargs command in combination with the pgrep command to display the arguments that are passed to a process, as follows:
# pargs `pgrep ttymon` 579: /usr/lib/saf/ttymon -g -h -p system-name console login: -T sun -d /dev/console -l argv[0]: /usr/lib/saf/ttymon argv[1]: -g argv[2]: -h argv[3]: -p argv[4]: system-name console login: argv[5]: -T argv[6]: sun argv[7]: -d argv[8]: /dev/console argv[9]: -l argv[10]: console argv[11]: -m argv[12]: ldterm,ttcompat 548: /usr/lib/saf/ttymon argv[0]: /usr/lib/saf/ttymon |
Use the pargs -e command to display the environment variables that are associated with a process, as in the following example:
$ pargs -e 6763 6763: tcsh envp[0]: DISPLAY=:0.0 |
You can use the pargs and preap commands to examine any process that you have the privileges to examine. As superuser, you can examine any process.
You can use the preap command to clean up a defunct process. A defunct process is also called a zombie process. A zombie process has not yet had its exit status reaped, or claimed, by its parent. These processes are generally harmless, but can consume system resources if they are numerous.
For information on using the preap command, see preap(1). For information on the using the pargs command, see proc(1).
You can monitor system performance and system resource utilization with the Solaris Management Console's Performance Tool.
For information on allocating, monitoring, and controlling system resources with the Solaris resource management, see “Introduction to Solaris 9 Resource Manager” in System Administration Guide: Resource Management and Network Services.
For information on using and starting the Solaris Management Console, see “Working With the Management Console (Tasks)” in System Administration Guide: Basic Administration.
The FSS and FX schedulers are new user process schedulers. Both schedulers use the same range of priorities (0 to 59) as the time sharing (TS) and interactive (IA) scheduling classes.
FX is a fixed-priority scheduler that gives processes that run in it an assured priority. FX is not meant to be a default scheduler. TS balances loads. FX does not. You can run FX and TS on the same system, but if you set the priority too high for FX, you could starve the processes that run in TS.
The FSS guarantees application performance by explicitly allocating shares of CPU resources to projects. Additional advantages of the FSS are as follows:
Allows the fine-grained sharing of CPU resources on a system.
Controls the allocation of available CPU resources among workloads based on their importance. Their importance is expressed by the number of shares of CPU resources that you assign to each workload.
FSS should not be used with TS or FX on the same system unless processor sets are used. If you use processor sets, you can mix TS, IA, and FX with FSS in one system as long as all the processes that run on each processor set are in one scheduling class to prevent them from competing for the same CPUs. The FX scheduler, in particular, should not be used in conjunction with the new FSS scheduling class unless processor sets are used, to prevent applications in the FX class from using priorities that are high enough to starve applications in the FSS class.
The following table identifies where to get more information about using these schedulers and other Solaris resource management features, such as projects and tasks, to better manage system resources.
Topic |
For More Information |
---|---|
Using FSS and FX schedulers |
“Fair Share Scheduler” in System Administration Guide: Resource Management and Network Services |
FSS | |
FX | |
Projects |
“Projects and Tasks” in System Administration Guide: Resource Management and Network Services |
System Performance Task |
For More Information |
---|---|
Manage processes | |
Monitor system performance | |
Change Solaris tunable parameters |
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 memory (RAM) on the system. |
Chapter 24, Monitoring System Performance (Tasks) describes the tools that display statistics about the activity and the performance of a system.
The following table describes terms related to processes.
Table 22–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 22–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 relationship of 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 22–3 Performance Monitoring Tools
Command |
Description |
For More Information |
---|---|---|
sar and sadc commands |
Collects and reports on system activity data | |
ps and prstat commands |
Displays information about active processes | |
vmstat and iostat commands |
Summarizes system activity data, such as virtual memory statistics, disk usage, and CPU activity | |
swap command |
Displays information about available swap space on your system |
“Configuring Additional Swap Space (Tasks)” in System Administration Guide: Devices and File Systems |
netstat and nfsstat commands |
Displays information about network performance | |
Sun Enterprise SyMON |
Collects system activity data on Sun's Enterprise level systems |
Sun Enterprise SyMON 2.0.1 Software User's Guide |