Neoview Workload Management Services Guide (R2.5)

Setting lower system resource thresholds for lower priority services restricts the number of
executing queries associated with lower priority services and enables more queries associated
with higher priority services to execute on the Neoview platform. For example, for a lower
priority service, suppose you set the CPU busy to 55% and the memory usage to 40%. Incoming
queries associated with the lower priority service automatically go into the waiting queue when
the CPU busy and maximum memory usage exceed the service thresholds of 55% and 40%,
respectively. This strategy might be useful for preventing lower priority queries, such as from
reporting applications or ad-hoc queries, from consuming the system resources needed by higher
priority queries.
The next section explains how WMS determines which waiting queries are allowed to execute
when system resources become available.
How WMS Determines When to Execute Waiting Queries
When the system resource usage is at its limits, executing queries continue to execute but incoming
queries go into the waiting queue. As queries in each service finish executing, system resources
free up, and WMS starts allowing some of the waiting queries to start executing. While system
resources are free, WMS determines whether to allow waiting queries associated with a service
to start executing based on these criteria:
Service priority
Current percentage of executing queries associated with the service
How the current percentage compares with the expected percentage for the service
The expected percentage of executing queries for each service is based on the service priority,
with higher priority services having a larger expected percentage of executing queries than lower
priority services.
If the percentage of executing queries for a service is greater than the expected percentage, WMS
keeps the queries associated with the service in the waiting queue. If the percentage of executing
queries for a service is equal to or less than the expected percentage, WMS allows waiting queries
associated with the service to start executing. The order in which WMS executes waiting queries
depends on the queries' service priority. For example, WMS executes queries associated with
higher priority services before executing queries associated with lower priority services.
WMS continues the process of dynamically balancing waiting and executing queries based on
the availability of system resources. WMS checks the system resource usage every five seconds.
When the system resource usage reaches its limits, WMS prevents waiting queries from executing
and puts incoming queries into the waiting queue, yet allows executing queries to continue
executing. When the queries finish executing, system resources become available again, and
WMS begins determining which waiting queries to allow to execute.
Active Time
The active time of a service is a time range when the service can accept incoming queries. A
service is in the ACTIVE state during its active period. Outside of its active period, the service
is in the HOLD state.
Outside the active time range, a service cannot execute incoming queries associated with the
service. If a query is still executing in the service when the end time is reached, WMS allows the
query to continue executing outside the active time range. However, WMS rejects any incoming
queries associated with the service if they occur outside the active time range. For example, if
you specify an active time of 15:00 to 18:00 for the service, WMS allows queries associated with
the service to execute between the hours of 15:00 to 18:00 but rejects any queries associated with
the service that try to execute outside the active time of 15:00 to 18:00.
By default, the active time of a service is from 00:00 through 24:00. To change the active time,
specify the start and end times when you want the service to accept incoming queries. The start
or end time, hh:mm, is in hours (hh) and minutes (mm). Currently, the active time cannot span
more than one day.
How Do Services Work? 49