如何加速 Windows XP 应用程序中的 UDP 通信
我正在对软件进行一些维护,并且有一个我不明白的问题。
应用程序使用 Microsoft Visual C++ 6 开发并在 Windows XP 上运行。它由 21 个通过 UDP 套接字相互通信的应用程序组成。它是嵌入式航空电子系统的仿真,用于在PC环境中调试系统。每个应用程序都模拟嵌入式系统中的一个节点,并且嵌入式网络是通过 UDP 模拟的。该系统最初可以在多台 PC 上运行,但现在可以在单台四核机器上运行。
系统正在运行,但通信速度慢得令人烦恼。然而,打开 Internet Explorer 并访问一两个网站会导致我的应用程序之间突然快速通信。
所以我的问题是,Internet Explorer 在访问网站时设置了什么,以便我的应用程序也可以设置它?该系统的原作者都已不在人世,而且我也几乎没有 Windows 编程经验。
I am doing some maintenance on software and have a problem that I do not understand.
Application was developed using Microsoft Visual C++ 6 and runs on Windows XP. It consists of 21 applications that communicate to each other via UDP sockets. It is a simulation of an embedded avionics system used to debug the system in a PC environment. Each of the applications simulates a node in the embedded system and the embedded networked is simulated over UDP. The system originally ran on multiple PCs but can now runs on a single Quad core machine.
The system is working but the communication is annoyingly slow. However opening up Internet Explorer and visiting a web site or two set something that would cause my applications to suddenly communicate very fast to each other.
So my question is what did Internet Explorer set when visiting a web site so that my application can also set it? None of the original authors of the system is still around and I have very little windows programming experience.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
毕竟这可能不是 Windows 问题
检查你的 API,检查你的缓冲区并检查错误消息“getlasterror()”,它不会导致 INVALID (-1) 并停止程序尝试使用它,即使你的程序运行 Perfectit 可能会产生有用的警告
检查 ACK 或攻击速度这是通过网络连接传输大量数据时的常见问题(<-- 90% 这是您的问题),这里有一个关于该主题的有用主题(support.microsoft.com) com/kb/823764)
如果这些解决方案都不起作用,请尝试根据制造商网站检查您的驱动程序版本。
如果
最后的手段是那些有用的想法:
。使用此程序 www.lvllord.de 将最大半/开放连接从 8 增加到 50
。使用Windows服务器版本可以增强一些基于互联网的程序
。如果您在多线程应用程序中的不同线程中使用超过 2 个套接字,则使用带有套接字 API 的多线程可能会对 API 造成一些混乱,请尝试使用异步套接字或类似的东西来优化性能 ( msdn.microsoft.com/en- us/library/ms738551(VS.85).aspx )
可能是 ACK 在 wiki 上检查它..这意味着以其他方式攻击速度..如果不是,那么它将是接收窗口大小
这两个设置对用户来说都是不可见的..但可以通过诸如调整实用程序或任何通用网络隐藏设置调节器之类的程序进行设置
它可能会起作用..
it might not be a windows problem after all
check your API, check your buffer and check for errormessages 'getlasterror()' that doesn't cause INVALID (-1) and stops the program try to use it even if your program runs perfectit might have useful warnings
check ACK or attack speed it's a common issue at transfer large amounts of data over network connections ( <-- 90% it's your problem ), here is a useful topic on that subject ( support.microsoft.com/kb/823764 )
if neither of those solutions work, try checking your driver version against the manfucturer website.
last resort is those useful ideas:
. use this program www.lvllord.de to increase max half/open connections from 8 to 50
. using a server edition windows can boost some internet based programs
. using multi-threading with sockets API can cause some confusing to the API if you're using more than 2 sockets at different threads in multithreaded application, try optimize performance by using async sockets or something like that ( msdn.microsoft.com/en-us/library/ms738551(VS.85).aspx )
may be ACK check it on wiki .. it means in other ways the attack speed .. if not then it will be the receive window size
both settings are invisible to users .. but can be set via programs such as tuneup utilities or any general network hidden setting adjustors
it might just do the trick ..
如果 UDP 之上的协议实现了可靠性,则速度损失将是由于本地主机上大量 UDP 数据包丢失造成的。本地主机上的 UDP 性能很糟糕,最好的选择是将套接字 API 包装在 TCP 层内。
如果是 UDP 广播或多播,您将必须考虑实现代理进程以通过 TCP 多路复用消息。
查看在进程间级别运行良好的现有消息传递 API 可能会更容易,例如 ZeroMQ。
If the protocol above UDP implements reliability the speed loss will be due to massive UDP packet loss on localhost. UDP performance on localhost is terrible, your best bet is to wrap the socket API inside a TCP layer.
If it's UDP broadcast or multicast you will have to look at implementing a broker process to multiplex the messages over TCP.
Might be easier to look at existing messaging APIs that work well at the interprocess level such as ZeroMQ.
尝试使用 Wireshark 来查看 Internet Explorer 正在做什么。
Try using Wireshark to see what Internet Explorer is doing.