Slots as the budget of a query

video locked
Enroll to watch

4 mins

Chapters
About
Discussion0
Notes
Be the first to start a conversation!

A slot is one thread on one machine, and Dremel estimates the execution of every query in slots.

The estimate is a guess: how many machines, into the number of threads those machines have, the query is going to use. A query that pulls 50 thousand data points on threads that each pull 1000 a second needs 50 slots.

The client does not ask for slots. The load balancer makes the estimate:

  1. A pool. The system has 3000 slots.
  2. A query of 2000 slots. It goes ahead.
  3. Another query of 2000 slots. Only a thousand are sent, and the query waits. It is slow, or it fails and the client retries, and the system is not overloaded.

A node holds several slots. A quad core processor has 4 threads and so 4 slots, an octa core has 8 and a single core has 1.

Slots are also what the customer pays for. AWS states how many IO operations a database does per second and charges only for that, and Google charges only for slots.