技术控

    今日:0| 主题:63445
收藏本版 (1)
最新软件应用技术尽在掌握

[其他] The Queueing Knee, Part 1

[复制链接]
精神病院VIP病人 发表于 2016-12-1 13:39:50
194 3
The “knee” in the queueing theory response time curve is a topic of some debate in the performance community. Some say “the knee is at 75% utilization; everyone knows that.” Others say “it depends.” Others say “there is no knee.”
   Depending on the definition, there is a knee, but there are several definitions and you may choose the one you want. In this post I’ll use a definition proposed by Cary Millsap: the knee is where a line from the origin is tangent to the queueing response time curve. The result is a function of the number of service channels, and although we may argue about the topics in the preceding paragraph and whether this is the right definition, it still serves to illustrate important concepts.
   

The Queueing Knee, Part 1

The Queueing Knee, Part 1

  The image above shows the response time stretch factor curve for a queueing system with 8 service channels. This is analogous to a server with 8 CPUs, for example. A line drawn from the origin, tangent to the curve, touches it at 0.7598, or 76% utilization.
  The important thing to note is that this curve is a function of \(m\), the number of service channels. In this case, \(m=8\). As you increase the number of service channels in the system, the curve remains flat longer and the “knee,” where the curve appears to lift upwards and start to climb steeply, moves towards the right—towards higher utilization, signified by \(\rho\).
   You can experiment interactively with this, using this Desmos calculator .*
  Here’s the derivation. Using the heuristic approximation,
  \[ R = \frac{1}{1-\rho^m} \]
   The line is tangent to the curve where response time divided by utilization is at a minimum. The equation for \(R/\rho\) is
  \[ R/\rho = \frac{1}{\rho - \rho^{m+1}} \]
  The minimum of this equation is where its derivative is zero; the derivative is
  \[ \frac{\left(m+1\right)\rho^m-1}{\rho^2\left(\rho^m-1\right)^2} \]
  The root of this expression is a function of \(m\) as expected.
  \[ \left(m+1\right)^{-\frac{1}{m}} \]
  Here’s how that function looks when plotted.
   

The Queueing Knee, Part 1

The Queueing Knee, Part 1

  The graph shows that as the number of service channels increases, the the knee occurs at increasingly high utilization.
  Despite the debate over exactly what the definition of the knee is, this illustrates two fundamental truths about queueing systems:
  
       
  • As you add service channels (servers) to a queueing system, queueing delay is tolerable at increasingly high utilization.   
  • The rule of thumb that you can’t run a system at greater than 75% utilization is invalid. For systems with many service channels (CPUs, disks, etc) that is wasteful, and you should strive for higher utilization.  
   For more on this topic, please read my free ebook on queueing theory .
   * Note that the calculator uses an approximation to the queueing theory response time curve, which is easier to differentiate than the Erlang C formula but underestimates how steeply the curve climbs at higher utilizations. I discussed this heuristic approximation at length in myprevious blog post. Even though it’s an approximation, again, it serves the purposes of this blog post.
   I'm Baron Schwartz, the founder and CEO of VividCortex . I am the author of High Performance MySQL and many open-source tools for performance analysis, monitoring, and system administration. I contribute to various database communities such as Oracle, PostgreSQL, Redis and MongoDB.
lopa2380 发表于 2016-12-2 07:41:37
每天顶顶贴,一身轻松啊!
回复 支持 反对

使用道具 举报

惜灵 发表于 2016-12-2 09:30:21
撸过。。。。
回复 支持 反对

使用道具 举报

初柔 发表于 2016-12-3 01:40:17
我死了,但是在烈火中我又站起来了,你猜是涅磐,还是尸变?
回复 支持 反对

使用道具 举报

我要投稿

回页顶回复上一篇下一篇回列表
手机版/c.CoLaBug.com ( 粤ICP备05003221号 | 粤公网安备 44010402000842号 )

© 2001-2017 Comsenz Inc.

返回顶部 返回列表