Estimate the time to complete seeding a mailbox database copy

Articles in the "Database seeding estimation" series

  1. Estimate the time to complete seeding a mailbox database copy [This article]
  2. Database seeding completion estimate script updated

Seeding a mailbox database copy, especially across a WAN, can take days to complete. The shell doesn’t give any indication of the time it will complete, though it does show a progress bar and the amount of data written. If you want to know when the seeding will actually finish, you can extrapolate this from the throughput of the seeding, dividing that into the amount of data remaining to be copied.

The throughput of a copy being seeded is available as a performance counter, as are the percentage complete and the amount written. Using this information I wrote a script to estimate the date and time the database seeding will complete. Because throughput can vary greatly from second to second, the default sample duration is 60 seconds. You can specify any number of seconds, choosing accuracy or impatience. Retrieving performance counters can take some time (not even counting any sampling you may do), so a progress indicator will indicate any time that is occurring. (Three separate queries for performance counters occur to provide the output.)

To run the script, provide a database copy and, optionally, a sample duration. The copy will be validated that it is being seeded, then the seeding throughput will be retrieved for 60 seconds or the duration you specified. Then the amount of data written so far is retrieved, comparing that to the total size of the database, so that the remaining amount can be determined. That amount is divided by the average throughput during the sample duration and calculating the time it will be done. Bear in mind that this calculation does not include the time to seed the content index or copy and replay transaction logs that have been generated since seeding began. The output will show the percentage of the database size that has been seeded thus far and the estimated date and time the seeding will complete.

You can copy the code below or download the script via the link.

  Get-DatabaseSeedingCompletion.zip (1.5 KiB)


10 thoughts on “Estimate the time to complete seeding a mailbox database copy

  1. Pingback: TOAA: Lokalisierte Server Software (oder auch: man lernt nie aus) | m-arx and the world.

  2. is working as expected …
    thanks a lot ….. also as Jamie – exactly what I was looking for

  3. Should this work for Exchange 2013 as well? I initiated a reseed of a complete server yesterday (29 DB’s, ca. 2 TB of data) and when I ran this script this morning it concluded “Could not calculate remaining time because throughput in the sampling interval was 0 kb”. Does that REALLY mean it just hasn’t been doing anything for the past 16 hours or so?

  4. Yes, it works with Exchange 2013 as the performance counters are the same. Throughput of 0 KB during the sampling period only means that no data was being written to the database during the time the script was looking at the performance counters. I can modify the script, however, to report the percentage completed even if it can’t tell when it will be completed.

Leave a Reply

Your email address will not be published. Required fields are marked *

*