Scaling the units for resource usage limits

The default unit for the following resource usage limits is KB:
  • Core limit (-C and CORELIMIT)

  • Memory limit (-M and MEMLIMIT)

  • Stack limit (-S and STACKLIMIT)

  • Swap limit (-v and SWAPLIMIT)

This default may be too small for some environments that make use of very large resource usage limits, for example, GB or TB.

LSF_UNIT_FOR_LIMITS in lsf.conf specifies larger units for the resource usage limits with default unit of MB.

The unit for the resource usage limit can be one of:
  • KB (kilobytes)

  • MB (megabytes)

  • GB (gigabytes)

  • TB (terabytes)

  • PB (petabytes)

  • EB (exabytes)

LSF_UNIT_FOR_LIMITS applies cluster-wide to limits at the job-level (bsub), queue-level (lsb.queues), and application level (lsb.applications).

The limit unit specified by LSF_UNIT_FOR_LIMITS also applies to limits modified with bmod, and the display of resource usage limits in query commands (bacct, bapp, bhist, bhosts, bjobs, bqueues, lsload, and lshosts).

Important:

Before changing the units of your resource usage limits, you should completely drain the cluster of all workload. There should be no running, pending, or finished jobs in the system.

In a MultiCluster environment, you should configure the same unit for all clusters.

After changing LSF_UNIT_FOR_LIMITS, you must restart your cluster.

How limit unit changes affect jobs

When LSF_UNIT_FOR_LIMITS is specified, the defined unit is used for the following commands. In command output, the larger unit appears as T, G, P, or E, depending on the job rusage and the unit defined.

Command

Option/Output

Default unit

bsub/bmod

-C (core limit)

KB

-M (memory limit)

KB

-S (stack limit)

KB

-v (swap limit)

KB

bjobs

rusage

CORELIMIT, MEMLIMIT, STACKLIMIT, SWAPLIMIT

KB (may show MB depending on job rusage)

bqueues

CORELIMIT, MEMLIMIT, STACKLIMIT, SWAPLIMIT

KB (may show MB depending on job rusage)

loadSched, loadStop

MB

bacct

Summary rusage

KB (may show MB depending on job rusage)

bapp

CORELIMIT, MEMLIMIT, STACKLIMIT, SWAPLIMIT

KB

bhist

History of limit change by bmod

KB

MEM, SWAP

KB (may show MB depending on job rusage)

bhosts

loadSched, loadStop

MB

lsload

mem, swp

KB (may show MB depending on job rusage)

lshosts

maxmem, maxswp

KB (may show MB depending on job rusage)

Example

A job is submitted with bsub -M 100 and LSF_UNIT_FOR_LIMITS=MB; the memory limit for the job is 100 MB rather than the default 100 KB.