More on BYO Fusion drive

I wanted to know how Fusion Drive (FUD) does decide on what to put on the SSD and disabled atime. This way FUD could no longer use that for sending accessed data to the SSD. FUD works even with the mount option ‘noatime’ set.

I then wondered if it might be in fact be block oriented (which would make most senses as core storage would have not need to know the inner workings of HFS+).

Is Fusion drive block oriented ?

So I created another 30 GBytes on the FUD which then got stored on the HDD first. I then started reading just the first Megabyte of the 100MBytes large files in a loop:

TIN> while `true`
do
for d in {30..33}                                                                                                                                                                                                                                                                                                                                      
for i in $d/*; do echo $i;
dd if=$i of=/dev/zero bs=1m count=1
done
done

Which resulted in this:

    KB/t tps  MB/s     KB/t tps  MB/s  us sy id   1m   5m   15m
   65.10  51  3.24    98.04 143 13.67  82  5 13  7.47 8.27 8.31
   62.62  61  3.72    97.63 157 14.94  81  6 13  7.47 8.27 8.31
   59.12  41  2.36   102.34 161 16.07  83  5 12  7.47 8.27 8.31
   69.71  75  5.10    93.75 142 12.99  83  5 12  7.47 8.27 8.31

So FUD was reading in the first MB from the HDD but had activity on the SSD as well. I presume it to directly store it on the SSD as well as copying things from the SSD to the HDD.

I gave FUD some time as I could clearly see some IO going on after I stopped the readout. Unmounted and remounted the drive to clear it’s caches and read again:

          disk1           disk7       cpu     load average
    KB/t tps  MB/s     KB/t tps  MB/s  us sy id   1m   5m   15m
    0.00   0  0.00     0.00   0  0.00   1  1 98  1.42 3.22 5.70
   97.15 775 73.52     0.00   0  0.00   6  6 88  1.42 3.22 5.70
   91.00 1420 126.17     0.00   0  0.00   8 10 82  1.42 3.22 5.70
   88.98 1425 123.80     0.00   0  0.00   6 10 85  1.39 3.18 5.67
    0.00   0  0.00     0.00   0  0.00   9 13 78  1.39 3.18 5.67

Wow. So it read the first megabyte of 300 files just from the SSD. To verify I read the whole files again:

          disk1           disk7       cpu     load average
    KB/t tps  MB/s     KB/t tps  MB/s  us sy id   1m   5m   15m
   12.75 101  1.26   128.00 200 24.96  87  7  7  7.70 7.85 8.17
   12.80 100  1.25   128.00 187 23.43  87  7  6  7.70 7.85 8.17
   12.71 102  1.26   128.00 196 24.45  85  5 10  7.70 7.85 8.17
   12.80 100  1.25   128.00 200 24.98  85  8  7  7.88 7.88 8.18
   12.92 118  1.49   122.01 211 25.12  84  7 10  7.88 7.88 8.18
   13.22  92  1.19   128.00 196 24.48  86  5  9  7.88 7.88 8.18

So the first Megabyte was read from the SSD, the rest from the HDD. Which proves for me that FUD is working block oriented. Which is good.

So I wonder if it’s possible to use a CoreStorage FUD with ZFS ;-) As stated before, I would never trust Data onto HFS+, it’s just too risky.

  1. awasim reblogged this from jollyjinx
  2. jollyjinx posted this