When could TargetResourceCount return 0 to a running task instance? RRS feed

  • Question

  • Hi, 

    We deploy our HPC SOA service at client sites. One client is having an issue which we know must only happen if ISchedulerJob.TargetResourceCount returns 0 but I am unable to reproduce this issue locally. Is there any way for HPC to return a TargetResourceCount of 0 to a running task instance? I have tried to force compute nodes offline after the task has started but before attempting to get the TargetResourceCount. In any case, I don't think our client had nodes go offline in this way.

    When our first calculation service starts up, it needs to know how many tasks are participating in the job. It will use the target resource count to create that number of shards in the database (we use AllocationAdjustInterval set to -1 to not go above this limit). Is there otherwise any other reliable way to know how many tasks a job starts with?


    Tuesday, January 26, 2016 12:15 PM

All replies

  • Hi Krolley,

    The TargetResourceCount job property is set and used by broker to let scheduler adjust the number of service hosts according to the number of outstanding requests of the SOA session. If the AllocationAdjustInterval is set to -1 which means the allocation adjustment is disabled, then the TargetResourceCount job property would not be set and calling ISchedulerJob.TargetResourceCount on the job instance would return 0. For details about TargetResourceCount and AllocationAdjustInterval, please check here & here.

    For the question to know how many tasks a SOA job starts with, it really depends on the Queue or Balanced scheduling mode, the Min and Max resource count settings, and the current available resource count in the cluster, etc. Basically, in Balanced mode the service job would starts with the Min (1 if Min=Auto), and in Queued mode the service job would starts with the Max or the available resource in the cluster. If you want to limit the running tasks to the startup number during the service runtime, it is achievale to use Queued scheduling mode without preemption or auto grow-shrink enabled. If you need to query how many tasks at the service runtime, the task counters can be obtained by calling ISchedulerJob.GetCounters().


    Yutong Sun

    Wednesday, January 27, 2016 4:30 AM