Quantcast
Channel: High Availability (Clustering) forum
Viewing all articles
Browse latest Browse all 5654

Performance AlwaysOn SQL 2014 in synchronous mode

$
0
0

Hello,

I have found a great article about AlwaysOn performance in synchronous mode:

_https://blogs.msdn.microsoft.com/sambetts/2014/08/21/alwayson-asynchronous-vs-synchronous-commit-performance-for-sharepoint/

The short version of this artice is: updates are about x2 slower than standalone for a x2 node AlwaysOn cluster; reading data is about the same performance (which would make sense).

As we currently create an AlwaysOn Cluster SQL 2014 with one primary synchronous replica if have also done some performance tests. For this I have used a scripts which inserts 20000 rows. Please find the script at the end.

My results: (Script see below)
Single Database (standalone, not in Availabilty Group): 9seconds
Synchronized Database (AlwaysOn, synchronous mode): 19seconds

It would be very interesting for me if you get similar results and what you think about this: Is this high latency really a normal behavior, means by design?

CREATE TABLE dbo.TestTableSize
(
 MyKeyField VARCHAR(10) NOT NULL,
 MyDate1 DATETIME NOT NULL,
 MyDate2 DATETIME NOT NULL,
 MyDate3 DATETIME NOT NULL,
 MyDate4 DATETIME NOT NULL,
 MyDate5 DATETIME NOT NULL
)

DECLARE @RowCount INT
DECLARE @RowString VARCHAR(10)
DECLARE @Random INT
DECLARE @Upper INT
DECLARE @Lower INT
DECLARE @InsertDate DATETIME

SET @Lower = -730
SET @Upper = -1
SET @RowCount = 0

WHILE @RowCount < 20000
BEGIN
 SET @RowString = CAST(@RowCount AS VARCHAR(10))
 SELECT @Random = ROUND(((@Upper - @Lower -1) * RAND() + @Lower), 0)
 SET @InsertDate = DATEADD(dd, @Random, GETDATE())
 
 INSERT INTO TestTableSize
  (MyKeyField
  ,MyDate1
  ,MyDate2
  ,MyDate3
  ,MyDate4
  ,MyDate5)
 VALUES
  (REPLICATE('0', 10 - DATALENGTH(@RowString)) + @RowString
  , @InsertDate
  ,DATEADD(dd, 1, @InsertDate)
  ,DATEADD(dd, 2, @InsertDate)
  ,DATEADD(dd, 3, @InsertDate)
  ,DATEADD(dd, 4, @InsertDate))

 SET @RowCount = @RowCount + 1
END



Viewing all articles
Browse latest Browse all 5654

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>