In the first article of this series we reviewed some of the most basic Performance Modelling techniques using fundamental performance equations. The first part of this series covered a Performance Modelling technique we call “Response Time Theory” and leveraged easy to use performance modelling tools accessible at www.visualize-it.co. Performance Modelling is the art of visualizing system (technology, business, etc.) behavior using different modelling techniques i.e. analytical or mathematical, statistical and simulation. The focus of the initial series of these articles will be on the use of analytical modelling techniques to visualize, forecast and predict system behavior or performance.
- Part I – If you intend to read the article on “Modelling System Performance Using Fundamental Laws – Response Time Theory” please visit Link. The other parts (yet to come in this series include)
- Part II (This one) – Modelling System Performance Using Fundamental Laws – Little’s Law
- Part III – Modelling System Performance Using Fundamental Laws – Queueing Theory
- Part IV – Modelling System Performance Using Fundamental Laws – Workload Models (WSL)
- Part IV – Modelling System Performance Using Fundamental Laws – Universal Scalability Law (USL)
If you are interested in learning more about the basics of SPE (Systems Performance Engineering) including strengthening your understanding of the fundamental of performance modelling please visit the SPE Fundamentals section here at Practical Performance Analyst. In the second part of this series we will cover the basics of Little’s Law, reasons why Performance Engineers might want to use Little’s Law, the various applications of Little’s Law to systems (technology, business, etc.) and a practical application of Little’s Law using VisualizeIT (www.visualize-it.co). So let’s get started.
About Dr. John D. Little: John Dutton Conant Little, is an Institute Professor at the Massachusetts Institute of Technology, best known for his result in Operations Research, Little’s Law. Little’s law is truly amazing in its simplicity and can be used to model the relationship between concurrency, response times, think time and throughput for most complex of systems including resources within those systems.
Here’s what Wikipedia says about Dr. Little.
Born in Boston, Dr. J. D. C. Little earned a Bachelors in physics from Massachusetts Institute of Technology and worked at General Electric. His Ph.D. was on Use of Storage Water in a Hydroelectric System used dynamic programming, and advised by Philip M. Morse, was the first ever awarded in operations research. Next, he taught at Case Western Reserve (1957–62) before joining the faculty at MIT (1962) where he since has worked. He was visiting professor at INSEAD during 1988.
His earlier research in operations research involved traffic signal control, and gave him fame as he formed the Little’s law in 1961. Dr. Little is considered to be a founder of marketing science, having conducted fundamental research in models of individual choice behavior, adaptive control of promotional spending, and marketing mix models for consumer packaged goods. He has also started companies such as Management Decisions Systems and Kana Software.
Having paid homage to Dr. J. D. Little it’s time to take a look at one of his major contributions to Operations Theory i.e. Little’s Law.
About Little’s Law: Little’s Law basically states that the long-term average number of customers in a stable system N is equal to the long-term average effective arrival rate, λ, multiplied by the average time a customer spends in the system, W or Rt.
- i.e. N = Rt * λ or also written as N = (Rt + Z) * λ
The notations used include:
- N – Number of users present within the system
- C – Number of completions
- X – Throughput or Rate of Departure
- A – Number of Arrivals
- λ – Rate of Arrival
- Rt – Time spent by Customers within the system
- Zt – Think Time
Let’s take a look at each of the equations a little more closely:
- N = λ * Rt ……………….. [ N = Number of Users in the System, Rt = Response Time, λ = Arrival Rate ]
Little’s Law can also be stated as:
- N = Rt * X ……………….. [ N = Number of Users in the System, Rt = Response Time, X = Throughput ]
For a system where Zt (Think Time is Non Zero) Little’s Law can be stated as:
- N = [Rt + Zt] * X ……………….. [ N = Number of Users in the System, Rt = Response Time, Zt = Think Time, X = Throughput ]
Modelling As A Black Art: It’s quite understandable why Performance Modelling has traditionally been considered a black art. The combination of modelling techniques, the perception of lack of robustness of the forecasts provided, the nature of assumptions that one has to make, etc. are just some of the reasons why Performance Modelling is generally never considered as a feasible approach to understand system behavior. Most professionals on projects in our experience wait until they get to Integrated Performance Testing to understand the system performance and identify potential bottlenecks that would impact the ability of the system to scale.
However there’s another way to look at things and with a little bit of help we might just be able to change the way you look at the black art of Performance Modelling. Armed with a good understanding of the performance fundamentals (which you can obtain by reading through the content here at Practical Performance Analyst), a good understanding of your system architecture, a strong understanding of the various modelling techniques (based on the information provided here at Practical Performance Analyst) and access to automated modelling solution you should be on your way to “Modelling Nirvana”. Hopefully at the end of this article we have convinced you that Performance Modelling isn’t a black art any more.
Modelling Nirvana, tell me more: So what is this “Modelling Nirvana and how might you get yourself into a state of Modelling Nirvana. Here’s some simple steps involved in getting yourself into Modelling Nirvana.
- Start reading up on the basics of Performance Engineering – SPE 101
- Understand the basics of various Performance Modelling techniques – Modelling 101
- Get access to the a Performance Modelling solution – VisualizeIT
- Read up on the examples and tutorials on Performance Modelling at VisualizeIT and familiarize yourself with the modelling approaches at hand
As you have seen above Modelling Nirvana is not impossible to attain. Yes, it involves some amount of reading up (on the basics of Systems Performance Engineering) and possibly lots of cups of caffeine (to keep you awake i.e.) to make sure you are able to get through to it all. Modelling Nirvana is now within everyone’s reach, all that’s required is the will to obtain it.
Where Would I Use Little’s Law: Little’s Law is a very useful analytical (or mathematical) modelling tool to understand the relationship between throughput, user concurrency, response time and user think time. Little’s Law is generally useful when performing the following activities across the development life cycle:
- Workload modelling for Performance Testing
- Workload modelling for Capacity Management
- Designing your Non Functional Requirements
- Back of the envelope modelling for a given system (technology or general business)
- Validate system Non Functional Requirements at Design
Little’s law is useful to both Information Technology and non Information Technology systems with a wide application from both a business and technology standpoint.
Application Of Little’s Law – Determining Concurrent Users : A system at peak processes 8000 Transactions/Hour with an average response time of ~5s per transaction. The average Think Time per user is ~30s. What is the number of concurrent users on the system?
- Throughput or X = 8000/3600 = 2.22 TPS
- We know: N = [Rt + Zt] * X ……….. [ N = Number of Users in the System, Rt = Response Time, Zt = Think Time, X = Throughput ]
- Applying the equation: N = [ Rt + Z ] * X = [ 5 + 30 ] * 2.22 = 77.7
- The above system has approximately 77 users at peak driving 8000 Transactions/Hour.
Application Of Little’s Law – Visualizing System Performance: For purposes of this tutorial we will be using VisualizeIT. VisualizeIT offers access to a bunch of Analytical Models, Statistical Models and Simulation Models. Access to all the Analytical (Mathematical) models is free. Go grab an account at VisualizeIT for FREE and get started with modelling system performance. Attaining Modelling Nirvana has never been this easy.
For purposes of this example lets consider a system with the following configuration i.e. Number of CPU’s (M) = 4, Throughput (X) = 5 TPS, Service Time (S) in Seconds = 0.2 seconds and Think Time (Z) = 5 seconds. The objective would be to use the Little’s Law modelling capability part of VisualizeIT to understand system performance as the throughput increases. So go ahead and create a free account at VisualizeIT, login to the system, select the dashboard and on the dashboard please select Little’s Law using the menu on the left hand side.
Enter the following values in the Little’s Law modelling interface at VisualizeIT.
- Number of CPU’s (M) = 4,
- Throughput (X) = 5 TPS,
- Service Time (S) = 0.2 seconds
- Think Time (Z) = 5 seconds
When using the Little’s Law modelling interface at VisualizeIT please note that Input is required only for 3 out of 4 inputs i.e. Utilization (U in %), Throughput (X), Number Of CPU’s (M), Time in Seconds (S secs). However, an input value for ThinkTime (Z secs) is mandatory. Please note for IO model’s “CPU = 1” irrespective of value entered, this is because of the fact IO systems are modelled as having separate queues for each of the controllers. CPU (like) systems on the other hand always share a single queue.
Hit execute model and VisualizeIT should model system performance for you and provide you the following graphs:
- Throughput (X) v/s Concurrency (N)
- System Utilization (U) v/s Queue Length (Q)
- Throughput (X) v/s Response Time (R)
- Throughput (X) v/s Queue Length (Q)
- Throughput (X) v/s Utilization (U)
- Utilization starts increasing beyond >70% once queue length crosses 1
- For Utilization ~70% the system can process throughput of ~15 TPS
For those folks who want to learn more about the basics of SPE (Systems Performance Engineering) including strengthening your understanding of the fundamental of performance modelling please visit the SPE Fundamentals section here at Practical Performance Analyst.
VisualizeIT offers access to a bunch of Analytical Models, Statistical Models and Simulation Models. Access to all the Analytical (Mathematical) models is free. Go grab an account at VisualizeIT for FREE and get started with modelling system performance. Attaining Modelling Nirvana has never been this easy.
Conclusion : In summary, Little’s law is useful to both Information Technology and non Information Technology systems with a wide application from both a business and technology standpoint. Use Little’s Law to understand the relationship between Response time, User Concurrency, Think Time and Transactional Throughput. With access to simple models like Little’s Law you have now the capability to visualize system (application, storage, infrastructure, network, etc.) performance early on during the application design/build phase much before your system actually gets into an integrated performance testing environment. Use Little’s Law to design relevant Non Functional Requirements, stronger Workload models and visualize how system behavior would change as key assumptions with regards to system configuration change.