3 ms·
Latency is funny, it is so because: * It is additive. It is necessary for just one component in the chain to add latency (monitor refresh, uncompressing, a bad
by rdtsc 13y ago
Latency is funny, it is so because:
* It is additive. It is necessary for just one component in the chain to add latency (monitor refresh, uncompressing, a bad cable modem, a bad router in the path, overloaded server, bloated JS code in the page). It is very hard to remove (one can argue impossible, but I am thinking of a multi-path set up with redundant hardware or network connections)
* Even though we can process teraflops per second on home GPU cards, our websites load about as a fast as they did 10 years ago.
* Border-line imperceptible UI or audio latencies still lead to bad user experience. They might not even know why they don't like it but in an A/B test they would pick the faster more response one. This was the case with Android vs Apple up until not too long ago. Even tiny UI jerkiness is enough to annoy a large number of users.
* OS and whole software stacks are usually designed for improved throughput not low latency processing. It takes tuning (proc and sys params) or even installing a special kernel to get better latency support for low level code.
* More benchmarks also measure throughput more than latency. Software is often picked and compared based on throughput, latency is second citizen most often. In a sequential setup for example, the two are compliments of each other, the more requests per second, the lower the latency of each request. It is only in concurrent and parallel contexts when latency starts to behave widely different. Send 100 requests at the same time towards the server? What happens? Do 50 get processed in 1ms but the rest block for 25ms?
* Low latency and liveliness has to be baked into the innards of the system/VM/framework. Depending on what is picked (and it often is picked based on throughput) a lot of time might end up being wasted fighting latency in a highly concurrent situation.
- dclowd9901 13y agoYour point about android v ios really hit home with me. People who have tried both often express to me that they enjoy ios far more than android, but can't really explain why. I, myself, appreciate the fluid 60fps experience, and generally on explaining that difference to them, a lightbulb goes off in their head, and they realize that does actually bother them as well, but they just didn't know it was something to be noted. In ui development, we recognize things like responsiveness and fluidity, and something as clearly different as 60fps v 30fps is conjures a very clear picture in our minds, but most people are not versed in such language.
- lloeki 13y agoOf note: you can achieve a solid 60fps yet still have latency issues. What instinctively bothers people is not just framerate, but the fact that on iOS†, scrolling (for example) has the content literally glued to your finger due to whatever scheduling trick, whereas the ever so slight latency on Android breaks the illusion as the content plays an uncanny catch up with the fingers. Project Butter made great strides to solve the framerate issue but also enabled triple buffering, which by definition increases latency. It's definitely noticeable even on both my N4 and N5 and absolutely jarring on my 2012 N7. † also available on my Mac right now, even though the finger is on the touchpad instead of the screen, the scrolling response is instantaneous.
- pointernil 13y agoVery insightful. "More benchmarks also measure throughput more than latency.": Yup, latency benchmarks are really very hard, especially when humans are involved (UI/UX), due to biases and the way perception and cognition quite often try to adapt sparing us "the worst of latency" but at the same time leave us with a gut feeling of "lag". The journey J. Carmack undertook to find and work around latencies for the Oculus Rift is good example for all this, i think. You can't do this for each and every app to give all users this "snappy" feeling... especially when a huge system like "the internet" is involved. I believe there is also "latency creep": even if "a system" has low latency at the beginning, operating it, maintaining it and especially scaling it will more easily accept increased latency than lower throughput... up to an threshold of course when the system becomes "apparently and unbearably slow" (still not the case for google, facebook etc. i guess) Add servers to a farm because the median req. latency increased by 30%? Hmm... Add servers to a farm because the number of users increased by 30%? Sure! ;) So most probably facebook, yahoo etc. are missing serious absolute latency SLAs [1] and those huge organizations as a whole tend to neglect them until things break... they don't care about "slow(ish)". [1] http://en.wikipedia.org/wiki/Service-level_agreement http://en.wikipedia.org/wiki/Service-level_agreement ps: it's "funny" to see the gaming big-biz industry fighting this: they are huge organizations willing to accept "slow" if the money comes in right, at the same time some of them are in a market where the customers are much more sensible to this issues than the typical facebook is slow poster.
- nhaehnle 13y agoWell-intended advice from another non-native speaker: You probably meant "sensitive" instead of "sensible" in your P.S.
- pointernil 13y agoright ;) thanks.
- rdtsc 13y ago> I believe there is also "latency creep": Very good point. I'll have to steal that phrase. Latency is additive in the system but also over time usually. Prototypes look good from then on it is usually just API layers, paths and more code on top. Those usually add latency to the stack.
- coldtea 13y ago>Even though we can process teraflops per second on home GPU cards, our websites load about as a fast as they did 10 years ago. Well, they are also 10x the size of what they were 10 years ago, with all the new fangled assets, large images, etc. >OS and whole software stacks are usually designed for improved throughput not low latency processing. It takes tuning (proc and sys params) or even installing a special kernel to get better latency support for low level code. Well, I don't think that has anything to do with the web latency as perceived client side. 99% of the lag/slowness is (should be?) because of network latency, not because the OS/browser is slow to receive and render.
- tenfingers 13y agoI was wondering if the 10x was accurate, and it seems it is... Complete assets of... "google.com": 1,09MB "bing.com": 332,95KB(!) "yahoo.com": 1,84MB (1,47MB with ADblock) I was actually estimating more than 10x, due to the heavy use of linked JS, CDNs and whatnot, but I would say it's actually quite correct (I checked other websites I use with similar results, so I didn't post it here). I was actually quite surprised by bing here, though google adds around 300k (which is the size of the whole bing assets) for the doodle in my country. Not to mention the background image in the bing homepage as well. Well played bing...
- rdtsc 13y agoGood point. Yeah it is a trade-off. One can ask "Do we need much larger images if it means stuttering load?". Or "Has anyone looked at why we are loading 1MB worth of JS on each page refresh?". Most places don't have a "latency czar" so to speak. It is usually UI testing or QA department that might notice it. (I used the "czar" word because it is really someone who need to look over all the system front to end, the database in the very back of the stack, up to the pixels on user's screen, which is very different perspective as most work in layers that go horizonatal -- front-end, ui, content delivery, back-end, database).
- qznc 13y agoWhat sucks is that latency hiding techniques are not applied. For example, prefetching HTTP requests unfortunately breaks a lot of (HTTP GET misusing) web apps.