Wednesday 3 January 2018

How full is too full for mechanical hard drives?



I have heard many claim that it doesn't matter how full a drive is until it starts cutting into temp and virtual memory space.


This doesn't make sense to me, given the nature of how the data is transacted on a hard drive. The inside of the platter presents less data per revolution than the outside of the drive does, by significant factors. The inside 40% of the radius of full size hard drive is used for the spindle, so only the outside 60% is used for data storage, but that still means that the inside track of a hard drive presents data 60% slower than the outside track.


By my calculation, a Hard drive that is only 10% full should perform about 2.25 times faster than a hard drive that is 90% full, assuming that the flow is constrained by other factors.


Am I wildly off base here? For all the drives I know, even the top speeds of the first 1% of the drive would be well within the bandwidth provided by a SATA 2 connection.



Answer



You also cannot equate a linear size increase with a linear speed increase, since the circumference of the disk increases quadratically. With respect to cache saturation and real-world testing, most users find a 35% variation in transfer speed from the outer to the inner surface of the disk platter (e.g. 100 MB/s to 65 MB/s). See the bottom of this answer for sample calculations.


While generally drives do write from the outside of the platter to the inner portion, data fragmentation often skews data across the platter. With a multi-platter drive, this situation becomes increasingly complex, as data may be distributed across more then one platter.


I have heard the "don't fill your hard drive" quote in the past, but unless you are dealing with a system disk (e.g. operating system or swap/page file), you can ignore this issue. Do note that you may have troubles defragmenting a disk without enough free space.


It is worth noting that you should not fill a solid-state drive to it's maximum capacity.




To prove my speed formula, let us assume that 40% of the platter's area is taken up by the spindle, and let us also assume that the platter is 3.5" in diameter, so we have an inner radius of 1.75". That means that the inner radius of the platter is given as 1.75 times the square root of 0.4, or about 1.11" (remember, area = pi * radius ^ 2, so work backwards).


Then, we compute the inner and outer circumferences as just C = 2 * pi * radius, yielding an outer circumference of ~11" and an inner circumference of 6.95". Since the circumference dictates the linear velocity, we see that the inner circumference will have a linear velocity of only 63.2% of the outer circumference - or in other words, 36.8% slower.


If you work out the math, you can prove that the speed decrease from the outer edge to inner edge of the platter is given by 1 minus the square root of the spindle size proportion (e.g. 1 minus the square root of 0.4 in our case, which yields 1 - 0.632 = 0.368).


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...