diff --git a/CHANGELOG b/CHANGELOG index 524a7f2..92c92dd 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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@. diff --git a/include/msched-common.h b/include/msched-common.h index c780fad..5fd960b 100644 --- a/include/msched-common.h +++ b/include/msched-common.h @@ -495,6 +495,7 @@ enum { pSimJobSubmissionPolicy, pSimNCPolicy, pUseMachineSpeed, + pUseMachineSpeedForFS, pUseSystemQueueTime, pNodeAvailPolicy, mcoResourceLimitPolicy, diff --git a/include/msched.h b/include/msched.h index f232ba9..5c47310 100644 --- a/include/msched.h +++ b/include/msched.h @@ -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; diff --git a/src/moab/MConfig.c b/src/moab/MConfig.c index ec546d0..e62c2f6 100644 --- a/src/moab/MConfig.c +++ b/src/moab/MConfig.c @@ -1697,6 +1697,7 @@ int MCfgSetVal( case pJobSizePolicy: case pJobNodeMatch: case pUseMachineSpeed: + case pUseMachineSpeedForFS: case pNodeAllocationPolicy: case pBFMetric: case mcoAdminMinSTime: diff --git a/src/moab/MConst.c b/src/moab/MConst.c index 3a31b35..1407edf 100644 --- a/src/moab/MConst.c +++ b/src/moab/MConst.c @@ -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 }, diff --git a/src/moab/MPar.c b/src/moab/MPar.c index d9bd2ae..1a4948e 100644 --- a/src/moab/MPar.c +++ b/src/moab/MPar.c @@ -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))) { diff --git a/src/moab/MStats.c b/src/moab/MStats.c index 229d95b..b162b21 100644 --- a/src/moab/MStats.c +++ b/src/moab/MStats.c @@ -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)