Configuring time-based service classes
About this task
Configure time-based service classes in LSB_CONFDIR/cluster_name/configdir/lsb.serviceclasses.
Procedure
Each ServiceClass section begins with
the line Begin ServiceClass and ends with the line End
ServiceClass. For time-based service classes, you must specify:
- A service class name
- At least one goal (deadline, throughput, or velocity) and a time window when the goal is active
- A service class priority
Other parameters are optional. You can configure as many service class sections as you need.
Important: The name that you use for your service class cannot be the same as an
existing host partition or user group name.
Time-based configuration examples
- The service class Sooke defines one deadline goal that is active
during working hours between 8:30 AM and 4:00 PM. All jobs in the service class should complete by
the end of the specified time window. Outside of this time window, the SLA is inactive and jobs are
scheduled without any goal being enforced:
Begin ServiceClass
NAME = Sooke
PRIORITY = 20
GOALS = [DEADLINE timeWindow (8:30-16:00)]
DESCRIPTION="working hours"
End ServiceClass
-
The service class Nanaimo defines a deadline goal that is active during the weekends and at nights.
Begin ServiceClass
NAME = Nanaimo
PRIORITY = 20
GOALS = [DEADLINE timeWindow (5:18:00-1:8:30 20:00-8:30)]
DESCRIPTION="weekend nighttime regression tests"
End ServiceClass
-
The service class Sidney defines a throughput goal of 6 jobs per hour that is always active:
Begin ServiceClass
NAME = Sidney
PRIORITY = 20
GOALS = [THROUGHPUT 6 timeWindow ()]
DESCRIPTION="constant throughput"
End ServiceClass
Tip: To configure a time window that is always open, use thetimeWindow
keyword with empty parentheses. - The service class Tofino defines two velocity goals in a 24 hour period.
The first goal is to have a maximum of 10 concurrently running jobs during business hours (9:00 AM
to 5:00 PM). The second goal is a maximum of 30 concurrently running jobs during off-hours (5:30 PM
to 8:30 AM)
Begin ServiceClass
NAME = Tofino
PRIORITY = 20
GOALS = [VELOCITY 10 timeWindow (9:00-17:00)] \
[VELOCITY 30 timeWindow (17:30-8:30)]
DESCRIPTION="day and night velocity"
End ServiceClass
- The service class Duncan defines a velocity goal that is active
during working hours (9:00 AM to 5:30 PM) and a deadline goal that is active during off-hours (5:30
PM to 9:00 AM) Only users user1 and user2
can submit jobs to this service
class.
Begin ServiceClass
NAME = Duncan
PRIORITY = 23
USER_GROUP = user1 user2
GOALS = [VELOCITY 8 timeWindow (9:00-17:30)] \
[DEADLINE timeWindow (17:30-9:00)]
DESCRIPTION="Daytime/Nighttime SLA"
End ServiceClass
- The service class Tevere defines a combination similar to
Duncan, but with a deadline goal that takes effect overnight and on
weekends. During the working hours in weekdays the velocity goal favors a mix of short and medium
jobs.
Begin ServiceClass
NAME = Tevere
PRIORITY = 20
GOALS = [VELOCITY 100 timeWindow (9:00-17:00)] \
[DEADLINE timeWindow (17:30-8:30 5:17:30-1:8:30)]
DESCRIPTION="nine to five" End ServiceClass