31 Improving Invoicing Performance

Learn how to improve invoicing performance in Oracle Communications Billing and Revenue Management (BRM) by setting parameters in the invoicing configuration file.

Topics in this document:

About Tuning Invoicing Performance

Invoice utilities are multithreaded applications (MTAs) and use a similar set of configuration entries as the billing utilities, including children, fetch_size, and per_step. For information about these entries, see "Configuring Your Multithreaded Application" in BRM Developer's Guide.

Not all invoice utilities use the entries in the same way, so you can configure them individually. To specify an entry for a particular utility, replace the generic name - pin_mta with the name of the specific utility. For example, you might have these two entries for fetch_size:

- pin_mta          fetch_size 30000
- pin_inv_accts    fetch_size 50000

In this case, pin_inv_accts uses a fetch size of 50,000, and all other invoicing utilities use a fetch size of 30,000.

For more information, see the comments in the configuration file (BRM_home/apps/pin_inv/pin.conf).

Setting the Number of Children for Invoice Utilities

The children entry governs how many child threads will process data in parallel. Increasing the number of child threads will provide better invoicing performance when the database server remains under-utilized even though you have a large number of accounts. If you increase the number of children beyond the optimum, performance suffers from context switching. This is often indicated by higher system time with no increase in throughput.

Because the invoice utilities work faster than the billing utilities, the number of children for invoicing can be up to 50% more than for billing or credit card processing.

You also need to tune the DM configuration file dm_shmsize entry to handle the number of children. A typical value for the dm_shmsize entry is the size of an invoice (in bytes) multiplied by the number specified in the children entry.

To set the number of children for invoice utilities:

  1. Open the invoice utilities configuration file (BRM_home/apps/pin_inv/pin.conf).

  2. In the Performance Parameters section, edit the children entry:

    - pin_mta children 2500
  3. Save and close the file.

Tuning the Account Cache Size for Invoice Utilities (fetch_size)

The fetch_size entry specifies the number of invoice records to retrieve from the database and hold in memory before the invoicing utility starts processing them. In general, this value should be as large as possible to reduce the number of fetches from the database. The maximum possible fetch size depends on the complexity of the invoice utility's search results.

When running invoicing for parent accounts (pay_type 10001), the fetch_size value refers to the number of parent invoice payment accounts to retrieve. For example, if you have 10,000 parent accounts and each account has an average of 50 children, you would set fetch_size to 10,000 to retrieve all of the parent invoice payment accounts. If you are running billing for only the children (pay_type 10007), you would set fetch_size to 500,000 to retrieve all of the child invoice payment accounts.

If enough memory is available, set the value of the fetch_size entry to the number of accounts that need to be invoiced. The fetch_size value should be a multiple of the number specified in the per_step entry.

To change the account cache size for invoice utilities:

  1. Open the invoice utilities configuration file (BRM_home/apps/pin_inv/pin.conf).

  2. In the Performance Parameters section, edit the fetch_size entry. For example:

    - pin_mta fetch_size 1000000
  3. Save and close the file.

Setting the Batch Size for Invoice Utilities (per_step)

The per_step entry specifies how much data to store in dm_oracle when the invoicing utility is performing a step search. It does not have a large impact on performance, but it does govern memory usage in dm_oracle. It also prevents BRM from using all of its memory for one large search.

A 64-bit dm_oracle can use reasonably large values. A typical per_step value for invoice utilities would be between 10,000 and 50,000.

Note:

When running invoicing for parent accounts (pay_type 10001), the per_step value refers to the number of parent invoice payment accounts to store in the DM. For example, if you have 10,000 parent accounts and each account has an average of 50 children, you would set per_step to 10,000 to store all of the parent invoice payment accounts in the DM.

To set the batch size for invoice utilities:

  1. Open the invoice utilities configuration file (BRM_home/apps/pin_inv/pin.conf).

  2. In the Performance Parameters section, edit the per_step entry. For example:

    - pin_mta per_step 10000
  3. Save and close the file.

Optimizing Invoicing Performance

To improve invoicing performance, you can set the inv_perf_features flag in the Connection Manager's configuration file (pin.conf) to enable or disable specific optimizations during PCM_OP_IN_MAKE_INVOICE opcode processing.

- fm_inv inv_perf_features 0x00000000  

This flag is a bitmask and each bit position represents a performance optimization that can be turned on or off. By default, it is set to 0x00000000 (no optimizations are enabled).

Table 31-1 lists the bit values and their significance.

Table 31-1 Invoicing Performance Bit Values

Value Description

0x00000001

Selects all event types. By default, only events that are configured in the /config/invoice_events object are selected.

0x00000002

Selects only the following event types:

  • /event/billing/adjustment/account

  • /event/billing/adjustment/event

  • /event/billing/adjustment/item

  • /event/billing/adjustment/tax_event

  • /event/billing/cycle/tax

  • /event/billing/payment/cash

  • /event/billing/payment/cc

  • /event/billing/payment/check

  • /event/billing/payment/dd

  • /event/billing/payment/payorder

  • /event/billing/payment/postalorder

  • /event/billing/payment/wtransfer

  • /event/billing/product/fee/cancel

  • /event/billing/product/fee/cycle

  • /event/billing/product/fee/cycle/cycle_arrear

  • /event/billing/product/fee/cycle/cycle_forward_bimonthly

  • /event/billing/product/fee/cycle/cycle_forward_monthly

  • /event/billing/product/fee/cycle/cycle_forward_quarterly

  • /event/billing/product/fee/cycle/cycle_forward_semiannual

  • /event/billing/product/fee/purchase

  • /event/billing/refund/cash

  • /event/billing/refund/cc

0x00000003

  • /event/billing/refund/check

  • /event/billing/refund/dd

  • /event/billing/refund/payorder

  • /event/billing/refund/postalorder

  • /event/billing/refund/wtransfer

  • /event/billing/reversal/cc

  • /event/billing/reversal/check

  • /event/billing/reversal/dd

  • /event/billing/reversal/payorder

  • /event/billing/reversal/postalorder

  • /event/billing/reversal/wtransfer

  • /event/billing/settlement/item

  • /event/billing/writeoff/account

  • /event/billing/writeoff/bill

  • /event/billing/writeoff/item

  • /event/billing/writeoff/tax_account

  • /event/billing/writeoff/tax_bill

  • /event/billing/writeoff/tax_item

  • /event/session/dialup

0x00000004

Creates the invoices but does not write them to the database. The bill object is updated with the invoice information.

0x00000008

Invoicing passes the input flist by reference. By default, invoicing creates a copy of the input flist. For large invoice input flists, setting this flag saves memory.

0x00000010

Events with no balance impacts are retained. If this flag is not set, events with no balance impacts are dropped from the final invoice.

0x00000400

Specifies to keep balance impacts for sponsored events in the member accounts.

To enable multiple optimizations, you can OR the bits. For example, to select hard coded list of event types and to not write invoices to the database, set the flag to 0x00000006.