34 Improving Real-Time Rating Performance

This chapter provides information on evaluating and improving the performance of Oracle Communications Billing and Revenue Management (BRM) real-time rating.

Topics in this document:

Improving Real-Time Rating Performance

You can improve real-time rating performance by doing the following:

Changing the Precision of Rounded and Calculated Values

To improve performance, you can change the precision of rounded values and of values calculated by real-time rating. You change the precision by adding or modifying entries in the CM pin.conf file:

  • To change the precision of rounded values, add or change the rating_quantity_rounding_scale entry. The value of this entry determines the number of digits to the right of the decimal place for rounding quantities. The default is 8.

  • To change the precision of calculated values, add or change the rating_max_scale entry. The value of this entry determines the number of digits to the right of the decimal place that are used. The default is 10.

    Note:

    You must stop and restart the CM after you change these values.

Setting the Interval for Checking for Price List Changes

You can set the interval at which BRM checks for changes to the price list. If you change the price list frequently, you may want to use a shorter interval. If your price list is less volatile, you can increase the interval.

To change the interval:

  1. Open the CM configuration file (BRM_home/sys/cm/pin.conf).

  2. Edit the following entry:

    - fm_rate refresh_product_interval 3600

    The value of this entry determines the interval in seconds. The default is 3600.

  3. Save the file.

  4. Stop and restart the CM.

Setting the Interval for Updating Zone Maps

To specify how frequently BRM checks for changes to zone maps and updates them in the database:

  1. Open the CM configuration file (BRM_home/sys/cm/pin.conf).

  2. Edit the following entry:

    - fm_zonemap_pol update_interval 3600
    

    The value of this entry determines the interval in seconds. The default is 3600.

  3. Save the file.

  4. Stop and restart the CM.

Filtering the ERAs Considered during Rating and Discounting

By default, real-time rating checks for both account-level extended rating attributes (/profile/acct_extrating object) and service-level ERAs (/profile/serv_extrating object) when it searches for rating and discounting criteria. You can improve real-time rating performance by filtering the types of ERAs that BRM considers when it searches for rating and discounting criteria. For example, you can configure BRM to search for service-level ERAs only or to omit the ERA search altogether.

You can specify the types of ERAs to consider by modifying a field in the rating instance of the /config/business_params object.

You modify the /config/business_params object by using the pin_bus_params utility. See "pin_bus_params" in BRM Developer's Guide.

To specify the ERA types:

  1. Use the following command to create an editable XML file from the rating instance of the /config/business_params object:

    pin_bus_params -r BusParamsRating bus_params_rating.xml 
    

    This command creates the XML file named bus_params_rating.xml.out in your working directory. If you do not want this file in your working directory, specify the full path as part of the file name.

  2. Search the XML file for following line:

    <EnableEras>serviceAndAccount</EnableEras>
    
  3. Change serviceAndAccount to one of the following:

    • account: Limits the rating and discounting criteria search to account-level ERAs by retrieving only the /profile/acct_extrating object.

    • service: Limits the rating and discounting criteria search to service-level ERAs by retrieving only the /profile/serv_extrating object.

    • disabled: Omits ERAs from the rating and discounting criteria. Because neither object is retrieved, this option provides the best performance.

      Note:

      BRM uses the XML in this file to overwrite the existing rating instance of the /config/business_params object. If you delete or modify any other parameters in the file, these changes affect the associated aspects of the BRM rating configuration.

  4. Save the file.

  5. Change the file name from bus_params_rating.xml.out to bus_params_rating.xml.

  6. Use the following command to load the change into the /config/business_params object:

    pin_bus_params bus_params_rating.xml 

    You should run this command from the BRM_home/sys/data/config directory, which includes support files used by the utility. To run it from a different directory, see "pin_bus_params" in BRM Developer's Guide.

  7. To verify that all fields are correct, you can display the /config/business_params object by using Object Browser in Developer Center or by using the robj command with the testnap utility.

    For more information, see "Using the testnap Utility to Test BRM" in BRM Developer's Guide.

  8. Stop and restart the CM.

  9. (Multischema systems only) Run the pin_multidb script with the -R CONFIG parameter.

Enabling and Disabling the Caching of Customized Products

When you use advanced customization to create customized products, BRM uses the customized products for rating. You can control whether customized products are cached for use by the real-time rating engine.

  • If you choose not to cache customized products (the default setting), the real-time rating engine retrieves customized product data from the database during rating. This slows rating performance but minimizes the memory impact of customized products.

  • If you choose to cache customized products, the CM size grows as customized products are created. Because the products are cached in memory, however, rating performance is increased.

You enable product caching by changing the EnableTailormadeCache field in the rating instance of the /config/business_params object from 0 to 1. You can disable caching by changing the field back to 0.

You modify the /config/business_params object by using the pin_bus_params utility. See "pin_bus_params" in BRM Developer's Guide.

To enable caching of customized products:

  1. Use the following command to create an editable XML file from the rating instance of the /config/business_params object:

    pin_bus_params -r BusParamsRating bus_params_rating.xml 
    

    This command creates the XML file named bus_params_rating.xml.out in your working directory. If you do not want this file in your working directory, specify the full path as part of the file name.

  2. Search the XML file for following line:

    <EnableTailormadeCache>0</EnableTailormadeCache>
    
  3. Change 0 to 1.

    Note:

    BRM uses the XML in this file to overwrite the existing rating instance of the /config/business_params object. If you delete or modify any other parameters in the file, these changes affect the associated aspects of the BRM rating configuration.

  4. Save the file.

  5. Change the file name from bus_params_rating.xml.out to bus_params_rating.xml.

  6. Use the following command to load the change into the /config/business_params object:

    pin_bus_params bus_params_rating.xml 
    

    You should run this command from the BRM_home/sys/data/config directory, which includes support files used by the utility. To run it from a different directory, see "pin_bus_params" in BRM Developer's Guide.

  7. To verify that all fields are correct, you can display the /config/business_params object by using Object Browser or by using the robj command with the testnap utility.

    For information on using testnap, see "testnap" in BRM Developer's Guide.

  8. Stop and restart the CM.

  9. (Multischema systems only) Run the pin_multidb script with the -R CONFIG parameter.

Configuring the Maximum Number of Products and Discounts Cached

Products and discounts that are used during the real-time rating process are automatically stored in the CM cache. This improves rating performance, but, over time, it can consume a large amount of memory. To prevent the CM cache from growing too large, you can set a maximum number of products and discounts that can be stored in the CM cache.

  • When you set the maximum to a nonzero value, BRM prevents the real-time rating engine from storing more than the specified number of products and discounts in CM cache. When the maximum number is reached, BRM flushes 10% of the products and discounts from cache that have been used the least.

    Note:

    The maximum number of products and discounts that should be stored in CM cache depends on the your business needs.

  • When you set the maximum to zero, BRM does not regulate the number of products and discounts stored in the CM cache. This is the default.

You configure the maximum number of products and discounts that can be cached by configuring the ProductsDiscountsThreshold field in the rating instance of the /config/business_params object.

To set a maximum number of products and discounts that can be cached:

  1. Use the following command to create an editable XML file from the rating instance of the /config/business_params object:

    pin_bus_params -r BusParamsRating bus_params_rating.xml 
    

    This command creates the XML file named bus_params_rating.xml.out in your working directory. If you do not want this file in your working directory, specify the full path as part of the file name.

  2. Search the XML file for following line:

    <ProductsDiscountsThreshold>0</ProductsDiscountsThreshold>
  3. Change 0 to the maximum number of products and discounts that you would like stored in cache. The default value of 0 specifies to not regulate the number of products and discounts in the CM cache.

    Note:

    BRM uses the XML in this file to overwrite the existing rating instance of the /config/business_params object. If you delete or modify any other parameters in the file, these changes affect the associated aspects of the BRM rating configuration.

  4. Save the file.

  5. Change the file name from bus_params_rating.xml.out to bus_params_rating.xml.

  6. Use the following command to load the change into the /config/business_params object:

    pin_bus_params bus_params_rating.xml 
    

    You should run this command from the BRM_home/sys/data/config directory, which includes support files used by the utility. To run it from a different directory, see "pin_bus_params" in BRM Developer's Guide.

  7. To verify that all fields are correct, you can display the /config/business_params object by using Object Browser or by using the robj command with the testnap utility.

    For information on using testnap, see "testnap" in BRM Developer's Guide.

  8. Stop and restart the CM.

  9. (Multischema systems only) Run the pin_multidb script with the -R CONFIG parameter.

Improving Performance for Loading Large Price Lists

If you have a large price list, you can improve performance in the following ways:

  • Cache pricing data, such as G/L IDs and resource IDs. In a test environment where you modify your price list often, caching pricing data improves performance because there is no need to load price reference objects every time you commit the price list to the database.

    Note:

    Pricing data is created every time the CM starts. Whenever the pricing data is changed in the database, the CM must be stopped and restarted to place the new information into the cache.

    In a production system where you rarely modify your price list, you do not need to cache pricing data. This reserves the CM cache for other uses and eliminates the need to stop and restart the CM to update the cache if you change the price list.

  • Turn off event logging for price list creation events.

    Note:

    When you turn off event logging, BRM still stores audit trail information for products, deals, and plans; however, there will not be an event log of when the price plans were modified and who modified them.

To improve loading performance:

  1. Open the CM configuration file (BRM_home/sys/cm/pin.conf).

  2. Edit the cache_references_at_start entry. The default is 1 (cache data).

    - fm_price cache_references_at_start 1
    
  3. Edit the fm_price_prod_provisioning_cache entry. The default entries are usually sufficient. For more information, see the instructions in the configuration (pin.conf) file.

    - cm_cache fm_price_prod_provisioning_cache 100, 102400, 13
    
  4. Edit the fm_price_cache_beid entry. The default entries are usually sufficient. For more information, see the instructions in the configuration (pin.conf) file.

    - cm_cache fm_price_cache_beid 200, 524288, 32
    
  5. Edit the log_price_change_event entry. The default is 0 (events are not logged).

    - fm_price log_price_change_event  0
    
  6. Edit the fm_offer_profile_cache entry. The default entries are usually sufficient. For more information, see the instructions in the configuration (pin.conf) file.

    - cm_cache fm_offer_profile_cache 20, 102400, 13
    

    Note:

    For policy-driven charging, the fm_offer_profile_cache entry must be present in the pin.conf file. See "Policy-Driven Charging".

  7. Save the file.

  8. Stop and restart the CM.