Re: Performance: Unix sockets vs. TCP/IP sockets

Поиск
Список
Период
Сортировка
От Doug McNaught
Тема Re: Performance: Unix sockets vs. TCP/IP sockets
Дата
Msg-id m3k87iuojk.fsf@belphigor.mcnaught.org
обсуждение исходный текст
Ответ на Performance: Unix sockets vs. TCP/IP sockets  (Frank Joerdens <frank@joerdens.de>)
Список pgsql-general
Tom Lane <tgl@sss.pgh.pa.us> writes:

> Doug McNaught <doug@wireboard.com> writes:
> > For a localhost TCP socket, a write() has to be sent down the network
> > stack and (possibly) split into packets, which are then sent through
> > the routing engine and back up through the stack, flow-controlled,
> > reassembled, and submitted to the receiving socket.  Also, ACK packets
> > have to be sent back to the sender through the same tortuous path.
>
> My notion of a "properly designed" kernel is one that has a shortcircuit
> path for local TCP connections, to avoid precisely that overhead.  Not
> all do ... but any kernel wherein attention has been paid to X Windows
> performance (to mention just one important case) does.

Hmmm.  I would take issue with your notion of "properly designed"--one
might instead use the phrase "insanely bloated with special cases". ;)

X can, and should, use Unix sockets and/or shared memory for speed
when connecting to the local display.

I don't intend to start a flamewar--I just think "properly designed"
is a matter of philosophy.

> Of course, since the kernel is certainly capable of net socket
> throughput well in excess of 0.3 megabytes/sec on this machine, this
> example really just proves Doug's other point: the difference between a
> Unix socket and a TCP socket is unlikely to be important for Postgres
> purposes, because it'll be swamped by other factors.

Yeah, I think that was my main point, though I didn't really emphasize
it very well.

Thanks for the followup.

-Doug

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Update Trigger Inconsistency with 7.1?
Следующее
От: Braeus Sabaco
Дата:
Сообщение: pg_dump fails sanity check