“启用高级性能”是否有效? 在 Win 2k3/SQL Server 2005 上覆盖 FILE_FLAG_WRITETHROUGH

发布于 2024-07-12 02:08:59 字数 426 浏览 7 评论 0原文

SQL Server 使用 FILE_FLAG_WRITETHROUGH 打开文件,这似乎强制写入物理磁盘。 在 SQL Server 中,这称为“强制单元访问 (FUA)”; 可以在此处找到讨论此问题的白皮书。 许多 SAN 似乎都尊重这一点,这可能解释了我在连接到 IBM shark 的服务器上开发的 ETL 流程性能缓慢的原因。

在 Windows 2003 服务器上的磁盘管理器对话框中,可以选择“启用高级性能”。 我可以找到间接和杜撰的文档,这些文档暗示这会覆盖强制写通行为。

有谁确切知道情况是否如此或这个选项实际上是做什么的?

SQL Server opens files with FILE_FLAG_WRITETHROUGH, which appears to force writes to the physical disk. In SQL Server-speak this is called 'Forced Unit Access (FUA)'; a white paper discussing this can be found here. Many SANs appear to honour this and this might explain slow performance of an ETL process I am developing on a server connected to an IBM shark.

On the dialogs in disk manager on Windows 2003 server one can select 'Enable Advanced Performance'. I can find indirect and apocryphal documentation that implies that this overrides forced writethrough behaviour.

Does anyone know for certain whether this is the case or what this option actually does?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

单挑你×的.吻 2024-07-19 02:08:59

不是这种情况。 SQL Server 将始终对其打开的文件启用直写。 这可确保任何写入操作都不会缓冲在本地 Windows 磁盘缓存中。 磁盘控制器(RAID 控制器等)或 SAN 上的任何其他内容都将拥有自己的缓存(希望有电池支持和镜像),并且无论文件在操作系统下如何打开,都将拥有单独的缓存策略。 切勿在没有备用电池的缓存上启用回写。 如果在写入过程中断电,您的数据库将被损坏。

This is not the case. SQL Server will always have write-through enabled on files it opens. This ensures that any writes are not buffered in the local Windows disk cache. Anything beyond that on the disk controller (RAID controller, etc.) or on the SAN will have its own cache (hopefully battery-backed and mirrored) and will have a separate cache policy regardless of how the files were opened under the OS. Don't ever enable write-back on a cache that has no battery back-up. If you lose power during writes, your database will become corrupt.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文