Author Topic: Why aren't computers designed to handle power failure?  (Read 12743 times)

0 Members and 1 Guest are viewing this topic.

Offline RajTopic starter

  • Frequent Contributor
  • **
  • Posts: 701
  • Country: in
  • Self taught, experimenter, noob(ish)
Why aren't computers designed to handle power failure?
« on: June 12, 2020, 07:28:40 am »
It came as a surprise to me that even in America, where all the computers are designed one might have to face one or two unplanned short power outages every month.
To Stop computers from crashing, we use UPS...

Now the thing is, UPS converts 12v to 220v which is used to power computer, occasionally a monitor and maybe bunch of other peripherals when all that was needed to save the computer was a continuous power to the volatile memory and a little bit of power to the processor and other memory to give it enough time to send itself to sleep.
This would be most efficient if the battery were to directly interact with the motherboard.
Why don't we do this?
 

Offline daqq

  • Super Contributor
  • ***
  • Posts: 2321
  • Country: sk
    • My site
Re: Why aren't computers designed to handle power failure?
« Reply #1 on: June 12, 2020, 07:42:09 am »
Quote
Why don't we do this?
Most notably because of the extra expenses and overall pointlessness. UPS devices here are rare. I know of one person who has their work computer hooked up to an UPS (notebooks don't count since they do this by default). And no one wants to change batteries, the extra weight etc.

I wouldn't want an extra compartment in my desktop for an event that has happened once this year (power outage) and even that was because a colleague was very creative when it came to hooking up cables.

An extra connector would be an option but again, that's another expense that maybe 1% of the people would use.

edit: Servers are a different thing of course, but powering data centers is a very different story.
Believe it or not, pointy haired people do exist!
+++Divide By Cucumber Error. Please Reinstall Universe And Reboot +++
 

Offline oPossum

  • Super Contributor
  • ***
  • Posts: 1472
  • Country: us
  • Very dangerous - may attack at any time
Re: Why aren't computers designed to handle power failure?
« Reply #2 on: June 12, 2020, 07:55:43 am »
It is being done for servers.  For example... https://www.supermicro.com/products/nfo/files/BBP/f_BBP.pdf

 

Offline filssavi

  • Frequent Contributor
  • **
  • Posts: 433
Re: Why aren't computers designed to handle power failure?
« Reply #3 on: June 12, 2020, 08:08:44 am »
I assume the OP is only talking about desktop computer, as servers are a whole different world (there UPSes are basically ubiquitous, and things like storage arrays and disk/raid controllers even have their own battery backed RAM)
It just is a matter of complexity against usefulness...
Let's start off by saying that there are very, very few workloads where a power outage is actually an issue, mainly workstations running long simulations (days to weeks long). otherwise a power failure is nothing more than a nuisance. So from the start the benefits of designing something outage proof are minimal.
Now apart from when performing certain kinds of major updates,  the OSes are actually designed so that the disk always stays in a consistent state, so in case of a power outage the system is still bootable and stable, thus the downside is only the loss of what is in memory.

The addition of outage resiliency would also be extremely complex in the current market for economic/technical reasons:
- Backward compatibility: anything you do, if you want any hope of widespread adoption, it must be backward compatible with the ATX standard, mostly dating back to the 90's, so good luck.
- all PSUs now need to be intelligent enough to reliably detect a power loss and report it to the main processor, realistically the only way is coaxing intel into adding it to the ATX standard, because:
    A) it needs to be universal, not a different communication method for eack PSU OEM
    B) you actually need the OEMs to implement it in something other than their halo products, which is of questionable feasibility given the already razor thin margins in what ammounts to a commodity market
- Also software will probably need to be aware of emergency shutdown, as you only need to save the bare minimum to resume work (trying to save 16-32 GB to a bunch of spinning rust would realistically require way too much energy
- The solution will need to be batteryless (you can't expect a consumer to regularly replace batteries every couple of years, and beside good luck trying to find spare batteries for old motherboards
 

Offline RajTopic starter

  • Frequent Contributor
  • **
  • Posts: 701
  • Country: in
  • Self taught, experimenter, noob(ish)
Re: Why aren't computers designed to handle power failure?
« Reply #4 on: June 12, 2020, 08:24:46 am »
"people won't like to replace batteries"
Meanwhile, we third world guys have to deal with using desktops cause it's too hot for laptops to not thermal throttle. But the ups are so horrible, they just save your pc from dying twice, then the battery is useless (doesn't keep the PC alive it'll it's done shutting down) *attached photo of said battery*1002450-0

Specially since window 10 takes forever to shutdown the computer. (Night and day difference between it and Linux)
That should add a special emergency shutdown procedure.
And adding a optical isolated universal power failure detection port for computer to ups communication shouldn't be a big thing. Lots of motherboard have unused serial interface (rs232)

I've been thinking of attaching my PC into one of those sine wave house inverters which use 150aH (I've seen their batteries lasting more than 5 years)

Also I've herd that Intel is working on a motherboard system that takes on nothing but 12v, unlike ATX with its negative and positive voltages of every value that you can imagine being in a PC
Maybe that'll make it happen. So backwards compatibility should not be an issue in near future.

I wonder if the "economic reasons" is even a excuse, since most of the desktop computer users are in the third world. Cause Western normies often go for a laptop, even when they wanna game. And third world guys are happy to pay for a better one time solution than paying for reoccurring expense like changing battery every year.
« Last Edit: June 12, 2020, 08:32:07 am by Raj »
 

Offline bd139

  • Super Contributor
  • ***
  • Posts: 23099
  • Country: gb
Re: Why aren't computers designed to handle power failure?
« Reply #5 on: June 12, 2020, 08:29:36 am »
Err, they are designed to handle power failures. You're just looking at the wrong end of the problem.

https://en.wikipedia.org/wiki/Journaling_file_system

Also most SSDs that aren't a piece of crap have "hold up" capacitors which allow the device to do a final consistent write in power failure scenarios (this is why you never buy cheap SSDs!).

Even MS office does periodic auto-commits and flushing. You don't have to use the save button.
« Last Edit: June 12, 2020, 08:32:09 am by bd139 »
 

Offline Krotow

  • Regular Contributor
  • *
  • Posts: 74
  • Country: lv
Re: Why aren't computers designed to handle power failure?
« Reply #6 on: June 12, 2020, 08:33:52 am »
With improved and power outage (almost) safe file systems used almost everywhere it is not much an issue anymore. Who use FAT/FAT32 in their PC HDD/SDD-s anymore? Situations when power outage cause major file system corruption is quite rare now. Besides that any other solution will cause unnecessary complexity and compatibility issues. People above already described most of them.
 

Offline RajTopic starter

  • Frequent Contributor
  • **
  • Posts: 701
  • Country: in
  • Self taught, experimenter, noob(ish)
Re: Why aren't computers designed to handle power failure?
« Reply #7 on: June 12, 2020, 08:36:24 am »
Err, they are designed to handle power failures. You're just looking at the wrong end of the problem.

https://en.wikipedia.org/wiki/Journaling_file_system

Also most SSDs that aren't a piece of crap have "hold up" capacitors which allow the device to do a final consistent write in power failure scenarios (this is why you never buy cheap SSDs!).

Even MS office does periodic auto-commits and flushing. You don't have to use the save button.

Good thing, even crap modern hard drives are complex enough to not crash their heads into spinning disks and use the momentum of platter as an momentum battery to park their heads.

Super useful if you're working in the third world where you're unlikely to find SSDs
 

Offline bd139

  • Super Contributor
  • ***
  • Posts: 23099
  • Country: gb
Re: Why aren't computers designed to handle power failure?
« Reply #8 on: June 12, 2020, 08:46:30 am »
Indeed.

Bottom end SSDs are quite cheap now (120gb for $15 off market prices) which is e-waste price. I reckon they'll be turning up in large quantities in the third world now.
 

Offline RajTopic starter

  • Frequent Contributor
  • **
  • Posts: 701
  • Country: in
  • Self taught, experimenter, noob(ish)
Re: Why aren't computers designed to handle power failure?
« Reply #9 on: June 12, 2020, 09:19:04 am »
Funny enough, third world guys don't like to buy brands, they've never herd of. They'll rather buy an Intex that explodes the next day, than  paq xi jin pin that'll last as long as they're alive. Marketing really works in such nations. Specially if you use patriotism, even if you're just a company that rebrands Chinese stuff
 

Offline bd139

  • Super Contributor
  • ***
  • Posts: 23099
  • Country: gb
Re: Why aren't computers designed to handle power failure?
« Reply #10 on: June 12, 2020, 09:20:28 am »
Not much different here to be honest!
 
The following users thanked this post: SilverSolder

Offline filssavi

  • Frequent Contributor
  • **
  • Posts: 433
Re: Why aren't computers designed to handle power failure?
« Reply #11 on: June 12, 2020, 10:13:56 am »
"people won't like to replace batteries"
Meanwhile, we third world guys have to deal with using desktops cause it's too hot for laptops to not thermal throttle. But the ups are so horrible, they just save your pc from dying twice, then the battery is useless (doesn't keep the PC alive it'll it's done shutting down)

I’m sorry if I came out rude, it really was not my intention. I feel your pain, however the fact of the matter is that development in PC technology is driven by developed “first world” countries needs, and here the power grids are stable enough that the odd crash once or twice a year is not an issue.

Bolting the feature on after the fact is certainly doable, whether you can find a market large enough for it to be economically viable I’m not knowledgeable enough on markets where such a thing would be usefull
 

Offline bd139

  • Super Contributor
  • ***
  • Posts: 23099
  • Country: gb
Re: Why aren't computers designed to handle power failure?
« Reply #12 on: June 12, 2020, 10:33:33 am »
It happens in first world countries as well: http://news.bbc.co.uk/1/hi/england/london/8162511.stm

Guess who was cooking off a alcohol stove then :)
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13216
Re: Why aren't computers designed to handle power failure?
« Reply #13 on: June 12, 2020, 11:09:40 am »
ATX form factor combo PSU/UPSes are commercially available. Its a niche market but big enough to support a number of manufacturers.
e.g. http://embedded-computing.com/news/trumpower-24v-battery-charger-2/
No special motherboard support required except for a free internally accessible USB port.

 

Offline dmills

  • Super Contributor
  • ***
  • Posts: 2093
  • Country: gb
Re: Why aren't computers designed to handle power failure?
« Reply #14 on: June 12, 2020, 11:16:30 am »
Also most SSDs that aren't a piece of crap have "hold up" capacitors which allow the device to do a final consistent write in power failure scenarios (this is why you never buy cheap SSDs!).
We got shafted by that at work, industrial controller PC that gets hard power off fairly often, turns out the SSD was lying about when it had committed data which left the fs overlapping the journal writes and the data writes, occasional hilarity ensued.

Extensive testing of SSDs ensued, and the ONLY ones that really worked properly were the Intel ones (Which were not available in our required form factor), very annoying.
 

Offline bd139

  • Super Contributor
  • ***
  • Posts: 23099
  • Country: gb
Re: Why aren't computers designed to handle power failure?
« Reply #15 on: June 12, 2020, 11:25:52 am »
Samsung Pro 2.5" SATA units are fine as well. I found that the Samsung Pro M2 ones don't have hold up capacitors though as they are usually shoved in laptops. Figured to hell with it when I built my desktop and stuffed a Samsung Evo in it.  :-//

HPE and Intel ones do.
 

Offline daqq

  • Super Contributor
  • ***
  • Posts: 2321
  • Country: sk
    • My site
Re: Why aren't computers designed to handle power failure?
« Reply #16 on: June 12, 2020, 11:36:33 am »
Quote
I've been thinking of attaching my PC into one of those sine wave house inverters which use 150aH (I've seen their batteries lasting more than 5 years)
Looking at the modern computer PSU, shouldn't they be able to run off of higher voltage DC? The input is rectified anyway.
Believe it or not, pointy haired people do exist!
+++Divide By Cucumber Error. Please Reinstall Universe And Reboot +++
 

Offline pepelevamp

  • Regular Contributor
  • *
  • Posts: 101
  • Country: nz
Re: Why aren't computers designed to handle power failure?
« Reply #17 on: June 12, 2020, 12:39:01 pm »
** computer science guy joins the chat

the problem is that computers in principal should be able to turn off in the blink of an eye without any problem. yet we can't design general purpose computers without being drunk & smoking crack.

if you truly think about it - aside from say saving an open document - why would you really even need to do anything when you yank the power on a computer?

now i know you're all gonna bite at me saying oh gee pepe, filesystems need to be flushed to disk oh waa. to that i say - stop cheating to get more performance with ya wee DRAM memory caches.
anywhere that has a DRAM cache such as a disk must hold enough local power in a local supercap to flush it to disk.

the modern day CPU is full of lies & tricks to get more performance by cheating. writing to local caches etc. its all a big scam. pipe-lining, speculative execution, asynchronous volatile buffers - its all stuff that takes away your ability to deterministically run operations in sequence - all just so you can get more overall throughput. it makes it damn near impossible to yank out your power cable and plug it back in again & resume at point T: Your computer never has one point in time that its working at. Its scattered.

so I propose this:
either give every damn thing a supercap or stop lying to everybody & make honest computers.

it all falls apart anyway. look at speculative execution. the latest security screwup is so bad the only solution is to lock the entire memory bus & tank the system's performance by 97%.


 

Offline engrguy42

  • Frequent Contributor
  • **
  • Posts: 656
  • Country: us
Re: Why aren't computers designed to handle power failure?
« Reply #18 on: June 12, 2020, 12:40:45 pm »
I'm kinda scratching my head here. While I realize this is probably a fun tech topic for some with nothing better to do, for the average home desktop user the stuff they're working on are, well, less than critical. You need a UPS so you don't lose your place in your favorite video game? Or that youtube video you were watching of a cat playing piano? Let's be real here. 

Also, W10 has a (sometimes annoying) feature where if it's shut off suddenly it remembers what you were working on and re-starts it all, where you left off, the next time you boot your computer. Add to that the fact that, for many/most here in the US, loss of power is a fairly rare occurrence. I generally go many months without an interruption. Yeah, in storm/hurricane season you might more, but it depends on where you live. 

Though I'm sure we'll hear from those "yeah, but..."'s who lost their power yesterday....  :D

Businesses are a different thing entirely, and they employ serious solutions as needed. And for home users, I recall my brief journey with a UPS many years ago was pretty much a waste, since it only provides enough power so you can take a few minutes to finish everything and shut it down. A lot of money for something like that...

And of course the "yeah, but..."'s will have to mention how you can get a bigger one to last longer.
« Last Edit: June 12, 2020, 12:45:13 pm by engrguy42 »
- The best engineers know enough to realize they don't know nuthin'...
- Those who agree with you can do no wrong. Those who disagree can do no right.
- I'm always amazed at how many people "already knew that" after you explain it to them in detail...
 

Offline pepelevamp

  • Regular Contributor
  • *
  • Posts: 101
  • Country: nz
Re: Why aren't computers designed to handle power failure?
« Reply #19 on: June 12, 2020, 12:52:20 pm »
yeah but computers are general purpose & theres little reason to yield to making computers unsafe to do work on, especially in the avenue of 'ya not doing anything important'. thats an uphill battle to prove.

computers simply should not require any significant time to safely shut down. the blame for this goes directly to asynchronous instruction caches, multiple cores, pipelining, speculative execution and so-on.

windows & applications have never been able to safely restore up to where they were. same with the mac. they dont actually do that. its just an attempt to do something similar enough in appearance to make you think you're resuming. ya not.

OP is right more than he even realizes:
computers are not designed to safely handle power failure. UPS externally or even an internal power buffer is still not making a computer designed to handle power failure - you're just eliminating or delaying the power failure.
 

Online NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9318
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Why aren't computers designed to handle power failure?
« Reply #20 on: June 12, 2020, 12:56:28 pm »
- Backward compatibility: anything you do, if you want any hope of widespread adoption, it must be backward compatible with the ATX standard, mostly dating back to the 90's, so good luck.
- all PSUs now need to be intelligent enough to reliably detect a power loss and report it to the main processor, realistically the only way is coaxing intel into adding it to the ATX standard, because:
    A) it needs to be universal, not a different communication method for eack PSU OEM
    B) you actually need the OEMs to implement it in something other than their halo products, which is of questionable feasibility given the already razor thin margins in what ammounts to a commodity market
- Also software will probably need to be aware of emergency shutdown, as you only need to save the bare minimum to resume work (trying to save 16-32 GB to a bunch of spinning rust would realistically require way too much energy
- The solution will need to be batteryless (you can't expect a consumer to regularly replace batteries every couple of years, and beside good luck trying to find spare batteries for old motherboards
Just make it an ATX PSU with a standardized connection for a battery and USB for monitoring. In fact, with many modern ATX PSUs internally generating 5V and 3.3V from 12V using DC/DC converters and a 3S pack being just perfect for supplying 12V directly, it might not take much hacking to convert a PSU to do that.

What I would like to see is an additional signal that instantly drops the CPU speed to minimum to allow using a smaller battery, I have DIYed one fairly easily by adding a circuit to a motherboard that pulls down the PROCHOT line.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline Monkeh

  • Super Contributor
  • ***
  • Posts: 8134
  • Country: gb
Re: Why aren't computers designed to handle power failure?
« Reply #21 on: June 12, 2020, 01:10:54 pm »
in America, where all the computers are designed

America must speak a lot of Chinese today.
 
The following users thanked this post: SilverSolder, duckduck

Offline madires

  • Super Contributor
  • ***
  • Posts: 8274
  • Country: de
  • A qualified hobbyist ;)
Re: Why aren't computers designed to handle power failure?
« Reply #22 on: June 12, 2020, 01:16:08 pm »
Some statistics about power outages: https://www.indexmundi.com/facts/indicators/IC.ELC.OUTG/rankings

In my case about 5 short outages happen a year, mostly in the summer during thunderstorms. The outages last for a few seconds up to a few minutes (<10). Longer outages are quite rare (maybe one in 5 years). There are also a few undervoltage events.
 

Offline bd139

  • Super Contributor
  • ***
  • Posts: 23099
  • Country: gb
Re: Why aren't computers designed to handle power failure?
« Reply #23 on: June 12, 2020, 01:25:22 pm »
** computer science guy joins the chat

the problem is that computers in principal should be able to turn off in the blink of an eye without any problem. yet we can't design general purpose computers without being drunk & smoking crack.

if you truly think about it - aside from say saving an open document - why would you really even need to do anything when you yank the power on a computer?

now i know you're all gonna bite at me saying oh gee pepe, filesystems need to be flushed to disk oh waa. to that i say - stop cheating to get more performance with ya wee DRAM memory caches.
anywhere that has a DRAM cache such as a disk must hold enough local power in a local supercap to flush it to disk.

the modern day CPU is full of lies & tricks to get more performance by cheating. writing to local caches etc. its all a big scam. pipe-lining, speculative execution, asynchronous volatile buffers - its all stuff that takes away your ability to deterministically run operations in sequence - all just so you can get more overall throughput. it makes it damn near impossible to yank out your power cable and plug it back in again & resume at point T: Your computer never has one point in time that its working at. Its scattered.

so I propose this:
either give every damn thing a supercap or stop lying to everybody & make honest computers.

it all falls apart anyway. look at speculative execution. the latest security screwup is so bad the only solution is to lock the entire memory bus & tank the system's performance by 97%.

Also comp sci guy. None of that really matters. All you need is a write barrier and transactional consistency. And we actually mostly have that.

In a lot of cases we have much much much better than that with journaling and nice new formats (Redis AOF I fucking love) which allow full ordered consistency.
 

Online Bud

  • Super Contributor
  • ***
  • Posts: 7276
  • Country: ca
Re: Why aren't computers designed to handle power failure?
« Reply #24 on: June 12, 2020, 01:32:34 pm »
What is the point of connecting a battery directly to the desktop computer if it is often required to also keep the display powered and may be some other peripherals. A mains voltage UPS already does that.
Facebook-free life and Rigol-free shack.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf