Search Engine: Elastic

Article ID: 129801, created on Nov 6, 2016, last review on Nov 7, 2016

  • Applies to:
  • Operations Automation

Question

How many mailboxes are updated in a “Collect mailboxes diskspace usage for service #XXX” task and how is this value determined?

Note: XXX here and below should be replaced with an actual Exchange Mailstore service ID.

Answer

You can find exactly how many mailboxes were set to have their diskspace usage updated using the Operations Automation (OA) main system log on the OA management node server. Search for a string like below at around the time when the task was scheduled using “calculateUpdateLoadin” and the actual service ID as keywords:

Nov  1 03:35:05.029 : INF [task:100001:31113 1:58118:f39efb70 Exchange 2056913379]: [ Exchange::ExchangeImpl::calculateUpdateLoadin] Collect diskspace usage task parameters for service with ID=XXX:  mailboxes_per_task: 20, folders_per_task: 16

mailboxes_per_task is the value we are looking for. How OA calculates this value is described below.

There are two “Maximum number of mailboxes to update simultaneously” limits that affect the total updated mailboxes number in one task:

  1. Global limit – can be found in OA Provider Control Panel at “Services > E-mail > Other > Exchange Settings > Storage Usage Accounting Settings”.

  2. Per-service limit – can be found at “Infrastructure > Services”, search for the service by ID, click on the service name, then on “Manage application” button, then on “Storage Usage Accounting” tab.

When a “Collect mailboxes diskspace usage for service #XXX” task is scheduled, OA counts how many mailboxes need to have their usage recalculated on a per-service basis using the below SQL query:

SELECT count(mbx.mailbox_id) AS count, srv.du_mailboxes_per_task AS mailboxes_per_task,srv.service_id AS service_id FROM exch_mbx_store_services srv INNER JOIN exch_mailbox_stores stores ON srv.service_id = stores.service_id INNER JOIN exch_mailboxes mbx ON stores.mail_store_id = mbx.store_id INNER JOIN exch_mailboxes_du du_inf ON mbx.mailbox_id = du_inf.mailbox_id WHERE du_inf.next_update <= <CURRENT DATE> GROUP BY srv.du_mailboxes_per_task, srv.service_id;

<CURRENT DATE> is replaced by the actual date and time in the YYYY-MM-DD HH:mm:ss.d format.

The output typically looks like below:

 count | mailboxes_per_task | service_id
-------+--------------------+------------
   100 |                 20 |         10
    40 |                 50 |         11

count is the number of mailboxes that are set to be updated, mailboxes_per_task is the per-service “Maximum number of mailboxes to update simultaneously” limit.

On this step, OA compares these values and stores the lesser of the two as the actual per-service mailbox count to be processed. After that, the actual mailbox counts for each service are summarized, resulting in the overall mailbox count.

In the example above, the actual per-service counts would be:

  • For service ID 10: 100 mailboxes are set to be updated, but the limit only allows 20, so the actual count is 20.
  • For service ID 11: 40 mailboxes need to be updated, and the limit allows more than that: 50, so the actual count is 40.
  • The overall count will be the sum of these values: 20 + 40 = 60.

On the next step the overall count is compared with the global “Maximum number of mailboxes to update simultaneously” limit:

  1. If the global limit is equal or greater than the overall count, then all mailboxes within the overall count are updated.

    In the example above, if the global limit is set to 60 or higher, all mailboxes within the overall count of 60 will be updated.

  2. If the global limit is less than the overall count, the following algorithm is used:

    2.1. A correction coefficient is calculated using the formula below:

    correction coefficient = overall count / global limit
    

    2.2. The actual per-service counts are corrected using the above coefficient:

    final mailbox count = actual count / correction coefficient (rounding up)
    

    In the example above, if the global limit is set to 50, the following amounts of mailboxes will be updated:

    correction coefficient = 60 / 50 = 1.2
    final mailbox count for service 10 = 20 / 1.2 = 17
    final mailbox count for service 11 = 40 / 1.2 = 34
    

    These final mailbox counts will be used in the corresponding diskspace collection tasks.

The algorithm above describes how the mailbox counts for the “Collect mailboxes diskspace usage for service #XXX” tasks are calculated. It can be used to understand how to tune the “Maximum number of mailboxes to update simultaneously” limits to achieve the best performance of the said tasks.

Note: The same algorithm is used for the “Collect public folders diskspace usage for service #XXX” tasks, but with the folders_per_task parameter instead of the mailboxes_per_task one.

5356b422f65bdad1c3e9edca5d74a1ae caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF