worqcloud
← Back to the journal

One BigQuery Project Is Hogging Your Slots. Here’s How to Cap It.

One BigQuery Project Is Hogging Your Slots. Here’s How to Cap It.

Diagnose BigQuery slot contention with SQL, then use project caps to limit slot usage or query concurrency in a shared reservation.

Who gets the slots? A vintage railway poster shows a signal holding freight near a shared station.
A project cap limits what one workload can use in a shared reservation. View full size ↗

When the morning dashboard and the batch job overlap

Imagine a sales dashboard that opens quickly for most of the day but slows down during a scheduled refresh. The dashboard and refresh run from different Google Cloud projects, yet their queries use the same BigQuery reservation. When the refresh overlaps with morning traffic, the platform team needs to find out whether shared compute is the bottleneck. This is a common pattern to investigate when you suspect BigQuery slot contention.

Google made project caps generally available on November 11, 2026, for BigQuery Enterprise and Enterprise Plus. The caps let an administrator set limits for a project within a reservation. The example in this guide uses hypothetical workloads and values. The experiment is to protect dashboard response time while still finishing the refresh by its deadline.

Check BigQuery slot usage by project

Start with job history during the slow period. Check the project that submitted each query and the reservation ID the job used. The project that stores the tables can be different from the project that runs the query. A cap on the data-owning project may leave the batch workload untouched.

Compare several mornings. Separate the time a query spent waiting to start from its execution time, then align both with reservation utilization and the refresh schedule. Look for other changes such as a longer query plan, additional input data, or a drop in cache hits. Overlap alone does not prove slot contention.

Record the dashboard’s end-to-end latency target and the batch completion deadline. If both workloads submit jobs under the same project, first decide whether they can use separate query projects. A project cap applies to the project as a whole within that reservation.

This read-only query uses organization-wide job history to compare submitting projects in the same reservation. Run it from a project in that organization with the organization-level bigquery.jobs.listAll permission. Replace the reservation ID and choose a time window that includes the slowdown. If your reservation is outside the US multi-region, change region-us and run the query in the matching location.

Compare slot utilization by submitting project
SELECT
  period_start,
  project_id,
  SUM(period_slot_ms) / 1000.0 AS avg_slots_in_second
FROM `region-us`.INFORMATION_SCHEMA.JOBS_TIMELINE_BY_ORGANIZATION
WHERE reservation_id = 'example-admin:US.shared-bi'
  AND period_start >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 1 HOUR)
  AND period_start < CURRENT_TIMESTAMP()
  AND job_type = 'QUERY'
  AND (statement_type IS NULL OR statement_type != 'SCRIPT')
GROUP BY period_start, project_id
ORDER BY period_start, avg_slots_in_second DESC;

Each row reports the average slots a project consumed in one second. Compare peaks with dashboard wait times. The query excludes parent SCRIPT jobs to avoid counting their child jobs twice and covers query jobs only.

Choose between a slot cap and a query concurrency cap

A maximum slot setting limits the project’s slot consumption approximately. Google documents a minimum of 100 slots. A maximum concurrency setting controls how many queries from the project can be admitted at once. When the project is already at that limit, more queries wait for a running query to finish.

Lowering concurrency does not cancel running queries. Use a slot cap to test whether a busy project needs a smaller share of compute. Use concurrency to test whether admitting fewer jobs at once improves the workload. A single large query can still use substantial capacity if you only control admissions.

You can set reservation defaults or override the settings for an individual project. Use a project override for the first experiment so other projects retain their existing policies.

Two vintage tickets illustrate max slots as track capacity and max concurrency as a turnstile.
Slot caps govern compute consumption. Concurrency caps govern query admission. View full size ↗

Estimate headroom before choosing a starting cap

Suppose a reservation has 600 available slots for an illustrative interval. The batch project can use 500 and the dashboard workload wants 240. If the batch project uses 500 in this simplified example, 100 remain. A batch cap of 360 leaves room for 240. This arithmetic helps choose a value to test.

Actual BigQuery scheduling accounts for demand and fair sharing. Capacity can also change with autoscaling and idle slot sharing. The example leaves those effects out. It does not predict how many slots a query will receive or how quickly it will finish. A cap does not reserve the difference for dashboards.

Review the batch job’s deadline before choosing the cap. If the refresh already finishes just before downstream reports begin, it may have little room to run longer. In that case, test moving the schedule or using separate reservations alongside a project cap.

How much room does a batch cap leave?

Assume 600 available slots, a batch workload that can use 500, and a dashboard workload that wants 240.

Dashboard lane · 100 of 240 requested slots fit in this example.

Batch lane · 500 of 500 requested slots fit.

Illustrative capacity arithmetic. Lane lengths represent slots in a fixed pool. Motion does not represent query speed. BigQuery caps are approximate, and actual allocation depends on demand, scheduling and capacity.

Create a project cap on the batch workload

In BigQuery, go to Administration, then Workload management and Assignment rules. Choose Project cap, select the batch query project and the reservation it already uses, and enter a maximum slot value. Leave concurrency unchanged for this trial so you can attribute any change more confidently.

Before adding the cap, review the BigQuery reservation assignments for the batch query project and its QUERY jobs. An assignment can be inherited from a folder or organization. Check the reservation_id on a recent batch query in the job metadata to confirm where it actually ran.

The SQL below illustrates a new scheduling policy assignment. Substitute the reservation administration project, location, reservation name, assignment ID and submitting project. If the project already has a scheduling policy for this reservation, record its settings and update the existing rule. A scheduling policy assignment governs behavior and does not route queries to the reservation.

Allow up to a minute for policy changes to apply. Google notes that changing a per-project slot override also requires a new query to start before it takes effect. Check the policy in the assignment view and run fresh test queries in the reservation location.

Example project cap for a batch query project
CREATE ASSIGNMENT
  `example-admin`.region-`us`.`shared-bi`.`batch-slot-cap`
OPTIONS (
  assignee = 'projects/example-batch',
  scheduling_policy_max_slots = 360
);

Illustrative identifiers and cap. Use an eligible reservation and a role authorized to manage its assignments. This statement creates a rule. It does not move query jobs.

Measure BigQuery query queue time and batch completion

Run a comparable dashboard workload alongside the scheduled batch before and after the change. Keep query inputs, job priority, and cache behavior comparable. Compare dashboard queue time, execution time, and end-to-end latency. For batch, record when work starts, how long the entire refresh takes, and whether it meets the deadline.

For jobs that have started, calculate BigQuery query queue time from the JOBS view with TIMESTAMP_DIFF(start_time, creation_time, MILLISECOND). Measure execution time separately with TIMESTAMP_DIFF(end_time, start_time, MILLISECOND) for completed jobs. Compare both before and after the cap to see whether dashboards spent less time waiting or ran faster. For slot consumption over time, inspect JOBS_TIMELINE data during the overlap. A job’s total slot milliseconds measures work across its lifetime, so it cannot show whether many jobs hit peak demand at the same moment.

If the dashboards improve and batch still finishes on time, keep the cap for a wider trial. If batch runs late, restore the prior policy or test a less restrictive cap. If both workloads are still slow, check reservation capacity and the query plans before imposing another limit.

Decide whether shared capacity still fits

Try a concurrency limit in a separate experiment if the main problem is how many batch queries start together. Check whether the extra time in the queue causes deadlines to slip. Restore the previous override if the trial misses its targets. When removing a new rule, check what reservation defaults the project will inherit.

Consider separate reservations when workloads need different capacity or operating targets that one shared reservation cannot reliably serve. Review actual billing and autoscaling data after any change. A cap can change who uses the available slots and when, while committed or baseline capacity charges may remain.

References & further reading

Explore more insights ↗