Daily GPU Utilization and Idle Nodes Per Cluster
Last updated: November 29, 2026
Quick Overview
Using per-GPU utilization samples and a node-to-cluster table, write SQL that reports, for each cluster and day, the average utilization and how many nodes averaged under 10% utilization that day.
Fluidstack
November 29, 20260
0
0 solved
Using per-GPU utilization samples and a node-to-cluster table, write SQL that reports, for each cluster and day, the average utilization and how many nodes averaged under 10% utilization that day.
Fluidstack's customers rent whole clusters, and account teams want to know when a customer is paying for GPUs that sit idle, both to help them right-size and to spot broken jobs. The screen checks clean two-level aggregation in SQL and whether you think about what each average actually means.
What the Interviewer Expects
- Aggregate to node-day first, then to cluster-day
- Explain why the two-level average differs from a flat average over samples
- Count idle nodes with a conditional sum
- Handle the join to nodes and date truncation correctly
- Mention missing samples and time zones
Key Topics to Cover
How to Approach This
- Clarify the schema and expected output format before writing queries.
- Use CTEs (WITH clauses) to break complex queries into readable steps.
- Consider window functions (ROW_NUMBER, RANK, LAG, LEAD) for ranking and sequential analysis.
- Watch for NULLs, duplicates, and edge cases in JOINs and GROUP BY.
- For pandas, prefer vectorized operations over row-by-row iteration.
Possible Follow-up Questions
- How would you weight by GPU count when nodes have different numbers of GPUs reporting?
- How would you detect nodes that stopped reporting entirely?
- How would you compute a 7-day rolling utilization per cluster?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice SQL ProblemsSample Answer
Clarify the Data
gpu_samples(node_id, gpu_index, ts, util_pct) with one row per GPU per sample interval, and nodes(node_id, cluster_id). I would confirm that ts is UTC, that the sampling interval is fixed (so a ...
Approach
First collapse samples to one row per node per day, which defines the idle test at the right grain. Then aggregate node-days into cluster-days: average of node averages, count of reporting nodes, and ...