Download Performance Guide for Informix Dynamic Server, Version 7.3

Transcript
Limiting the Number of Concurrent Scans
Limiting the Number of Concurrent Scans
Dynamic Server apportions some number of scans to a query according to its
PDQ priority (among other factors). DS_MAX_SCANS and
MAX_PDQPRIORITY allow you to limit the resources that users can assign to
a query, according to the following formula:
scan_threads = min (nfrags, (DS_MAX_SCANS * (pdqpriority / 100)
* (MAX_PDQPRIORITY / 100) )
nfrags
pdqpriority
is the number of fragments in the table with the largest
number of fragments.
is the PDQ priority value set by either the PDQPRIORITY
environment variable or the SET PDQPRIORITY statement.
For example, suppose a large table contains 100 fragments. With no limit on
the number of concurrent scans allowed, Dynamic Server would concurrently execute 100 scan threads to read this table. In addition, as many users
as wanted to could initiate this query.
As the Dynamic Server administrator, you set DS_MAX_SCANS to a value
lower than the number of fragments in this table to prevent Dynamic Server
from being flooded with scan threads by multiple decision-support queries.
You can set DS_MAX_SCANS to 20 to ensure that Dynamic Server concurrently executes a maximum of 20 scan threads for parallel scans.
Furthermore, if multiple users initiate PDQ queries, each query receives only
a percentage of the 20 scan threads, according to the PDQ priority assigned to
the query and the MAX_PDQPRIORITY that the Dynamic Server administrator
sets.
Limiting the Maximum Number of Queries
The DS_MAX_QUERIES configuration parameter limits the number of
concurrent decision-support queries that can run. To estimate the number of
decision-support queries that Dynamic Server can run concurrently, count
each query that runs with PDQ priority set to 1 or greater as one full query.
Dynamic Server allocates less memory to queries that run with a lower
priority, so you can assign lower-priority queries a PDQ priority value that is
between 1 and 30, depending on the resource impact of the query. The total
number of queries with PDQ priority values greater than 0 cannot exceed
DS_MAX_QUERIES.
Parallel Database Query 9-13