Skip Navigation
InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)HU
Comrade Birb @lemmygrad.ml
Posts 0
Comments 6
Swap memory: SSD or HDD?
  • Ah, sorry for the slow replies, I didn't notice my inbox.

    Generally the second one, but it's kinda both. Modern flash memory works by storing an electric charge in a memory cell and the number of writes per cell is limited. To make memory more dense (and thus cheaper), modern designs store multiple bits in one single cell (called MLC flash, usually TLC flash currently with three bits per cell). This means that changing a single bit usually leads to the whole cell being read and written again. All of this is abstracted away by the memory controllers on modern SSDs. In general the controller will handle stuff like defragmentation and wear leveling on the fly and none of this is transparent to the user. So in theory even a once written file could be moved to a different part of the memory chips when the controller sees fit. In general the controller tries to keep cell writes to a minimum and tries to spread them out evenly over the whole drive and when cells start failing there are usually spares that are not directly visible to the user (over-provisioning).

    The only thing you can really influence is the amount of "locked in" cells, aka how much of the SSD is filled up with data. As long as there is plenty of room to spread out writes, SSDs will last ages. But if you have a 120 GB filled with 119 GB of data and you write a couple of hundred MB a day... the controller will struggle to keep the overall drive healthy.

    So I'd say if it's not some very heavy usage (like 24/7 writing server logs to disk on a production server) don't worry about it. I've never had an SSD fail, I usually replace them with larger/newer ones before that point. I have an 128 GB SSD from 2011 that got used in my daily system for like 7 years in suboptimal conditions (drive was pretty full most of the time) that's still perfectly healthy. Just buy a 1TB drive and forget about it.

    On the topic of backups: It's always good to keep backups but SSDs are not the best medium for that. Traditional HDDs in some reduntant/resilient configuration like a RAID array are way better for that.

  • Swap memory: SSD or HDD?
  • On the contrary it's better to get a bigger SSD since the writes for swap usage get distributed more evenly across the larger memory pool. Modern SSDs can take a lot of writes before degrading since their controllers are very smart. USB drives get worn out a lot faster since they lack redundancy in storage and good memory controllers.

  • Swap memory: SSD or HDD?
    1. Where I live SSD storage has become very cheap and the price premium for going from 200 GB class SSDs to 500 GB class is insignificant. So I'd suggest going with an entry-level 500 GB SATA SSD like the WD Blue in the first place.
    2. Following from that my opinion is that SSDs are big and durable enough to put swap on them without an issue, assumed that you won't be swapping constantly. This heavily depends on the amount of RAM in the system. My old-ish laptop only has 8 GB of RAM so I run it with an additional 8 GB of swap file on the internal SSD. My main PC has 32 GB of RAM and I run it without any swap. In any case you'd want to put swap on the fastest storage possible so that your system stays somewhat responsive during swap usage.
    3. You can share swap partitions without any issue since swap is usually wiped/overwritten on boot.
    4. Every OS on your system can read any data from any disk/partition. If you want to have secure separation you need to encrypt the data.
  • Does China Have Private Property?
  • Yes. Land is always owned by the state and only up for lease. Other types of capital can be owned by individuals or groups. There are private companies, factories owned by individuals etc.