Archives of the TeradataForum
Message Posted: Thu, 06 Dec 2001 @ 15:59:31 GMT
Priority Scheduler is intended to manage CPU usage for DBMS acvivity. More precisely, it prioritizes the active processes that are requesting CPU resources at any given time. The PSF weighting assigned to a process determines the "probability" that it will get a slice of the CPU.
What I have seen happen in the past, and am guessing that you are seeing as well, is a situation where a single query consumes, over a period of time, relatively more CPU resources than other concurrent queries. This can be caused for a couple of reasons:
1) The "big/intensive" query has a higher CPU to IO processing ratio. What that really means is that, compared to the other queries, this query places a higher relative demand on the CPU. When the CPU issues an IO request for a process, it will work on other processes while waiting for the IO request to be satisfied. If a process does "relatively" little IO, it will get more CPU cycles. More accurately, it will use the full slice of CPU time allocated to it because it doesn't break to perform IO. This doesn't mean that the big/intensive query is not doing a lot of IO, it just means that it is more demanding, from a CPU perspective. This is common when a query is doing product joins, massive aggregations, or complex column manipulation (i.e. case logic, substring, index, etc.). This problem was much more pronounced V2R3, but NCR has addressed this issue somewhat. However, keep in mind that PSF is only prioritizes CPU and not IO.
2) Queries that generate multiple, concurrent steps will create more processes. Since this type of query will have more processes relative to other queries, it will have more opportunities to get CPU cycles. For example, if two similar queries run concurrently, they should both get about equal resources over time. However, if one of the two queries creates a step that has three parallel steps, this query would have more processes associated with it and, therefore, would have more opportunities to get CPU cycles.
PSF has configurable parameters that can be set to change how it treats concurrent processes from the same session. The allocation group policies also have an impact on how sessions within the same performance group (i.e. $M) behave relative to each other.
I hope this makes sense and helps!
Thomas F. Stanek
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|