File System vs ATA vs Flash vs SSD

The filesystem’s view of the world

The filesystem is responsible for a number of things, like permissions and name lookup, but none of those has an impact on where it puts blocks on a drive. Once we remove all of that, we can consider the file system to be an “Object to block” mapping layer. In general a storage object just means a separate distinct entity, so each file is an object. It is the file systems job to take these various object requests (create, delete, read write) and service them using chunk of block storage it is provided by some underlying device.

ATA’s view of the world

ATA is a command based transport that allows a lot of things, but for example we don’t care about ATAPI and all that stuff, we just care about the block storage services it provides. ATA doesn’t have any object commands, it just has block commands. Basically your entire drive divided into a series of logical block addresses. The drive has commands to read and write data to a particular LBA. Note that it does not have a command to delete an LBA, that will become an enormous issue later.

Flash’s view of the world

Flash is a relatively complicated storage medium, and has its own view of the world. It works in terms of pages and blocks. Usually a page is the smallest amount of space you can reasonably read or write to a a flash chip (for our discussion, 4K), and a block is the smallest chunk of space you can erase at a time. With an empty unwritten block, all the bits are set to 1 and during a write they can only transition to 0. That means in order to rewrite a page you must erase it first. This is an important point. You can’t just go and erase a page of the flash, you need to erase the 128 contiguous pages contained in a whole block at a the same time.

The SSD controller’s view of the world

There are two forms of NAND flash used in SSDs today: Single-Level Cell (SLC) and Multi-Level Cell (MLC). The difference between the two is the amount of data stored per cell, with SLC it’s 1-bit per cell and with MLC it’s 2-bits per cell. The key here is that both SLC and MLC take up the same amount of die area, so MLC effectively doubles your capacity at the same price. The controller will apply voltage to the gate or channel to allow some electrons to tunnel and check the threshold voltage of the cell. When the threshold voltage has reached a predetermined value, your data is stored. The SSD controller deals with ATAs view of the world on one side (LBA), but it also has to deal with flash’s view of the world. This is a hugely complicated task, and it is the reason that the quality of drives varies widely.

Posted by admica   @   8 August 2009

Related Posts

Like this post? Share it!

Digg Twitter StumbleUpon Delicious Technorati Facebook RSS

0 Comments

No comments yet. Be the first to leave a comment !
Leave a Comment

Name

Email

Website

Previous Post
« Configuring and making OProfile for a custom kernel on Fedora
Next Post
A faster way to write out all zeros to a disk using checksums »
Powered by Wordpress   |   Lunated designed by ZenVerse