1992.12.22

SUBJECT: Workload Management(½Ã½ºÅÛ Performance Management)

STATUS OF THIS MEMO:
System Performance Tuning°ú °ü·ÃÇÏ¿© ½Ã½ºÅÛÀÇ WORKLOAD¸¦ Management ÇϱâÀ§ÇÑ
utility¸¦ Á¤¸®ÇÑ °ÍÀÓ

CONTENTS:
1. Changing a Job's Priority
   1) BSD C Shell nice
   2) Changing a job's priority BSD UNIX
   3) The at command
   4) System V.4 Batch Queues
2. Shell Time Limits
3. CPU Capacity
   1) What the basic kernel tables are
   2) Configuration Parameters for Kernel Tables

DESCRIPTION:

1. Changing a Job's Priority

   1) BSD C Shell nice

      - BSD UNIXÇÏ¿¡¼­ nice command¸¦ ÀÌ¿ë -20¿¡¼­ 20±îÁöÀÇ nice number¸¦
        ºÎ¿©ÇÏ¿©  priority¸¦ ºÎ¿©ÇÒ¼ö ÀÖÀ¸¸ç -20Àº the highest priority,
        20Àº lowestÀ̸ç, default´Â 0 ÀÌ´Ù

      % nice +/-n command
        ¿©±â¼­ nÀº 0-20»çÀÌÀÇ integer 

   2) Changing a job's priority BSD UNIX

      - ¾î¶² jobÀÌ Çѹø runningµÈÈÄ ±×jobÀÇ priority¸¦ ¼öÁ¤Çϱâ À§ÇØ
        renice¶ó´Â command ÀÇ »ç¿ëÀÌ ÇÊ¿ä

      % /etc/renice priority -p pid
      % /etc/renice priority -g pgrp
      % /etc/renice priority -u uname
        ( pid  : processÀÇ ID number
          pgrp  : process group number
          uname : user name )

   3) The at command

      % at options time script_file
      
      % at options time
      Command 1
      Command 2
      ...
      CTRL-D

      %atq      : batch jobÀÇ status¸¦ report
      %atrm

   4) System V.4 Batch Queues

      % batch
      Command 1
      Command 2
      CTRL-D

      % batch script_file

2. Shell Time Limits

    % limit
      cputime 	unlimited
      filesize 	unlimited
      datasize 	524280 kbytes
      stacksize 	8192 kbytes
      coredumpsize 	unlimited
      memoryuse 	unlimited
      descriptors 	64 

    % limit -h cputime time
      ( -h optionÀÌ ¾øÀ¸¸é soft limit, ÀÖÀ¸¸é hard limit)
      
      - hoursh          limit in hours
      - minutesm           ,,    minutes
      - seconds            ,,    seconds (default)
      - minutes:seconds    ,,    minutes & seconds

    % limit cputime 200m

    % unlimit           removes limits

3. CPU Capacity

   1) What the basic kernel tables are

      - Process table  : Process tableÀÇ size´Â µ¿½Ã¿¡ runÇÒ¼ö ÀÖ´Â 
                         process ÀÇ total¼ö¸¦ Á¦ÇÑ
     
      - Text table     : Çѹø¿¡ activeµÉ¼ö ÀÖ´Â text segmentÀÇ ¼ö

      - Region table   : System V¿¡¼­ Text table´ë½Å »ç¿ë

      - Inode table    : cache of active inode entries

      - File table     : Çѹø¿¡ openÇÒ¼ö ÀÖ´Â total file¼ö

      - Callout table  : Çѹø¿¡ activeÇÒ¼ö ÀÖ´Â timerÀÇ ¼ö
                         timer´Â I/O device°¡ respondingÀ» ÇÒ°ÍÀÎÁö¸¦ °áÁ¤ÇÏ´Â
                         device driverµé¿¡ ÀÇÇØ »ç¿ëµÇ¸ç,
                         Callout table¿¡ overflow°¡ ¹ß»ýÇϸé "Timeout table
                         overflow"¶ó´Â message ¹ß»ý

      - Character list(clist) table
                         buffer terminal I/O¿¡ »ç¿ëµÇ´Â character¼ö
     
      - Processes per user : ¾î¶² »ç¿ëÀÚ¿¡°Ô ÇÒ´çµÈ processÀÇ total¼ö

      - Files per process : ¾î¶² process°¡ Çѹø¿¡ openÇÒ¼ö ÀÖ´Â fileÀÇ ¼ö

      - Mounted filesystems : any time¿¡ mountÇÒ¼ö ÀÖ´Â filesystemÀÇ ¼ö

   2) Configuration Parameters for Kernel Tables

      - /sys/sun4c /sys/sys directory ÂüÁ¶

      Table        V.2 Name  V.3&V.4 Name   BSD Variable   BSD default
     ----------------------------------------------------------------------
      Process      PROCS     NPROC          nproc          20+8*maxusers
      Text         TEXTS                    ntext          36+maxusers
      Region       REGIONS   NREGION(V.3)
      Inode        INODES    NINODE         ninode         nproc+80+13*maxusers
      BSD Inode              UFSINODE(V.4)
      File         FILES     NFILE(V.3)     nfile        16*(nproc+16+maxusers)
                                                         /10+64
      Callout      CALLS     NCALL          ncallout       16+nproc
      Character list CLISTS  NCLIST         nclist         60+12*maxusers
      Quota table            NDQUOT(V.4)    ndquot         ninode+(maxusers*
                                                           nmount)/4
      Processes 
      per user     MAXPROC   MAXUP          MAXUPROC       25
      Files 
      per process            NOFILES(V.3)   NOFILE         256
      Mounted
      filesystems  MOUNTS    NMOUNT(V.3)    NMOUNT         40
      ------------------------------------------------------------------------




Revision History
Created      on Dec  22 ,1992