Resource Allocation Limits

From Define Wiki
Jump to navigation Jump to search

lsb.resources

# User Define Limits
Begin Limit
NAME = job_exec_resource_limits
USERS = user1 ~user2 
SLOTS = 1
MEM = 100
End Limit
  • Run: badmin reconfig after making changes to lsb.resources

Note:

  • SLOTS = 1 - User can submit more than 1 job but only 1 job will be active at a time. The rest will be in PEND state
  • MEM = 100 - Restrict memory usage to 100MB
  • USERS = user1 ~user2 - This limit apply to user1 but not user2
  • If Both JOBS and SLOTS limits are define, the most restrictive limits is used
  • Use bresources to check what resource limuits currently defined


Example: bresources shows:

Begin Limit
  NAME = job_exec_resource_limits
  USERS = user1 ~user2 
  SLOTS = 1
  MEM = 100
End Limit

Submit job as user1:

  • bsub -R "rusage[mem=200]" ./myjob

Job will be submmited and it will be in pending state.

  • Use bjobs to confirm
  • Use bjobs -p to see the reason of the pending state
bjobs -p
JOBID   USER    STAT  QUEUE      FROM_HOST   EXEC_HOST   JOB_NAME   SUBMIT_TIME
490     user1   PEND  normal     vhpchead                *nit2.bash Jun  4 12:34
Resource (mem) limit defined on user or user group has been reached;
491     user1   PEND  normal     vhpchead                *nit2.bash Jun  4 12:35
Resource (mem) limit defined on user or user group has been reached;
492     user1   PEND  normal     vhpchead                *nit2.bash Jun  4 12:36
Resource (mem) limit defined on user or user group has been reached;

lsb.queues

Exclude user9 from a queue name normal

Begin Queue
QUEUE_NAME = normal
.
.
USERS = ~user9
.
End Queue

Submit job as user9:

  • bsub ./myjob
   normal: User cannot use the queue. Job not submitted.

Exclude Unix users group from a queue name normal

Begin Queue
QUEUE_NAME = normal
.
.
USERS = lecturer1 ~users
.
End Queue
  • bqueues -l normal
 QUEUE: normal
 .
 .
 USERS: lecturer1 ~users/
 HOSTS: all

Note:

  • users group entry in /etc/group must define a list of 'user' in this users group, ie: users:100:userX. Otherwise, 'badmin reconfig' will fail. It is not enough just do 'useradd userX -g 100'