
Imagine an engineering team with twenty powerful servers and fifty people who need them. Without a scheduler, everyone logs in to a favourite machine. A few servers are overloaded, others sit idle, and one heavy simulation can slow down everybody else's work.
IBM Spectrum LSF (Load Sharing Facility) solves this problem. Users describe what a job needs, such as CPU cores, memory, a GPU or a time limit. LSF then decides where and when the job runs. It is used for high-performance computing (HPC), including chip design, engineering simulation and research.
This guide covers how LSF works, how to install it on Linux, and the commands that users and administrators need most. It is based on LSF 10.1.
Key terms
| Term | Meaning |
|---|---|
| Cluster | A group of servers that LSF manages together. |
| Management host | The server that accepts jobs and makes scheduling decisions. Older documents call it the master host. |
| Server host | A server that runs jobs. |
| Job | A command or script submitted to LSF. |
| Queue | A waiting line for jobs, with its own priority, limits and rules. |
| Job slot | A unit of capacity on a host. LSF uses slots to decide how many tasks a host can run. |
How LSF works

LSF is a set of background services, called daemons, that run on the hosts:
| Daemon | Runs on | What it does |
|---|---|---|
mbatchd | Management host | Accepts jobs, keeps them in queues and dispatches them. |
mbschd | Management host | Decides which job runs where. |
sbatchd | Every server host | Starts jobs on its host and reports their status. |
lim | Every server host | Collects load and configuration information. |
res | Every server host | Handles requests to run tasks remotely. |
pim | Every server host | Measures the CPU and memory that job processes use. |
If the management host fails, another host from the configured list can take over. This only works if that host can read the same LSF configuration and working files, which is why they are normally kept on reliable shared storage.
The life of a job

- PEND: waiting in a queue.
- RUN: running on a host.
- DONE: finished successfully, with exit code 0.
- EXIT: ended with an error, or was killed.
- PSUSP: suspended by its owner or an administrator while it was still waiting.
- USUSP: suspended by its owner or an administrator after it started.
- SSUSP: suspended by LSF after it started, for example because the host was overloaded.
Installing LSF on Linux
LSF is commercial software. You need the installer, the package for your platform and an entitlement file from IBM. IBM has also offered a free Community Edition with limits on cluster size, so check IBM's current terms before you plan around it.
1. Prepare the hosts
- Make sure every host can resolve the names of all the others.
- Keep the clocks in sync with NTP or chrony.
- Use the same user accounts and user IDs on every host.
- Mount a shared directory, such as NFS, at the same path on every host.
- Create an administrator account, for example
lsfadmin. The primary administrator cannot be root. - Allow LSF traffic between the hosts, but never expose LSF ports to the internet.
2. Edit install.config
Extract the installer and set these values in install.config. Do not put spaces around the equals sign. The names and paths here are examples:
LSF_TOP="/shared/lsf"
LSF_ADMINS="lsfadmin"
LSF_CLUSTER_NAME="cluster1"
LSF_MASTER_LIST="mgmt01 mgmt02"
LSF_ADD_SERVERS="node01 node02 node03"
LSF_TARDIR="/shared/lsf_packages"
LSF_ENTITLEMENT_FILE="/shared/lsf_packages/lsf.entitlement"
The first name in LSF_MASTER_LIST becomes the management host. The others can take over if it fails.
3. Install and start the cluster
Run the installer as root:
./lsfinstall -f install.config
Then run this as root on every LSF host, so the daemons start when the server boots:
cd /shared/lsf/10.1/install
./hostsetup --top="/shared/lsf" --boot="y"
Finally, load the LSF environment and start the daemons on all hosts:
. /shared/lsf/conf/profile.lsf
lsfstartup
lsfstartup needs remote access to the other hosts. To make it use SSH, set LSF_RSH=ssh in lsf.conf.
4. Check that it works
lsid # LSF version, cluster name and management host
lshosts # hosts and their hardware
bhosts # which hosts can accept jobs
bsub sleep 60 # submit a test job
bjobs # see its status
Submitting jobs
Jobs are submitted with bsub. For anything you run more than once, put the options in a script:
#!/bin/bash
#BSUB -J simulation
#BSUB -q normal
#BSUB -n 8
#BSUB -R "span[hosts=1] rusage[mem=4GB]"
#BSUB -W 2:00
#BSUB -o simulation.%J.out
#BSUB -e simulation.%J.err
./run_simulation
Submit it with the < sign, so that LSF reads the #BSUB lines:
bsub < simulation.sh
| Option | Meaning |
|---|---|
-J | Job name. |
-q | Queue to use. |
-n 8 | Number of tasks, which normally means eight job slots. |
span[hosts=1] | Keep all the tasks on one host. |
rusage[mem=4GB] | Reserve memory for the job. |
-W 2:00 | Time limit of two hours. |
-o, -e | Files for output and errors. %J becomes the job ID. |
Watch the memory value. Depending on how your cluster is configured, rusage[mem] can count once per host or once for every task. Eight tasks with 4 GB each would reserve 32 GB. Ask your administrator which rule applies.
Useful patterns
Job array: run the same test 500 times with different inputs, with at most 50 running at once.
bsub -J "regress[1-500]%50" -o "regress.%J.%I.out" './run_test $LSB_JOBINDEX'
Dependency: start the tests only after the build succeeds.
bsub -J build ./build.sh
bsub -w 'done("build")' ./test.sh
GPU job:
bsub -gpu "num=1" python train.py
Interactive shell on a server host:
bsub -Is bash
Monitoring and controlling jobs
| Command | Use it to |
|---|---|
bjobs | List your unfinished jobs. Add -u all to see everyone's. |
bjobs -l JOBID | See full details of one job. |
bjobs -p | See why jobs are still waiting. |
bpeek JOBID | Read the output of a running job. |
bhist -l JOBID | See the history of a job. |
bacct | See statistics for finished jobs. |
bstop, bresume | Suspend a job, then continue it. |
bkill JOBID | Stop a job for good. |
bqueues, bhosts, lsload | Check queues, hosts and current load. |
Queues and scheduling policies
Queues are where LSF follows your business priorities. They are defined in the file lsb.queues:
Begin Queue
QUEUE_NAME = normal
PRIORITY = 30
FAIRSHARE = USER_SHARES[[design, 3] [verification, 2] [default, 1]]
RUNLIMIT = 4:00 24:00
DESCRIPTION = Everyday jobs
End Queue
Begin Queue
QUEUE_NAME = urgent
PRIORITY = 60
PREEMPTION = PREEMPTIVE[normal]
DESCRIPTION = Deadline work
End Queue
In this example, design and verification are user groups that must already exist. The two run limits are the default (4 hours) and the maximum (24 hours). Check the file for mistakes, then apply it:
badmin ckconfig
badmin reconfig
Fairshare

With simple first-come, first-served scheduling, one person can submit a thousand jobs and block everyone else. Fairshare gives each user or group a share of the cluster. Those who have recently used less than their share move ahead. If only one group has work, it can use the free capacity, so servers are not left idle.
Preemption
Jobs in a preemptive queue can take slots from running jobs in a lower-priority queue. By default the lower-priority job is suspended and continues later. A suspended job can still hold memory and software licences, so test this policy before relying on it.
Backfill

A large job may have to wait until enough hosts are free. Backfill lets short jobs run in that gap, as long as they will finish before the large job is due to start. LSF can only plan this when jobs have run limits, so encourage users to set a realistic -W value.
Solving common problems
| Problem | Where to look |
|---|---|
| A job stays in PEND | Run bjobs -l JOBID and read the pending reason. Often the job asks for more memory or cores than any host has free. |
A job ends with TERM_MEMLIMIT | It used more memory than its limit. Check actual use with bjobs -l, then request more. |
A job ends with TERM_RUNLIMIT | It reached its time limit. Increase -W or use a queue for longer jobs. |
| A host accepts no jobs | Run bhosts -l HOST. The host may be full, closed by an administrator or unreachable. |
| Commands cannot contact LSF | Check that profile.lsf is loaded and the daemons are running, then check host names and the firewall. |
Good habits for administrators
- Start with two or three queues. Add more only when there is a clear need.
- Set default run limits and memory limits, so one faulty job cannot take over a host.
- Close a host with
badmin hclosebefore maintenance, let its jobs finish, and reopen it withbadmin hopen. - Back up the LSF configuration directory and record every change.
- Compare requested and used resources regularly. Jobs that request far more than they use keep other people waiting.
Do you need LSF?
LSF makes sense when many people share many servers, when jobs run for hours, or when expensive software licences must be used well. For one or two servers, cron or a simple job queue is usually enough. If you need a cluster scheduler without licence costs, also compare Slurm, a widely used open-source alternative.
Planning a Linux cluster, or trying to get more from the servers you already have? Book a free consultation and tell us about your workload.
Sources and further reading
- IBM Spectrum LSF quick reference
- LSF daemons
- install.config reference
- bsub options
- lsb.queues reference
IBM and IBM Spectrum LSF are trademarks of International Business Machines Corporation. This is an independent guide and is not endorsed by IBM.
লেখাটি ভালো লেগেছে?
নতুন ইনসাইট সরাসরি আপনার ইনবক্সে পান।


