From: Greg Ercolano <erco@(email surpressed)>
Subject: Re: weighted groups of machines?
   Date: Fri, 08 Nov 2013 00:00:45 -0500
Msg# 2362
View Complete Thread (4 articles) | All Threads
Last Next
On 11/07/13 09:06, Greg Ercolano wrote:
     Now to block the low pri renders (<100) from running at particular hours,
     set up a cron job that changes the MinPri field of the rush/etc/hosts file around:
 
         In the morning, set the MinPri to 100
         In the evening, set the MinPri to 0

    Oops: well, that's the theory anyway..!

    I just checked though; looks like the above is half broken in 103.03 and older;
    when the hosts file reloads with a /larger/ MinPri it blocks the render properly,
    but once blocked, the job doesn't pick up again when the MinPri is lowered back to 0.

    So I just made a fix for this problem which will be in Rush 103.04.

    The following screen history shows it working properly; a job asking for host 'zoar'
    at priority 100: zoar=1@100

    While this @100 job is rendering away on "zoar", I changed the MinPri around:

     1) Raised the MinPri on zoar from 0 -> 555 (using sed -i to edit the live file)
     2) Check the job to see it's been denied from further rendering due to the raised MinPri of 500
     3) Lowered the MinPri on zoar back to 0 (again using sed -i)
     4) See the @100 job pick up again

    What follows is the screen history I just ran with Rush 103.04 which has this fix:

$ egrep 'MinPri|^zoar' /usr/local/rush/etc/hosts 
#Host               Cpus    Ram    MinPri    Criteria/Hostgroups
zoar                8       100    0         +any,linux,+linux      Verify MinPri for zoar is 0

$ rush -lc                                                          See what job's cpu is doing
CPUSPEC[HOST] STATE  FRM  PID   JOBTID PRI ELAPSED  JOBID    NOTES
zoar=1@100    Busy   0089 17308 306866 100 00:00:29 zoar.224        "Busy" rendering frame 89

$ sed -i 's/^\(zoar.*100.*\)0/\1555/' /usr/local/rush/etc/hosts     Change MinPri from 0 to 555
$ rush -push hosts +any                                             send change to network
      [..snipped output..]

$ egrep 'MinPri|^zoar' /usr/local/rush/etc/hosts
#Host               Cpus    Ram    MinPri    Criteria/Hostgroups
zoar                8       100    555       +any,linux,+linux      Verify MinPri now 555

$ rush -lc                                                          See what job's cpu is doing
CPUSPEC[HOST] STATE   FRM PID JOBTID PRI ELAPSED  JOBID    NOTES
zoar=1@100    JobPass -   -   306866 100 00:00:31 zoar.224 Below MinPri (100<555) Stopped rendering (JobPass)

$ sed -i 's/^\(zoar.*100.*\)555/\10/' /usr/local/rush/etc/hosts      change MinPri for zoar back to 0
$ rush -push hosts +any
      [..snipped output..]

$ rush -lc
CPUSPEC[HOST] STATE FRM  PID   JOBTID PRI ELAPSED  JOBID    NOTES
zoar=1@100    Busy  0090 17342 306866 100 00:00:03 zoar.224         "Busy" rendering again
$

*******************************************************************************************************************
**  UPDATE: 11/07/13 22:31: Perhaps the following sed expressions are slightly better than the above:            **
**                                                                                                               **
**     sed -i 's/^\(zoar\s*\S*\s*\S*\s*\)\S*/\10/' /usr/local/rush/etc/hosts          -- sets MinPri to 0        **
**     sed -i 's/^\(zoar\s*\S*\s*\S*\s*\)\S*/\1555/' /usr/local/rush/etc/hosts        -- sets MinPri to 555      **
**                                                                                                               **
*******************************************************************************************************************
    

Last Next