Added UseMachineSpeedForFS patch from Robin Roth
git-svn-id: svn://opensvn.adaptivecomputing.com/maui/trunk@147 3f5042e3-fb1d-0410-be18-d6ca2573e517
This commit is contained in:
parent
1c4f2e31ce
commit
aa37fa7509
@ -17,6 +17,13 @@ Maui 3.3.1
|
||||
which previously no-op'ed (Jason Williams)
|
||||
- Patch for 'showq -r' to show the correct values between 0 - 100 percent if NODEALLOCMAXPS is set
|
||||
to TRUE (Bas van der Vlies)
|
||||
- Added UseMachineSpeedForFS patch. (Robin Roth)
|
||||
"When using Fairshare it weights the Fairshareusage with the speed of
|
||||
the nodes used by the job. Up to now the nodespeed is only used to allow
|
||||
jobs to run longer, but with fairshare users on slower nodes are punished,
|
||||
as their fs-usage is higher than on fast nodes. Additionally this allows
|
||||
single nodes to be taken out of the fairshare-system by setting their speed
|
||||
to very low numbers."
|
||||
|
||||
Maui 3.3
|
||||
- Fixed configure script. Was putting RMCFG[name] TYPE=PBS@RMNMHOST@.
|
||||
|
@ -495,6 +495,7 @@ enum {
|
||||
pSimJobSubmissionPolicy,
|
||||
pSimNCPolicy,
|
||||
pUseMachineSpeed,
|
||||
pUseMachineSpeedForFS,
|
||||
pUseSystemQueueTime,
|
||||
pNodeAvailPolicy,
|
||||
mcoResourceLimitPolicy,
|
||||
|
@ -205,6 +205,7 @@
|
||||
#define DEFAULT_SRPERIOD mpDay
|
||||
|
||||
#define DEFAULT_USEMACHINESPEED FALSE
|
||||
#define DEFAULT_USEMACHINESPEEDFORFS FALSE
|
||||
#define DEFAULT_USESYSTEMQUEUETIME ptOFF
|
||||
#define DEFAULT_JOBPRIOACCRUALPOLICY jpapQueuePolicy
|
||||
#define DEFAULT_RESOURCEAVAILPOLICY mrapCombined
|
||||
@ -1356,6 +1357,7 @@ typedef struct {
|
||||
/* booleans */
|
||||
|
||||
int UseMachineSpeed;
|
||||
int UseMachineSpeedForFS;
|
||||
int UseSystemQueueTime;
|
||||
int UseCPUTime;
|
||||
int RejectNegPrioJobs;
|
||||
|
@ -1697,6 +1697,7 @@ int MCfgSetVal(
|
||||
case pJobSizePolicy:
|
||||
case pJobNodeMatch:
|
||||
case pUseMachineSpeed:
|
||||
case pUseMachineSpeedForFS:
|
||||
case pNodeAllocationPolicy:
|
||||
case pBFMetric:
|
||||
case mcoAdminMinSTime:
|
||||
|
@ -1627,6 +1627,7 @@ const mcfg_t MCfg[] = {
|
||||
{ "USEJOBREGEX", mcoUseJobRegEx, mdfString, mxoSched, NULL },
|
||||
{ "USELOCALMACHINEPRIORITY", pUseLocalMachinePriority, mdfString, mxoSched, NULL },
|
||||
{ "USEMACHINESPEED", pUseMachineSpeed, mdfString, mxoSched, NULL },
|
||||
{ "USEMACHINESPEEDFORFS", pUseMachineSpeedForFS, mdfString, mxoSched, NULL },
|
||||
{ "USERCAP", pCUCap, mdfInt, mxoPar, NULL },
|
||||
{ "USERWEIGHT", pCUWeight, mdfInt, mxoPar, NULL },
|
||||
{ "USESYSLOG", mcoUseSyslog, mdfString, mxoSched, NULL },
|
||||
|
@ -602,6 +602,7 @@ int MParSetDefaults(
|
||||
P->BFProcFactor = DEFAULT_BACKFILLNODEFACTOR;
|
||||
P->BFMaxSchedules = DEFAULT_MAXBACKFILLSCHEDULES;
|
||||
|
||||
P->UseMachineSpeedForFS = DEFAULT_USEMACHINESPEEDFORFS;
|
||||
P->UseMachineSpeed = DEFAULT_USEMACHINESPEED;
|
||||
P->UseSystemQueueTime = DEFAULT_USESYSTEMQUEUETIME;
|
||||
P->JobPrioAccrualPolicy = DEFAULT_JOBPRIOACCRUALPOLICY;
|
||||
@ -1667,6 +1668,12 @@ int MParProcessOConfig(
|
||||
|
||||
break;
|
||||
|
||||
case pUseMachineSpeedForFS:
|
||||
|
||||
P->UseMachineSpeedForFS = MUBoolFromString(SVal,FALSE);
|
||||
|
||||
break;
|
||||
|
||||
case pUseMachineSpeed:
|
||||
|
||||
P->UseMachineSpeed = MUBoolFromString(SVal,FALSE);
|
||||
@ -2070,6 +2077,15 @@ int MParConfigShow(
|
||||
|
||||
if (P->Index == 0)
|
||||
{
|
||||
if ((P->UseMachineSpeedForFS == TRUE) ||
|
||||
(VFlag || (PIndex == -1) || (PIndex == pUseMachineSpeedForFS)))
|
||||
{
|
||||
sprintf(Buffer,"%s%-30s %s\n",
|
||||
Buffer,
|
||||
MParam[pUseMachineSpeedForFS],
|
||||
(P->UseMachineSpeedForFS == TRUE) ? "TRUE" : "FALSE");
|
||||
}
|
||||
|
||||
if ((P->UseMachineSpeed == TRUE) ||
|
||||
(VFlag || (PIndex == -1) || (PIndex == pUseMachineSpeed)))
|
||||
{
|
||||
|
@ -881,6 +881,10 @@ int MStatUpdateActiveJobUsage(
|
||||
|
||||
mreq_t *RQ;
|
||||
mpar_t *P;
|
||||
|
||||
double averagenodespeed = 0.0;
|
||||
double totalnodespeed = 0.0;
|
||||
int speedcounter = 0;
|
||||
|
||||
const char *FName = "MStatUpdateActiveJobUsage";
|
||||
|
||||
@ -940,10 +944,14 @@ int MStatUpdateActiveJobUsage(
|
||||
|
||||
for (rqindex = 0;J->Req[rqindex] != NULL;rqindex++)
|
||||
{
|
||||
|
||||
RQ = J->Req[rqindex];
|
||||
|
||||
P = &MPar[RQ->PtIndex];
|
||||
|
||||
totalnodespeed = 0.0;
|
||||
speedcounter = 0;
|
||||
|
||||
psdedicated = 0.0;
|
||||
psutilized = 0.0;
|
||||
|
||||
@ -972,6 +980,9 @@ int MStatUpdateActiveJobUsage(
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
speedcounter++;
|
||||
totalnodespeed += N->Speed;
|
||||
|
||||
msdedicated += (double)(interval * TC * RQ->DRes.Mem);
|
||||
|
||||
@ -1149,6 +1160,23 @@ int MStatUpdateActiveJobUsage(
|
||||
|
||||
MPolicyAdjustUsage(NULL,J,NULL,mlActive,NULL,-1,1,NULL);
|
||||
|
||||
if (speedcounter == 0)
|
||||
averagenodespeed = 1.0;
|
||||
else
|
||||
averagenodespeed = totalnodespeed / speedcounter;
|
||||
|
||||
if (P->UseMachineSpeedForFS == TRUE)
|
||||
{
|
||||
fsusage *= averagenodespeed;
|
||||
psdedicated *= averagenodespeed;
|
||||
psutilized *= averagenodespeed;
|
||||
msdedicated *= averagenodespeed;
|
||||
msutilized *= averagenodespeed;
|
||||
}
|
||||
|
||||
if ((J != NULL) && (J->Cred.C != NULL))
|
||||
DBG(1,fSTAT) DPrint("INFO: Average nodespeed for Job %s is %f, %f, %i \n",J->Name,averagenodespeed,totalnodespeed,speedcounter);
|
||||
|
||||
U = J->Cred.U;
|
||||
|
||||
if (U != NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user