Measuring latency for stretched SharePoint farm topologies

This blog post focuses on measuring latency for SharePoint stretched farm topologies.

As per this article there is a requirement for <1ms latency between web front end servers and database servers.

I've been assisting customers in measuring their latency in order to see if they are able to meet this requirement.
The solution that I provided for them is a PowerShell script that can be left running for a number of hours (e.g. 120 hours (5 days)).

The script outputs directly into a SQL database.  This provides greater flexibility when analysing the data; for example below I have connected PowerBI to the database to illustrate latency/ roundtrip values:

In the example above, you can see that <1ms latency has only been achieved approximately 45% of the time.

You can download the script here:

Please be aware that you will need to build a database to output the information to. In my lab environment I created a database called 'Net_Latency', with a table called 'Latency' containing the following columns:

Cheers! Hope this helps.


Comments (2)

  1. Andrew says:

    Great Post Steve, I was trying to configure this in my lab to test it, but I’m receiving the following:

    .Exception calling "ExecuteNonQuery" with "0" argument(s): "Cannot insert the
    value NULL into column ‘Id’, table ‘70331_NET_Latency.dbo.Latency’; column
    does not allow nulls. INSERT fails.

    Any clue?

  2. Hi Andrew,

    I uploaded a newer version of the script, and a backup of an empty database to GitHub if this helps?


Skip to main content