큐잉 이론

Lean software development

LSD의 원칙 중 하나인 Deliver as fast as possible의 도구.

Cycle time:

The fundamental measurement of a queue is cycle time - that is, the average time it takes something to get from one end of a process to the other. The cycle time clock starts when something enters a queue and keeps on ticking away while it waits in the queue, while it gets service, while it waits in the next queue, gets the next service, and so on, until it pops out at the other end of the process. —p77

Steady Rate of arrival:

There are two ways to reduce cycle time; one is to look at the way work arrives and the other is to look at the way work is processed. In some systems, it is not possible to influence the rate of arrival of work, but in others policies can be established to even out incoming demand. Pricing policies are often used for this purpose. …

One way to contrl the rate of work arrival is to release small packages of work. If you have to wait for a large batch of work to arrive before you can start processing it, then the queue will be at least as long as the whole batch. If the same work is released in small batches, the queue can be much smaller. —p78

Steady Rate of service:

If you have a process that involves several steps, then the processing time at the earlier steps will affect the rate at which work arrives at the later stations. If you have big processing variations in upstream workstations, these cascade throughtout the system. Thus, it is a good idea to try to move any variability downstream.

The serious impact of upstream variation becomes very important to understand when you use iterative development. Let’s say you have a bottleneck at acceptance testing. If acceptance testing is last thing that happens before deployment, this bottleneck will not appreciably slow down earlier work. But when you are doing iterations, acceptance testing is no longer the last step; it is a vital part of every iteration and must be done before proceeding with the next iteration. If you skip this vital step, you will not get the feedback, which is a key purpose of the iteration in the first place. With iterative development, acceptance testing moves far upstream, and any delays there will be amplified in subsequent iterations. Thus, with iterative development, it is critically important that you do not have a bottleneck at testing. —p79

Slack:

We would never run the servers in our compuer rooms at full utilization - why haven’t we learned that lesson in software development?

In his book Slack, Tom DeMarco makes the point that having slack in an organization gives it the capacity to change, to reinvent itself, and to marshal resources for growth. Actually, queuing theory would suggest that slack serves an even more basic purpose. Just as a highway cannot provide acceptable service without some slack in capacity, so you probably are not providing your customers with the highest level of service if you have no slack in your organization. —p81

The Theory of constraints:

The best way to optimize an organization is to focus on the throughput of the organization, because this is the key to generating profitable revenue. The way to increase throughput is to look for the current bottleneck that is slowing things down and fix it. Once that is done, find the next bottleneck and fix it. Keep this up and you will have a fast moving value stream.

Note that is doesn’t do any good to increase the utilization of non-bottleneck areas. It doesn’t matter how fast you develop software if you can’t test it at the same rate. It doesn’t matter how fast you develop a system if you don’t have the people to deploy it. So, move people to the bottleneck; don’t keep piling up work that can’t be used immediately. —p82

How queues work?

Queuing theory is a well-known discipline that applies whenever something flows through a constrained resource. Here is a quick summary of how queues work:

  1. Measuring the amount of work waiting to be done (let’s call this work-in-queue) is equivalent to measuring the cycle time of a system.
  2. As variability (in arrival time or processing time) increases, cycle time and work-in-queue will increases.
  3. As batch size increases, variability in arrival and processing time increases, and therefore cycle time and work-in-queue will increases.
  4. As utilization increases, cycle time will increase nonlinearly.
  5. As variability increases, the nonlinear increase in cycle time happens at ever-lower levels of utilization.
  6. Continuous flow requires a reduction in variability.
  7. Variability may be reduced by an even arrival of demand, small batches, an even rate of processing, and parallel processing.
  8. Decreasing variability early in the process has larger impact than decreasing variability late in the process.

Software development managers tend to ignore cycle time, perhaps because they feel that they are already getting things done as fast as they can. In fact, reducing batch sizes and addressing capacity bottlenecks can reduce cycle time quite a bit, even in organizations that consider themselves efficient already. —p82-83

2024 © ak