接在同一台机器对于Windows和Linux [英] Sockets On Same Machine For Windows and Linux

查看:90
本文介绍了接在同一台机器对于Windows和Linux的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

效率如何它用做IPC时相比,命名管道和在Windows和Linux等方法插座?

How efficient is it to use sockets when doing IPC as compared to named pipes and other methods on Windows and Linux?

现在,我有需要沟通4个独立的盒4个独立的应用程序。二是在Windows Server 2003 R2上运行.NET 3.5的应用程序。两者的Linux(SUSE LINUX 10)。他们不是一般的CPU限制。交通量不是很大,但其非常重要的,这是低的等待时间。我们使用的插座现在用的Nagle DIS-体健和SLES10慢启动补丁安装在Linux机器。

Right now, I have 4 separate apps on 4 separate boxes that need to communicate. Two are .NET 3.5 applications running on Windows Server 2003 R2. Two are Linux (Suse Linux 10). They're not generally CPU bound. The amount of traffic is not that large but its very important that it be low latency. We're using sockets right now with nagle dis-abled and the sles10 slow start patch installed on the linux machines.

如何的速度提升有多少你认为我们会通过简单地运行在相同的Linux机器在同一窗口框中的两个窗口的应用程序和两个Linux应用程序,使没有code变化(即仍使用套接字得到)。

How much of a speed boost do you think we would get by simply running the two windows apps on the same windows box and the two linux apps on the same linux box and making no code changes (ie still using sockets).

将操作系统的认识到端点是在同一台机器上不知道出去的以太网数据包?他们将分组还是要在整个网络堆栈?多少速度就越快,如果我们把更改为命名管道或内存映射文件或时间点别的?

Will the OS's realize that the endpoints are on the same machine and know not to go out to the ethernet with the packets? Will they packets still have to go through the whole networking stack? How much faster it be if we took the time to change to named pipes or memory mapped files or something else?

推荐答案

对于TCP性能,我最近在HP-UX服务器上完成这种测试(8英特尔安腾2处理器1.5 GHz的6 MB,400吨/ s的总线),并在Red Hat Linux(2 IA-64 1,6千兆赫)。我为了测试TCP性能使用 iperf的。我发现TCP的交流,速度快十倍以上,当我在同一台机器比较两个不同的机器上运行的iperf上运行iperf的。

As for TCP performance, I have done this sort of test recently on an HP-UX server (8 Intel Itanium 2 processors 1.5 GHz 6 MB, 400 MT/s bus) and on Red Hat Linux (2 IA-64 1,6 Ghz). I used iperf in order to test TCP performance. I found that speed of TCP exchange is more than ten times faster when I run iperf on the same machine comparing to running iperf on two different machines.

您也可以尝试一下,因为有可能是你的兴趣选择 - 缓冲区长度要读取或写入,设置TCP无延迟等。此外,因为是Winddws一个版本的iperf的你可以比较在Windows计算机的TCP交换的速度。

You can also give it a try as there are options that might be of interest to you - length of buffer to read or write, set TCP no delay and so on. Also you can compare speed of TCP exchange on Windows machines as there is a version of iperf for Winddws.

这是一个更详细的比较:

This is a more detailed comparison:

1)不同的HP-UX服务器上运行的两个iperf的领域应用之间的TCP交换速度,默认的TCP窗口32K:387兆位/秒

1) Speed of TCP exchange between two iperf applicatons running on different HP-UX server, default TCP window 32K: 387 Mbits/sec

2)不同的HP-UX服务器上运行的两个iperf的领域应用之间的TCP交换速度,TCP窗口512K:640兆位/秒

2) Speed of TCP exchange between two iperf applicatons running on different HP-UX server, TCP window 512K: 640 Mbits/sec

3)相同的HP-UX服务器上运行的两个iperf的领域应用之间的TCP交换速度,默认的TCP窗口32K:5.60吉比特/秒

3) Speed of TCP exchange between two iperf applicatons running on the same HP-UX server, default TCP window 32K: 5.60 Gbits/sec

4)相同的HP-UX服务器上运行的两个iperf的领域应用之间的TCP交换速度,默认的TCP窗口512K:5.70吉比特/秒

4) Speed of TCP exchange between two iperf applicatons running on the same HP-UX server, default TCP window 512K: 5.70 Gbits/sec.

5)同一Linux服务器上运行的两个iperf的领域应用之间的TCP交换速度,TCP窗口512K:7.06吉比特/秒

5) Speed of TCP exchange between two iperf applicatons running on the same Linux server, TCP window 512K: 7.06 Gbits/sec

6)在HP-UX和Linux,TCP窗口512K运行的两​​个iperf的领域应用之间的TCP交换的速度:699兆位/秒

6) Speed of TCP exchange between two iperf applicatons running on HP-UX and Linux, TCP window 512K: 699 Mbits/sec

这篇关于接在同一台机器对于Windows和Linux的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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