RTX 与 Windows 以太网性能分析

发布时间:2017.03.20 新闻来源:PCI5565反射内存-实时仿真技术网 浏览次数:

      RTX 下使用普通网卡即可实现实时以太网的性能。作者对 RTX 与 Windows 下以太网性能进行了对比测试来验证该观点。


1. 测试环境
        Windows XP 操作系统, RTX 使用Dedicated 模式, 单独占用一颗 CPU 核, 硬件使用 Core i7, 4 核8 线程, 2.8GHz 主频, 4GB 内存, 两块 Intel 82545GM 千兆网卡点对点互联。


2. 测试方法
        RTX 环境下, 测试方法为两台机器分别运行RT Client 和 RT Server 两个 RTSS 应用程序, RT Client 发送数据包到 RT Server, RT Server 收到数据包之后发送回 RT Client。使用 TCP/IP & UDP 协议, 选择不同的包长度, 每次发送500 个数据包, 重复 20 次Windows 环境下, 两台机器分别运行 Client 和 Server 两个应用程序, Client 发送数据包到 Server, Server 收到数据包之后发送回 Client。使用 TCP/IP & UDP 协议, 选择不同的包长度, 每次发送500 个数据包, 重复 20 次。


3. 测试结果

RTX 环境, TCP/IP 协议测试结果 Windows 环境, TCP/IP 协议测试结果
Packet Size = 1 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 35 us
Maximum Time = 54 us
Errors = 0
Lost Packets = 0
--
Packet Size = 16 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 36 us
Maximum Time = 55 us
Errors = 0
Lost Packets = 0
Packet Size = 16 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 55 us
Maximum Time = 199 us
Errors = 0
Lost Packets = 0
Packet Size = 32 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 37 us
Maximum Time = 54 us
Errors = 0
Lost Packets = 0
Packet Size = 32 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 58 us
Maximum Time = 196 us
Errors = 0
Lost Packets = 0

Packet Size = 64 bytes
Connections = 1

Messages / Connection = 10000
Minimum Time = 39 us
Maximum Time = 51 us
Errors = 0
Lost Packets = 0

Packet Size = 64 bytes
Connections = 1

Messages / Connection = 10000
Minimum Time = 58 us
Maximum Time = 3400 us
Errors = 0
Lost Packets = 0

Packet Size = 128 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 42 us
Maximum Time = 59 us
Errors = 0
Lost Packets = 0
Packet Size = 128 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 55 us
Maximum Time = 166 us
Errors = 0
Lost Packets = 0
Packet Size = 256 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 50 us
Maximum Time = 71 us
Errors = 0
Lost Packets = 0
Packet Size = 256 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 79 us
Maximum Time = 653 us
Errors = 0
Lost Packets = 0
Packet Size = 512 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 64 us
Maximum Time = 92 us
Errors = 0
Lost Packets = 0
Packet Size = 512 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 122 us
Maximum Time = 495 us
Errors = 0
Lost Packets = 0
Packet Size = 1024 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 92 us
Maximum Time = 111 us
Errors = 0
Lost Packets = 0
Packet Size = 1024 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 212 us
Maximum Time = 716 us
Errors = 0
Lost Packets = 0
Packet Size = 1462 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 117 us
Maximum Time = 633 us
Errors = 0
Lost Packets = 0
--

Packet Size = 2048 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 124 us

Maximum Time = 632 us
Errors = 0
Lost Packets = 0

Packet Size = 2048 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 165 us

Maximum Time = 709 us
Errors = 0
Lost Packets = 0

Packet Size = 4096 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 188 us
Maximum Time = 695 us
Errors = 0
Lost Packets = 0
Packet Size = 4096 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 232 us
Maximum Time = 565 us
Errors = 0
Lost Packets = 0
Packet Size = 8192 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 289 us
Maximum Time = 1083 us
Errors = 0
Lost Packets = 0
Packet Size = 8192 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 348 us
Maximum Time = 946 us
Errors = 0
Lost Packets = 0
Packet Size = 65535 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 1643 us
Maximum Time = 2707 us
Errors = 0
Lost Packets = 0
Packet Size = 65535 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 2244 us
Maximum Time = 2591 us
Errors = 0
Lost Packets = 0

 

RTX 环境, UDP 协议测试结果 Windows 环境, UDP 协议测试结果
Packet Size = 1 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 32 us
Maximum Time = 48 us
Errors = 0
Lost Packets = 0
Packet Size = 1 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 56 us
Maximum Time = 128 us
Errors = 0
Lost Packets = 0
Packet Size = 16 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 32 us
Maximum Time = 50 us
Errors = 0
Lost Packets = 0
Packet Size = 16 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 53 us
Maximum Time = 958 us
Errors = 0
Lost Packets = 0

Packet Size = 64 bytes
Connections = 1
Messages / Connection = 10000

Minimum Time = 35 us
Maximum Time = 52 us
Errors = 0
Lost Packets = 0

Packet Size = 64 bytes
Connections = 1
Messages / Connection = 10000

Minimum Time = 54 us
Maximum Time = 575 us
Errors = 0
Lost Packets = 0

Packet Size = 128 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 38 us
Maximum Time = 55 us
Errors = 0
Lost Packets = 0
Packet Size = 128 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 56 us
Maximum Time = 637 us
Errors = 0
Lost Packets = 0
Packet Size = 256 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 46 us
Maximum Time = 66 us
Errors = 0
Lost Packets = 0
Packet Size = 256 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 77 us
Maximum Time = 326 us
Errors = 0
Lost Packets = 0
Packet Size = 512 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 60 us
Maximum Time = 78 us
Errors = 0
Lost Packets = 0
Packet Size = 512 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 93 us
Maximum Time = 535 us
Errors = 0
Lost Packets = 0
Packet Size = 1024 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 88 us
Maximum Time = 105 us
Errors = 0
Lost Packets = 0
Packet Size = 1024 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 119 us
Maximum Time = 742 us
Errors = 0
Lost Packets = 0
Packet Size = 1462 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 111 us
Maximum Time = 124 us
Errors = 0
Lost Packets = 0
--

Packet Size = 2048 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 126 us
Maximum Time = 149 us
Errors = 0

Lost Packets = 0

Packet Size = 2048 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 176 us
Maximum Time = 960 us
Errors = 0

Lost Packets = 0

Packet Size = 8192 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 313 us
Maximum Time = 357 us
Errors = 0
Lost Packets = 0
Packet Size = 8192 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 408 us
Maximum Time = 759 us
Errors = 0
Lost Packets = 0
-- Packet Size = 40960 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 1407 us
Maximum Time = 159874 us
Errors = 0
Lost Packets = 0

 

4 测试数据分析
        使用 TCP/IP 协议, 当传输的数据包长度低于1460 上限时, RTX 下数据包传输的实时性明显优于 Windows 。当传输数据包长度超过 1460 上限的大包时, RTX 在应用层分包, Windows 下在 IP 层自动分包。由于 TCP 协议数据传输的可靠性要求, RTX 下大数据包需要接收多次数据包 ACK 报文, RTX 下数据包传输的实时性与 Windows 相当。使用 UDP 协议传输时, 由于 UDP 协议不需要数据包ACK 报文, RTX 实时性得以体现, RTX 下数据包传输的实时性明显优于 Windows 。
 

5 结论
1)使用 TCP/IP 协议, 相比于 Windows, RTX 在传输小包(数据包长度低于 1460) 时有明显的实时性。
2)使用 UDP 协议, 相比于 Windows, RTX 在数据包传输时有明显的实时性。

      RTX 下使用普通网卡即可实现实时以太网的性能。作者对 RTX 与 Windows 下以太网性能进行了对比测试来验证该观点。


1. 测试环境
        Windows XP 操作系统, RTX 使用Dedicated 模式, 单独占用一颗 CPU 核, 硬件使用 Core i7, 4 核8 线程, 2.8GHz 主频, 4GB 内存, 两块 Intel 82545GM 千兆网卡点对点互联。


2. 测试方法
        RTX 环境下, 测试方法为两台机器分别运行RT Client 和 RT Server 两个 RTSS 应用程序, RT Client 发送数据包到 RT Server, RT Server 收到数据包之后发送回 RT Client。使用 TCP/IP & UDP 协议, 选择不同的包长度, 每次发送500 个数据包, 重复 20 次Windows 环境下, 两台机器分别运行 Client 和 Server 两个应用程序, Client 发送数据包到 Server, Server 收到数据包之后发送回 Client。使用 TCP/IP & UDP 协议, 选择不同的包长度, 每次发送500 个数据包, 重复 20 次。


3. 测试结果

RTX 环境, TCP/IP 协议测试结果 Windows 环境, TCP/IP 协议测试结果
Packet Size = 1 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 35 us
Maximum Time = 54 us
Errors = 0
Lost Packets = 0
--
Packet Size = 16 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 36 us
Maximum Time = 55 us
Errors = 0
Lost Packets = 0
Packet Size = 16 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 55 us
Maximum Time = 199 us
Errors = 0
Lost Packets = 0
Packet Size = 32 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 37 us
Maximum Time = 54 us
Errors = 0
Lost Packets = 0
Packet Size = 32 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 58 us
Maximum Time = 196 us
Errors = 0
Lost Packets = 0

Packet Size = 64 bytes
Connections = 1

Messages / Connection = 10000
Minimum Time = 39 us
Maximum Time = 51 us
Errors = 0
Lost Packets = 0

Packet Size = 64 bytes
Connections = 1

Messages / Connection = 10000
Minimum Time = 58 us
Maximum Time = 3400 us
Errors = 0
Lost Packets = 0

Packet Size = 128 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 42 us
Maximum Time = 59 us
Errors = 0
Lost Packets = 0
Packet Size = 128 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 55 us
Maximum Time = 166 us
Errors = 0
Lost Packets = 0
Packet Size = 256 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 50 us
Maximum Time = 71 us
Errors = 0
Lost Packets = 0
Packet Size = 256 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 79 us
Maximum Time = 653 us
Errors = 0
Lost Packets = 0
Packet Size = 512 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 64 us
Maximum Time = 92 us
Errors = 0
Lost Packets = 0
Packet Size = 512 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 122 us
Maximum Time = 495 us
Errors = 0
Lost Packets = 0
Packet Size = 1024 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 92 us
Maximum Time = 111 us
Errors = 0
Lost Packets = 0
Packet Size = 1024 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 212 us
Maximum Time = 716 us
Errors = 0
Lost Packets = 0
Packet Size = 1462 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 117 us
Maximum Time = 633 us
Errors = 0
Lost Packets = 0
--

Packet Size = 2048 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 124 us

Maximum Time = 632 us
Errors = 0
Lost Packets = 0

Packet Size = 2048 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 165 us

Maximum Time = 709 us
Errors = 0
Lost Packets = 0

Packet Size = 4096 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 188 us
Maximum Time = 695 us
Errors = 0
Lost Packets = 0
Packet Size = 4096 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 232 us
Maximum Time = 565 us
Errors = 0
Lost Packets = 0
Packet Size = 8192 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 289 us
Maximum Time = 1083 us
Errors = 0
Lost Packets = 0
Packet Size = 8192 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 348 us
Maximum Time = 946 us
Errors = 0
Lost Packets = 0
Packet Size = 65535 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 1643 us
Maximum Time = 2707 us
Errors = 0
Lost Packets = 0
Packet Size = 65535 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 2244 us
Maximum Time = 2591 us
Errors = 0
Lost Packets = 0

 

RTX 环境, UDP 协议测试结果 Windows 环境, UDP 协议测试结果
Packet Size = 1 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 32 us
Maximum Time = 48 us
Errors = 0
Lost Packets = 0
Packet Size = 1 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 56 us
Maximum Time = 128 us
Errors = 0
Lost Packets = 0
Packet Size = 16 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 32 us
Maximum Time = 50 us
Errors = 0
Lost Packets = 0
Packet Size = 16 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 53 us
Maximum Time = 958 us
Errors = 0
Lost Packets = 0

Packet Size = 64 bytes
Connections = 1
Messages / Connection = 10000

Minimum Time = 35 us
Maximum Time = 52 us
Errors = 0
Lost Packets = 0

Packet Size = 64 bytes
Connections = 1
Messages / Connection = 10000

Minimum Time = 54 us
Maximum Time = 575 us
Errors = 0
Lost Packets = 0

Packet Size = 128 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 38 us
Maximum Time = 55 us
Errors = 0
Lost Packets = 0
Packet Size = 128 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 56 us
Maximum Time = 637 us
Errors = 0
Lost Packets = 0
Packet Size = 256 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 46 us
Maximum Time = 66 us
Errors = 0
Lost Packets = 0
Packet Size = 256 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 77 us
Maximum Time = 326 us
Errors = 0
Lost Packets = 0
Packet Size = 512 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 60 us
Maximum Time = 78 us
Errors = 0
Lost Packets = 0
Packet Size = 512 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 93 us
Maximum Time = 535 us
Errors = 0
Lost Packets = 0
Packet Size = 1024 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 88 us
Maximum Time = 105 us
Errors = 0
Lost Packets = 0
Packet Size = 1024 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 119 us
Maximum Time = 742 us
Errors = 0
Lost Packets = 0
Packet Size = 1462 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 111 us
Maximum Time = 124 us
Errors = 0
Lost Packets = 0
--

Packet Size = 2048 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 126 us
Maximum Time = 149 us
Errors = 0

Lost Packets = 0

Packet Size = 2048 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 176 us
Maximum Time = 960 us
Errors = 0

Lost Packets = 0

Packet Size = 8192 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 313 us
Maximum Time = 357 us
Errors = 0
Lost Packets = 0
Packet Size = 8192 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 408 us
Maximum Time = 759 us
Errors = 0
Lost Packets = 0
-- Packet Size = 40960 bytes
Connections = 1
Messages / Connection = 10000
Minimum Time = 1407 us
Maximum Time = 159874 us
Errors = 0
Lost Packets = 0

 

4 测试数据分析
        使用 TCP/IP 协议, 当传输的数据包长度低于1460 上限时, RTX 下数据包传输的实时性明显优于 Windows 。当传输数据包长度超过 1460 上限的大包时, RTX 在应用层分包, Windows 下在 IP 层自动分包。由于 TCP 协议数据传输的可靠性要求, RTX 下大数据包需要接收多次数据包 ACK 报文, RTX 下数据包传输的实时性与 Windows 相当。使用 UDP 协议传输时, 由于 UDP 协议不需要数据包ACK 报文, RTX 实时性得以体现, RTX 下数据包传输的实时性明显优于 Windows 。
 

5 结论
1)使用 TCP/IP 协议, 相比于 Windows, RTX 在传输小包(数据包长度低于 1460) 时有明显的实时性。
2)使用 UDP 协议, 相比于 Windows, RTX 在数据包传输时有明显的实时性。

本文共分 1