Managing Model Builds

The process of building mining models can consume significant system resources. You have the option to control the impact of model builds on overall system resources, by increasing or decreasing the value of MAX_NUM_THREADS repository property.

MAX_NUM_THREADS specifies the maximum number of mining model builds that can execute concurrently across all workflows in an Oracle Data Miner session. MAX_NUM_THREADS has no effect on model builds that are triggered individually and do not belong to a workflow.

For example, if one workflow is attempting to build 25 models while another workflow is attempting to build 15 models and MAX_NUM_THREADS is 10, then 10 model build operations occur simultaneously and the 30 remaining model builds are queued. The delayed build processes complete with a warning message that explains the reason for the delay. Two additional properties, THREAD_WAIT_TIME and MAX_THREAD_WAIT control the queuing of model builds. See Table 6-1 for details.

Example 6-2 shows how to increase the maximum number of concurrent model builds from 10 (the default) to 15.

This script produces the following log:

-- value of MAX_NUM_THREADS before update
SELECT property_name, property_num_value 
    FROM ODMRSYS.ODMR$REPOSITORY_PROPERTIES
    WHERE property_name = 'MAX_NUM_THREADS';
PROPERTY_NAME PROPERTY_NUM_VALUE
------------------------------ ----------------------
MAX_NUM_THREADS 10
-- update MAX_NUM_THREADS
UPDATE ODMRSYS.ODMR$REPOSITORY_PROPERTIES
    SET property_num_value = 15
    WHERE property_name = 'MAX_NUM_THREADS';
1 rows updated
-- commit change
commit
committed
-- value of MAX_NUM_THREADS after update
SELECT property_name, property_num_value 
    FROM ODMRSYS.ODMR$REPOSITORY_PROPERTIES
    WHERE property_name = 'MAX_NUM_THREADS';
PROPERTY_NAME PROPERTY_NUM_VALUE
------------------------------ ----------------------
MAX_NUM_THREADS 15

Example 6-2 Changing the Number of Concurrent Model Builds

set echo on;
-- value of MAX_NUM_THREADS before update
SELECT property_name, property_num_value 
    FROM ODMRSYS.ODMR$REPOSITORY_PROPERTIES
    WHERE property_name = 'MAX_NUM_THREADS';
-- update MAX_NUM_THREADS
UPDATE ODMRSYS.ODMR$REPOSITORY_PROPERTIES
    SET property_num_value = 15
    WHERE property_name = 'MAX_NUM_THREADS';
-- commit change
COMMIT;
-- value of MAX_NUM_THREADS after update
SELECT property_name, property_num_value 
    FROM ODMRSYS.ODMR$REPOSITORY_PROPERTIES
    WHERE property_name = 'MAX_NUM_THREADS';