五分钟规则 - 磁盘 I/O 一次访问的价格 [英] five minutes rules - the price of one access of disc I/O

查看:25
本文介绍了五分钟规则 - 磁盘 I/O 一次访问的价格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是非常有趣的话题,他们使用以下公式来计算访问间隔时间:

This is very interesting topic, they use following formula to compute access interval time:

BreakEvenIntervalinSeconds = (PagesPerMBofRAM/AccessesPerSecondPerDisk) × (PricePerDiskDrive/PricePerMBofRAM).

BreakEvenIntervalinSeconds = (PagesPerMBofRAM / AccessesPerSecondPerDisk) × (PricePerDiskDrive / PricePerMBofRAM).

它是使用用于将页面保存在缓冲池中的 RAM 成本和每次需要页面时执行 I/O 的(部分)磁盘的成本的公式得出的,等于这两个代价,求解访问间隔的方程.

It is derived using formulas for the cost of RAM to hold a page in the buffer pool and the cost of a (fractional) disk to perform I/O every time a page is needed, equating these two costs, and solving the equation for the interval between accesses.

所以每次访问的磁盘 I/O 成本是 PricePerDiskDrive/AccessesPerSecondPerDisk,我的问题是为什么每次访问的磁盘 I/O 成本是这样计算的?

so the cost of disc I/O per access is PricePerDiskDrive / AccessesPerSecondPerDisk, My question is why disc I/O cost per access is computed like this?

推荐答案

基本假设是磁盘寿命的限制是有多少磁盘寻道,而 RAM 的大小有固定成本,并且固定的生命周期,无论访问频率如何.这是合理的,因为寻找磁盘会导致物理磨损,而当磁盘消失时,您将丢失整个磁盘.相比之下,RAM 没有物理移动部件,因此不会随着使用而磨损.

The underlying assumption is that the limit to the life of a disk is how many disk seeks there are, while RAM has a fixed cost for its size, and a fixed lifetime regardless of how often it is accessed. This is reasonable because seeking to disk causes physical wear and tear, and when the disk goes, you lose the whole disk. By contrast RAM has no physical moving parts, and so does not wear out with use.

在此假设下,将数据保存在磁盘上的成本取决于访问频率和磁盘成本.将数据保存在 RAM 中的成本取决于您使用的 RAM 量.他们试图找到的是将数据保存在磁盘或 RAM 中更便宜的收支平衡点.

With that assumption, the cost of keeping data on disk depends on the frequency of access and the cost of the disk. The cost of keeping data in RAM depends on how much RAM you're using. What they are trying to find is the break even point between where it is cheaper to keep data on disk or in RAM.

然而给出的等式是不完整的.虽然该方程确定了相关因素,但缺少一个重要的比例常数.普通硬盘可以承受多少次访问?RAM平均持续多长时间?这些都计入了将数据保存在硬盘驱动器和 RAM 上的成本,如果没有它们,您就是在比较苹果和橙子.

However the equation as given is incomplete. While that equation identifies relevant factors, there is an important constant of proportionality missing. How many accesses can the average hard drive sustain? How long does RAM last on average? Those enter into the costs for keeping data on hard drives and RAM, and without them you are comparing apples and oranges.

这是我对整篇论文的印象.它对一个重要话题说了很多,但分析很草率.他们草率地忽略了关键的事情,并且没有做足够的事情来帮助人们了解他们在想什么以及他们的分析何时适合您正在做的事情.例如,如果您要维护低延迟系统,则必须将所有数据保存在 RAM 中.时期.如果您正在处理大型数据集并且不想付费将其全部保存在 RAM 中,那么您将向磁盘传输数据/从磁盘传输数据.如果您以冗余格式(例如 RAID)保存数据,则每次读取的查找次数将超过他们承认的次数.

This is indicative of my impression of the whole paper. It says a lot at great length, about an important topic, but the analysis is sloppy. They are slopping and leave critical things out, and don't do enough to help people understand what they are thinking and when their analysis is appropriate what you are doing. For instance if you are trying to maintain a low latency system, you have to keep all of your data in RAM. Period. If you're processing large data sets and don't want to pay to keep it all in RAM, then you will be streaming data to/from disk. If you're keeping data in a redundant format, for instance RAID, you are doing more seeks per read than they admit.

这篇关于五分钟规则 - 磁盘 I/O 一次访问的价格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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