Limit Jobs for Users

From Define Wiki
Revision as of 15:29, 6 December 2012 by Michael (talk | contribs) (Created page with "===== Limit Users ===== * Edit the lsb.users file in /etc/cfm/template/lsf/lsbatch/default/configdir/ * The following example sets up the user david with MAX_JOBS=5 and everyo...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Limit Users
  • Edit the lsb.users file in /etc/cfm/template/lsf/lsbatch/default/configdir/
  • The following example sets up the user david with MAX_JOBS=5 and everyone in the ugrads group=5
Begin UserGroup
GROUP_NAME       GROUP_MEMBER              USER_SHARES            #GROUP_ADMIN
#ugroup1         (user1 user2 user3 user4) ([user1, 4] [others, 10])   #()
#ugroup2         (all)                     ([user3, 10] [others, 15])  #()
#ugroup3         (ugroup1 user5 user6 user7)     ([user5, 16] [user6, 34] [user7, 15] [ugroup1, 40])  #()
ugrads           (lancaster)               -                           #-
End UserGroup

#Begin User
#USER_NAME        MAX_PEND_JOBS
#user1           800            # user1 has pend threshold of 800
#ugroup1@        500            # each user in ugroup1 has threshold of 100
#ugroup1         1000           # collectively ugroup1 has threshold of 1000
#default         100            # default, any user/group has threshold of 100
#End User

Begin User
USER_NAME        MAX_JOBS    MAX_PEND_JOBS
default          400         -              # default, any user/group has threshold of 100
david            5           -
ugrads@          5           -
End User
  • Update LSF once configuration applied
addhost -u

# Or if your just giving a quick test in /opt/lsf/conf/...
badmin reconfig
Limit Groups defined in Linux/OS
  • NOTE: For groups defined in linux, LSF will only check the /etc/group file (so standard users supplementary groups only considered)
  • The following will fail:
atlasprod:x:10019:
lhcbusers:x:10020:
  • The following will be recognised by LSF
atlasprod:x:10019:user1,user2,user3
lhcbusers:x:10020:user4,user5
  • Change the users groups
usermod -g new_primary_group user (only updates /etc/passwd)
usermod -G additional_group  user (adds entried to /etc/group)
  • Now make changes to lsb.users (in /etc/cfm/templates/lsf/...)
  • NOTE: The @ symbol forces to limit to apply to each users, rather than the group as a whole.
Begin User
USER_NAME        MAX_JOBS    MAX_PEND_JOBS
atlasprod@          100           -
lhcbusers@          200           -
default             400         -              # default, any user/group has threshold of 100
End User
  • Verify these are configured correctly (after addhost -u or badmin reconfig)
[busers]
[root@vhpchead ~]# busers all
USER/GROUP          JL/P    MAX  NJOBS   PEND    RUN  SSUSP  USUSP    RSV
user1                  -    100      0      0      0      0      0      0
user2                  -    100      0      0      0      0      0      0
user3                  -    100      0      0      0      0      0      0
user4                  -    200      0      0      0      0      0      0
user5                  -    200      0      0      0      0      0      0

[bugroups]
[root@vhpchead ~]# bugroup
GROUP_NAME    USERS
atlasprod    user1 user2 user3
lhcbusers    user4 user5