Skip to content

Regulation options: fresh job demand, and bounds that reach workers of an older queue configuration - #322

Merged
mightqxc merged 2 commits into
HSF:masterfrom
wenaus:regulation-options
Nov 9, 2026
Merged

mightqxc merged 2 commits into
HSF:masterfrom
wenaus:regulation-options

Conversation

@wenaus

@wenaus wenaus commented Oct 30, 2026

Copy link
Copy Markdown
Member

Four configuration options for pilot supply. Each is off unless set, so existing configurations behave as before; each is documented in the configuration template.

  • cacher.refreshSecondsByKey: a refresh interval in seconds for the main keys listed, instead of refreshInterval in minutes. Job statistics can refresh every 30 seconds while the static records keep their slower cadence, so newly activated jobs are no longer hidden from the worker adjuster for up to the whole cache period.
  • submitter.jobStatsMaxAge: job statistics missing or older than this many seconds give no demand from activated jobs. Without job statistics, a pull queue falls back to its configured queue limits and submits pilots that find no work.
  • monitor.fifoMaxCheckInterval: an upper bound on the FIFO check interval. A worker keeps the queue configuration it was submitted with, so a shorter fifoCheckInterval set in the queue configuration does not reach workers already submitted; this bound does.
  • monitor.historyMaxAgeFloor: a lower bound on HTCondorMonitor's useCondorHistoryMaxAge, which likewise reaches workers already submitted. Pilots that run several jobs in sequence under a timefloor ended past the 7200-second default and were recorded as cancelled instead of finished.

Running on the ePIC OSG harvester at BNL since 2026-10-22, with job statistics refreshed every 30 seconds, jobStatsMaxAge 90, fifoMaxCheckInterval 30 and historyMaxAgeFloor 86400.

🤖 Generated with Claude Code

…f an older queue configuration

Four options, each off unless set:

- cacher.refreshSecondsByKey: a refresh interval in seconds for the main
  keys listed, so job statistics can refresh faster than static records.
- submitter.jobStatsMaxAge: job statistics missing or older than this give
  no demand from activated jobs, instead of the configured queue limits.
- monitor.fifoMaxCheckInterval: an upper bound on the FIFO check interval,
  which also reaches workers whose queue configuration predates a change.
- monitor.historyMaxAgeFloor: a lower bound on HTCondorMonitor's
  useCondorHistoryMaxAge, reaching those workers likewise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 30, 2026 21:34
wenaus added a commit to BNLNPPS/distcomp-services that referenced this pull request Oct 30, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Stale detailed job statistics can still drive pilot demand, and event-first Condor queries can bypass the configured history-age floor, causing older workers to miss history lookup.

2 open issues
What changed in this PR

This PR adds optional controls for Harvester’s pilot supply, allowing fresher job-demand data and monitoring bounds that also apply to workers submitted under older queue configurations.

Changes:

  • Add per-key cache refresh intervals and a job-statistics freshness guard.
  • Add a FIFO check-interval cap and an HTCondor history-age floor.
  • Document all four options in the configuration template.
File Description
templates/​panda/​panda_harvester.cfg.rpmnew.template Documents the new optional settings.
pandaharvester/​harvestermonitor/​htcondor_monitor.py Applies the configured history-age floor.
pandaharvester/​harvesterbody/​worker_adjuster.py Suppresses activated-job demand when statistics are missing or stale.
pandaharvester/​harvesterbody/​monitor.py Caps worker FIFO check intervals.
pandaharvester/​harvesterbody/​cacher.py Supports per-key refresh intervals in seconds.

Review effort: Balanced

# max age of workers in seconds (since last status update) that are allowed to queyr with condor history
self.useCondorHistoryMaxAge = getattr(self, "useCondorHistoryMaxAge", 7200)
# monitor.historyMaxAgeFloor raises it, also for workers whose queue configuration predates a change
self.useCondorHistoryMaxAge = max(getattr(self, "useCondorHistoryMaxAge", 7200), getattr(harvester_config.monitor, "historyMaxAgeFloor", 0))
Add checks for job statistics age and log errors accordingly.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@mightqxc
mightqxc merged commit e494c5a into HSF:master Nov 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants