windows-server-2008 - Windows Server 2008 R2目录可以安全地容纳多少个文件?

标签 windows-server-2008 windows-server-2008-r2

Windows Server 2008 R2目录可以安全地容纳多少个文件?

我在考虑拥有图片库的网站。假设有一个目录包含所有缩略图,而另一个目录则包含完整大小的图像。可以安全地存储几对图像?

或者,如果没有一个很好的简单答案,我是否应该尝试处理30,000张图像?

最佳答案

如果您的服务器使用NTFS作为其卷文件系统,则不限于每个目录本身具有任何数量的文件,而更多的是,您限于每个卷具有一定数量的文件/目录。

对于NTFS,大小限制为:

NTFS Size Limits

Files per volume 4,294,967,295 (2^32 minus 1 file)



当然,这并不能说明性能,还有其他一些考虑因素也可以发挥作用。拥有30000,您不必担心。当您进入数百万美元时,您可能必须开始进行重组。

编辑以解决扩展/性能

从技术上讲,NTFS文件系统使用全局MFT来跟踪所有文件(目录是文件,并且大多数用于最终用户的逻辑表示),因此,每次修改卷时,该更改都会反射(reflect)在MFT中。

当您开始使用包含大量文件的单个目录时,建议的步骤之一是禁用自动8.3名称生成。从上面我链接的Technet文章:

Every time you create a file with a long file name, NTFS creates a second file entry that has a similar 8.3 short file name. A file with an 8.3 short file name has a file name containing 1 to 8 characters and a file name extension containing 1 to 3 characters. The file name and file name extension are separated by a period.



因此,如果您不断修改包含大量文件的单个目录,则系统必须为其生成一个短名称-如果您不断修改单个目录的内容,可能会导致性能下降。由于您要存储图像,因此很可能很多文件的开头都有相似的文件名,例如imageblahblahblah。

为了提高文件查找性能,即使是大型目录,由于底层B-Tree的实现,NTFS也应相当快。

还要检查这个线程:NTFS performance and large volumes of files and directories

关于windows-server-2008 - Windows Server 2008 R2目录可以安全地容纳多少个文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4000742/

相关文章:

audio - Windows Server 2008 R2上的虚拟音频设备和媒体基础

odbc - SAP BusinessObjects Crystal Reports -- 数据源从何而来?

operating-system - 如何判断 SP1 是否安装在 Windows Server 2008 R2 Standard 上?

memory - VMMap - 为什么一个 exe 的 promise 内存为 13.4GB?工作集只有1.7GB

java - 无法终止 Windows Server 上的 java 进程(无需硬重启)

php - 使用任务计划程序运行 PHP 脚本时出现问题 (Windows Server 2008 R2)

windows-server-2008 - Windows Server 2008 - 拒绝访问文件夹。即使在管理员

active-directory - 导入模块 : The specified module 'activedirectory' was not loaded because no valid module file was found in any module directory

c++ - Windows 服务启动进程结束通知(2003、2008)

windows - dotnet.exe 不会运行,因为缺少 api-ms-win-crt-runtime-l1-1-0.dll