数据传输速度:NFS 与 HTTP
目前正在考虑使用 REST 访问 Nirvanix 在线存储来存储/下载文件。 不过,Nirvanix 还提供对网络存储的 NFS 访问。
我想知道选择 REST 而不是 NFS 是否有任何已知的基准或特定于协议的原因?
Am currently considering using REST access to Nirvanix online storage to store/download files. However, Nirvanix also offers NFS access to the network storage.
I was wondering if there are any known benchmarks or protocol-specific reasons for choosing REST over NFS?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
使用最适合您环境的任何东西。 任何差异都可以忽略不计,尤其是在非 LAN 速度链路上,CPU 使用率等因素变得无关紧要,因为链路已经饱和这一简单事实让它们不知所措。
一个可能的例外是处理大量小文件。 如果您的用例涉及快速访问大量小文件,我建议对两者进行测试,看看其中一个的速度是否快得足够大,足以产生重要影响。
Use whatever best fits your environment. Any difference is going to be negligible, especially over non-LAN-speed links where things like CPU usage become irrelevant as they're overwhelmed by the simple fact that the link is already saturated.
One possible exception is dealing with lots of little files. If your use case involves rapid access to a lot of little files, I'd suggest testing both and seeing if one is faster by a large enough margin to matter.
这是一个折腾。
NFS 在正确的设置、版本和调整下,仅比 SMB/CIFS 慢一点。 然而,较旧的版本可能会慢得多。
使用 NFS 所获得的好处是:
但是,如果您不是在 100% NFS 环境中工作,您可能会发现这不值得付出努力。
顺便说一句,根据记录,Windows 7 Beta/RC 确实支持开箱即用的 NFS。
It's a toss-up.
NFS, with the right setup, version, and tuning, is just a tad slower than SMB/CIFS. Older versions, however, can be significantly slower.
What you do gain with NFS is:
However, if you are not working in a 100% NFS environment, you might find that it's not worth the effort.
By the way, for the record, Windows 7 Beta/RC does support NFS out of the box.
它们应该几乎相同,但是有一个很大的区别 NFS 通常通过 UDP 运行(可以配置为通过 TCP 运行),而 HTTP 通过 TCP 运行.. 因此,如果丢包率很高,那么 HTTP 应该更稳定!
They should be almost the same, but there is one big difference NFS normally works over UDP(can be configured to run over TCP) and HTTP over TCP.. so if you have a high packet loss then HTTP should be more stable!
NFS 不是文件传输协议,而是网络文件系统协议。 如果配置和实现得当,HTTP 应该可以轻松击败它。
这将取决于您想要做什么的细节。 如果您只是上传和下载整个文件,那么我怀疑您将能够配置 HTTP,使其比 NFS 做得更好。
还记得 NFS 是在较早的时候创建的。 NFS 2.0还是最新版本吗? 我记得将 NFS 实现的代码从 2 更新为 3。那是在 1996 年左右。
NFS is not a file transfer protocol, it's a Network File System protocol. Properly configured and implemented, it should be possible for HTTP to beat it easily.
It will depend on the details of what you're trying to do. If you're just uploading and downloading entire files, then I suspect you'll be able to configure HTTP to do a lot better than NFS.
Recall also that NFS was created in an earlier time. Is NFS 2.0 still the latest version? I recall updating the code of an NFS implementation from 2 to 3. That was in 1996 or so.