If you want to use SUBMIT_ATTRS to have condor_submit put attributes into the job, then you need to provide values for those attributes in your configuration
You would put something like this in your configuration
SUBMIT_ATTRS = TotalExecutingTime RemoteCpuUtilizationPercent \
RemoteUserCpuUtilizationPercent RemoteSysCpuUtilizationPercent
TotalExecutingTime = 0
RemoteCpuUtilizationPercent = 0.0
RemoteUserCpuUtilizationPercent = 0.0
RemoteSysCpuUtilizationPercent = 0.0
-tj
From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx>
On Behalf Of Vikrant Aggarwal
Sent: Wednesday, May 22, 2019 4:22 AM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Subject: Re: [HTCondor-users] Avoiding CPU wastage
Thanks for your email. I used them in my setup what difference we expect them to make in the results.
i don't see these parameters getting reflect in the job AD for the jobs which are submitted after making the change.
$ condor_config_val -dump | grep SUBMIT_ATTRS
SUBMIT_ATTRS = TotalExecutingTime RemoteCpuUtilizationPercent RemoteUserCpuUtilizationPercent RemoteSysCpuUtilizationPercent
SUBMIT_EXPRS is not something you put in your submit file. It goes in the configuration of the machine that you run condor_submit on.
Also, SUBMIT_EXPRS is the deprecated name for that configuration knob, use SUBMIT_ATTRS instead.
-tj
From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx>
On Behalf Of Vikrant Aggarwal
Sent: Friday, May 17, 2019 5:34 AM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Subject: Re: [HTCondor-users] Avoiding CPU wastage
Hello Michael,
Thanks for your response.
I saw your example at this thread [1]. Referred your and another thread [2] in hope to make the things work for me but unfortunately still I am not managed to put together required
configuration. Yes, Remotewallclocktime is only updated once the job changed it's state example: running to hold or any other state transition. It's also accumulative parameter.
If I use your example as it's then job is going into hold status with proper message with in few seconds of submission which is expected.
Also submit_expr always gives this error to me while submitting the job.
$ condor_submit sleep.sub
1 job(s) submitted to cluster 2633.
WARNING: the line 'SUBMIT_EXPRS = TotalExecutingTime RemoteCpuUtilizationPercent RemoteUserCpuUtilizationPercent RemoteSysCpuUtilizationPercent' was unused by condor_submit. Is
it a typo?
Added the 300s time window in your example so that job should at-least run for 300s before evaluating the condition.
RunningTime = (CurrentTime - JobCurrentStartDate)
( ifThenElse(! isUndefined(RemoteWallClockTime), \
RemoteWallClockTime, 0) - \
ifThenElse(! isUndefined(CumulativeSuspensionTime), \
CumulativeSuspensionTime, 0) \
( ifThenElse(JobStatus == 2 && $(RunningTime) > 300, \
( ifThenElse(JobStatus == 7, \
LastSuspensionTime - JobCurrentStartDate, 0) \
RemoteCpuUtilizationPercent = \
ifThenElse(! isUndefined($(TotalExecutingTime)) && $(TotalExecutingTime) > 300, \
((RemoteSysCpu + RemoteUserCpu) / RequestCpus) / $(TotalExecutingTime) * 100, \
periodic_hold = ($(RemoteCpuUtilizationPercent) < 20)
But the job is going into hold status as the condition evaluates to undefined. I was not expecting that it should have only evaluated the condition when the job is running for more
than 300s but it put the job on hold after 10 sec only. I guess this comes back to same discussion on this thread in which Collin Mehring mentioned about the late evaluation of _expression_.
$ condor_q 2632.0 -af holdreason
The job attribute PeriodicHold _expression_ '( ifThenElse( !isUndefined(( ifThenElse( !isUndefined(RemoteWallClockTime),RemoteWallClockTime,0) - ifThenElse( !isUndefined(CumulativeSuspensionTime),CumulativeSuspen$
ionTime,0) ) + ( ifThenElse(JobStatus == 2,CurrentTime - JobCurrentStartDate,0) ) + ( ifThenElse(JobStatus == 7,LastSuspensionTime - JobCurrentStartDate,0) )) && ( ifThenElse( !isUndefined(RemoteWallClockTime),$
emoteWallClockTime,0) - ifThenElse( !isUndefined(CumulativeSuspensionTime),CumulativeSuspensionTime,0) ) + ( ifThenElse(JobStatus == 2,CurrentTime - JobCurrentStartDate,0) ) + (
ifThenElse(JobStatus == 7,LastSu$
pensionTime - JobCurrentStartDate,0) ) > 300,( ( RemoteSysCpu + RemoteUserCpu ) / RequestCpus ) / ( ifThenElse( !isUndefined(RemoteWallClockTime),RemoteWallClockTime,0) - ifThenElse(
!isUndefined(CumulativeSusp$
nsionTime),CumulativeSuspensionTime,0) ) + ( ifThenElse(JobStatus == 2,CurrentTime - JobCurrentStartDate,0) ) + ( ifThenElse(JobStatus == 7,LastSuspensionTime - JobCurrentStartDate,0)
) * 100,undefined) < 20 )'
$ condor_q 2636.0 -af RemoteWallClockTime CumulativeSuspensionTime JobCurrentStartDate LastSuspensionTime
Still i am not sure why the example which I shared in my previous comment is not working as expected why it's keep on running more than the list of sleep until PERIODIC_RELEASE
evaluates to FALSE.
Sorry I have nothing to share about the reason of using specific version atm.
_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to
htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users
The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/
|