Symptoms

The resources' usage is different for the same subscription in the OA and BA Provider Control Panels.

Cause

OA and BA count the resources differently.

OA side

OA counts the usage of a resource and stores usage in the resources_usage_log.usage_alter table in the OA database.

NB: the usage_alter values are relative (not absolute values of a resource usage), and reflect the difference in resource usage (made between usage collection procedures), so, for non-additive resources, they can be negative.

For example, a VM was consuming 2 GHz of CPU resource, and then started to consume 1 GHz. The usage_alter would reflect that change by storing negative value in the OA database.

The total amount of resource used is taken as the sum of the values in the usage_alter field.

BA side

From time to time BA asks OA about the resource usage and, depending on the resource type (additive or non-additive) calculates the usage in the following way:

  1. In case of additive resource, BA collects the total amount of the resource used for the billing period, subtracts the amount included into subscription fee and bills the customer for overusage.

    Example:

    Traffic - a customer was using 5 GB per day for a 30-days month. The order would bill the customer for 30x5=150 GB.

  2. In case of non-additive resource, BA collects the amount of the resource used for the billing period, counts the weighted mean of it, subtracts the amount of the resource included into subscription fee and bills the customer.

    Example:

    Diskspace - a customer was consistently overusing 5 GB of diskspace during a month (they were using 15 GB, and the included value in the subscription was set to 10). The billing order would be for 5 GB precisely.

Internal content

Link on internal Article