Sourcing
Rate Maintenance Multi-threading
In order to understand and effectively use multi-threading in rate maintenance, it is important to understand how OTM’s multi-threading logic works.
You can configure OTM to multi-thread several time consuming areas within the rate maintenance. The following areas in rate maintenance support multi-threading:
- Downloading Rate Offerings
- Downloading Rate Records
- Uploading Rate Offerings
- Uploading Rate Records
Uploading or Download Bulk Rates using Multi-threading
Setting Up Properties for Multi-threading
By default, the topic group is assigned 2 thread groups. Depending on the number of processors and the load on the system, you can increase this to more than 2. The topic groups should be set before starting the server.
You can also change the threads through the Event Queues page. However, the recommended approach is to set the thread group before starting the server. If the threads are changed through the Event Queues page, the changes will be lost once the server is brought down. The Event Queues page can be accessed via Configuration and Administration > Technical Support > Diagnostics and Tools > Event Management > Event Queues. You must be logged into OTM has DBA.ADMIN to access the Event Queues page.
Once on the screen, click on Show Threads button at the bottom to see all the threads. To increase the number of threads, click on Threads. To kill a thread (if it hangs up), click on the thread to terminate. Remember that killing a thread will not terminate any existing download or upload. No future download or uploads will be scheduled to run on that thread though.
Uploading/Downloading Bulk Rates
Once the threads are set up, you can upload or download rates simultaneously. If there are more uploads or downloads than the number of threads, then the upload or download will be queued up and will start executing as soon as the threads get freed up.
Threads Inside Rate Maintenance
Within rate maintenance, the download and upload of rates are multi-threaded. These areas are assigned functional topic groups. The table below describes the default thread settings for these functional topic groups. These properties can be found in glog.task.properties file and can be overridden in glog.properties. These areas are also called task groups.
Functional Area (Task Type) |
Description |
Default Topic Group |
Default Number of Threads |
---|---|---|---|
Rate Offering Upload |
Validates and persists the rate offering rows uploaded using spreadsheet. |
rateOfferingLoading
|
2 |
Rate Record Upload |
Validate and persists the rate record rows uploaded using spreadsheet. |
rateGeoLoading
|
2 |
Rate Offering Download |
Generates the rate offering rows selected for download and adds them to spreadsheet. |
rateOfferingLoading
|
2 |
Rate Record Download |
Generates the rate record rows selected for download and adds them to spreadsheet. |
rateGeoLoading |
2 |
Multi-thread Properties Associated to Each Task Type
These properties can be found in glog.workflow.task.properties file and can be overridden in glog.properties.
Property |
Definition |
Default Value |
---|---|---|
Queue Threads |
glog.workflow.queueThreads.<event queue>=<# of threads> Example: glog.workflow.queueThreads.rateGeoLoading=2 The number of threads assigned to a topic group. |
2 |
Group |
glog.task.group.<task type>=<event queue> Example: glog.task.group.RateOfferingUpload=rateOfferingLoading The topic group assigned to the task type. |
Required – no defaults associated |
Desired Batch Size |
glog.task.desiredBatchSize.<task type>=<# of tasks per batch | QUEUE> Example: glog.task.desiredBatchSize.RateOfferingUpload=QUEUE Optional. The desired number of tasks per batch. If QUEUE, the number will be determined by balancing the workload over the event queue threads. For example, 1000 tasks using a queue with 5 threads would result in 5 batches with 200 tasks each. Note that QUEUE presumes you have a dedicated queue for the task type. If, on the other hand, the desired batch size is 300, then 4 batches will be created with 300 tasks in the first 3 batches and 100 tasks in the 4th batch.
|
QUEUE |
Minimum Batch Size |
glog.task.minimumBatchSize.<task type>=<minimum # of tasks per batch> Example: glog.task.minimumBatchSize.RateOfferingUpload=50 Optional. Batches can have overhead due to shared resources and workflow processing. This property allows you to assign a minimum number of tasks in any batch. If the total # of tasks is less than the minimum, OTM creates a single batch to process the tasks.
|
1 |
Parallel Threshold |
glog.task.parallelThreshold.<task type>=<minimum # of batches before allowing parallel execution> Example: glog.task.parallelThreshold.RateOfferingUpload=2 Optional. If the total # of batches is less than the threshold, all tasks are processed on the calling thread (or single threaded). Otherwise, the batches are processed in parallel using the threads in the topic. |
2 |
Time out in Seconds |
glog.task.blockTimeout.<task type>=<timeout, in seconds, for a task list execution> Example: glog.task.blockTimeout.RateOfferingUpload=7200 Optional. The amount of the time that each batch processing is allowed before it times out. |
10800 Seconds |
Related Topics