Db2 DPF Query Workload Test

Nothing can degrade the performance of the server like a resource-hungry or a long-running query! When such queries execute on the server, they either hog almost all the available CPU, memory, and disk resources or keep the resources locked for long time periods, thus leaving little to no resources for carrying out other critical database operations. This can significantly slowdown the database server and adversely impact user experience with the server. To ensure peak performance of the DB2 DPF server at all times, such queries should be rapidly identified and quickly optimized to minimize resource usage. This is where the DB2 DPF Query Workload test helps.

At configured intervals, this test compares the usage levels and execution times of all queries that started running on the target server in the last measurement period and identifies a ‘top query’ in each of the following categories - CPU usage, memory usage, disk activity, and execution time. The test then reports the resource usage and execution time of the top queries and promptly alerts administrators if any query consumes more resources or takes more time to execute than it should. In such a scenario, administrators can use the detailed diagnosis of this test to view the inefficient queries and proceed to optimize them to enhance server performance.

Target of the test : A DB2 database server with DPF enabled

Agent deploying the test : An internal agent

Outputs of the test : One set of results for each database instance on the DB2 database server being monitored

Configurable parameters for the test
Parameter Description

Test period

How often should the test be executed

Host

The IP address of the DB2 server

Port

  • The port number through which the DB2 server communicates. The default port is 50000.
  • User

    Specify the name of the user who is authorized to access the target database server and collect the required metrics in this text box. You can create a separate user on the OS hosting the DB2 server for this purpose. The steps for the same are detailed in the Creating a Special User for Monitoring DB2 Server topic.

    Password

    Enter the password of the specified USER in the PASSWORD text box.

    Confirm Password

    Confirm the Password by retyping it in the Confirm Password text box.

    Database

    Specify the name of the database on the monitored DB2 server to be used by this test.

    Include DB

    Specify a comma-separated list of databases that you wish to monitor in the Include DB text box.

    Exclude DB

    Specify a comma-separated list of databases that need to be excluded from monitoring in the Exclude DB text box.

    SSL

    If the target database server is SSL-enabled, then set the SSL flag to Yes. If not, then set the SSL flag to No.

    Trust Store File Name

    This parameter is applicable only if the target DB2 database is SSL-enabled, if not, set this parameter to none. Specify the file name of the client-side SSL truststore that contains the server certificate required for establishing an SSL connection. The truststore is used to verify the identity of the server and enable a secure communication channel.

    By default, the truststore file should be placed in:<EG_INSTALL_DIR>/jre/lib/security/mytruststore.jks

    Here, mytruststore.jks is the Truststore file name. You may change this to any valid file name. By default, none is specified against this text box.

    Trust Store Password

    This parameter is applicable only if the target DB2 database is SSL-enabled, if not, set this parameter to none. If a Truststore File name is provided, then, in this text box, provide the password that is used to obtain the associated certificate details from the Truststore File. By default, this parameter is set to none.

    Confirm Password

    Confirm the Password by retyping it in the Confirm Password text box.

    DD Row Count

    By default, the detailed diagnosis of this test, if enabled, will report only the top-5 records. This is why, the DD Row Count parameter is set to 10 by default. If you want to include more or less records in detailed diagnosis, then change the value of this parameter accordingly.

    Detailed Diagnosis

    To make diagnosis more efficient and accurate, the eG Enterprise embeds an optional detailed diagnostic capability. With this capability, the eG agents can be configured to run detailed, more elaborate tests as and when specific problems are detected. To enable the detailed diagnosis capability of this test for a particular server, choose the On option. To disable the capability, click on the Off option.

    The option to selectively enable/disable the detailed diagnosis capability will be available only if the following conditions are fulfilled:

    • The eG manager license should allow the detailed diagnosis capability
    • Both the normal and abnormal frequencies configured for the detailed diagnosis measures should not be 0.
    Measurements made by the test
    Measurement Description Measurement Unit Interpretation

    Maximum physical reads

    Indicates the number of physical disk reads performed by the top query per execution.

    Number

    If the value of this measure is abnormally high, you can use the detailed diagnosis of this measure to view the top-5 (by default) queries generating maximum physical disk activity. From this, you can identify the top query in terms of number of physical disk reads. You may then want to optimize the query to reduce the disk reads.

    Maximum physical writes

    Indicates the number of memory buffers used by the top query per execution.

    Number

    If the value of this measure is abnormally high, you can use the detailed diagnosis of this measure to view the top-5 (by default) queries consuming memory excessively. From this, you can easily pick that query which is consuming the maximum memory. You may then want to optimize the query to minimize memory usage.

    Maximum CPU time

    Indicates the CPU time used for processing upon execution of the top query.

    Seconds

    If the value of this measure is abnormally high, you can use the detailed diagnosis of this measure to the top-5 (by default) queries hogging the CPU resources. From this, you can easily pick that query which is consuming the maximum CPU. You may then want to optimize the query to minimize CPU usage.

    Maximum elapsed time

    Indicates the running time of each execution of the top query.

    Seconds

    Use the detailed diagnosis of this measure to view the top-5 (by default) queries that are taking too long to execute. From this, you can easily pick that query with the maximum execution time. You may then want to optimize the query to minimize execution time.

    Recently executed queries

    Indicates the number of queries recently executed on this database server.

    Number

    If the number of queries executed recently is very high, it might be a indication of high workload on database server.

    Average elapsed time

    Indicates the average running time of the queries on this database server.

    Seconds

    If the average execution time of the queries is too high it might be ana indication of high workload.