[CC list pruned] On Wed, 2005-Mar-02 13:15:49 -0800, ALeine wrote: >If only hardware manufacturers were to equip hard drives with >a mechanism to ensure atomic writes. A capacitor large enough >to hold enough energy to flush the cache upon detecting the >power supply was cut would be sufficient.
I'm not sure thus is readily practical at the drive level. Based on some back-of-envelope calculations using figures in a Seagate Barracuda manual (which I happened to have handy): - Random seek is 9.5 msec. - Rotational period is 8.3msec - Power consumption at 50% R/W, 50% seek is 0.82A @ 12V + 0.68A @ 5V A single random seek + track write will take 17.8 msec. This translates to an electrical charge of 0.015C @ 12V and 0.012C @ 5V. Assuming the drive is designed to allow the supply rails to droop 20% whilst functioning correctly during this shutdown phase (which is a significantly bigger drop than the standard specifications), a single random seek + track write would require the drive to include a 6000µF capacitor on the 12V rail and a 12000µF capacitor on the 5V rail. As a first order approximation all Unix disk operations are writes (reads can be satisfied from the buffer cache). Given the size of current generation drive caches, it's more likely that there are around 50 writes cached - which requires capacitors 50 times as large - which would make them significantly larger than the drive itself. > They could even use >a battery the status of which could be monitored via S.M.A.R.T., >I don't see how implementing something like that could possibly >make the cost noticably higher. Batteries (and standard supercaps) are generally designed to release their energy over an extended period - several minutes is the lower realistic limit. It would make sense to build a battery backup system which maintained power for (say) 5 minutes. It's not realistic to build a battery backup system that can release all it's available energy in 1 second. If you're going to the effort of building a battery backup system, you might as well backup the entire computer. These are available off the shelf and have the added advantage of allowing users and the system to clean up before the power goes away. -- Peter Jeremy _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"