在数据迁移中传输大数据
我们有一组应用程序,可将数据从一个系统传输到同一网络内的另一个系统。他们使用 WCF C#,并执行诸如连续传输一次 1000 个对象之类的操作。 (接收数据后,接收方应用程序通知发送方发送更多数据)
我想通过在给定时间内传输更多数据来优化流程,并且正在考虑以下 2 个选项中哪一个更好:
显着增加传输量。越大越好,就像 50000 个对象一样。通过批量操作,这将减少每个数据从用户进程空间移动到网卡所花费的时间。
使传输数量刚好小于1460,这是我们的网络路径MTU。例如,如果一个对象是 100 字节,则传输 12 个对象,为 http 和soap 标头留出一些余量。这将避免重新组装 TCP 段并加快接收速度。 (这样可以避免过多的RAM使用问题)
您能否告诉我哪个选项更好,或者我是否可以尝试其他想法来加速传输?
We have a set of applications that transfer data from one system to another within the same network. They uses WCF C#, and do something like transfer 1000 objects at a time on a continuous basis. (after receiving data, receiver application notifies sender to send more data)
I am wanting to optimize the process by transferring more data in a given time, and am thinking which of the following 2 options is better:
Increase transfer quantity significantly. The bigger the better, make it like 50000 objects. This will reduce the time spent per data in moving from user process space to network card, by doing it in bulk.
Make transfer quantity to be just less than 1460, which is our network path MTU. eg., if an object is 100 bytes, transfer 12 objects leaving some allowance for http and soap headers. this will avoid reassembling of TCP segments and speedup the receipt. (it will avoid excessive RAM usage problems)
Can you please tell which option is better, or if I can try some other idea to speedup the transfer?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为你的问题不是传输到网卡的速度。
请告诉我们有关此数据迁移的更多信息
-- 它来自平面文件吗?
-- 您是否正在更改数据?
-- 另一端需要什么类型的数据?
我猜 - 但我希望你一定正在更改数据。如果您只需要移动数据,有许多快速方法可以移动大文件(例如 ftp 或其他一些标准)。
如果您正在更改数据,那么该过程可能会减慢您的速度 - 在您的程序上运行分析器并对其进行优化。
I don't think your problem is the speed of transferring to the network card.
Please tell us more about this data migration
-- Is it coming from a flat file?
-- Are you changing the data at all?
-- What type of data do you need at the other other end?
I'm guessing -- but I expect you must be changing the data. If you just need to move data there are many fast ways to move a big file (eg ftp or some other standard).
If you are changing the data it is probably that process that is slowing you down -- run a profiler on your program and optimize it.