|Skip Navigation Links|
|Exit Print View|
|Resource Management and Oracle Solaris Zones Developer's Guide Oracle Solaris 11 Information Library|
The main concept behind resource management is that workloads on a server must be balanced for the system to work efficiently. Without good resource management, faulty runaway workloads can bring progress to a halt, causing unnecessary delays to priority jobs. An additional benefit is that efficient resource management enables organizations to economize by consolidating servers. To enable the management of resources, the Oracle Solaris operating system provides a structure for organizing workloads and resources, and provides controls for defining the quantity of resources that a particular unit of workload can consume. For an in-depth discussion of resource management from the system administrator's viewpoint, see Chapter 1, Introduction to Resource Management, in Oracle Solaris Administration: Oracle Solaris Zones, Oracle Solaris 10 Zones, and Resource Management.
The basic unit of workload is the process. Process IDs (PIDs) are numbered sequentially throughout the system. By default, each user is assigned by the system administrator to a project, which is a network–wide administrative identifier. Each successful login to a project creates a new task, which is a grouping mechanism for processes. A task contains the login process as well as subsequent child processes.
For more information on projects and tasks, see Chapter 2, Projects and Tasks (Overview), in Oracle Solaris Administration: Oracle Solaris Zones, Oracle Solaris 10 Zones, and Resource Management for the system administrator's perspective or Chapter 2, Projects and Tasks for the developer's point of view.
Processes can optionally be grouped into non-global zones, which are set up by system administrators for security purposes and to isolate processes. A zone can be thought of as a box in which one or more applications run isolated from all other applications on the system. Non-global zones are discussed thoroughly in Part II, Oracle Solaris Zones, in Oracle Solaris Administration: Oracle Solaris Zones, Oracle Solaris 10 Zones, and Resource Management. To learn more about special precautions for writing resource management applications that run in zones, see Chapter 7, Design Considerations for Resource Management Applications in Oracle Solaris Zones
The system administrator can assign workloads to specific CPUs or defined groups of CPUs in the system. CPUs can be grouped into processor sets, otherwise known as psets. A pset in turn can be coupled with one or more thread scheduling classes, which define CPU priorities, into a resource pool. Resource pools provide a convenient mechanism for a system administrator to make system resources available to users. Chapter 12, Resource Pools (Overview), in Oracle Solaris Administration: Oracle Solaris Zones, Oracle Solaris 10 Zones, and Resource Management covers resource pools for system administrators. Programming considerations are described in Chapter 6, Resource Pools.
The following diagram illustrates how workload and computer resources are organized in the Oracle Solaris operating system.
Figure 1-1 Workload and Resource Organization in the Oracle Solaris Operating System
Simply assigning a workload unit to a resource unit is insufficient for managing the quantity of resources that users consume. To manage resources, the Oracle Solaris operating system provides a set of flags, actions, and signals that are referred to collectively as resource controls. Resource controls are stored in the /etc/project file or in a zone's configuration through the zonecfg command described in zonecfg(1M). The Fair Share Scheduler (FSS), for example, can allocate shares of CPU resources among workloads based on the specified importance factor for the workloads. With these resource controls, a system administrator can set privilege levels and limit definitions for a specific zone, project, task, or process. To learn how a system administrator uses resource controls, see Chapter 6, Resource Controls (Overview), in Oracle Solaris Administration: Oracle Solaris Zones, Oracle Solaris 10 Zones, and Resource Management. For programming considerations, see Chapter 5, Resource Controls.
In addition to the workload and resource organization, the Oracle Solaris operating system provides the extended accounting facility for monitoring and recording system resource usage. The extended accounting facility provides system administrators with a detailed set of resource consumption statistics on processes and tasks.
The facility is described in depth for system administrators in Chapter 4, Extended Accounting (Overview), in Oracle Solaris Administration: Oracle Solaris Zones, Oracle Solaris 10 Zones, and Resource Management. The Oracle Solaris operating system provides developers with both a C interface and a Perl interface to the extended accounting facility. Refer to Chapter 3, Using the C Interface to Extended Accounting for the C interface or Chapter 4, Using the Perl Interface to Extended Accounting for the Perl interface.