snippetsqlMinor
How to reduce network latency during mirroring?
Viewed 0 times
duringnetworkmirroringreducehowlatency
Problem
We are using SQL Server 2008 R2 Standard edition for mirroring.
But we found out that network latency is too high. It takes nearly four times time to complete a transaction while mirroring is active. Is it possible to connect these two servers with a direct crossover cable and force sql server to use this link for mirroring? Will that help?
We have already setup a crossover cable between these two servers. But how do we configure sql server to use this link for mirroring?
Any help will be appreciated.
But we found out that network latency is too high. It takes nearly four times time to complete a transaction while mirroring is active. Is it possible to connect these two servers with a direct crossover cable and force sql server to use this link for mirroring? Will that help?
We have already setup a crossover cable between these two servers. But how do we configure sql server to use this link for mirroring?
Any help will be appreciated.
Solution
For a weak network I wouldn't personally use Mirroring. But if you really want mirroring for the specific case when there might be a slow connection an option would be to use the Asynchronous mode (or High Performance mode). This would imply some data loss would be possible, but you will be able to finish transactions faster.
Details on MSDN: Async mirroring. Some details about it:
This mode enhances performance at the expense of high availability.
High-performance mode uses just the principal server and the mirror
server. Problems on the mirror server never impact the principal
server. On the loss of the principal server, the mirror database is
marked DISCONNECTED but is available as a warm standby.
Now this comes with a caveat, the transaction on the Principal is just put in queue, it's not committed immediately on the Mirror, so in case of problems with the Principal, you may have data loss. But at least you won't wait for the transaction to finish on both servers. Check if it's an option.
Regarding specifying different NICs for the connections, please see these questions:
In theory it should be simple enough as to configure both NICs with different IP and use the IP to connect to the SQL Server (not the server name). Also I'd think @Nathan's answer might lead you to a fix. No idea if it can be done with the existing mirroring, my guess is that you need to redo it.
The first sentence is more important if it's an unreliable network. In that case I'd totally advice to use a different technology for HA (log shipping or maybe replication).
PS: Following @Nathan's mention about reading the real requirements (ty, @NathanJolly), then your option remains to configure the NICs so you can connect via the direct link cable. Follow the other answers and questions and see if it's good enough for your environment. If it's still too slow, then I'd suggest you move over to log shipping.
Details on MSDN: Async mirroring. Some details about it:
This mode enhances performance at the expense of high availability.
High-performance mode uses just the principal server and the mirror
server. Problems on the mirror server never impact the principal
server. On the loss of the principal server, the mirror database is
marked DISCONNECTED but is available as a warm standby.
Now this comes with a caveat, the transaction on the Principal is just put in queue, it's not committed immediately on the Mirror, so in case of problems with the Principal, you may have data loss. But at least you won't wait for the transaction to finish on both servers. Check if it's an option.
Regarding specifying different NICs for the connections, please see these questions:
- Using SQL Server on separate networks and
- Running different instances of SQL Server from different networks on one box.
In theory it should be simple enough as to configure both NICs with different IP and use the IP to connect to the SQL Server (not the server name). Also I'd think @Nathan's answer might lead you to a fix. No idea if it can be done with the existing mirroring, my guess is that you need to redo it.
The first sentence is more important if it's an unreliable network. In that case I'd totally advice to use a different technology for HA (log shipping or maybe replication).
PS: Following @Nathan's mention about reading the real requirements (ty, @NathanJolly), then your option remains to configure the NICs so you can connect via the direct link cable. Follow the other answers and questions and see if it's good enough for your environment. If it's still too slow, then I'd suggest you move over to log shipping.
Context
StackExchange Database Administrators Q#42413, answer score: 5
Revisions (0)
No revisions yet.