Personal tools
Platform LSF Version 6.0 - Running Jobs with Platform LSF - About Platform LSF
[ Platform Documentation ] [ Title ] [ Contents ] [ Previous ] [ Next ] [ Index ]
[ Top ]
Cluster Concepts
Clusters, jobs, and queues
A group of computers (hosts) running LSF that work together as a single unit, combining computing power and sharing workload and resources. A cluster provides a single-system image for disparate computing resources.
Hosts can be grouped into clusters in a number of ways. A cluster could contain:
- All the hosts in a single administrative group
- All the hosts on one file server or sub-network
- Hosts that perform similar functions
Commands
lshosts
--View static resource information about hosts in the clusterbhosts
--View resource and job information about server hosts in the clusterlsid
--View the cluster namelsclusters
--View cluster status and sizeConfiguration
The name of your cluster should be unique. It should not be the same as any host or queue.
A unit of work run in the LSF system. A job is a command submitted to LSF for execution. LSF schedules, controls, and tracks the job according to configured policies.
Jobs can be complex problems, simulation scenarios, extensive calculations, anything that needs compute power.
Commands
A job slot is a bucket into which a single unit of work is assigned in the LSF system. Hosts are configured to have a number of job slots available and queues dispatch jobs to fill job slots.
Commands
bhosts
--View job slot limits for hosts and host groupsbqueues
--View job slot limits for queuesbusers
--View job slot limits for users and user groupsConfiguration
LSF jobs have the following states:
- PEND--Waiting in a queue for scheduling and dispatch
- RUN--Dispatched to a host and running
- DONE--Finished normally with zero exit value
- EXITED--Finished with non-zero exit value
- PSUSP--Suspended while pending
- USUSP--Suspended by user
- SSUSP--Suspended by the LSF system
- POST_DONE--Post-processing completed without errors
- POST_ERR--Post-processing completed with errors
- WAIT--Members of a chunk job that are waiting to run
A clusterwide container for jobs. All jobs wait in queues until they are scheduled and dispatched to hosts.
Queues do not correspond to individual hosts; each queue can use all server hosts in the cluster, or a configured subset of the server hosts.
When you submit a job to a queue, you do not need to specify an execution host. LSF dispatches the job to the best available execution host in the cluster to run that job.
Queues implement different job scheduling and control policies.
Commands
bqueues
--View available queuesbsub
-q
--Submit a job to a specific queuebparams
--View default queuesConfiguration
The names of your queues should be unique. They should not be the same as the cluster name or any host in the cluster.
First-come, first-served (FCFS) scheduling
The default type of scheduling in LSF. Jobs are considered for dispatch based on their order in the queue.
Hosts
An individual computer in the cluster.
Each host may have more than 1 processor. Multiprocessor hosts are used to run parallel jobs. A multiprocessor host with a single process queue is considered a single machine, while a box full of processors that each have their own process queue is treated as a group of separate machines.
Commands
lsload
--View load on hostslshosts
--View configuration information about hosts in the cluster including number of CPUS, model, type, and whether the host is a client or serverbhosts
--View batch server hosts in the cluster
The names of your hosts should be unique. They should not be the same as the cluster name or any queue defined for the cluster.
The host where jobs are submitted to the cluster.
Jobs are submitted using the
bsub
command or from an application that uses the LSF API.Client hosts and server hosts can act as submission hosts.
Commands
The host where a job runs. Can be the same as the submission host. All execution hosts are server hosts.
Commands
Hosts that are capable of submitting and executing jobs. A server host runs
sbatchd
to execute server requests and apply local policies.Commands
Configuration
Hosts that are only capable of submitting jobs to the cluster. Client hosts run LSF commands and act only as submission hosts. Client hosts do not execute jobs or run LSF daemons.
Commands
Configuration
Where the master LIM and
mbatchd
run. An LSF server host that acts as the overall coordinator for that cluster. Each cluster has one master host to do all job scheduling and dispatch. If the master host goes down, another LSF server in the cluster becomes the master host.All LSF daemons run on the master host. The LIM on the master host is the master LIM.
Commands
Configuration
- The master host is the first host listed in the
lsf.cluster.
cluster_name file or is defined along with other candidate master hosts by LSF_MASTER_LIST inlsf.conf
.LSF daemons
Master Batch Daemon running on the master host. Started by
sbatchd
. Responsible for the overall state of jobs in the system.Receives job submission, and information query requests. Manages jobs held in queues. Dispatches jobs to hosts as determined by
mbschd
.Configuration
Master Batch Scheduler Daemon running on the master host. Works with
mbatchd
. Started bymbatchd
.Makes scheduling decisions based on job requirements and policies.
Slave Batch Daemon running on each server host. Receives the request to run the job from
mbatchd
and manages local execution of the job. Responsible for enforcing local policies and maintaining the state of jobs on the host.
sbatchd
forks a childsbatchd
for every job. The childsbatchd
runs an instance ofres
to create the execution environment in which the job runs. The childsbatchd
exits when the job is complete.Commands
badmin hstartup
--Startssbatchd
badmin hshutdown
--Shuts downsbatchd
badmin hrestart
--Restartssbatchd
Configuration
Remote Execution Server running on each server host. Accepts remote execution requests to provide, transparent and secure remote execution of jobs and tasks.
Commands
Configuration
Load Information Manager running on each server host. Collects host load and configuration information and forwards it to the master LIM running on the master host. Reports the information displayed by
lsload
andlshosts
.Static indices are reported when the LIM starts up or when the number of CPUs (ncpus) change. Static indices are:
- Number of CPUs (ncpus)
- Number of disks (ndisks)
- Total available memory (maxmem)
- Total available swap (maxswp)
- Total available temp (maxtmp)
Dynamic indices for host load collected at regular intervals are:
- Hosts status (status)
- 15 second, 1 minute, and 15 minute run queue lengths (r15s, r1m, and r15m)
- CPU utilization (ut)
- Paging rate (pg)
- Number of login sessions (ls)
- Interactive idle time (it)
- Available swap space (swp)
- Available memory (mem)
- Available temp space (tmp)
- Disk IO rate (io)
Commands
lsadmin limstartup
--Starts limlsadmin limshutdown
--Shuts down limlsadmin limrestart
--Restarts limlsload
--View dynamic load valueslshosts
--View static host load valuesConfiguration
The LIM running on the master host. Receives load information from the LIMs running on hosts in the cluster.
Forwards load information to
mbatchd
, which forwards this information tombschd
to support scheduling decisions. If the master LIM becomes unavailable, a LIM on another host automatically takes over.Commands
lsadmin limstartup
--Starts limlsadmin limshutdown
--Shuts down limlsadmin limrestart
--Restarts limlsload
--View dynamic load valueslshosts
--View static host load valuesConfiguration
External LIM (ELIM) is a site-definable executable that collects and tracks custom dynamic load indices. An ELIM can be a shell script or a compiled binary program, which returns the values of the dynamic resources you define. The ELIM executable must be named
elim
and located in LSF_SERVERDIR.Process Information Manager running on each server host. Started by LIM, which periodically checks on
pim
and restarts it if it dies.Collects information about job processes running on the host such as CPU and memory used by the job, and reports the information to
sbatchd
.Commands
Batch jobs and tasks
You can either run jobs through the batch system where jobs are held in queues, or you can interactively run tasks without going through the batch system, such as tests for example.
A unit of work run in the LSF system. A job is a command submitted to LSF for execution, using the
bsub
command. LSF schedules, controls, and tracks the job according to configured policies.Jobs can be complex problems, simulation scenarios, extensive calculations, anything that needs compute power.
Commands
A batch job that allows you to interact with the application and still take advantage of LSF scheduling policies and fault tolerance. All input and output are through the terminal that you used to type the job submission command.
When you submit an interactive job, a message is displayed while the job is awaiting scheduling. A new job cannot be submitted until the interactive job is completed or terminated.
The
bsub
command stops display of output from the shell until the job completes, and no mail is sent to you by default. UseCtrl-C
at any time to terminate the job.Commands
A command that is not submitted to a batch queue and scheduled by LSF, but is dispatched immediately. LSF locates the resources needed by the task and chooses the best host among the candidate hosts that has the required resources and is lightly loaded. Each command can be a single process, or it can be a group of cooperating processes.
Tasks are run without using the batch processing features of LSF but still with the advantage of resource requirements and selection of the best host to run the task based on load.
Commands
lsrun
--Submit an interactive tasklsgrun
--Submit an interactive task to a group of hosts- See also LSF utilities such as
ch
,lsacct
,lsacctmrg
,lslogin
,lsplace
,lsload
,lsloadadj
,lseligible
,lsmon
,lstcsh
An application or command that does not make sense to run remotely. For example, the
ls
command on UNIX.Commands
Configuration
lsf.task
--Configure systemwide resource requirements for taskslsf.task.cluster
--Configure clusterwide resource requirements for tasks.lsftasks
--Configure user-specific tasksAn application or command that can be run on another machine in the cluster.
Commands
Configuration
lsf.task
--Configure systemwide resource requirements for taskslsf.task.cluster
--Configure clusterwide resource requirements for tasks.lsftasks
--Configure user-specific tasksHost types and host models
Hosts in LSF are characterized by host type and host model.
The following example has HP hosts. The host type is HPPA. Host models can be HPN4000, HPJ210, etc.
The combination of operating system version and host CPU architecture.
All computers that run the same operating system on the same computer architecture are of the same type--in other words, binary-compatible with each other.
Each host type usually requires a different set of LSF binary files.
Commands
Configuration
The combination of host type and CPU speed (CPU factor) of the computer.
All hosts of the same relative speed are assigned the same host model.
The CPU factor is taken into consideration when jobs are being dispatched.
Commands
Configuration
Users and administrators
A user account that has permission to submit jobs to the LSF cluster.
In general, you must be an LSF administrator to perform operations that will affect other LSF users. Each cluster has one primary LSF administrator, specified during LSF installation. You can also configure additional administrators at the cluster level and at the queue level.
The first cluster administrator specified during installation and first administrator listed in
lsf.cluster.
cluster_name. The primary LSF administrator account owns the configuration and log files. The primary LSF administrator has permission to perform clusterwide operations, change configuration files, reconfigure the cluster, and control jobs submitted by all users.May be specified during LSF installation or configured after installation. Cluster administrators can perform administrative operations on all jobs and queues in the cluster. Cluster administrators have the same cluster-wide operational privileges as the primary LSF administrator except that they do not necessarily have permission to change LSF configuration files.
For example, a cluster administrator can create an LSF host group, submit a job to any queue, or terminate another user's job.
An LSF administrator user account that has administrative permissions limited to a specified queue. For example, an LSF queue administrator can perform administrative operations on the specified queue, or on jobs running in the specified queue, but cannot change LSF configuration or operate on LSF daemons.
Resources
The LSF system uses built-in and configured resources to track resource availability and usage. Jobs are scheduled according to the resources available on individual hosts.
Jobs submitted through the LSF system will have the resources they use monitored while they are running. This information is used to enforce resource limits and load thresholds as well as fairshare scheduling.
LSF collects information such as:
- Total CPU time consumed by all processes in the job
- Total resident memory usage in KB of all currently running processes in a job
- Total virtual memory usage in KB of all currently running processes in a job
- Currently active process group ID in a job
- Currently active processes in a job
On UNIX, job-level resource usage is collected through PIM.
Commands
Configuration
- SBD_SLEEP_TIME in
lsb.params
--Configures how often resource usage information is sampled by PIM, collected bysbatchd
, and sent tombatchd
Load indices measure the availability of dynamic, non-shared resources on hosts in the cluster. Load indices built into the LIM are updated at fixed time intervals.
Commands
Defined and configured by the LSF administrator and collected by an External Load Information Manager (ELIM) program. The ELIM also updates LIM when new values are received.
Commands
Built-in resources that represent host information that does not change over time, such as the maximum RAM available to user processes or the number of processors in a machine. Most static resources are determined by the LIM at start-up time.
Static resources can be used to select appropriate hosts for particular jobs based on binary architecture, relative CPU speed, and system configuration.
Two types of load thresholds can be configured by your LSF administrator to schedule jobs in queues. Each load threshold specifies a load index value:
loadSched
determines the load condition for dispatching pending jobs. If a host's load is beyond any definedloadSched
, a job will not be started on the host. This threshold is also used as the condition for resuming suspended jobs.loadStop
determines when running jobs should be suspended.To schedule a job on a host, the load levels on that host must satisfy both the thresholds configured for that host and the thresholds for the queue from which the job is being dispatched.
The value of a load index may either increase or decrease with load, depending on the meaning of the specific load index. Therefore, when comparing the host load conditions with the threshold values, you need to use either greater than (>) or less than (<), depending on the load index.
Commands
bhosts-l
--View suspending conditions for hostsbqueues -l
--View suspending conditions for queuesbjobs -l
--View suspending conditions for a particular job and the scheduling thresholds that control when a job is resumedConfiguration
Limit the use of resources while a job is running. Jobs that consume more than the specified amount of a resource are signalled or have their priority lowered.
Configuration
Resource limits specified at the queue level are hard limits while those specified with job submission are soft limits. See
setrlimit(2)
man page for concepts of hard and soft limits.Restrict the amount of a given resource that must be available during job scheduling for different classes of jobs to start, and which resource consumers the limits apply to. If all of the resource has been consumed, no more jobs can be started until some of the resource is released.
Configuration
lsb.resources
--Configure queue-level resource allocation limits for hosts, users, queues, and projectsRestrict which hosts the job can run on. Hosts that match the resource requirements are the candidate hosts. When LSF schedules a job, it collects the load index values of all the candidate hosts and compares them to the scheduling conditions. Jobs are only dispatched to a host if all load values are within the scheduling thresholds.
Commands
Configuration
[ Top ]
Job Life Cycle
1 Submit a job
You submit a job from an LSF client or server with the
bsub
command.If you do not specify a queue when submitting the job, the job is submitted to the default queue.
Jobs are held in a queue waiting to be scheduled and have the PEND state. The job is held in a job file in the
LSF_SHAREDIR/
cluster_name/logdir/info/
directory.LSF assigns each job a unique job ID when you submit the job.
You can also assign a name to the job with the
-J
option ofbsub
. Unlike the job ID, the job name is not necessarily unique.2 Schedule job
mbatchd
looks at jobs in the queue and sends the jobs for scheduling tombschd
at a preset time interval (defined by the parameter JOB_SCHEDULING_INTERVAL inlsb.params
).mbschd
evaluates jobs and makes scheduling decisions based on:mbschd
selects the best hosts where the job can run and sends its decisions back tombatchd
.Resource information is collected at preset time intervals by the master LIM from LIMs on server hosts. The master LIM communicates this information to
mbatchd
, which in turn communicates it tombschd
to support scheduling decisions.3 Dispatch job
As soon as
mbatchd
receives scheduling decisions, it immediately dispatches the jobs to hosts.4 Run job
sbatchd
handles job execution. It:
- Receives the request from
mbatchd
- Creates a child
sbatchd
for the job- Creates the execution environment
- Starts the job using
res
The execution environment is copied from the submission host to the execution host and includes the following:
- Environment variables needed by the job
- Working directory where the job begins running
- Other system-dependent environment settings, for example:
The job runs under the user account that submitted the job and has the status RUN.
5 Return output
When a job is completed, it is assigned the DONE status if the job was completed without any problems. The job is assigned the EXIT status if errors prevented the job from completing.
sbatchd
communicates job information including errors and output tombatchd
.6 Send email to client
mbatchd
returns the job output, job error, and job information to the submission host through email. Use the-o
and-e
options ofbsub
to send job output and errors to a file.A job report is sent by email to the LSF client and includes:
[ Top ]
[ Platform Documentation ] [ Title ] [ Contents ] [ Previous ] [ Next ] [ Index ]
Date Modified: November 21, 2003
Platform Computing: www.platform.com
Platform Support: support@platform.com
Platform Information Development: doc@platform.com
Copyright © 1994-2003 Platform Computing Corporation. All rights reserved.