[Bizgres-general] Statement Queuing take II - Resource Scheduling (Running)

Mark Kirkwood mkirkwood at greenplum.com
Sun Jul 16 23:38:19 UTC 2006


Dear all - A progress update:

On Friday Resource Queuing ran for the first time (drum roll)!

In addition, I took the opportunity to implement structure design change 
discussed in the review, so that the queues are real catalog objects, 
and also to moved the lock/release into the portal run function itself 
(PortalRun), as this means it is (theoretically) easy to  push the 
locking point further down for cursors, so they don't get planned twice.

So all the basic elements are there (some functionally incomplete, but 
working):

- Queues created in shared memory at system startup.
- Session initialization determines (and remembers) the queue for the user.
- Resource Lock taken for appropriate statements.
- Resource limits checked and updated correctly.

There is still several things to look at before any serious testing is 
done (e.g. the remaining points in the review), however I was pleased to 
notice that I could not detect any difference in performance between 
scheduling on or off for a few runs of pgbench.

The test used number of clients less than the count limit for queue, so 
was only attempting to measure the overhead introduced by the queue lock 
and unlock operations, rather than the effect of throttling the number 
of executing statements (need the deadlock handling in place before that 
is realistically testable -  modifying the code to only lock SELECT or 
CURSOR statements would let this be tested right now, but I'm not sure 
how useful that would be).

Best wishes

Mark


For those wishing to eyeball the (still very WIP) code: 
http://homepages.paradise.net.nz/markir/download/bizgres/bizgres-resscheduler-07-14.patch



More information about the Bizgres-general mailing list