PostgreSQL UNIX 域套接字与 TCP 套接字 [英] PostgreSQL UNIX domain sockets vs TCP sockets

查看:61
本文介绍了PostgreSQL UNIX 域套接字与 TCP 套接字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道 UNIX 域套接字与 postgresql 的连接是否比来自本地主机的高并发率的 tcp 连接更快,如果是,那么快多少?

I wonder if the UNIX domain socket connections with postgresql are faster then tcp connections from localhost in high concurrency rate and if it does, by how much?

推荐答案

UNIX 域套接字在环回接口上应该提供比 TCP 套接字更好的性能(更少的数据复制,更少的上下文切换),但我不知道性能是否增加可以用 PostgreSQL 来证明.

UNIX domain sockets should offer better performance than TCP sockets over loopback interface (less copying of data, fewer context switches), but I don't know whether the performance increase can be demonstrated with PostgreSQL.

我在 FreeBSD 邮件列表上找到了一个小的比较:http://lists.freebsd.org/pipermail/freebsd-performance/2005-February/001143.html.

I found a small comparison on the FreeBSD mailinglist: http://lists.freebsd.org/pipermail/freebsd-performance/2005-February/001143.html.

这篇关于PostgreSQL UNIX 域套接字与 TCP 套接字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆