DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Managing system performance

Managing CPU resources

Contention for CPU resources is inevitable unless you run only one job. The following are recommendations and procedures you can use to ease that contention.

Balancing system work loads

Sometimes users do not realize the strain they are putting on system resources. Detecting problems in the workload and notifying users of alternatives can result in better system availability and response for everyone.

First, try to reduce the prime-time load.

Identify inefficient use of system resources by users or user-caused errors.

Detecting runaway processes

The ps(1) command provides information about active processes and light-weight processes (LWPs). (Note that many processes have only one LWP.) It gives a snapshot of what is going on, and you can use it to identify processes and LWPs that are loading the system. Examine the entries for TIME (the minutes and seconds of CPU time used by processes and LWPs) and STIME (the time when the process or LWP first started).

When you identify a runaway process or LWP (one that uses progressively more system resources over a period of time), check with the owner. A runaway process can continue to eat up system resources until everything stops. It is possible that such a process or LWP should be terminated immediately using the kill(1) command.

When you identify processes or LWPs that execute for a long time, suggest that users use the cron(1M) or at(1) commands to execute the job during off-hours.

Monitoring user PATH variables

A PATH environment variable set in each user's .profile file defines a list of directories to be searched when a command is executed. The system searches every directory in $PATH before displaying a not found error message. These searches require both processor and disk time. If there is a disk or processor slowdown, changes to PATH might help performance.

You can inform system users that inefficient PATH variables use excessive system resources, provide a default PATH, and inform users of the best way to customize their PATH variable.

Include the system directories accessible by all users in the default system PATH in the /etc/profile file.

Check PATH variables for the following:

Identifying heavily loaded system resources

The timex(1) command is used to collect information about system consumption. The results can be used to identify heavily loaded resources so that you can tune the system for better throughput. See ``Reporting application turnaround with timex'' for more information about the timex command.


Next topic: Managing disk resource usage
Previous topic: Managing and improving system performance

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 22 April 2004