Slow ConnectionRefused错误 [英] Slow ConnectionRefused error

查看:87
本文介绍了Slow ConnectionRefused错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


为什么Windows操作系统在尝试连接到环回地址上的端口时报告连接被拒绝错误需要这么长时间正在倾听? 


连接系统调用通常需要大约1秒才能返回,而在大多数Unix平台上,它需要不到1毫秒...有没有办法调整这个?我们有一个在Windows上运行速度非常慢的测试套件,因为作为测试的一部分,
尝试在没有监听的环回端口上建立连接。


干杯,

解决方案

嗨bentoif,


感谢您在此发帖。


从我的观点来看。


Linux内核是大内核,它包括你所知道的所有操作系统,驱动程序,文件系统,内存管理,任务调度程序,一切都是在相同的内核空间中,它们之间的通信很容易且成本低


但是Windows NT内核是微内核,它只包含操作系统需要的基本功能,其他函数不是相同的内核空间,它们需要IPC(进程间通信)相互通信,与Linux
内核相比,这是相当昂贵的。


Windows速度更快比起Linux,就某些GUI而言。


最好的问候,


Hart


如果你的话问题已经解决,请记得关闭你的帖子,将有用的帖子标记为对同样问题的其他人有帮助的答案。




Hi,

Why does it take so long for the Windows operating system to report a connection refused error when trying to connect to a port on the loopback address for which nothing is listening? 

It takes around 1s for the connect system call to return in general while on most Unix platforms it takes less than one milli-second... is there a way to tune this? We have a test suite that is running very slow on Windows because as part of its tests it tries to establish connections on loopback ports where nothing is listening.

Cheers,

解决方案

Hi bentoif,

Thank you for posting here.

From the point of my view.

Linux kernel is big kernel, it includes everything you knows as an OS, the drivers, the file system, the memory management, the task scheduler, everything is in the same kernel space, communication between them is easy and low cost

But Windows NT kernel is micro kernel, it only includes basic functions the OS need, other functions are not the same kernel space, they need IPC(inter-process communication) to talk to each other, this is quite expensive compared to Linux kernel.

Windows is faster than Linux, when it comes to some GUI things.

Best Regards,

Hart

if your issue has been resolved, please remember to close your thread by marking useful posts as answer that can be helpful for other person with same issue.


这篇关于Slow ConnectionRefused错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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