4 ms·
Eh? It is possible for size to be decreasing most of the time. Just make traffic extremely bursty - add 60 on the hour every hour, and consume at one per minute
by Smaug123 4y ago
Eh? It is possible for size to be decreasing most of the time. Just make traffic extremely bursty - add 60 on the hour every hour, and consume at one per minute.
- remram 4y agoWhat does average mean there? Increasing and decreasing are punctual events. If you mean the 1-minute average can be negative most of the time, that is true, but it would not work for other time horizons, whether larger or shorter.
- roflyear 4y agothe # of items in a queue is either growing or shrinking, there isn't the concept of "staying the same" and as you approach the line from shrinking to growing, performance (queue time) degrades after roughly 70-75% utilization.
- remram 4y agoOf course it can stay the same? Where the hell do you get this 70-75% figure from? This makes no sense.
- roflyear 4y agoUnless you have something outside of the queue monitoring the size and limiting items being entered into the queue, a queue is always either growing or shrinking. See: https://blog.danslimmon.com/2016/08/26/the-most-important-thing-to-understand-about-queues/ https://blog.danslimmon.com/2016/08/26/the-most-important-th... 70-75% is just a rough number, the real number depends highly on several factors related to your specific use of the queue. It may not make sense but it is the reality.
- remram 4y agoYou can only assert that it's "shrinking" or "growing" over a given period of time. It may have been shrinking over the last 5min while at the same time it has grown over the last hour. For a time window small enough, it has not changed, because getting 1 input or 1 output is a punctual event. For a time window large enough, it has necessarily grown, if it started empty. So I disagree entirely with "it's either shrinking or growing". It is both growing, shrinking, and stable, at the same time, over different horizons, and I have no idea what law you are trying to state. The link you provided above is a really good primer based on serious math, I don't understand how you think it supports your vague claims.
- roflyear 4y agoI think you should read up on this a little bit as your assumptions are not totally correct, and if you're using queues understanding this theory is pretty important and will save you some headaches. Queues are either growing (adding items) or getting smaller (consuming items). There is not a state where they stay the same length, unless you're doing something really weird like monitoring to make sure there are always 10 items in the queue, or something, and adding if that number drops, but then you'd need a second queue-type structure to support that, and the conversation kind of goes off the rails.
- remram 4y agoWhat happens in between getting items or consuming them? Is that not a "state"? I literally cannot understand how you think time works in your area.
- roflyear 4y agoIt's a point in time, but it is irrelevant to the problem we're discussing and I'm not sure what value there is in discussing that static points in time exist. It's like discussing a runtime and saying "well, at this static point in time it takes zero seconds to run" - I just can't wrap my head around how it is relevant to the issue at hand. You're also being really rude for no good reason. My polite suggestion is that you reflect on yourself here about why you are being rude on the internet to strangers. It could lead to growth and hopefully help you with whatever hurt you're experiencing.