Some care has to be taken when saying a "petabyte of data" with flash media. You don't have to write a petabyte of data to reach a petabyte of SSD writes. The minimum block size that flash can write is an "erase block", which is usually a few megabytes.
This means that the minimum SSD write will be at least a few megabytes, including that few hundred bytes to that logfile. Likewise, every flushed write will round up to the nearest erase block, in size.
So, to write a few petabytes to the drive, you only need a few gigabytes of writes of per-byte-flushed data, since your actual NAND writes are amplified by a few million.
There's cache and many smart algorithms at play to minimize the number of erase block writes, but once you cause a flush (close the file, etc), you're performing a write to flash.
This is also why any embedded system with logging enabled has a very real maximum operating life. This is fun to discover the first time, when all of your customers start saying your product stopped working within the same couple of months.
Some clarifications:
Minimum SSD write is much less than the erase block. Erase block is the minimum block size that can be erased.
For SSDS, there are 2 key concepts:
1. Read granularity < write granularity < erase granularity
2. Cells that have been written to must be erased before writing again.
Most SSD vendors will buffer write contents to collect a `write granularity` worth of data to avoid wasting bytes writing padding. This can be hard to do on drives without capacitors to supply backup power in the event of power loss.
I stand corrected. Our application was a circular buffer, so all non-cached writes trigger an erase. I suppose this isn't a normal use case, unless your drive is 100% full, so maybe tens of gigs rather than gigs, to write a petabyte. ;)
The most common size I'm seeing for erase blocks is 128kB. The only drives I found with erase blocks over 1 MB are the Samsung TLC drives like the 840.
You must be looking at really old info, which is understandable because page and erase block sizes for current NAND is often hard to get. The first generation of Intel/Micron 3D NAND used 16kB pages and 16MB/24MB erase blocks for MLC and TLC.
This means that the minimum SSD write will be at least a few megabytes, including that few hundred bytes to that logfile. Likewise, every flushed write will round up to the nearest erase block, in size.
So, to write a few petabytes to the drive, you only need a few gigabytes of writes of per-byte-flushed data, since your actual NAND writes are amplified by a few million.
There's cache and many smart algorithms at play to minimize the number of erase block writes, but once you cause a flush (close the file, etc), you're performing a write to flash.
This is also why any embedded system with logging enabled has a very real maximum operating life. This is fun to discover the first time, when all of your customers start saying your product stopped working within the same couple of months.