Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Solaris Containers: Resource Management and Solaris Zones Developer's Guide
Previous Next

/etc/project Project File

The project file is a local source of project information. The project file can be used in conjunction with other project sources, including the NIS maps project.byname and project.bynumber and the LDAP database project. Programs use the getprojent(3PROJECT) routines to access this information.

Define Two Projects

/etc/project defines two projects: database and appserver. The user defaults are user.database and user.appserver. The admin default can switch between user.database or user.appserver.

hostname# cat /etc/project

.
.
.
user.database:2001:Database backend:admin::
user.appserver:2002:Application Server frontend:admin::
.
.

Configure Resource Controls

The /etc/project file shows the resource controls for the application.

hostname# cat /etc/project

.
.
.
development:2003:Developers:::task.ax-lwps=(privileged,10,deny);
process.max-addressspace=(privileged,209715200,deny)
.
.

Configure Resource Pools

The /etc/project file shows the resource pools for the application.

hostname# cat /etc/project

.
.
.
batch:2001:Batch project:::project.pool=batch_pool
process:2002:Process control:::project.pool=process_pool
.
.
.

Configure FSS project.cpu-shares for a Project

Set up FSS for two projects: database and appserver. The database project has 20 CPU shares. The appserver project has 10 CPU shares.

hostname# cat /etc/project

.
.
.
user.database:2001:database backend:admin::project.cpu-shares=(privileged,
     20,deny)
user.appserver:2002:Application Server frontend:admin::project.cpu-shares=
     (privileged,10,deny)
.
.
.

Note - The line break in the lines that precede “20,deny” and “(privileged,” is not valid in an /etc/project file. The line breaks are shown here only to allow the example to display on a printed or displayed page. Each entry in the /etc/project file must be on a single line.


If the FSS is enabled but each user and application is not assigned to a unique project, then the users and applications will all run in the same project. By running in the same project, all compete for the same share, in a timeshare fashion. This occurs because shares are assigned to projects, not to users or processes. To take advantage of the FSS scheduling capabilities, assign each user and application to a unique project.

To configure a project, see Local /etc/project File Format in System Administration Guide: Solaris Containers-Resource Management and Solaris Zones.

Configure Five Applications with Different Characteristics

The following example configures five applications with different characteristics.

Table 8-1 Target Applications and Characteristics

Application Type and Name

Characteristics

Application server, app_server.

Negative scalability beyond two CPUs. Assign a two-CPU processor set to app_server. Use TS scheduling class.

Database instance, app_db.

Heavily multithreaded. Use FSS scheduling class.

Test and development, development.

Motif based. Hosts untested code execution. Interactive scheduling class ensures user interface responsiveness. Use process.max-address-space to impose memory limitations and minimize the effects of antisocial processing.

Transaction processing engine, tp_engine.

Response time is paramount. Assign a dedicated set of at least two CPUs to ensure response latency is kept to a minimum. Use timeshare scheduling class.

Standalone database instance, geo_db.

Heavily multithreaded. Serves multiple time zones. Use FSS scheduling class.


Note - Consolidate database applications (app.db and geo_db) onto a single processor set of at least four CPUs. Use FSS scheduling class. Application app_db gets 25% of the project.cpu-shares. Application geo_db gets 75% of the project.cpu-shares.


Edit the /etc/project file. Map users to resource pools for the app_server, app_db, development, tp_engine, and geo_db project entries.

hostname# cat /etc/project

.
.
.
user.app_server:2001:Production Application Server::
     project.pool=appserver_pool
user.app_db:2002:App Server DB:::project.pool=db_pool,
     project.cpu-shares=(privileged,1,deny)
development:2003:Test and delopment::staff:project.pool=dev.pool,
     process.max-addressspace=(privileged,536870912,deny)
user.tp_engine:Transaction Engine:::project.pool=tp_pool
user.geo_db:EDI DB:::project.pool=db_pool;
     project.cpu-shares=(privileged,3,deny)

Note - The line break in the lines that begin with “project.pool” , “project.cpu-shares=”, “process.max-addressspace”, and “project.cpu-shares=” is not valid in a project file. The line breaks are shown here only to allow the example to display on a printed or displayed page. Each entry must be on one and only one line.


Create the pool.host script and add entries for resource pools.

hostname# cat pool.host

create system host
create pset dev_pset (uint pset.max = 2)
create pset tp_pset (uint pset.min = 2; uint pset.max = 2)
create pset db_pset (uint pset.min = 4; uint pset.max = 6)
create pset app_pset (uint pset.min = 1; uint pset.max = 2)
create pool dev_pool (string pool.scheduler="IA")
create pool appserver_pool (string pool.scheduler="TS")
create pool db_pool (string pool.scheduler="FSS")
create pool tp_pool (string pool.scheduler="TS")
associate pool pool_default (pset pset_default)
associate pool dev_pool (pset dev_pset)
associate pool appserver_pool (pset app_pset)
associate pool db_pool (pset db_pset)
associate pool tp_pool (pset tp_pset)

Run the pool.host script and modify the configuration as specified in the pool.host file.

hostname# poolcfg —f pool.host

Read the pool.host resource pool configuration file and initialize the resource pools on the system.

hostname# pooladm —c

Previous Next

 
 
  Published under the terms fo the Public Documentation License Version 1.01. Design by Interspire