Live data from Hacker News

Computer Latency at a Human Scale

prowesscorp.com

11–18 of 18 posts

Re: Computer Latency at a Human Scale

#11
post #2

I'd be interested in somebody doing this, but instead of scaling it to 1000ms (1 second), I'd like to see it scaled to 16ms (single frame @60fps). I feel like this would give a better representation of "time to feedback". Saying a ping of 65ms is like 5 years doesn't make a ton of sense as that's a relatively decent ping time. Saying it's 4 frames has a direct correlation to it's perceived delay, and matters to users…

As requested:

    System event                   Actual latency Scaled latency   
    ------------                   -------------- --------------
    One CPU cycle                  0.4 ns         1 frame (1/60 s)
    Level 1 cache access           0.9 ns         2 frames
    Level 2 cache access           2.8 ns         7 frames
    Level 3 cache access           28 ns          1 s
    Main memory access (DDR)       ~100 ns        4 s
    Intel Optane memory access     
Conversions courtesy of Wolfram|Alpha, e.g.: https://www.wolframalpha.com/input/?i=65+ms+%2F+0.4+ns+%2F+6...

Re: Computer Latency at a Human Scale

#12
I've been wanting to do a similar thing, but also bring memory/storage into the human scale as well.

A byte is approximately a single letter.

A 4kb page of memory is approximately a single-sided piece of paper.

A 32kb L1 cache is 16 pages, spread on the desk, though you may prefer to think of 512 64-byte post-it notes. You could probably find and read a note in ~2s.

A 256kb L2 cache is a 64-page binder on the desk. Plausible to find a page in ~7s.

A 8MB L3 cache is a filing cabinet or small bookshelf, with 32 binders. It might take a minute to walk over, identify the right book, pull it out, find a page, find a sentence.

8GB of RAM is a sizable library, though far from the largest ever - rows & rows of bookshelves, 512 large shelves in total, 64 books each. If you knew right where you were going, it might take a few minutes to fetch the right book.

A 1TB SSD is 4 million books, among the largest libraries today, or perhaps a warehouse.

If that 1TB is instead a HDD, you can't actually browse the stacks - instead, there's a staircase outside the building, and you can reach in through the window on any floor - the entire building rotates, at the blistering pace of a full rotation every 8 months.

Re: Computer Latency at a Human Scale

#13
post #9

Earlier quoted context omitted.

This, except also relatively compared to reaction time thresholds/max latency for hci. For example in predictive typing anything above ~100ms (don't remember the number but there's an exact measurement on the Gmail paper for smart compose) is noticeable and very annoying to a user. Or video chat, I'd be curious to see the video latency required for a user to notice lag between audio & video. I know in game dev, I was…

> I know in game dev, I was always taught that 60fps is fine, but then there are gamers swearing up and down when they drop below 140fps. Would be curious to see what the max allowed latency is here as well. The 60 fps mark isn't really latency related. Instead, at 60 fps animation without motion blur feels smooth. At 30 fps you need motion blur or it feels like it stutters (and in 24hz cinema the camera produces nat…

> The 60 fps mark isn't really latency related. Instead, at 60 fps animation without motion blur feels smooth. At 30 fps you need motion blur or it feels like it stutters (and in 24hz cinema the camera produces natural motion blur due to shutter time).

Really, this is related to the speed of motion. If everything is moving slowly, 30 fps is fine; if something is moving quickly enough, even 60 fps looks choppy. Try scrolling a long page really fast on your smartphone, for example.

Re: Computer Latency at a Human Scale

#14
post #9

Earlier quoted context omitted.

This, except also relatively compared to reaction time thresholds/max latency for hci. For example in predictive typing anything above ~100ms (don't remember the number but there's an exact measurement on the Gmail paper for smart compose) is noticeable and very annoying to a user. Or video chat, I'd be curious to see the video latency required for a user to notice lag between audio & video. I know in game dev, I was…

> I know in game dev, I was always taught that 60fps is fine, but then there are gamers swearing up and down when they drop below 140fps. Would be curious to see what the max allowed latency is here as well. The 60 fps mark isn't really latency related. Instead, at 60 fps animation without motion blur feels smooth. At 30 fps you need motion blur or it feels like it stutters (and in 24hz cinema the camera produces nat…

> The 60 fps mark isn't really latency related. Instead, at 60 fps animation without motion blur feels smooth. At 30 fps you need motion blur or it feels like it stutters (and in 24hz cinema the camera produces natural motion blur due to shutter time).

After using 120/144hz monitors for a while 60 fps without motion blur doesn't feel smooth at all.

60 fps mark is really just because that's all LCDs could do for the longest of time. It has nothing to do with anything human vision related, it was just the long-standing technological limitation of displays.

Re: Computer Latency at a Human Scale

#17
“improvements made anywhere besides the bottleneck are an illusion.” Loved that maxim.

Also: "if...your application uses microservices...you are essentially turning program function calls into network calls..."

Great post overall, full of nice insights.

#relevant: https://blog.codinghorror.com/the-infinite-space-between-wor...

Post reply on HN