Wednesday, March 7, 2012

Local named pipes better than TCP/IP?

Is it generally true that local named pipes are better than TCP/IP? Are ther
e
any drawbacks?
Regards, Per."PerFry" <PerFry@.discussions.microsoft.com> wrote in message
news:57138C0A-544C-435E-81A5-B2F7455C608B@.microsoft.com...
> Is it generally true that local named pipes are better than TCP/IP?
Not true.

> Are there any drawbacks?
Named pipes have been around for a long, long time. Therefore on a LAN,
named pipes may give slightly better performance. However, TCP/IP is far
more tolerant and resiliant with both LAN and WAN applications.
Occaisionally, you'll find applications (mostly legacy) that will require
named pipes. A good way to handle that configure the server side network
library utility to first use TCP/IP, then named pipes (in that order).
Steve|||With SQL Server 2000 the default for local connections (connections made on
the server itself) is shared memory. Steve is correct that named pipes is
for the most part a legacy connection method. I would just use the default
of shared memory for local connections and TCP/IP for remote connections.
Rand
This posting is provided "as is" with no warranties and confers no rights.|||I'd like to stress that we're having the client and server on the same
machine, so I'm referring to _local_ named pipes. Books Online states that
"Local named pipes runs in kernel mode and is extremely fast" (
http://msdn.microsoft.com/library/d...r />
_5l9r.asp ).
"Rand Boyd [MSFT]" wrote:

> With SQL Server 2000 the default for local connections (connections made o
n
> the server itself) is shared memory. Steve is correct that named pipes is
> for the most part a legacy connection method. I would just use the default
> of shared memory for local connections and TCP/IP for remote connections.
> Rand
> This posting is provided "as is" with no warranties and confers no rights.
>|||IMO -> In general you are not going to see huge differences in performance
using the different network library options such as named pipes, shared
memory or tcp-ip sockets.
The reason for this is the overhead network library performance is usually
insignificant compared to perf of the client application and SQL query
performance.
So you are better off spending time optimizing your SQL queries and your
client code.
Matt
"PerFry" <PerFry@.discussions.microsoft.com> wrote in message
news:161A939F-0102-46C2-80EB-6CC0B55DAD2F@.microsoft.com...[vbcol=seagreen]
> I'd like to stress that we're having the client and server on the same
> machine, so I'm referring to _local_ named pipes. Books Online states that
> "Local named pipes runs in kernel mode and is extremely fast" (
> http://msdn.microsoft.com/library/d.../>
_g_5l9r.asp )
> .
>
> "Rand Boyd [MSFT]" wrote:
>|||It's about what I shall recommend all our customers. I want to recommend the
m
the best configuration options when they choose to install our application
server and SQL Server on the same machine. So when I have to recommend
something, would it be shared memory?
/Per
"Matt Neerincx [MS]" wrote:

> IMO -> In general you are not going to see huge differences in performance
> using the different network library options such as named pipes, shared
> memory or tcp-ip sockets.
> The reason for this is the overhead network library performance is usually
> insignificant compared to perf of the client application and SQL query
> performance.
> So you are better off spending time optimizing your SQL queries and your
> client code.
> Matt
>
> "PerFry" <PerFry@.discussions.microsoft.com> wrote in message
> news:161A939F-0102-46C2-80EB-6CC0B55DAD2F@.microsoft.com...
>
>|||Yes in this case then shared memory for local connections and TCP-IP for
remote is a good recommendation. By default the driver will automatically
pick these methods, i.e. if the driver connects to local SQL it will use
shared memory and if the driver connects to remote SQL it will use TCP-IP.
One thing you can do as well is if you want local ONLY connections in this
case (for example to avoid remote users from trying to connect to the SQL
Server) then you could disable tcp-ip protocol for SQL and only use shared
memory. For example, to follow the standard security procedure of "reducing
the attack surface" to SQL you would do this.
Matt
"PerFry" <PerFry@.discussions.microsoft.com> wrote in message
news:A0F3FEED-C578-4558-A8C0-7FF0F7A4636E@.microsoft.com...[vbcol=seagreen]
> It's about what I shall recommend all our customers. I want to recommend
> them
> the best configuration options when they choose to install our application
> server and SQL Server on the same machine. So when I have to recommend
> something, would it be shared memory?
> /Per
> "Matt Neerincx [MS]" wrote:
>

No comments:

Post a Comment