Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
10.  Resource Pools Creating Pools Configurations  Previous   Contents   Next 
   
 

How to Create a Configuration by Discovery

Use the discover subcommand argument to the -c option of /usr/sbin/poolcfg to create the pools configuration file. The resulting file, /etc/pooladm.conf, contains any existing processor sets.

  1. Become superuser.

  2. Type the following:

    # poolcfg -c discover

You can also supply a file name to use instead of the default /etc/pooladm.conf. If the file name is supplied, then the poolcfg commands are applied to the contents of the named file.

For example, to place a discovered configuration in /tmp/foo, do the following:

  1. Become superuser.

  2. Type the following:

    # poolcfg -c discover /tmp/foo

How to Create a New Configuration

Use the create subcommand argument to the -c option of /usr/sbin/poolcfg to create a simple configuration file for a system that is named tester. Note that you must quote subcommand arguments that contain white space.

  1. Become superuser.

  2. Type the following:

    # poolcfg -c 'create system tester'
  3. View the contents of the configuration file in readable form.

    # poolcfg -c info
    system tester
            int system.version 1
            boolean system.bind-default true
            string system.comment

How to Modify a Configuration

To enhance your simple configuration, create a processor set that is named batch and a pool that is named batch. Then join them with an association. Note that you must quote subcommand arguments that contain white space.

  1. Become superuser.

  2. Create processor set batch.

    # poolcfg -c 'create pset batch (uint pset.min = 2; uint pset.max = 10)'
  3. Create pool batch.

    # poolcfg -c 'create pool batch'
  4. Join with an association.

    # poolcfg -c 'associate pool batch (pset batch)'
  5. Display the edited configuration.

    # poolcfg -c info
    system tester
            int system.version 1
            boolean system.bind-default true
            string system.comment
    
            pool batch
                    boolean pool.default false
                    boolean pool.active true
                    int pool.importance 1
                    string pool.comment
                    pset batch
    
            pset batch
                    int pset.sys_id -2
                    string pset.units population
                    boolean pset.default true
                    uint pset.max 10
                    uint pset.min 2
                    string pset.comment
                    boolean pset.escapable false
                    uint pset.load 0
                    uint pset.size 0

How to Associate a Pool With a Scheduling Class

You can associate a pool with a scheduling class so that all processes that are bound to the pool use this scheduler. Set the pool.scheduler property to the name of the scheduler class. This example shows how to associate the pool batch with the FSS.

  1. Become superuser.

  2. Modify pool batch to be associated with the FSS.

    # poolcfg -c 'modify pool batch (string pool.scheduler="FSS")'
  3. Display the edited configuration.

    # poolcfg -c info
    system tester
            int system.version 1
            boolean system.bind-default true
            string system.comment
    
            pool batch
                    boolean pool.default false
                    boolean pool.active true
                    int pool.importance 1
                    string pool.comment
                    string pool.scheduler FSS
                    pset batch
    
            pset batch
                    int pset.sys_id -2
                    string pset.units population
                    boolean pset.default true
                    uint pset.max 10
                    uint pset.min 2
                    string pset.comment
                    boolean pset.escapable false
                    uint pset.load 0
                    uint pset.size 0

How to Use Command Files With poolcfg

poolcfg -f can take input from a text file that contains poolcfg subcommand arguments to the -c option. This technique is appropriate when you want a set of operations to be performed atomically. When processing multiple commands, the configuration is only updated if all of the commands succeed. For large or complex configurations, this technique can be more useful than per-subcommand invocations.

  1. Create the input file.

    $ cat > poolcmds.txt
    create system tester
    create pset batch (int pset.man = 2; int pset.max = 10)
    create pool batch
    associate pool batch (pset batch)
  2. Become superuser.

  3. Type the following:

    # /usr/sbin/poolcfg -f poolcmds.txt
 
 
 
  Previous   Contents   Next