Set Up the Optional Preemption Ruler Compiler Daemon
The Accelerator preemption mechanism is activated by default. If the preemption rules are stored within the config.tcl file, then vovpreemptd will need to be started in order to read and monitor the preemption rules. Follow these steps to enable and configure the preemption daemon.
- Create the directories preemption and vovpreemptd inside the server configuration directory (.swd). The vovpreemptd directory is the run directory for the preemption daemon.
-
Open up permissions for preemption, because auxiliary jobs
will be run in this directory.
% vovproject enable vnc % cd `vovserverdir -p .` % mkdir vovpreemptd % mkdir preemption % chmod a+rwx preemption
- Copy the configuration file template, $VOVDIR/etc/config/vovpreemptd/config.tcl into the newly-created preemption directory.
- Edit the file to define the preemption rules to be used, using the examples below as a guide.
-
Start the vovpreemptd daemon process using
nc cmd vovdaemonmgr start vovpreemptd
, or manually via:% vovproject enable vnc % cd `vovserverdir -p vovpreemptd` % vovpreemptd >& vovpreemptd.log &
Tip: Set up an autostart script to automatically start vovpreemptd when the vovserver is started.% cd `vovserverdir -p autostart` % cp $VOVDIR/etc/autostart/vovpreemptd.csh .
- VovPreemptRule defines which jobs can preempt other jobs.
- VovPreemptMethod defines the methods used to revoke specific resources.
#
# Example of a config.tcl file for vovpreemptd.
#
#
# Set to 0 (zero) if you do not have the old fashion policies.
# Obsolete in 2013.09
#
set vovpreempt(doPolicies) 0
set vovpreempt(maxPreemptPerJob) 6
#
# The max time we wait for a jobcontrol action to have effect.
# On slow networks (e.g. slow LDAP), you may want to increase
# this to 20 or more seconds.
# Obsolete in 2013.09
#
set vovpreempt(timeout,safejobcontrol) 8
#
# This rule fires when there are jobs in the
# queue that have priority >= 8 and that have been
# waiting in the queue for more than 1 minute.
# The preemptable jobs are those in the same jobclass
# as the preemting job and have priority less than 4.
#
VovPreemptRule -rulename GenericPriorityWithinClass \
-preempting "priority>=8" -bucketage 1m \
-preemptable "jobclass==@JOBCLASS@ priority<4" \
-method AUTOMATIC
#
# Example of an ownership contract (Obsolete)
#
VovPreemptDefineOwnershipContract -contractname "SampleOwnership" \
-ownertable {
/sample/urgent 0 40
/sample/normal 0 20
/sample/regression 0 10
}