Management Granularity

Much of Apple’s marketing on Fusion Drive talks about moving data at the file and application level, but in reality data can be moved between the SSD and HDD portions in 128KB blocks.

Ars actually confirmed this a while ago, but I wanted to see for myself. Using fs_usage I got to see the inner workings of Apple's Fusion Drive. Data is moved between drives in 128KB blocks, likely determined by frequency of use of those blocks. Since client workloads tend to be fairly sequential (or pseudo-random at worst) in nature, it's a safe bet that if you're accessing a single LBA within a 128KB block that you're actually going to be accessing more LBAs in the same space. The migration process seems to happen mostly during idle periods, although I have seen some movement between drives during light IO.

What’s very interesting is just how quickly the migration is triggered after a transfer occurs. As soon as file copy/creation, application launch or other IO activity completes, there’s immediate back and forth between the SSD and HDD. As you fill up the Fusion Drive, the amount of data moved between the SSD and HDD shrinks considerably. Over time I suspect this is what should happen. Infrequently accessed data should settle on the hard drive and what really matters will stay on the SSD. Apple being less aggressive about evicting data from the SSD as the Fusion Drive fills up makes sense.

The migration process itself is pretty simple with data being marked for promotion/demotion, it being physically copied to the new storage device and only then is it moved. In the event of a power failure during migration there shouldn't be any data loss caused by the Fusion Drive, it looks like only after two copies of the 128KB block are in place is the source block removed. Apple told me as much last year, but it's good to see it for myself.

By moving data in 128KB blocks between the HDD and SSD, Apple enjoys the side benefit of partially defragmenting the SSD with all writes to it. Even though the Fusion Drive will prefer the SSD for all incoming writes (which can include smaller than 128KB, potentially random/pseudo-random writes), any migration from the HDD to the SSD happens as large block sequential writes, which will trigger a garbage collection/block recycling routine in cases of a heavily fragmented drive. Performance of the SSD can definitely degrade over time, but this helps keep it higher than it would otherwise given that the SSD is almost always running at full capacity and the recipient of all sorts of unrelated writes. As I mentioned earlier, I would’ve preferred a controller with more consistent IO latency or for Apple to set aside even more of the PM830’s NAND as spare area. I suspect cost was the deciding factor in sticking with the standard amount of overprovisioning.

Fusion Drive: Under the Hood The Application Experience
Comments Locked

127 Comments

View All Comments

  • Mortenling - Wednesday, May 15, 2013 - link

    When (not if) the fusion drive breaks down it is almost impossible to replace it in the new iMac's. But will the SSD part of the fusion drive still work if its only the normal HD part there is broken ?
    I'm not sure if i should go for the fusion drive or the 256 SSD in a new iMac. I need to fill it up with music applications and i'm not sure if there is space enough in the 256 SSD but I'm sure it will last longer. I don't think you can create a fusion drive with an external HD but is it possible to create some sort of RAID with an external SSD to give me a total 512 SSD HD. At the moment I cant afford the internal 512 SSD but that I think would be the best solution. I need some advice so please help me out here :-)
  • thecartman - Thursday, May 16, 2013 - link

    Do you think it is worth upgrading the harddrive to a fusion drive when i use an iMac 27" for homework, browsing and image editing with editing?
  • austoonz - Tuesday, May 28, 2013 - link

    I've been running a Crucial M4 240GB SSD in my 2007 Macbook Pro for years loving the SSD speed. Then in 2011 I purchased a top-of-the-line 27" iMac with only the 1TB HDD with plans to purchase a ThunderBolt SSD to boot from. However, ThunderBolt SSD's still haven't hit a remotely reasonable pricepoint, so I've been running a 120GB SSD in a FW800 case for a year or so now, and even that was SO MUCH FASTER than using the internal HDD, it seems even adding on FW latency it was still massively faster for everyday use, but I got annoying with using symlinks and folders just being a little strange in Finder...

    So I finally got round to changing things... the 128GB boot SSD on the iMac has been moved into the MBP, and the 240GB SSD (from 2008...) was installed inside the iMac and I setup a Fusion Drive with that and the 1TB.

    I'm definitely impressed... storage tiering for the consumer that actually works, and works very, very well. This is exactly what I'm after out of a consumer product, excellent performance for 90%+ of my usage, but still with the capacity for my music and iPhoto libraries, most of which are never seen or accessed.

    Thanks Anand for doing this review though - I really like reading reviews like this showing real-life usage rather than simply benchmarks.
  • 9comp - Thursday, May 30, 2013 - link

    Hey I didn't understand the write method.

    When you write 6GB to the array, the first 4gb store on the ssd drive and the left 2gb to sata

    or

    little files 1mg-3.99gb are automatically store to the ssd and bigger files like HD movies (over than 4gb) are automatically store on the sata?!

    Please explain...
    Thanks
    Hagy
  • ajcarr - Tuesday, September 17, 2013 - link

    I took my mid-2010 15" Core i7 MacBook Pro and replaced the optical drive with a 750 GB WD Scorpio Black (using an OWC DataDoubler), and the existing HDD with a 256 GB OCZ Vertex Plus R2 (no meed for anything faster: the machine only has SATA 2), and issued the command line incantations needed to create a fusion drive. The performance gain was incredible: in particular, Microsloth Word launched at about the same speed as on my mid-2012 13" MacBook Air. Repeated the operation with a friend's Core i5 MacBook Pro of the same vintage, but with a Seagate HDD this time, still using the OCZ (it was cheap, and 'good enough'), and again there was a huge performance boost. Basically, in both cases, the CPU is more than adequate for anything routine, three years after manufacture, but the fusion drive upgrades have given us perhaps *another* three years of life for our machines. I fully expect to receive flak for using OCZ drives, but after a year, neither of us has seen problems (possibly because I used slow, commodity OCZ devices that were mature).
  • p4madeus - Thursday, September 25, 2014 - link

    I rolled my own Fusion drive in my 2012 2.3ghz quad i7 Mini as well, it only had a 1tb 5400rpm HDD stock in it. I had recently just outright replaced the stock 750gb 7200rpm HD in my 2012 MacBook Pro with a 1tb Samsung EVO (I'll keep the optical drive, for now) so I had this better 7200rpm drive laying around. So I got the kit for the Mini and replaced the stock 1tb 5400rpm drive with the 750gb 7200rpm drive from my MBP and added a 480gb Crucial M550, end result is a 1.22TB fusion drive with a good 16/25 SSD/HDD ratio...it screams...not quite as much as the straight 1tb SSD in my MBP, but is night and day compared to the stock 5400rpm 1tb HDD.

Log in

Don't have an account? Sign up now