[Info-vax] VMS and the (lack of the) TRIM facility.

JF Mezei jfmezei.spamnot at vaxination.ca
Sat Jun 20 23:50:40 EDT 2015


On 15-06-20 04:28, Dirk Munk wrote:

> With flash memory you can do two things, you can write empty cells, or 
> you can erase written cells. You can not rewrite cells, like you would 
> rewrite written block on a disk.

It is worse. You can only write a block if it is empty. But you can only
empty pages (a group of blocks).

So the SSD firmware, when told to write block 7, will zap page 1000, and
copy blocks 0 to 9 to it, including the modified block 7. It uses
virtual memory concepts to remap blocks as it rewrites them elsewhere.

And SSD does not know whether a file system considers a block to be free
or in use, so in the above example, it assumes all blocks 0 to 9 are in
use and copoies them to new location.

Had those blocks been freee from the file system point of view, and SSD
told about it (via TRIM), it could have zapped the page that contained
blocks 0 to 9 and written block 7 directly. And when blocks 0 to 6 and
8-9 needs to be written too, they are already zapped so can be written
right away without copying the page to another location and remapping
the blocks.

> When you delete a file on a disk, not very much will happen.

>From an SSD point of view a lot happens. Blocks that contain the .DIR
file get rewritten. )which may require the SSD find a page it can zap
and remap those blocks). Then blocks in INDEXF.SYS get rewritten (same
principle) and also the freeblocks list etc.

The blocks used by the actual file that was deleted are not marked
"deleted" and the SSD has no knowledge that these blocks can be zapped,
so any disk operation will preserve the content of the deleted blocks
until they are "software" written over.

> As far as I'm aware VMS doesn't have TRIM yet, not even the Itanium 
> version. So that would make SSD's not very suitable for VMS.

Note that SSDs still work. It is just that they will wear out more
quickly and performance degrades as more and more operations require
pages be moved to new location that has been zapped. However, such
operations are still faster than rust coated disks.






More information about the Info-vax mailing list