Defining Preferred Writers in the IQMultiplex.ini File

Update the IQMultiplex.ini file to define preferred writers for multiplex execution.

  1. Navigate to the etc directory in the installation folder and use a text editor to open the IQMultiplex.ini file.
  2. Add one section for each multiplex group you want to use. By default, the IQMultiplex.ini file is empty. If you do not specify anything, the grid engine uses the internal default values.

    A sample section is as follows:

    [dbsybase15+iq15m+sample] 
    /* This is the section name */
    Enabled=true
    Workload=OperationsWaiting
    MinimalUpdateInterval=60
    SelectWriterTimeout=6
    MostIdleNode=select NAME from TEST_CUSTOMER_NODE
    order by WORKLOAD asc
    MostBusyNode=select NAME from TEST_CUSTOMER_NODE
    order by WORKLOAD desc

    You must provide the section name, which includes the coordinator’s interface name, host name, and database name, separated by a plus (+) sign. Do not use colon (:), hash (#), or equal sign (=) characters.

  3. Save and close the file.
    Multiplex Group Optional Properties

    Name

    Type

    Value

    Description

    Enabled

    boolean

    True (default) or False

    Enable or disable this feature in the IQ server database.

    Workload

    text

    OperationsWaiting (default)

    Specify which row of the result of EXEC sp_iqstatistics should be used to take as workload.The dispatcher executes the stored procedure EXEC sp_iqstatistics to query the writer workload. The query result set returns the operation status name in the second column, and the status value in the fourth column. The dispatcher finds the row for which the second column matches the value of the workload option you specify, and then uses the fourth column of that row as the final workload value.

    MinimalUpdateInterval

    integer

    Greater than zero (0), default value is 6

    The minimal interval, in seconds, for the dispatcher to refresh writer information by querying the coordinator.

    SelectWriterTimeout

    integer

    Greater than equal to zero (0), default value is 0

    The number of seconds the dispatcher should wait, if all the writers are selected and not released. When you specify 0, the dispatcher waits indefinitely. In case of a timeout, an error is generated.

    MostIdleNode

    SQL

    Empty by default

    The first column of the first row returned by the SQL execution should be a writer node name. The dispatcher assumes the returned writer as the most idle node in the multiplex, and uses it as the target for the next table load request.

    For example, this SQL script creates a custom dispatch table:

    DROP TABLE TEST_CUSTOMER_NODE; CREATE TABLE TEST_CUSTOMER_NODE(NAME varchar(100),           WORKLOAD int /*must be integer*/ ); INSERT INTO TEST_CUSTOMER_NODE (NAME,WORKLOAD) VALUES('iq15w1',78); INSERT INTO TEST_CUSTOMER_NODE (NAME,WORKLOAD) VALUES('iq15w2',34); INSERT INTO TEST_CUSTOMER_NODE (NAME,WORKLOAD) VALUES('iq15w3',12); /* iq15w1-w3 are writers*/

    To obtain the most idle node from the table, add this SQL query in the IQMultiplex.ini file:

    Select NAME from TEST_CUSTOMER_NODE order by WORKLOAD asc

    iq15w3 is returned as the most idle node.

    MostBusyNode

    SQL

    Empty by default

    The first column of first row returned by the SQL execution should be a writer node name. The dispatcher assumes the returned writer as the busiest node in the multiplex, and delays using it as a load table target.

    For example, this SQL script creates a custom dispatch table:

    DROP TABLE TEST_CUSTOMER_NODE; CREATE TABLE TEST_CUSTOMER_NODE(NAME varchar(100),           WORKLOAD int /*must be integer*/ ); INSERT INTO TEST_CUSTOMER_NODE (NAME,WORKLOAD) VALUES('iq15w1',78); INSERT INTO TEST_CUSTOMER_NODE (NAME,WORKLOAD) VALUES('iq15w2',34); INSERT INTO TEST_CUSTOMER_NODE (NAME,WORKLOAD) VALUES('iq15w3',12); /* iq15w1-w3 are writers*/

    To obtain the most busy node from the custom dispatch table, add this SQL query in the IQMultiplex.ini file:

    Select NAME from TEST_CUSTOMER_NODE order by WORKLOAD desc

    iq15w1 is returned as the most busy node.