A slot is a narrow, elongated depression or notch, especially one in the shape of an oval or rectangle, through which something can be inserted. Slots in walls or doors are often used to secure door handles, keys or other small objects. A time slot is a period of time in a day when a program is scheduled to be broadcast or played on a device. A television show is usually broadcast in a specific time slot each week. In the US, this is usually at a time when most people are watching their favorite shows on other devices (such as mobile phones).
The term “slot” also refers to a position in a series of tasks or events; for example, someone might be assigned the job of “shooter,” and would be expected to shoot the winning goal during the finals of an important sporting event. The concept of a slot is also widely used in computer science, particularly when discussing the scheduling of processes.
In BigQuery, a slot is a reserved portion of capacity that is committed to an assigned reservation. When a query runs, the number of slots it occupies is added to the reservation’s total slot usage. Idle slots that are not being used by a running query are preempted and made available for use by other queries. This process may cause a short period of time when you see total slot consumption exceed the maximum you specified across all reservations, but you aren’t charged for this additional slot usage.
BigQuery allocates slots to a given reservation based on the reservation’s baseline, default autoscaling, and a setting called ignore_idle_slots. If ignore_idle_slots is set to true, the slots that are not used by a query are not preempted and are not available for other reservations. When a reservation is assigned a new allocation of slots, the default autoscaling and baseline slots are updated automatically to reflect this change. If a reservation has both the default autoscaling and ignore_idle_slots set to false, the additional allocation of slots is not automatic and requires manual intervention. This process is described in this article. If the autoscaling and idle slot settings are not configured correctly, the additional allocated slots may be preempted by other queries and fail to run. In this case, the additional query will queue until currently running queries complete or enough idle slots become available to the query. In the case of ML_EXTERNAL jobs, the additional allocated slots are not preempted. This is because these jobs are executing an external model that uses reserved slots for internal data storage. For more information on how to configure the autoscaling and idle slot settings for ML_EXTERNAL jobs, see this article. This configuration will allow the ML_EXTERNAL jobs to run successfully without affecting your overall system performance. However, you must keep in mind that if the ML_EXTERNAL job isn’t able to finish its work in the allocated time, it will fail with an error message and could result in missing data when the results are published.