Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fastest SQL Server protocol?

What is the fastest SQL Server connection protocol?

Related: which protocols are available remote versus local, and does that affect the choice of fastest protocol?

like image 338
Aidan Ryan Avatar asked Jul 16 '09 15:07

Aidan Ryan


People also ask

What protocol does SQL Server use?

The most commonly used network protocol in SQL Server is the TCP/IP protocol. This protocol connects computers with different hardware and operating systems specs and allows it to communicate together, as it includes network traffic routing standards with advanced security protection.

What is SQL Server IOPS?

Understand SQL Server and IOPS On any server that hosts a SQL Server instance, it is important that the server achieves the fastest response possible from the I/O subsystem. More and faster disks or arrays provide sufficient I/O operations per second (IOPS) while maintaining low latency and queuing on all disks.

How many protocols are there in SQL Server?

Hi Friends, We all know that there are 4 protocols that can be used to connect a SQL Server instance from a client; namely Share Memory, TCP/IP, Named Pipes & VIA.


1 Answers

VIA. This is the fastest SQL Protocol, it runs on dedicated hardware and is used in doing SQL Server benchmarked records.

Note that the VIA protocol is deprecated by Microsoft, and will be removed in a future version of Microsoft SQL Server. It is however supported in SQL Server 2008, SQL Server 2008 R2 and SQL Server 2012.

Shared Memory is next as performance, but it only works between a client and a server that can actually share memory, so local only.

For remote connectivity on ordinary hardware, TCP is the way to go. Under normal operations, it has the same performance as Named Pipes. On slow or busy networks, it outperforms NP in robustness and speed, a fact documented in MSDN:

For named pipes, network communications are typically more interactive. A peer does not send data until another peer asks for it using a read command. A network read typically involves a series of peek named pipes messages before it starts to read the data. These can be very costly in a slow network and cause excessive network traffic, which in turn affects other network clients.

Named Pipes also can lead to client connect time outs:

TCP/IP Sockets also support a backlog queue. This can provide a limited smoothing effect compared to named pipes that could lead to pipe-busy errors when you are trying to connect to SQL Server.

Unfortunately the normal client configuration tries NP first and this can cause connectivity problems (for the reasons cited above), where enforcing TCP on client network config (or in connection string, via tcp:servername) skips the NP connect attempt and goes straight to TCP for a much better experience under load.

Now is true that the same link I quoted above goes on to praise NP for its easy of configuration, most likely referring to no need to open SQL TCP port in firewall, but is there where me and BOL have different views.

like image 123
Remus Rusanu Avatar answered Oct 23 '22 05:10

Remus Rusanu