Tuning Daily Billing Process

Configuring Parallelization for Daily Billing Process

Billing supports Daily Billing Process parallelization, which allows utilizing multiple CPU cores simultaneously to increase Daily Billing Process performance and enable vertical scaling.

Important: By default, Billing uses six threads. We do not recommend that you run the Daily Billing Process in more than six threads, especially if you use delayed billing orders processing.

However, you may want to change the number of threads in some cases depending on your business needs.

  • You can consider to lower the number of threads if you use 2 cores CPU machine with a high load via API, or you use a low performance machine;
  • You can consider to raise the number of threads if you do not use delayed billing order processing, or use "Operating Unit" resellers; however, such increasing would give a minimum performance growth while a higher load on a database.

In order to change the number of threads executed in parallel, perform the following steps:

  1. Log in to Billing application server through SSH.
  2. Open the global.conf file located at /usr/local/bm/etc/ssm.conf.d/global.conf.
  3. Add the following parameter to the [environment] section of the file:

    DBPRunners = 4

    In this example, 4 is a number of threads.

  4. Restart the pba service:

    /etc/init.d/pba restart

Configuring Priority for Processing of Orders Generated by Daily Billing Process for Resellers

There are cases when you might need to process orders of customers of the reseller A in the first place while orders of customers of the reseller B can be delayed. You can define the priority for processing of orders generated by the Daily Billing Process by editing the global.conf file located at /usr/local/bm/etc/ssm.conf.d/global.conf on Billing application server. You should add a string in the following format:

ResellerPriorityForDBPOrders = RESELLERID=PRIORITYID,RESELLERID=PRIORITYID

Billing Task Manager supports seven priority levels:

  • 0 – Idle
  • 1 – Very Low
  • 2 – Low
  • 3 – Normal
  • 4 – High
  • 5 – Very High
  • 6 – Realtime

For more details about the Billing Task Manager, refer to the Configuring Event Settings in Billing section.

For example, you have two resellers with account id 1000007 and 1000008. You need orders of reseller 1000007 to be processed in first place. You can define priorities in the global.conf as follows:

[environment]
ResellerPriorityForDBPOrders = 1000007=2,1000008=0

Configuring Multi-Threaded Generation of Renewal Orders

The default number of threads used for renewal order generation is 24. You can specify the number of threads by adding the parameter DBPRenewalRunners to the [environment] section in the /usr/local/bm/etc/ssm.conf.d/global.conf on Billing application server. This will allow you to reduce the time spent on generation of renewal orders. After making the changes in the global.conf, you must restart the pba service.

Important: Please do not change the parameter on your own, set it up after getting recommendations from the CloudBlue Commerce support.

Configuring Multi-Threaded Credit Hold Check for Accounts and Subscriptions

The default number of threads used for the credit hold check is 24. You can specify the number of threads by adding the parameter DBPCreditHoldRunners to the [environment] section in the /usr/local/bm/etc/ssm.conf.d/global.conf on Billing application server. This will allow you to reduce the time spent on the credit hold check. After making the changes in the global.conf, you must restart the pba service.

Important: Please do not change the parameter on your own, set it up after getting recommendations from the CloudBlue Commerce support.

CloudBlue, an Ingram Micro business, uses cookies to improve the usability of our site. By continuing to use this site and/or logging in you are accepting the use of these cookies. For more information, visit our Privacy Policy.