RAM vs. SSD (Both solid state, yet only one is persistent?)

GoodEnough

Golden Member
Apr 24, 2011
1,547
19
81
When you power down the PC, RAM is lost, but SSD is permanent.
If both are solid state, why does RAM get cleared yet SSD does not?
What's the fundamental difference?
 

IntelUser2000

Elite Member
Oct 14, 2003
8,686
3,786
136
Solid state just means no physical moving parts, nothing to do with persistence.

SSD doesn't lose data when power is cut because the transistors are designed to keep the charges.

RAM loses data because its data storage relies on capacitors, and it gets drained.
 
  • Like
Reactions: ao_ika_red

GoodEnough

Golden Member
Apr 24, 2011
1,547
19
81
Google returned these results when I searched for "difference between RAM and hard drive",

Umm, no. Did you understand my question?
I did not ask "What is the difference between SSD and RAM"
I asked why RAM loses its data, but SSD persists, yet they are both solid state.
 

GoodEnough

Golden Member
Apr 24, 2011
1,547
19
81
Solid state just means no physical moving parts, nothing to do with persistence.

SSD doesn't lose data when power is cut because the transistors are designed to keep the charges.

RAM loses data because its data storage relies on capacitors, and it gets drained.

Bingo. This did not turn up in all the searching I did. Thank you.
So, how long do transistors keep the charge?
What if you don't turn your PC on for 1 year. Will the SSD still have the data?
Does the inside of SSD drive come with a CMOS battery?
 

mindless1

Diamond Member
Aug 11, 2001
8,613
1,680
126
^ No, SSDs don't have a battery (maybe something proprietary for the server market?) and they will eventually lose the data, faster the closer it gets to the end of the write cycle limit and faster the higher the power-off storage temperature.

Initially the average data retention for consumer ("client") grade SSDS is several years, then dropping to dozens of weeks towards the end of the lifespan in a temperature controlled environment, then less, and less, etc.

https://www.anandtech.com/show/9248/the-truth-about-ssd-data-retention

What is unclear to me is what happens if the drive is merely powered on? Does that reset the period, or does the data decay need reset by writing it again? Power cycling a drive is a lot less work than rewriting, might not even need a computer to do so, just a phone charger with an SATA power plug on it might work.
 

Billy Tallis

Senior member
Aug 4, 2015
293
146
116
What is unclear to me is what happens if the drive is merely powered on? Does that reset the period, or does the data decay need reset by writing it again?

Data degradation in flash memory can only be corrected by re-writing the data (though SSDs have several layers of error correcting codes, so the original data can be reconstructed even after the stored data has degraded). This is also true of DRAM, just on a much shorter timescale. Neither form of memory has any sort of permanent connection between the power supply coming into the chip and the individual memory cells. This is one of the reasons that they have enough density to be economical in multi-GB capacities. If you want a memory cell whose state is actively maintained by the application of power, look at SRAM and notice its high cost and low density.

Some SSDs will periodically scan their contents to check for data degradation and re-write data as needed. This is what Samsung had to add in firmware updates for the 840 and 840 EVO after it became apparent that their data retention was low enough that read performance for stale data was noticeably affected when slower error correcting layers had to be engaged to reconstruct the data.
 
  • Like
Reactions: mindless1

mindless1

Diamond Member
Aug 11, 2001
8,613
1,680
126
^ Thanks, yeah that was what I was suspecting but then the information out there goes on about powered-on SSD as if that mattered, when the majority of data, for example I mean not just dynamic user data but things like the OS files themselves, usually don't change.
 

IntelUser2000

Elite Member
Oct 14, 2003
8,686
3,786
136
The 1-year for client SSD retention time is after the write cycle has been exhausted. Some research says it should last 10-years in storage.

Few years in storage is probably a good metric. It's the nature of the medium that allows data retention without needing any power. DRAM on the other hand requires refreshing just to maintain data, even when idle and doing nothing.
 

corkyg

Elite Member | Peripherals
Super Moderator
Mar 4, 2000
27,370
239
106
This difference has always existed - RAM is volatile memory while the SSD is non-volatile. What they are made of is not relevant. It is how they are powered.
 

Glaring_Mistake

Senior member
Mar 2, 2015
310
117
126
Some SSDs will periodically scan their contents to check for data degradation and re-write data as needed. This is what Samsung had to add in firmware updates for the 840 and 840 EVO after it became apparent that their data retention was low enough that read performance for stale data was noticeably affected when slower error correcting layers had to be engaged to reconstruct the data.

Expanding on this:

The newest firmware updates for the 840 EVO made it try to check for data degradation and re-write data as needed as you say.
It can be a bit slower than for other drives and it can still overlook a few problem areas but overall it is a great improvement compared to earlier firmware versions.
Discovered not that long ago though that the 840 EVO with earlier firmware does seem to perform rewrites eventually but it appears to take a lot to trigger rewrites.
Don't know with the old firmware whether it takes a pro-active or passive approach to finding out whether rewrites are needed but regardless that threshhold for rewrites to be triggered was set too high.

The newest firmware update for the 840 did not add the same function.
It did add support for a function in Samsung Magician that will check for data degradation and rewrite when necessary (or maybe it just rewrites all the data on the drive) but that is not quite the same as for the 840 EVO which does it automatically.
Don't know if the 840 has a rudimentary rewrite-function like the 840 EVO with the old firmware did - have some indications that might be the case, but like with the 840 EVO with the old firmware if it does then the threshhold for rewrites was also set too high.
 
  • Like
Reactions: cbn