Question about ever growing swap space on raspi 4 4 GB

Is it OK to use SSD-type storage for swap space, or should it be a spinning disk because of the large number of reads and writes that swap space causes?

My 32 GB "system drive" (which I presume includes swap space) in my PI 3B+ is working fine after about 18 months of usage. I use my Pi, among other things, as a video recorder (lower power than a Windows 7 PC running Windows Media Centre or NextPVR) and I use a spinning disk for the recordings, but that's mainly because I need a bit more space than 32 GB: especially if I need to go several days without being able to copy the recordings off it and edit them before writing to my Windows "server" PC.

Reply to
NY
Loading thread data ...

Its fine using a proper SSD for swap, as they have sophisticated controllers which minimize writing and perform proper wear leveling.

For other storage it depends how good the controller is. On SD cards and the tiny USB thumb drives, it isn't very good and will reduce the devices lifetime. From experience the larger USB bar drives are somewhere in between SD cards and SSDs, i.e. between awful performance and lifetime for the cheaper ones, up to damn near an SSD for ones such as the Samsung USB 3.1 bar drives.

It all depends on how much the device is used, if you are swapping constantly, any non SSD storage is going to stressed, and system performance is going to suffer. If it only swaps very rarely, such as when opening a large web page, its not going to make a huge difference to the drives lifetime.

The best strategy is to make sure you don't swap in the first place. If after removing any unnecessary software, if the 1GB Pi proves insufficient, at least the Pi 4 has 2GB and 4GB options.

If you can't stretch to a proper SSD large enough for the system drive and the video storage, I'd carry on as you are using the conventional HD for video.

---druck

Reply to
druck

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.