通过 LAN 发送较大数据块时 ZMQ 失败
基本上我有一个主系统和 3 个从系统。我已经使用请求/响应阶段将内容发送到我的 3 个客户端系统,因为它本质上解决了我的数据分割问题。将内容发送到我的 3 个客户端系统后,我关闭了负责 REQ/REP 拓扑的套接字,并创建了另一组与各个从属系统配对的套接字,以便从所有 3 个系统接收内容。我在 localhost 中运行了整个代码,没有任何问题,一切都很顺利,即使当我尝试将 40MB 数据集从客户端系统之一发送到主系统时也是如此。
问题是,当我尝试在实验室中通过 LAN 实现此操作时
REQ/REP 阶段运行顺利,因此基本上所有客户端系统都会获取要处理的数据集。
当我尝试处理大型数据集(例如 40MB ,我不认为它更大,因为我将内容加载到字典中并且字典对象的大小达到 24MB )时,与客户端的单独 PAIR 有点失败,它有点被阻塞由于某种原因无法处理。
我不知道为什么它在 LAN 上的行为与在我的系统上的行为不同。
我在 LAN 中使用的系统是 AMD 双核 64 位,2GB RAM(所有 4 个系统)
如果您有兴趣运行代码:
主系统代码:http://codepad.org/5uVCEb42
Salve1:http://codepad.org/LNmi9vu2< /a>
Slave2: http://codepad.org/0vmEAJYc (这个从文件中获取 40MB 内容并最终传递到主系统)
Slave3:http://codepad.org/d565lgiv
well basically i have a single master system and 3 slave systems . I have used Request/Response phase to send the content to 3 of my client systems , since it inherently solves my problem of data splitting . After sending the content to 3 of my client systems , i close the socket which was responsible to REQ/REP topolgy and created another bunch of sockets which pairs with individual slave systems inorder to receive the content from all 3 system. I ran the whole code in localhost i didnt have any problem and everything went smooth , even when i tried to send 40MB data sets from one of the client system to master system .
The problem is when i tried implementing this over LAN in my lab
The REQ/REP phase runs smoothly , so basically all the client systems fetch the data sets to work on.
The indivudal PAIR with client kinda fails when i try processing large sets of data (like the 40MB , which i kinda dont consider larger since i loaded the content in dictionary and size of the dictionary object came to 24MB ) it kinda gets choked and for some reason doesnt process.
I have no idea on why its behaving differently over the LAN than from my system.
The systems that i use in LAN are AMD dual core 64bit with 2GB RAM ( all 4 systems)
Incase if your interested to run the code :
Master System code : http://codepad.org/5uVCEb42
Salve1 : http://codepad.org/LNmi9vu2
Slave2: http://codepad.org/0vmEAJYc ( this one takes in 40MB content from a file and finally passes to Master system)
Slave3: http://codepad.org/d565lgiv
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
PAIR 套接字不会自动重新连接,因此不建议在 LAN 中使用。
PAIR sockets don't automatically reconnect, so they're not recommended for LAN use.