跳转到主内容

为什么小文件和大文件的文件传输速度可能不同

Views:
235
Visibility:
Public
Votes:
0
Category:
ontap-9
Specialty:
nas
Last Updated:

适用于

  • ONTAP 9
  • 集群模式 Data ONTAP 8
  • 7-模式 Data ONTAP

解答

  • 将许多小文件复制到某个位置比将几个大文件(其总大小等于小文件的总大小)复制到同一位置要花更长的时间。这是一个众所周知、但却很少被人们理解的、基于主机的文件系统性能问题。
  • 在所有主要操作系统中、尝试读取或写入大量小文件会导致大量的 O/S 系统开销。这是因为在操作系统级别执行查找()、打开()和关闭()操作的时间会更多,而这些操作将花费在您正在处理的每个文件上。
  • 虽然这些操作不一定需要花费大量时间来处理单个文件、但在处理数百或数千个小文件时,它们会快速进行机架安装。在执行备份、还原、病毒扫描等活动时会出现这些问题。 与读取或写入数据相比、使用 4K 这样的小文件、您可以花费更多的时间查找、打开和关闭文件。
  • 一旦 O/s 在文件系统中找到该文件并打开该文件、即,当它开始读取 / 写入该文件的内容并与存储阵列通信时。这就是为什么从存储阵列性能角度看一切都正常的原因。
  • 阵列对来自 O/S 的读 / 写请求的响应速度非常快在这些情况下、更快的 CPU 和最低延迟的磁盘有助于解决问题、但您永远无法真正消除该问题。即使您将所有文件存储在 SSD 或基于 RAM 的磁盘中、操作系统仍必须对每个文件执行所有系统调用。
  • 对于大文件,上述 " 查找打开 " 和 " 关闭 " 操作仍在进行中、但由于文件计数较少、完成这些访问部分所需的时间较短、实际读 / 写操作所需的时间也较多。

其他信息

Microsoft 知识库 对小型文件的写入性能变慢

 

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.
Scan to view the article on your device