←back to thread

62 points hiAndrewQuinn | 8 comments | | HN request time: 0.606s | source | bottom
1. 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 #
2. wredcoll ◴[] No.44392724[source]
Yay, thin clients!
replies(1): >>44392742 #
3. Waterluvian ◴[] No.44392742[source]
We did it! We’re back to where we came from!
4. hiAndrewQuinn ◴[] No.44392748[source]
You might be interested in Tiny Core Linux [0], then, especially piCore. After the initial read from the persistent media, everything is in RAM, the entire filesystem. You are working exclusively in memory until and unless you run a specific command to save everything you care to save back to that media again.

I have it running on a Raspberry Pi so that my already sparingly-used SD card's lifespan gets extended to, hopefully, several years. I have never seen the green writing LED light blink on without me specifically triggering it.

I primarily use it as a cronslave [1]. It has ~50 separate cronjobs on it by now, all wheedling away at various things I want to make happen for free on a clock. But if you live out of a terminal and could spend your days happily inside tmux + vim or emacs -nw, there's nothing stopping you from just doing this. Feels a lot like driving stick shift.

[0]: http://tinycorelinux.net/

[1]: https://hiandrewquinn.github.io/til-site/posts/consider-the-...

replies(1): >>44393117 #
5. Jhsto ◴[] No.44392754[source]
I've been running my daily development laptop on 64GB of RAM for 1,5 years. My anecdotal experience is that no, you don't need persistent storage for most things. In fact, often it's in your way -- it clutters the system over time by causing configuration errors and weird undefined program states. When you can just reboot and all works again it's great. Never going back.
replies(1): >>44393137 #
6. johnmaguire ◴[] No.44393117[source]
I have a few systemd timers but not nearly 50! Any interesting use cases?
7. pm2222 ◴[] No.44393137[source]
64g ram here as well I mount chromium/firefox cache dir as tmpfs
8. 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!