3 ms·
Stupid question: why don't all computers (irrespective of the OS) have a built in power loss mechanism? It seems to be such a common and obvious problem. 1. Th
by cm2187 11y ago
Stupid question: why don't all computers (irrespective of the OS) have a built in power loss mechanism? It seems to be such a common and obvious problem.
1. The PSU would have a big enough capacitor to keep the computer running for a few seconds at its stated output power
2. The PSU would notify the OS of a power loss
3. The OS would immediately flush all caches and adopt a "brace position".
4. Events are spread system wide so that apps can also flush and brace.
It should work even if it is the PSU that fails (as long as the capacitor is there).
Surely the problem cannot be the cost. Why don't modern desktops have that feature?
- illotum 11y agoI would guess because no promise is much better than a broken promise. No one wants to take blame.
- cm2187 11y agoWe have to accept that it wouldn't save the day in all scenarios. If there is a 60MB excel file to save on a slow network drive, the file will be lost. But this mechanism would still reduce file/disk/database corruptions by an order of magnitude.
- rasz_pl 11y ago1 is not possible on anything with more than one >100MHz chip
- cm2187 11y agoYou mean there is no capacitor powerful enough?
- rasz_pl 11y agoIts one thing to add $0.5 supercap and a diode to SSD (and still the likes of OCZ didnt bother for cost reasons). Its entirely another to slap bank of boost/buck converters, 100F cap and spider web of control circuity all over the place. Adding $20-50 in bom the size of two D batteries just in case something _very rare_ happens is not economically viable. There are better alternatives, like banks of batteries ala google boxes. Turning server into oversized laptop gives you more than couple of seconds buffer.
- drewm1980 11y agoYou have just described a UPS. Or a laptop. A battery just makes more sense than a capacitor in this application.
- cm2187 11y agoThe idea is rather to have it built in. A retail consumer shouldn't have to worry about these things. And the idea would not be to sustain a long power interruption like a UPS, just to give time to flush caches and avoid corruption. Which should be much cheaper than a UPS.
- brigade 11y agoWhy? Wouldn't a large enough capacitor last longer than batteries? UPS batteries I've seen are only rated for 3 years, and half of my recent laptop batteries have physically swelled after 3 years of use.
- sdk77 11y agoIt would, but the size would be impractical and it's too costly. Quick estimate, let's assume we need 10W for 10 seconds, that's 100 Joule of energy. The energy stored in a capacitor is 0.5CV^2. Say we use a 10V capacitor then C = 2 Farad. They exist, but they are very large (look them up on amazon for instance). You'll probably need more like twice the capacity though because it's impossible to extract all energy from the capacitor, and it's lossy to convert it to a constant +5V / +12V.
- tzs 11y agoInstead of 10 V and 2 F, how about going for 2.5 V and 50 F? A capacitor with those specs is only 40 mm long and 18 mm diameter [1]. That shouldn't be too hard to fit in a typical server or desktop. That's under $4 in quantity. [1] http://www.mouser.com/ds/2/257/Maxwell_HCSeries_DS_1013793-9-341195.pdf http://www.mouser.com/ds/2/257/Maxwell_HCSeries_DS_1013793-9...
- sdk77 11y ago
- avar 11y agoYou'll find this old mailing list post a good answer to your question: http://zork.net/~nick/mail/why-reiserfs-is-teh-sukc http://zork.net/~nick/mail/why-reiserfs-is-teh-sukc The answer is cost. We used to have the computers you're describing. They were made by SGI and the hardware & OS made all sorts of guarantees like the ones you're describing, to the point where XFS was ported to Linux x86 initially it had all sorts of bugs that simply couldn't happen on SGI machines. The x86 boxes were cheaper, nobody really cared enough about hardware reliability enough to pay the price for the likes of SGI, and the rest is history. Today we have a "worse is better" hardware architecture and software has to be able to handle it.
- cm2187 11y agoVery interesting link. Thanks