« | Home | »

Of HFS+ and optimization

By Sparky | March 24, 2006

Recently at work we had a project come through that dealt with writing device drivers for flash memory devices. I had a chance to review some of the design documents and learned a great deal about some of the differences between NAND flash and traditional disk magnetic disk drives in both the way they store and retrieve data.

This and the recent /. linked article on OS X’s system optimization techniques has spurred me into learning more and more about HFS+ and the way that it stores and optimizes data on the hard drive in my powerbook. Of particular note is some of the new technologies that have been included to reduce the number of extents that files operate, and the way that it automatically de-fragments files that meet certain requirements on the fly.

While most magnetic disk drives employ a similar hierarchical file system and try to preserve a file as a contiguous block on the hard drive, flash memory (such as NAND flash) does not need to do this. Flash memory is able to look at a drive as a circular device and loop data around on it due to the fact that accessing any one part of the volume in particular does not require moving a physical head.

While this does provide certain performance advantages during normal operation most flash based file systems such as JFFS and JFFS2 do take a significant performance hit when mounted because they lack a true file descriptor table so the entire volume must be scanned for information pertaining to the files it contains. While this is a quick process for a 128MB flash drive in the future as portable computers become more and more likely to include a flash drive rather than a hard disk drive we are likely to see problems with this as a computer tries to boot and has to scan through a multi-gigabyte or terabyte volume before mounting it.

Share and enjoy:
  • email
  • Digg
  • del.icio.us
  • Fark
  • StumbleUpon
  • Technorati
  • Facebook

Topics: Open source, Technology | Comments Off

Comments are closed.