How vulnerable are SSDs to power failures compared to HDDs? [closed]

We know that HDDs are very vulnerable to power failures. Are SSDs prone to power failures as well? Since they have no moving parts, I'm assuming that they can handle power failures better.


Are SSDs prone to power failures as well?

Yes, SSDs can be vulnerable to powers cuts just like HDDs.
The vulnerability of storage media to power cuts is during write operations.
There's even anecdotal evidence that (older?) SSDs are more susceptible than HDDs to problems from power cuts: https://www.extremetech.com/computing/169124-the-mysteriously-disappearing-drive-are-power-outages-killing-your-ssds

Since they have no moving parts, I'm assuming that they can handle power failures better.

Faulty assumption.

An HDD is likely to lose only a sector's worth of data due to a power cut. Otherwise a modern HDD is designed to handle sudden loss of power. For example the HDD maintains reserve power or retractors to execute an immediate seek to safely park the R/W heads when the power is cut.

But flash chips require a erasure of a block (of many pages/sectors) before a page write can actually be performed.
So in some respects it can actually be worse, since erasing a block could involve saving/coping many pages/sectors of valid data, aka write amplification , so more valid data could be vulnerable.

SSDs trade mechanical complexity with logical complexity.
In order to accomplish efficient writes and wear-leveling, a logical layer of sector mapping is imposed over the physical NAND chips, i.e. a flash translation layer. To order to avoid catastrophic loss of this crucial mapping, SSDs can employ reserve power sources, e.g. holdup capacitors, to ensure completion of crucial operations on detection of a power cut.
However as this manufacturer's document states, SSDs do not have equal capabilities in self-protection from power cuts.
So generalizations about all SSDs and power loss are likely to be inaccurate.

But the vulnerability of storage media to power cuts is minimized by using journaled filesystems such as NTFS, ext4, and UBIFS. Since modern operating systems have a preference for using a journaled filesystem, you are unlikely to encounter filesystem integrity issues caused by data loss during a power cut.
However this can only protect against loss of pending writes that did not complete. The storage media is expected to accurately preserve previously written data.
In this regard SSDs could have a weakness that has to be compensated with self-protection capabilities that varies between manufacturer brands & models.