Delphi和HDD I / O报价,资源预缓存,读/写/查找参数限制 [英] Delphi and HDD I/O Quoting , Resource Pre-Caching , Read/Write/seek parameter limiting

查看:117
本文介绍了Delphi和HDD I / O报价,资源预缓存,读/写/查找参数限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个充满字节的动态数组,使用BlockRead()从.raw文件中读取这些字节,从逻辑上讲,此操作需要Shell资源,我想知道是否有任何方法可以保留一定数量或限制程序运行时从硬盘驱动器上读取/写入/查找的最大数量*****

I have dynamic array filled with bytes, which are read from .raw file with BlockRead() and this operation, logically, requires hell of a Shell resources and I wanted to know if there is any methods to reserve some amount or limit maximum amount of Read/Write/Seek used for Program run time from Hard Disk Drive*****

[澄清] :我的意思是在使用Windows Shell /内部应用程序资源执行操作时设置HDD的最大读取速度。此刻应用程序对硬盘的性能非常敏感,但是由于系统无法管理磁盘操作,它会导致多台机器冻结/锁定...

[Clarification]: I meant to set maximum reading speed from HDD while performing action with windows shell / internal app resources. In this moment app is very sensitive to hdd's performance, but it causes on several machines to freeze / lock because system cannot manage disk operations...

我想知道在最坏的情况下,可以找到函数声明和类信息的任何方法,教程。

I wanted to know about any methods, tutorials, in worst case unit in which function declarations and class info can be found.

据我所知,作为Delphi基础的Pascal并没有提供最好的简单方法是使用TStream或TPipeline(TSocket应该不好,对吧?)...我曾经使用过流,但我不喜欢它,因为TFileStream带有一些水下石头...

As much I know, Pascal as the base of Delphi does not provide very easy approach as the best could be TStream or TPipeline usage (TSocket should not be good, right?)... As much I have used streams, I did not like it because there were some underwater stones with TFileStream ...

无论如何-请至少给我介绍​​磁盘性能管理...

Anyway - please give me at least intro to disk performance management...

推荐答案

<恐怕无法使用Windows API或某些Delphi函数来限制IO活动。 (例如,与线程不同)

I'm afraid there's no way to throttle the IO activity using the Windows API or some Delphi function. (Unlike threads for example)

您只能通过在代码中添加Sleep命令或类似的命令来减慢IO访问速度。

You can only slow down your IO accesses by adding Sleep commands or something similar into your code.

您可以使用阅读当前的IO活动。 WMI ,如果IO活动频繁,则会增加您的延迟。

You could read the current IO activity using WMI and increase your delays if there's high IO activity.

这篇关于Delphi和HDD I / O报价,资源预缓存,读/写/查找参数限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆