Configure Policy - FairShare and Other Parameters
Accelerator has a time-windowing multi-level FairShare mechanism. This allocates CPU cycles to the fsgroups at each level according to the assigned weights of each group until the leaf nodes of the FairShare tree are reached. Each node of the FairShare tree may have a separate time window. The word 'fsgroup' is used as an abbreviation here.
Locate Server Configuration Directory to Find policy.tcl
The test queue was start in vncdexin in directory ~/ncadmin. So the server configuration directory for this Accelerator queue is ~/ncadmin/vncdexin.swd. By default, the server configuration directory is $VOVDIR/../../vnc/vnc.swd.
% nc cmd vovserverdir
/home/dexin/ncadmin
In this case, you will find policy.tcl file at /home/dexin/ncadmin/vncdexin.swd/policy.tcl.
You will find other configuration files in the same directory, for example, taskers.tcl, resources.tcl.
Configure policy.tcl for FairShare
In the following example, two groups, production
and
regression
, are configured.
# in policy.tcl
% vovfsgroup create /production -weight 400 -window 8h
% vovfsgroup create /regression -weight 100 -window 8h
/production
and
/regression
. When there are jobs from both the
production
group and regression
group, the
target share ratio of CPUs will be 400:100.Save the New Configuration
Changes made by the vovfsgroup command are only in the vovserver's memory until the next save, and may be lost if the vovserver is restarted before then.
% nc cmd vovfsgroup genconfig myfsconfig.tcl
Test the New Fairshare Configuration
Server Configuration Parameters
Certain parameters of the Accelerator vovserver are also configurable by means of entries in the policy.tcl file. The Server Configuration page describes these in detail.)
# This is part of the policy.tcl file.
set config(maxQueueLength) 8000
set config(httpSecure) 1
set config(saveToDiskPeriod) 2h;
set config(autoLogout) 1h; # Logout from browser interface
# Used by Accelerator for autoforget.
set config(autoForgetValid) 1h
set config(autoForgetFailed) 2d
set config(autoForgetOthers) 2d
set config(autoRescheduleThreshold) 2s