1

I'm planning on getting an NVMe for use to contain a swapfile to extend the RAM of my Linux system. Yes, I know this is a bad choice due to the finite number of writes an NVMe has in its lifetime, but bear with me.

I'm wondering if an NVMe with ECC can detect and correct drive errors and redistribute the corrected data to some other section of the NVMe, doing this in the NVMe's firmware at runtime. This would slightly prolong the NVMe's lifetime, enough for me to use it for my purposes.

It speaks here about bad sectors and reallocation.

So does an NVMe correct errors and redistribute the data to good sections of the NVMe in firmware at runtime? If not then how is this done in the (Linux) OS?

Steve Mucci
  • 113
  • 5
  • 1
    I believe this question is already answered on the site you linked. [How to test SSDs or NVMe for badblocks'?](https://superuser.com/questions/1266752/how-to-test-ssds-or-nvme-for-badblocks) –  Jul 31 '20 at 01:51
  • 1
    I should warn that swap does not equate to more RAM. You will not be able to load more things into memory with more swap, even if that swap device is somehow the same speed as the rest of your memory. Heavy use of swap on this devices involves a lot of additional context switches, bus activity on PCIe, and aggressive rewriting of data everywhere. Making the CPU and related bus connections wildly more busy so that it can use a slower form of media to desperately relieve memory pressure will not yield a node of greater capacity. It's not that much more expensive to add more RAM. – Spooler Aug 28 '20 at 00:48

2 Answers2

0

Wear leveling in tandem with ECC is what was needed.

Steve Mucci
  • 113
  • 5
-1

That thing you're dreaming on, it already exists -I believe. Perhaps your needs would be covered by Intel's "Optane" memory? If you don't know it, check it out. If that doesn't cover your needs, please enlighten us telling why.