In a similar vein, why can we not use the technology of RAM to prolong the life-cycle of an SSD?

4 points

I don’t know exactly, but I wonder if it has to do with ram being volatile and ssds not being volatile?

permalink
report
reply
1 point

It’s exactly that.

permalink
report
parent
reply
7 points

You’re on it.

With RAM the data is being stored as a voltage level continuously refreshed by computer. When the power is removed, the refresh voltage disappears, and the data it represents disappears. This is volatile storage. Infinite re-writes of the same bits, but data cannot persist without power always on it.

With NVRAM aka Non-volatile RAM (which is what SSDs are) data is being stored in a physical material. When data is written, the data represented by voltage differences, is used to make a physical change via chemistry to the material that makes up the SSD. This is also a MUCH slower process in NVRAM than updating data in real RAM. However the benefit is, because NVRAM is a physical change, you can remove power, and the data persists. When you power it back up, the data is read from the physical shape of the chemical material that makes up the NVRAM and then represented again as voltage differences when passed back to the computer.

The cost to this is there are only so many times that the chemical material can be changed. It wears out and is eventually no longer changeable.

permalink
report
parent
reply
0 points

RAM needs a current to keep it’s data, if there is no power it will forget very fast. The SSD won’t forget anything if power fails.

To save re-writes you would have to have data that only resides in the RAM memory part of the SSD, which, again, is delicate. Also SSDs basically have this, a bit of more durable flash memory which acts as a write back cache.

permalink
report
reply
69 points

Writing to an SSD damages the SSD, however things saved to an SSD are persistent, meaning the data isn’t lost when the SSD doesn’t get any power. Writing to RAM doesn’t damage it and it is also quicker. However, data saved on RAM is not persistent, meaning that all data is lost as soon as the RAM is not connected to a power source. Also, RAM is a lot more expensive than SSD storage.

RAMs are already used to avoid writing to (or reading from) the SSD or HDD when possible, the concept is called “Caching”

permalink
report
reply
35 points

Even if it’s powered, RAM will lose its data on the order of a tenth of a second. RAM doesn’t just require power, it requires that your computer constantly read and rewrite it - so every 64ms your computer has to read every gigabyte of RAM and write it back.

permalink
report
parent
reply
7 points

What!

permalink
report
parent
reply
4 points

Dynamic RAM tracks bits by using a capacitor for each bit. Caps’ charge bleeds out so you have to top it off again every so often. The way you do that is to just write the same data back again. So it reads and writes the same data to itself every refresh. The opposition to this is static RAM which does not use a capacitor and is just a clever arrangement of transistors. No refresh needed. It’s not typically used commercially except under special requirements, though as transisters are significantly more expensive. So the refresh strategy is the better choice for consumer hardware. DRAM has been dominant for decades.

permalink
report
parent
reply
10 points
*

If you ever have the chance to use an old Apple II computer, run a text mode program, wait til the owner is looking in the other direction and turn the power off and back on quickly.

For about a second, before you hear the loud BOOP and the screen clears, you’ll see whatever was on the screen just before you powered it off. But a few characters will be corrupted. Try it again, and wait a half a second longer than before. More characters will be corrupted.

For that brief second you’re looking at the contents of the video RAM, then the ROM (Apple called what we call BIOS now “ROM”) clears the contents and puts up the familiar text banner. The longer the power stays off, the more the contents of those RAM cells decay, and any bit flip will show up as a different character at the corresponding location on the screen.

On a side note, there was an article in the early '80s in Circuit Cellar by Steve Ciarcia showing how you could make a rudimentary digital camera by prying the top off a DRAM chip (some were ceramic with metal lids, or just metal cans) and adding a CCTV camera lens at the right distance. Light can deplete the charge in DRAM cells even faster, and by writing all 1s to the memory, exposing it to light, and reading back the contents, you could get a black and white image of whatever’s shining on the chip.

permalink
report
parent
reply
16 points

Doesn’t the ram do that itself? Otherwise reading/writing all that data would waste tons of time for the CPU.

permalink
report
parent
reply
37 points

Yes - it’s been the job of the DRAM controller for almost the entire history of computing. But that’s still a part of the computer and if it stops working then your RAM will go blank in a fraction of a second

permalink
report
parent
reply
7 points

It’s been a very long time since my computer engineering course, and we didn’t cover this topic specifically, but I highly doubt it’s a full dump and reload. What likely happens is each ram address has a ttl flag or some way for the CPU to know when to rewrite the data, and it does it as needed.

Plus, the bus between the CPU and ram is ridiculously fast. Your pc could dump and reload all of its ram in the time it takes you to blink. And, with multiple cores, the task can be allocated to a single core, or divided up among all of them.

permalink
report
parent
reply

Slightly misleading, the DRAM chips do that themselves so the kernel doesn’t have to do that.

permalink
report
parent
reply
6 points

Some very early systems did do it at kernel level, but yeah you are correct. Though I’d also consider the dram chips to be part of the computer and DRAM refresh makes up a good part of your phones battery consumption at standby.

permalink
report
parent
reply
4 points

If I remember, the decay of information in RAM is slower than that. This is an old memory, but I recall I think someone on TechTV talking about how you could, if fast enough, remove a module from one machine and put it in another, and if done right, potentially get the information off it.

permalink
report
parent
reply
3 points

It’s possible, and can be done at home. You need to literally freeze the RAM very quickly (typically with CO2) and transfer it to the new system. Then you dump the contents of the stick and hopefully find an encryption key.

permalink
report
parent
reply
1 point

From what i’ve read it’s temperature dependent, and at room temp some dram cells might take as long as 10 seconds to decay. The 64mS refresh is a super conservative call because it’s really bad when random bits go missing out of memory. The decay is faster at high temperatures, but some dram controllers might actually adjust based on temperature.

permalink
report
parent
reply
1 point

Note that when you freeze the RAM a lot, it will hold the data for up to seconds (if I remember correctly). This is used in hacking - you can get the contents of the RAM after the computer has been shutdown.

permalink
report
parent
reply
2 points

Ram gets knocked out to sleep Ssd remembers because it went to sleep by it self

permalink
report
reply
1 point

I like this one, but as a slight change:

RAM holds the apples you gave it until it is knocked out and drops them all and has no idea what an apple is when it wakes up.

Flash holds the apples you gave it and sets them down in the exact order you gave it to them, sleeps, and picks them back up again when it wakes up ready to hand them back.

permalink
report
parent
reply
27 points
*

Under the hood, RAM and SSDs use very different structures to store memory. SSDs use “flash memory”. To store a bit in flash, the SSD uses a larger than usual voltage to inject and trap electrons into part of the memory cell. This is a stressful process for the silicon, so there’s a limited number of times it can be done. The benefit is that the injected electrons stay put for decades.

RAM (specifically DRAM) stores charge in tiny capacitors. These don’t take anything special to charge up unlike flash. However, they are very leaky and will lose their charge (and therefore the memory) in a handful of seconds. RAM chips actually read and rewrite their memory several times per second to make up for the leakyness. Because of this, RAM needs to always be powered to keep its memory. This makes DRAM unreasonable for SSDs.

There are a couple other types of memory, but they have different power and space trade-offs. One example is SRAM. It needs power to keep its memory, but it doesn’t need to constantly refresh, so it doesn’t take much power. It can be rewritten indefinitely. However, it takes up more space on a chip than DRAM or Flash, so it’s much more expensive per byte.

permalink
report
reply
1 point
*

do not worry. superconductivity at room temps is only 2 yrs away. With superconductive SSDs, these will last FOREVER. Like a nightmare marriage.

permalink
report
parent
reply

Explain Like I'm Five

!explainlikeimfive@lemmy.world

Create post

Simplifying Complexity, One Answer at a Time!

Rules

  1. Be respectful and inclusive.
  2. No harassment, hate speech, or trolling.
  3. Engage in constructive discussions.
  4. Share relevant content.
  5. Follow guidelines and moderators’ instructions.
  6. Use appropriate language and tone.
  7. Report violations.
  8. Foster a continuous learning environment.

Community stats

  • 1.4K

    Monthly active users

  • 80

    Posts

  • 1.5K

    Comments