What happens when you add a new teller? (2008)
johndcook.com
johndcook.com
So there's two factors: flow rate and service time.
FLOW RATE:
Those people aren't coming in the door every 10.3 minutes: they're all coming in at 9:00 before work, 12:00 on their lunch breaks, or 4:45 right before closing. So you'd see 15-20 people all working through the doors within 10-20 minutes of each other. Ouch! This is modeled in queue theory as a Poisson distribution of arrival times.
SERVICE TIME:
Again, we're dealing with averages and distributions, but this time it's exponential. For every person who comes in with a check to deposit (let's say that takes 3m), there's another extreme case (let's say someone who wants to deposit $2,500 in Canadian pennies). As someone in the back of the line, you have to wait for all customers before you to be served before it's your turn.
All of a sudden you're in a 29-person line and waiting 5 hours. THAT math makes sense: 29 people × 10 minutes per person = 4.8 hours.
THE FLAW [1]
Of course, this queue model is continuous: the bank doesn't open or close (as most banks do). Moreover, arrival times are deterministic: you can model based on a distribution, but you could quickly measure expected arrival times.
Process efficiency and queue theory are interesting topics. My favorite case is Toyota's six sigma production line engineers helping a NYC food kitchen cut wait times from 90 minutes to 18 minutes with simple adjustments:
http://www.nytimes.com/2013/07/27/nyregion/in-lieu-of-money-...
> The kitchen, which can seat 50 people, typically opened for dinner at 4 p.m., and when all the chairs were filled, a line would form outside. Mr. Foriest would wait for enough space to open up to allow 10 people in. The average wait time could be up to an hour and a half.
> [Toyota] eliminated the 10-at-a-time system, allowing diners to flow in one by one as soon as a chair was free.
Talk about low-hanging fruit. This is quite literally a case of cutting waiting times by saying "hey, why don't we just stop telling people they have to wait?"
We decided to entertain ourselves figuring out how long it would take to get through, assuming 1,000 people were in line (and also to figure out if we needed to make plans for meals while waiting).
Getting through a border usually takes no more than 2-3 minutes per person.
1,000 people will take 33.3 hours to process, assuming no major issues and 2 minutes per person.
When the second officer showed up, around 10:30am, we had moved just a few feet in 3 hours and had taken time to go get breakfast. We estimated that the single border officer had processed around 100 people in that time. More planes had emptied out behind us and the line snaked through as far as we chose to follow it during bathroom and food breaks.
So we assumed we had about 900 people in front of us...with 2 guards that worked out to only 15 more hours of waiting.
Eventually, a little after 1pm (and our lunch), somebody had the bright idea to move some of the officers from the Shengen area over to the international entrance, at this point the entire international terminal at CDG must have been clogged with people, and we saw a handful of major arguments and one fist-fight in our part of the line. We had moved forward about 25% of the way at this point and were trying to figure out which overpriced crappy snack kiosk we wanted to get our dinner at. They added 5 more officers (a total of 7) and they cleared us through fairly quickly after that.
Since then, I've had obvious questions about information asymmetry w/r to capacity planning. Border control could use the arrival schedule (which was known months in advance) to estimate the number of needed officers at any given time of day 90 days in advance. By setting a maximum queue wait time, they could decide capacity. The unknown variable would be international passports vs. Shengen, but past history could provide prior ratios useful for future planning.
I don't know if they ever availed themselves of this information, but I was not impressed with the DCPAF's (or whichever agency it was) planning or execution.
The rest of our stay was nice though.
So as the frequency with which people arrive approaches 1 in 10 minute (from above), the average wait time will increase dramatically, reaching infinity at 1 person / 10 min.
That's kind of a silly model for a bank, but it makes more sense for a server (which, given the time span of most network requests, might as well have been up for an infinitely long time).
Question: what happens when there's no line for a specific ride at Tokyo Disneyland? Answer: nobody wants to ride the ride! Second question: what happens when there's a line for a specific ride at Tokyo Disneyland? Answer: everybody starts queuing up for that ride, even if they don't know which ride it is!
If the one teller is 100% busy serving customers, then that's efficient. The queue is clearly temporary and due to demand spikes
If two tellers are idle 70% of the time, that's inefficient and one of them should be relocated.
I've had similar discussions with non-tech management about server utilisation (why should we buy another server when we're only using 80% capacity of the ones we've got?)
Wait time clocks are normally inflated by around 15-20% on really popular rides.
Generally, if the line splits, the left side is shorter bc more people are right handed and tend to go right.
No data to support either claim, just what I've experienced. I'd be really curious to see some of Disney's work in line theory.
Edit - the text version was a disaster here. Here is an image of what I used to try to understand:
http://i.imgur.com/HOKgfmd.png
One teller: average wait time is 22.5 minutes for "six users who arrive one minute apart from 9:00 to 9:05"
Two tellers: average wait time is 8 minutes.
I think to go from "5 hours with one teller" to "Three minutes with two tellers" requires you to space people out more than "one every one minute".
The queue are everywhere - your messaging queue, the threadpool, the hardware threads, and other layers of the stack and APIs you use. The video adds the interesting detail that as you add more tellers (workers) you learn of impending disaster only in the outlier p99 (or higher) latencies; by the time your p85 latency rises, you're already about to stall out.
I agree that under 30s should be able to relate, but technology is changing how often I physically queue up somewhere.
I imagine they were much worse before there were ATMs every 50 feet?