您的位置:首页 > 其它

Utilization Law 和 Little's Law

2010-11-09 23:02 411 查看
在学习磁盘相关的队列理论的时候学时常会提到两个定理Utilization Law和Little's Law:

Little's Law:

Number of request in the system = arrival rate * average response time

这一个定理可以被用来计算系统average response time,就是:

average response time = Number of request in the system/arrival rate

实际应用中可以用IO的并发线程数取代Number of request in the system, 用IOPS取代arrival rate来计算average response time。

Utilization Law

Utilization = throughtput X mean service time,

也就是:

系统的使用率 = 系统吞吐量 X 系统处理一个任务的平均时间

如果一个IO系统的吞吐量是 100 IOPS,其平均处理一个任务的时间是7ms,则该系统利用率就是 100 * 7/1000 = 70%.

之前一直不明白该公式是怎么来的,其实其推导很简单。

系统使用率 = 系统服务时间/总时间 = (完成任务数/总时间)* (系统服务时间/完成任务数) = 吞吐率 * 处理单个任务的平均时间。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: