Live data from Hacker News

IO Devices and Latency

planetscale.com

71–80 of 159 posts

Re: IO Devices and Latency

#71

Earlier quoted context omitted.

I heavily, heavily abused d3.js to build these.

Small FYI that I couldn't see them in Chrome 133.0.6943.142 on MacOS. Firefox works.

Interesting. Running any chrome extensions that might be messing with things? Alternatively, if you can share any errors you're getting in the console lmk.

Re: IO Devices and Latency

#72
post #67

Earlier quoted context omitted.

> I've been advocating for SQLite+NVMe for a while now. Why SQLite instead of a traditional client-server database like Postgres? Maybe it's a smidge faster on a single host, but you're just making it harder for yourself the moment you have 2 webservers instead of 1, and both need to write to the database. > Latency is king in all performance matters. This seems misleading. First of all, your performance doesn't matt…

The entire point is to avoid the network hop. Application SQLite NVMe has orders of magnitude less latency than Application Postgres Client Network Postgres Server NVMe > You should be avoiding serial database queries as much as possible in the first place. I don't get to decide this. The business does.

"...has orders of magnitude less latency than..."

[citation needed]. Local network access shouldn't be much different than local IPC.

Re: IO Devices and Latency

#73
post #3

Author of the blog here. I had a great time writing this. By far the most complex article I've ever put together, with literally thousands of lines of js to build out these interactive visuals. I hope everyone enjoys.

Were you at all inspired by the work of Bartosz Ciechanowski? My first thought was that you all might have hired him to do the visuals for this post :)

Re: IO Devices and Latency

#74
I love the visuals, and if it's ok with you will probably link them to my class material on block devices in a week or so.

One small nit: > A typical random read can be performed in 1-3 milliseconds.

Um, no. A 7200 RPM platter completes a rotation in 8.33 milliseconds, so rotational delay for a random read is uniformly distributed between 0 and 8.33ms, i.e. mean 4.16ms.

>a single disk will often have well over 100,000 tracks

By my calculations a Seagate IronWolf 18TB has about 615K tracks per surface given that it has 9 platters and 18 surfaces, and an outer diameter read speed of about 260MB/s. (or 557K tracks/inch given typical inner and outer track diameters)

For more than you ever wanted to know about hard drive performance and the mechanical/geometrical considerations that go into it, see https://www.msstconference.org/MSST-history/2024/Papers/msst...

Re: IO Devices and Latency

#75
Disk latency, and one's aversion to it, is IMHO the only way Hetzner costs can run up on you. You want to keep the database on local disk, and not their very slow attached Volumes (Hetzner EBS). In short, you can have relatively light work-loads that will be on sort of expensive VMs because you need 500GB, or more, of local disk. 1TB local disk is the biggest VM they offer in the US. 300 EUR a month.

Re: IO Devices and Latency

#76

Earlier quoted context omitted.

Small FYI that I couldn't see them in Chrome 133.0.6943.142 on MacOS. Firefox works.

Interesting. Running any chrome extensions that might be messing with things? Alternatively, if you can share any errors you're getting in the console lmk.

Oh, looks like it. I disabled extensions one by one til I found it was reflect.app's extension. Edit: reported on their discord.

False alarm :) Amazing work!!

Re: IO Devices and Latency

#77

Seeing the disk IO animation reminded me of Melvin Kaye[0]: Mel never wrote time-delay loops, either, even when the balky Flexowriter required a delay between output characters to work right. He just located instructions on the drum so each successive one was just past the read head when it was needed; the drum had to execute another complete revolution to find the next instruction. [0] https://pages.cs.wisc.edu/~mar…

I was reminded of Mel as well! If you haven't seen it, Usagi Electric on YouTube has gotten a drum-memory system from the 1950s nearly fully-functional again.

Re: IO Devices and Latency

#78
post #3

Author of the blog here. I had a great time writing this. By far the most complex article I've ever put together, with literally thousands of lines of js to build out these interactive visuals. I hope everyone enjoys.

Were you at all inspired by the work of Bartosz Ciechanowski? My first thought was that you all might have hired him to do the visuals for this post :)

Bartosz Ciechanowski is incredible at this type of stuff. Sam Rose has some great interactive blogs too. Both have had big hits here on HN.

Re: IO Devices and Latency

#79
post #74

I love the visuals, and if it's ok with you will probably link them to my class material on block devices in a week or so. One small nit: > A typical random read can be performed in 1-3 milliseconds. Um, no. A 7200 RPM platter completes a rotation in 8.33 milliseconds, so rotational delay for a random read is uniformly distributed between 0 and 8.33ms, i.e. mean 4.16ms. >a single disk will often have well over 100,00…

Whoah, thanks for sharing the paper.

Re: IO Devices and Latency

#80

Earlier quoted context omitted.

It's the complete opposite for me — there are no animations in Firefox even with uBlock Origin disabled, but Brave shows them fine. The browser console spams this link: https://react.dev/errors/418?invariant=418 edit: looks like it's caused by a userstyles extension injecting a dark theme into the page; React doesn't like it and the page silently breaks.

Ohhh interesting! Obviously not ideal, but I guess just an extension issue?

[deleted]
Post reply on HN