Pivotal Knowledge Base

Follow

How Resource Queue priorities are implemented

Environment

Product Version
Pivotal Greenplum (GPDB)  4.3.x
OS All supported OS

Synopsis

Resource Queue priorities determine the relative amount of CPU time given to actively running queries.

Description

The system implements priorities by injecting OS "usleep" function calls to the process so that it releases a CPU for other queries. By injecting usleep to queries based on the priorities, the system ensures that higher priority queries "sleep" for a less time than the low priority queries. 

The system does not stop any query from execution but slows down low priority queries by injecting usleep. Therefore, even a query with the lowest priority will still progress, but at a slower rate as it spends a longer time "sleeping".

If there is only one active query in the system, then it does not matter which priority it has as it would get all the CPU resources until another query is started.

The system does NOT use the "priority" or the "nice" values of the process to implement the Resource Queue priorities. 

Additional Information

 

Comments

Powered by Zendesk