8 ms·
Two workers are quadratically better than one (2020)
- marcosdumay 5y agoAs a rule, if you have more than 50% of utilization, latency grows very quickly. That is true with any numbers.
- rootusrootus 5y agoDiscussion from 2020: https://news.ycombinator.com/item?id=25001875 https://news.ycombinator.com/item?id=25001875
- civilized 5y agoTwo workers are infinitely better than one for latency, if you have slightly more work than one worker can do
- williamkuszmaul 5y agoI'm not sure why they claim that the total time grows quadratically. If tasks arrive arrive randomly at the same average rate as they can be processed, then the amount of time that the nth task will have to wait is proportional to sqrt(n) in expectation. So one would expect a total waiting time of n^1.5, which incidentally fits much better to their plotted curve than n^2 does.
- mwint 5y agon^1.5 is still quadratic growth.
- mrfox321 5y agoQuadratic is literally x^2
- mwint 5y agoMy bad, it’s been a while since algorithms class. I had my orders mixed up.
- Yiin 5y agothe word you're looking for is exponential.
- zorgmonkey 5y agono the word you are looking for is polynomial, exponential is stuff like 2^n
- travisgriggs 5y agoIt's funny. I saw the headline, and my immediate association was "employees" rather than computation tasks. And I was thinking "not even!" It's been my experience that scaling up employee count, has diminishing returns, with even some net negatives with some adds. I'm not sure I buy the quadratic gains, but the general gst is that if done correctly, two processes/tasks/workers/etc is better than one. So why is this? Why does it work in computing, but not with people? Is it the nature of the tasks (one is problem solving, the other is grinding out computations?). Is it differences in configuration?
- Cerium 5y agoIt works for employees, but only when you care about latency and the employees are interchangeable. A classic queueing example is tellers at a bank. One teller and the line is awful because of one complex transaction. Two and you are in and out in a minute.
- RyanHamilton 5y agohttps://ryanhcom.files.wordpress.com/2017/07/index.png https://ryanhcom.files.wordpress.com/2017/07/index.png
- ggm 5y agobank with one queue and two tellers. two queues and two tellers can introduce frustrations, when one queue advances but the other doesn't and social pressure forbids head-of-line queue jumping.
- dghlsakjg 5y agoMy local grocery store is like this. They never seem to have enough cashiers, and instead of having a single line served by many cashiers like most stores in the area, you just have to pick your line and hope it works out. They normally only have two registers open, too. So it is abundantly clear when someone has managed to get ahead of you. No idea why this in particular drives me so nuts
- ianstormtaylor 5y agoFor an article that’s entirely about comparing two scenarios, it would be nice if the two scenarios appeared on the same graph... or even the same axis... or even the same screen...
- ajuc 5y agoIs this doubling the rate at which tasks are being added to the queue when there is 2 workers? Because otherwise the comparison isn't fair. Basically it compares tasks piling up vs tasks being consumed faster than they arrive.
- smokey_circles 5y agoConversely, 3 women will not give birth in 3 months
- pvillano 5y agoSee also "Why the other line is likely to move faster" [3:42] by Bill Hammock the Engineer Guy https://youtu.be/F5Ri_HhziI0 https://youtu.be/F5Ri_HhziI0 The very short video touches on Agner Erlang's studies on telephone block queues and how shopper wait times are reduced by having cashiers share a common queue.