ESP Workload Automation

  • 1.  Tuesday Tips: (CA ESP) Best way to make renewable resource unavailable

    Broadcom Employee
    Posted Apr 16, 2015 09:40 AM

    CA Tuesday Tip by Lucy Zhang, Principal Support Engineer  16/04/2015

     

    At times, users may want to make resource unavailable, so that jobs requiring this resource won't run. For renewable resources, if there are still running jobs using this resource, following command may not work as expected:

    RESEF resource_name SET AVAIL(0)

     

    As when the active jobs complete, the resource count will be returned, causing AVAIL value increased (>0).

     

    With PTF RO50035 in 11.3 or 11.4 base, you can use DECREMENT option. Here is an example:

    1. Renewable resource LUCY3:
    resdef lucy3                          
    Resource LUCY3    Enterprise Renewable
    *        *        Max=10 Avail=10     
    2. Start one JOB using 1 count of this resource:
    Note: the job will stay executing until manually complete it.
    resdef lucy3                          
    Resource LUCY3    Enterprise Renewable
    *        *        Max=10 Avail=9    
    3. Issue command:
    resdef lucy3 SET DECREMENT(10)
    resdef lucy3                         
    Resource LUCY3    Enterprise Renewable
    *        *        Max=0 Avail=-1    

    As you can see, AVAIL value is -1. You may notice the MAX is 0, NOT 10; DECREMENT actually changes the MAX as well. So NO new jobs can run, even after the active job complete which will bring AVAIL to 0.

     

    4. Make the resource available again:
    resdef lucy3 SET INCREMENT(10)         
    ESP1908I Resource LUCY3 updated                                               
    resdef lucy3                          
    Resource LUCY3    Enterprise Renewable 
    *        *        Max=10 Avail=9       

    As you can see, the AVAIL count is 9, NOT 10; as one is still used by an active job.

     

    5. Complete the job and release the resource, now it shows:
    resdef lucy3 SET INCREMENT(10)         
    ESP1908I Resource LUCY3 updated                                                
    resdef lucy3                           
    Resource LUCY3    Enterprise Renewable 
    *        *        Max=10 Avail=10       


    Note: RESDEF resource_name SET MAX(value) can be used to achieve same result:

    - To mark resource as unavailable:

    RESDEF resource_name SET MAX(0) is the same as RESDEF resource_name SET DECREMENT(max_value);

    - To mark the resource available again:

    RESDEF resource_name SET MAX(max_value) is the same as RESDEF resource_name SET INCREMENT(max_value);



  • 2.  RE: Tuesday Tips: (CA ESP) Best way to make renewable resource unavailable

    Posted Jul 06, 2022 09:12 AM
    Hi Lucy,

    Just want to clear my understanding, support if we run RESDEF resource_name SET MAX(0), as per my understanding no new job will submit or will wait for the resource(resource_name) untill it made to it original defined vaue?

    Requesting your suggestion on it.



  • 3.  RE: Tuesday Tips: (CA ESP) Best way to make renewable resource unavailable

    Posted Jul 06, 2022 09:13 AM
    Hi Lucy,

    Suppose if we apply RESDEF resource_name SET MAX(value)=0, does it mean no new job will run and wait for resource(resource_name) untill its value changed to original value?


  • 4.  RE: Tuesday Tips: (CA ESP) Best way to make renewable resource unavailable

    Broadcom Employee
    Posted Jul 06, 2022 09:23 AM

    Hi Nitin,

    You are correct.

    Regards,

    Lucy




  • 5.  RE: Tuesday Tips: (CA ESP) Best way to make renewable resource unavailable

    Posted Jul 07, 2022 10:02 AM
    Hi Lucy, 

    Thank you for your response. What could be the other possibility of new jobs getting resource satisfied (executed) even though RESDEF resource_name SET MAX(value)=0?


  • 6.  RE: Tuesday Tips: (CA ESP) Best way to make renewable resource unavailable

    Broadcom Employee
    Posted Jul 07, 2022 12:05 PM

    Hi Nitin,

    Here are a few possible reasons I can think of:

    - The resource is not RENEWABLE or ENTERPRISE. For the latter, the SET command is not issued to  all the applicable NODEs or CPUs, so the JOB may be routed to other CPU or NODE.

    - The JOB request may be processed by ESP before the RESDEF SET command;

    Note: I saw that one support case was opened on this, we will collect more related data for further review.

    Thank you,

    Lucy