Go to main content

Resource Management and Oracle® Solaris Zones Developer's Guide

Exit Print View

Updated: October 2017
 
 

Understanding Resource Management in the Oracle Solaris Operating System

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. Efficient resource management also enables organizations to economize by consolidating systems.

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 Administering Resource Management in Oracle Solaris 11.3.

Resource Management Workload Organization

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 about projects and tasks, see Chapter 2, About Projects and Tasks in Administering Resource Management in Oracle Solaris 11.3 for the system administrator's perspective or Workload Hierarchy of Projects and Tasks in this document 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 enables one or more applications to run isolated from all other applications on the system. Non-global zones are discussed thoroughly in Creating and Using Oracle Solaris Zones. To learn more about special precautions for writing resource management applications that run in zones, see Design Considerations for Resource Management Applications in Oracle Solaris Zones.

Resource Organization

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, About Resource Pools in Administering Resource Management in Oracle Solaris 11.3 covers resource pools for system administrators. Programming considerations are described in Resource Pools in Oracle Solaris.

The following diagram illustrates how workload and computer resources are organized in the Oracle Solaris operating system.

Figure 1  Workload and Resource Organization in the Oracle Solaris Operating System

image:Diagram provides an example of how workloads and resources are                             organized in a system.

Resource Controls

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, About Resource Controls in Administering Resource Management in Oracle Solaris 11.3. For programming considerations, see Resource Controls in Oracle Solaris.

Extended Accounting Facility

In addition to 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, About Extended Accounting in Administering Resource Management in Oracle Solaris 11.3. The Oracle Solaris operating system provides developers with both a C interface and a Perl interface to the extended accounting facility. Refer to Using the C Interface to Extended Accounting for the C interface or Using the Perl Interface to Extended Accounting for the Perl interface.