Skip to content

Create job history execution in database (for TTL estimators)

Using the table below (TTLPredictionHistorySite), we save information about the execution time of Grid jobs based on (ProductionId, Site, CPUModelName). The information from this table will be used to adjust the job TTL based on the execution history of jobs with the same (ProductionId, Site, CPUModelName). The updates use Welford's algorithm to compute mean and stddev.

The commits from this PR:

  • in JobAgent: export PATH=$PATH in the JobWrapper environment
  • in JobAgent: extract productionId from JDL (LPMJobTypeID)
  • in JobAgent: add siteMap and productionId in extrafields when the JA sends accounting data (when job status is DONE)
  • in TaskQueue.history: add HistoryFactory to receive data to be consumed by HistoryConsumers
  • in TaskQueue.history: add HistoryConsumer as an abstract class that represents a history data consumer
  • in TaskQueue.history: add JobHistoryStatistics, a HistoryConsumer that saves history data in TTLPredictionHistorySite
  • in TaskQueue.history: add JobHistoryFactor that created the job HistoryConsumers.
  • in TaskQueueUtils: add a static JobHistoryFactory object that will be notified with accounting data (extrafields containing the notifyMap field) when a job successfully finishes its execution
  • in TaskQueue.history: monitory queue size and db update time for JobHistoryStatistics.

The table definition:

CREATE TABLE `TTLPredictionHistorySite` (
  `prodId` int NOT NULL,
  `site` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
  `cpuModelName` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
  `jobs` bigint DEFAULT NULL,
  `mean` decimal(30,10) DEFAULT NULL,
  `stddev` decimal(30,10) DEFAULT NULL,
  `welfordM` decimal(30,10) DEFAULT NULL,
  `maxTime` bigint DEFAULT NULL,
  `lastUpdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `estimatedTTL` bigint DEFAULT NULL,
  `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`prodId`,`site`,`cpuModelName`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_cs;

Signed-off-by: Elena Mihailescu maria.mihailescu@upb.ro

Merge request reports

Loading