Specifying CPU frequency management for jobs

Set CPU_FREQUENCY in lsb.applications or lsb.queues to specify required CPU frequency in an application profile or a queue. Specify a value for the required CPU frequency. If no unit is specified, the default unit is GHz. Use MHz to specify a CPU frequency in MHz. All jobs submitted to the application or the queue will request the specified frequency.

Use bsub -freq to submit a job with a required CPU frequency. You can specify frequency units as KHz, MHz or GHz. If no unit is specified, the default is GHz. For example, the following job requires a CPU frequency of 2.5 GHz. CPU frequency is managed by host, so the job is an exclusive job:

bsub –x –freq 2.5GHz myjob

The following job requires a CPU frequency of 2.5 GHz, but in this case, CPU frequency is managed by core, so the job is submitted with an affinity resource requirement:

bsub -R "affinity[core]" –freq 2.5GHz myjob

Job-level frequency specified with bsub -freq overrides the application-level frequency, and application-level frequency overrides queue-level specification.

Use bmod -freq to modify the CPU requirements for the job. Use bmod -freqn to remove job-level frequency requirements. You can only modify frequency for pending jobs. You cannot modify the CPU frequency of running jobs.

When LSF sets the specified maximum CPU frequency, it also sets the CPU governor “on demand”. The operating system will dynamically change the CPU frequency based on the minimum and maximum CPU frequency specified for the job.

Use bjobs use to display the specified maximum CPU frequency:

bjobs –l

Job <304>, User <user1>, Project <default>, Application <8proc>, Status <RUN>,
Queue <normal>, Specified CPU Frequency <2.5 GHz>, Combined CPU Frequency <2.5 GHz>,
Command <#!/bin/csh;#BSUB -q normal ;#BSUB  -app '8proc';rm -rf /tmp/user1; myjob>

The Combined CPU Frequency is the CPU frequency setting of the job (bsub -freq) combined with the queue and application configuration (CPU_FREQUENCY), if any. This value is set by mbatchd when the job starts.

CPU frequency management makes use of two new dynamic string resources you must define in lsf.shared:

availcpufreqs  String          3600      ()          N
currcpufreqs   String            15      ()          N

and in lsf.cluster.<cluster_name>:

availcpufreqs   [default]
currcpufreqs    [default]
Logical CPU available frequency updated by elim.frequency every 3600 seconds.
Current logical CPU frequency updated by elim.frequency every 15 seconds.

Submit a job with a target CPU frequency:

  • By core – target CPU frequency is set to the specified frequency
  • By host – all CPUs in the host are set to the specified frequency

Use lshosts to display CPU frequency for a host:

# lshosts –l hostA

2.7  2.6  2.5  2.4  2.3  2.2  2.1  2.0  1.9  1.8  1.7  1.6  1.5  1.4  1.3  1.2 
Frequency                 CPUs
1.5                             0, 2, 4-6
2.0                             1, 3, 7-8

The environment variable LSB_SUB_FREQUENCY is used by esub to set CPU frequency.