Back to home page

EIC code displayed by LXR

 
 

    


Warning, /swf-monitor/docs/COMPUTE_EFFICIENCY.md is written in an unsupported language. File is not indexed.

0001 # Compute efficiency history
0002 
0003 The Sites menu's **Compute efficiency** page (`panda/compute-efficiency/`) shows
0004 successful-job core-hours divided by the core-hours of all ended jobs.
0005 Both it and the dashboard count production jobs only: EIC managed jobs and
0006 legacy `epicproduction` jobs; trials (processing type `canary`) are excluded,
0007 and so are an Event Service queue's jobs created before its move to production,
0008 which were its commissioning trials whatever their label (SysConfig
0009 `compute_efficiency.commissioning_until`: Google ES 2026-10-25 17:36 ET,
0010 Perlmutter ES 2026-10-26 08:20 ET). Trials after that move are excluded by
0011 task (SysConfig `compute_efficiency.commissioning_tasks`; Torre Wenaus,
0012 2026-10-29): Perlmutter's return to commissioning on 28 October, gun tasks
0013 41463 and 41469 of the serialized-handoff defect and 41479 and 41480, the
0014 first tasks of the new EVGEN Event Service workflow. None was a production
0015 run. PCS trials, whose task names end in `.trial` or `.trialN`, are
0016 excluded by name. A production task in which a defect shows that
0017 commissioning validation was incomplete is relabelled a trial after the
0018 fact with swf-epicprod `scripts/trial-relabel.py`: it joins the list with
0019 who, when and why in the action stream, and the retained histories are
0020 rebuilt over its days (the efficiency history in full, productive cores
0021 from the task's start). Every production metric and the Prod tasks in
0022 flight page apply the one rule (`trial_sql`, `trial_tasks`). Jobs whose loss came from a commissioning-grade defect of ours are
0023 excluded by PandaID (SysConfig `compute_efficiency.commissioning_jobs`;
0024 Torre Wenaus, 2026-10-29): Google Event Service jobs 6341816, 6359213,
0025 6359214 and 6359215, which the broken close-out step of 28-29 October left
0026 open until PanDA's lost-heartbeat timeout.
0027 It contains a site-by-period heatmap with core-hour volumes and selectable
0028 trend lines. The PanDA hub and the dashboard's Computing now heading link
0029 to this history.
0030 
0031 The dashboard's panel below Storage has three monthly plots, each with
0032 OSG, Perlmutter and GREX curves: efficiency, total average cores (labelled
0033 **Cores / day**), and productive average cores; the efficiency plot also has a
0034 Google curve, whose few cores would draw flat lines on the other two. Each plot also shows an overall
0035 reading for the preceding 24 hours and one overall monthly average since May.
0036 OSG combines execution sites and retired queues; Perlmutter combines its
0037 historical queues. Hover identifies each curve and its measured values.
0038 
0039 A larger **Productive average cores · daily** plot sits immediately above
0040 Production resource peaks in the dashboard's left column. Its 90 completed
0041 UTC days show additive filled areas: OSG blue, GREX green and Perlmutter
0042 amber, with a white line on their summed upper boundary. Each daily value is
0043 successful core-hours divided by 24. The current incomplete day is omitted;
0044 the compact right-hand plots retain their preceding-24-hour readings.
0045 
0046 This daily plot includes EIC managed jobs and legacy `epicproduction`
0047 jobs, which carried PanDA's `test` source label before the production label
0048 transition. Jobs with processing type `canary` are excluded. Missing
0049 timings create gaps, while a completed day with no production completions
0050 contributes zero. Hover gives the day, site contributions and summed total.
0051 The existing PanDA Snapper counters include test jobs, so this filtered
0052 record has its own Snapper component, `epicprod:production_compute`, and
0053 cached product, `productive_cores_daily:v1`. The initial build queries 90
0054 days; hourly refreshes reread seven days and preserve older daily values
0055 from Snapper. Immutable system snaps retain each accepted history. The
0056 same hourly scheduled producer refreshes both compute products.
0057 
0058 A shallow **Pressure front ready tasks** plot below productive cores uses
0059 the identical 90-day date positions. Its cyan line begins on the first
0060 nonzero daily mean; earlier dates remain blank. Later measured zero days
0061 remain visible, while unrecorded intervals stay missing. Its Y-axis ticks
0062 are whole numbers; hover retains fractional daily means. The source is the
0063 production front's ready-task depth and cycle records in the action stream,
0064 not PanDA jobs waiting for a worker. A day's value is the time-weighted mean
0065 over its recorded coverage, which hover reports in hours. Queue decisions
0066 expire after 75 minutes and a cycle sample after 15 minutes, preserving
0067 collection gaps. These daily means are retained with productive cores in
0068 Snapper; the hourly producer rereads the latest seven days.
0069 
0070 All three metrics use the same ended-job sample. Efficiency divides summed
0071 successful core-hours by all ended core-hours. Total average cores includes
0072 failed work and divides ended core-hours by elapsed calendar hours, including
0073 days with no completions. The dashboard's cores/day readings divide the
0074 underlying core-hours/day values by 24. Productive average cores divides
0075 successful core-hours by elapsed hours; it equals cores/day times efficiency,
0076 with efficiency expressed as a fraction.
0077 No processor-performance weights are applied. The partial current month
0078 uses elapsed time through the history's observation timestamp.
0079 
0080 The last-24-hour reading uses exact UTC timestamps and the shared
0081 `compute_efficiency_current:v2` cached product, refreshed every minute.
0082 Monthly values read the retained hourly history. Dashboard requests serve
0083 cached results and start stale or initial builds in the background.
0084 
0085 The heatmap uses an explicit fixed 0–100% scale: red at zero, amber at
0086 50%, and green at 100%. Dark labels remain readable on the light fills;
0087 higher efficiency is always greener.
0088 
0089 Hovering a trend line or marker identifies its site in a high-contrast
0090 floater with the nearest measured period's efficiency and ended core-hours.
0091 Line hover respects missing periods and hidden legend entries; it never
0092 reports an interpolated percentage as a measurement.
0093 
0094 Trend line thickness is proportional to the site's ended core-hours over
0095 the selected date window, with the largest contributor drawn at six pixels
0096 and a one-pixel minimum keeping smaller contributors visible. Focusing or
0097 hiding a line preserves this scale. Hover details include the site's total
0098 core-hours and share of processing for the same window.
0099 
0100 ## Measurement
0101 
0102 The source is PanDA's active and archived job tables. Finished, failed,
0103 closed and cancelled jobs are bucketed by
0104 their UTC end date. Duration is end minus start; allocation is duration
0105 times actual core count, falling back to declared cores and then one.
0106 Missing or reversed timings do not contribute hours and are counted
0107 separately. Running jobs and idle pilot allocations are outside the metric.
0108 This is successful wall-time efficiency, distinct from the CPU-efficiency
0109 measure on Site compute usage.
0110 
0111 ## Event Service jobs
0112 
0113 PanDA's status cannot measure an Event Service job: a job whose slots
0114 starved still ends finished, and a job cut by preemption fails with its
0115 closes saved. An Event Service consumer job (PanDA `eventservice` 1, 3, 4, 5
0116 or 6) therefore counts its allocated core-hours times its saved-processing
0117 share as successful, whatever its status: the share of its slot time spent
0118 processing events whose output was saved, from the harness's own record,
0119 the same measure its job page shows (EVENT_SERVICE_PLOTS.md). On
0120 Perlmutter, job 6071469 (task 41287), finished in PanDA while its ranges
0121 starved, has a share of 0.018; trial job 6087270 (task 41316), with no events
0122 in its PanDA record, 0.525. A job whose record does not measure the share
0123 keeps PanDA's status and is counted separately (`es_unmeasured`, beside
0124 `es_jobs`). The share of an ended job does not change and is kept for the
0125 life of the process.
0126 
0127 OSG queues are split by recorded execution site. Historical jobs without
0128 that field use the existing worker-host site mapping; Fir and CNAF host
0129 patterns are recognized explicitly. Unknown sites remain visible. Site
0130 names use the shared short-name vocabulary. Retired queues remain in
0131 historical accounting. Perlmutter's historical test, GPU and Event Service
0132 queues share one site. Month and week totals sum the underlying hours;
0133 they never average percentages. Cells below 50 core-hours are blank.
0134 The current period is marked partial. An optional view excludes task
0135 40856 to separate that incident from the complete record.
0136 
0137 ## Automatic refresh
0138 
0139 The cached product `compute_efficiency:v1` retains daily aggregates from
0140 May 2026 onward, including separate contributions from task 40856.
0141 Its hourly refresh rereads the latest seven UTC days; older daily rows
0142 are retained. A monthly full reconciliation catches older late arrivals.
0143 Days older than the source archive's first remaining day are retained
0144 during reconciliation, so archive expiry does not erase the history.
0145 The same builder serves the page and the scheduled command. A missing
0146 initial product builds behind the page response; read requests never
0147 download job lists. An attended page checks for refreshed data every
0148 five minutes and while the first build is running.
0149 
0150 `scripts/refresh-compute-efficiency.py` refreshes the product through the
0151 standard CachedProduct locking/writer rules. `--full` rebuilds all days.
0152 The installed cron file is `swf-compute-efficiency`, running as the
0153 deployment account against `/opt/swf-monitor/current`; its output is
0154 kept in `/data/wenauseic/swf-monitor/compute-efficiency.log`. No production job, task or
0155 worker controls are changed by this producer.
0156 
0157 Install the scheduled producer after deploying the page:
0158 
0159 ```sh
0160 sudo install -o root -g root -m 644 scripts/refresh-compute-efficiency.py /opt/swf-monitor/current/scripts/
0161 sudo install -o root -g root -m 644 scripts/compute-efficiency.cron /etc/cron.d/swf-compute-efficiency
0162 /opt/swf-monitor/current/.venv/bin/python /opt/swf-monitor/current/scripts/refresh-compute-efficiency.py
0163 ```