Configuring initial spec cache loading during server startup

Product Master provides a mechanism to populate the spec cache during service startup.

About this task

You can modify the file initial_spec_load.xml in the $TOP/etc/default directory. It is important to understand the files in this directory define the defaults for all services. But as the initial spec loading makes sense most probably only for the appsvr, workflow engine and scheduler process, the initial_spec_load.xml file must be defined for each wanted service individually.

Procedure

  1. Create a directory under the $TOP/etc directory for each service. The directory must be named exactly as the service. The correct naming can be checked best by looking at the directory names in $TOP/logs.
    For example, when ls in %TOP/logs shows:
    admin_JONAS-MDM   eventprocessor_JONAS-MDM  rmi_JONAS-MDM
    workflowengine_JONAS-MDM  appsvr_JONAS-MDM  default  queuemanager_JONAS-MDM
    scheduler_JONAS-MDM
    You would create following new directories:
    $TOP/etc/appsvr_JONAS-MDM
    $TOP/etc/scheduler_JONAS-MDM
    $TOP/etc/workflowengine_JONAS-MDMM
    When you define multiple scheduler or appsvr services, you would need to create multiple scheduler or appsvr directories.
  2. Copy the initial_spec_load.xml file and eventually the common.properties file from the $TOP/etc/default directory to those newly added directories. This enables you to specify individual settings for each of those services. If you want to use the same settings for all three services, then you might copy the initial_spec_load.xml and common.properties to yet another location.
    For example, $TOP/etc/common_app_sched_wfl, and then create a link from the respective service configuration directories to the same files in common_app_sched_wfl. For example:
    cd $TOP/etc/appsvr_JONAS-MDM
    ln -s $TOP/etc/common_app_sched_wfl/initial_spec_load.xml
    ln -s $TOP/etc/common_app_sched_wfl/common.properties.xml

    Repeat these commands for each wanted service.

    By doing so, you would only need to modify files in $TOP/etc/common_app_sched_wfl/ and the appsvr, scheduler, and workflow engine process would pick up the settings automatically.
    Note: Do not modify the initial_spec_load.xml in $TOP/etc/default. If you do so, this setting is used by all other Product Master services, for which you do not provide a service-specific setting as outlined previously. In consequence, services, which are configured with lesser amount of memory (init_ccd_vars.sh) might not start successfully as they run out of memory while you load all of the specs.
  3. Modify respective initial_spec_load.xml to configure the spec loading behavior. The embedded instructions in that file show:

    This file contains information for which Specs needs to be preinstalled by the Application on start. This is useful since it results in the specs that are being fetched in bulk, and hence results in faster performance.

    Consideration needs to be given to the number of specs that are being loaded. Make sure that the number of specs that are listed here is less than number that are allowed in the cache setting in common.properties.

    Bulk Fetch Size needs to be tuned for each setup since the best side depends on how many nodes each spec has, for smaller specs keep this number at about 100, for larger specs set it to a lesser more conservative number like 20. For example,
    <specs bulkfetchsize="100">
    <spec pattern="spec*"/>
    <spec name="other spec"/>
    </specs>"
    There is no definitive answer what value should be used for bulkfetchsize. But going with the smaller size probably is the safer option, it might take slightly longer for Product Master to start up, but ultimately all of the specs go into the cache.
    To load all secondary specs, that start with _ETIM and end with some number [0-9], (do not load the *stand-alone specs, you can use the following settings:
    <?xml version="1.0"?>
    <specs bulkfetchsize="30">
    	<spec pattern="_ETIM_*0"/>
    	<spec pattern="_ETIM_*1"/>
    	<spec pattern="_ETIM_*2"/>
    	<spec pattern="_ETIM_*3"/>
    	<spec pattern="_ETIM_*4"/>
    	<spec pattern="_ETIM_*5"/>
    	<spec pattern="_ETIM_*6"/>
    	<spec pattern="_ETIM_*7"/>
    	<spec pattern="_ETIM_*8"/>
    	<spec pattern="_ETIM_*9"/>
    </specs>
  4. Restart Product Master. All of the specs should then be cached into memory upon startup and the performance of many aspects should hopefully be improved as a result.