[Bizgres-general] Another use case

Luke Lonergan llonergan at greenplum.com
Wed Aug 9 03:55:01 UTC 2006


Mark,

On 8/8/06 8:08 PM, "Mark Kirkwood" <mkirkwood at greenplum.com> wrote:

> Jim Nasby wrote:
>> I'm not sure if this fits exactly into queuing or not, but lowering
>> the priority of a specific backend is something that comes up every
>> few months.
>>   
> Yeah - there is good raw material there for when/if we talk about
> prioritizing queues or queue entries - we don't want to fall victim to
> priority inversion without realizing it....

We had a good meeting about queuing today.  The consensus is that we should
get something out to the field quickly that we think is basically usable.

Here are some of the thoughts about the what the first implementation should
achieve:
- Every user has a single queue mapped to them, no need for multiple
selectable queues per user
- The queues should be manageable:
  - A query can be issued to show the statements running in each queue
  - Queries can be killed using a SQL statement
- Queues should have a default nice value, from 0 to 19

We talked through a number of issues that will need to be tackled in the
next phases including:
- planned queries hold locks, then are queued, which inappropriately couples
queues together
- The statement classification problem involves a number of issues:
  - an outer bound on memory consumption is calculable, but better estimates
are more challenging
  - statement costs are approximate, and may not be sufficient to estimate
the time statements actually take
  - we may want two types of classification, the first would characterize
statements that use conflicting lock types, say those with EXCLUSIVE locks,
typical of DML statements and those with ACCESS SHARE locks, typical of DQL.
The second level of classification would use a time or cost estimate.
- Once we have implemented a solid classification mechanism, we can
implement a mapping of class to queues using a vector of limits, one entry
for each statement class.

We'll talk more next week, but it looks like you've basically implemented
enough to get started.

- Luke




More information about the Bizgres-general mailing list