Re: Multiple UNIX-domain sockets?
От | Oliver Fromme |
---|---|
Тема | Re: Multiple UNIX-domain sockets? |
Дата | |
Msg-id | 200609261315.k8QDFRdq048973@lurza.secnetix.de обсуждение исходный текст |
Ответ на | Re: Multiple UNIX-domain sockets? (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-novice |
Tom Lane wrote: > Oliver Fromme writes: > > The only solution would be to use TCP sockets on localhost, > > but the TCP/IP overhead is considerably higher, especially > > when there are lots of small queries (which I expect). > > I've foiund several benchmarks in various mailinglists, > > some mention a factor of 10. > > Really? A decently designed TCP stack should have enough shortcuts > for local traffic to be competitive with Unix sockets. TCP/IP is a very non-trivial protocol. It has to deal with fragmentation, re-assembly, retransmission and reordering, calculating and verifying checksums, transmission window control, packet filtering etc., and all of that includes connections to localhost, too. Compared to that, UNIX domain sockets are extremely simple. > Have you > measured a significant performance problem for yourself? I have to admit that I haven't done any benchmarks myself. The problem is that it's not easy (and takes much time) to set up such benchmarks under realistic conditions and get useful numbers. I've found the following postings: http://freebsd.rambler.ru/bsdmail/freebsd-stable_2005/msg07530.html http://freebsd.rambler.ru/bsdmail/freebsd-stable_2005/msg07442.html They don't relate to PostgreSQL, though, but to other apps that can use TCP sockets and UNIX sockets. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "Python is an experiment in how much freedom programmers need. Too much freedom and nobody can read another's code; too little and expressiveness is endangered." -- Guido van Rossum
В списке pgsql-novice по дате отправления: