←back to thread

66 points hiAndrewQuinn | 1 comments | | HN request time: 0.204s | source
Show context
Waterluvian ◴[] No.44392689[source]
An assumption I’ve been revisiting is if I really do need to be writing to disk all the time. I can’t remember the last time I actually had a crash or other event where I would have abruptly lost my work.

I’m wondering if I can completely hide away the detail where I can work exclusively in memory (even when I habitually save my code) and “reconcile” as some task I do before shutdown.

In fact, that doesn’t even feel necessary… I git push my day’s work a number of times. None of that needs a local disk. And 64GB of memory was surprisingly affordable.

replies(4): >>44392724 #>>44392748 #>>44392754 #>>44398922 #
1. roryirvine ◴[] No.44398922[source]
Have a look at libeatmydata - https://github.com/stewartsmith/libeatmydata

Things will still get written to disk eventually, it's just that fsync() returns instantly without actually doing anything. It's sometimes used in CI and similarly-ephemeral systems, and can produce a noticeable reduction in i/o.

Be warned, though, that it has that name for a reason!