4 ms·
In linux-land, sometimes I'll use a 2-3G ramdisk (tmpfs) for `$HOME/.cache` just to reduce wear-and-tear on my SSD. The web browsers put a ton of junk there, a
by georgia_peach 5y ago
In linux-land, sometimes I'll use a 2-3G ramdisk (tmpfs) for `$HOME/.cache` just to reduce wear-and-tear on my SSD. The web browsers put a ton of junk there, and I rarely reboot my machine.
- silisili 5y agoSame. Also for when compiling packages from source and whatnot.
- gargarplex 5y agoWhoa. Super interesting! Maybe even useful for compiling during development ... develop in workspace, use unison to copy over to the ramdisk, then do all builds from the ramdisk dir? Would you agree with this article's recommendations regarding ramdisk setup? https://www.linuxbabe.com/command-line/create-ramdisk-linux https://www.linuxbabe.com/command-line/create-ramdisk-linux There seems to be controversy in the comments as to whether tmpfs is a proper ramdisk - although no clear tutorial as to a better method. Interested to learn more!
- silisili 5y agoYeah they are used a lot interchangeably, but the top commenter is probably technically correct. In this case I'm just using tmpfs as outlined in your link. Keep in mind tmpfs can actually swap when out of space, if that matters to you.
- georgia_peach 5y agoStrangely, I've gotten slightly better performance out of an ordinary filesystem (XFS) than tmpfs. Perhaps filesystem caching is more performant at the moment? I've never really dug into the bowels of it. Any kernel FS gurus have an answer?
- charcircuit 5y ago>just to reduce wear-and-tear on my SSD SSDs can handle a lot of writes. That is not necessary to do.
- willis936 5y agoIt's not necessary, but it is beneficial. Why not increase throughput and decrease latency of storage?
- inshadows 5y agoThen your cache is lost on every reboot... Evolution (mail client) by default stores fetched email in there (I moved it to other place for backup purposes). It'd suck to have your mail client re-fetch emails every time.
- georgia_peach 5y agoI use webmail, so haven't had any problems. Seems like something under `$HOME/.local`, or maybe its own dotdir, would be a better place for downloaded messages.
- anamax 5y agoHow often do you reboot linux? I go months between reboots, and that's with crappy hardware.
- inshadows 5y agoEnjoy your unfixed CVEs. About weekly the longest.
- zaptheimpaler 5y agoGood idea, ill try that thanks.
- sbierwagen 5y agoI would be surprised if managing disk cache by hand is going to beat the Linux cache allocator. RAM is never wasted, every byte not being used by an application is used by the kernel for disk cache. If you dedicate 2 gigabytes of it to the .cache folder than either it's going to be mostly empty and you're be causing more thrashing as the kernel unloads stuff it didn't need to, or it fills up and your system falls over when something tries to put a big temporary file in that folder.