Poor man's UPS
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
This is an idea a had some time ago. It might be a waste of time or it might be a good idea, you decide.
A short description would be "continuous system hibernation". Say you are running Firefox, writing an e-mail in mutt and compiling the next X.org release. The power goes off, your computer crashes or something happens and you lose everything you were doing (yes, sadly you haved saved your e-mail as a draft yet).
The "continuous hibernation" is some kind of memory snapshots taken, say, every 5 minutes. The next time your system starts after a crash, it'd say "oh oh, looks like something went wrong" and offer you a list of the last N (for instance, 4) snapshots and you can recover your system to the very same state it was before power went off or your dog unplugged your CPU. It might even ask you which individual applications you want to start from that snapshot:
maybe you don't want to start Quake 3.
Provided the implementation is fast enough and you have a large hard drive, it might even allow you to say: "I want to restore the system to the same stage it had on Monday, 11.04PM"
That's it. Please, shoot at the idea not at the idealist :-)
- --
Pau Garcia i Quiles
http://www.elpauer.org
(Due to the amount of work, I usually need 10 days to answer) -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFEcMAj/DzYv9iGJzsRAnO9AKDwoybV6sdmPHmxe6poTTReW3ldOgCgr7jb Qt47QlO6BVG14+o7rODhoNI=
=zoTu
-----END PGP SIGNATURE-----
Quoted 14 lines · Pau Garcia i Quiles
A short description would be "continuous system hibernation". Say you are running Firefox, writing an e-mail in mutt and compiling the next X.org release. The power goes off, your computer crashes or something happens and you lose everything you were doing (yes, sadly you haved saved your e-mail as a draft yet).
The "continuous hibernation" is some kind of memory snapshots taken, say, every 5 minutes. The next time your system starts after a crash, it'd say "oh oh, looks like something went wrong" and offer you a list of the last N (for instance, 4) snapshots and you can recover your system to the very same state it was before power went off or your dog unplugged your CPU. It might even ask you which individual applications you want to start from that snapshot:
maybe you don't want to start Quake 3.
Quoted 5 lines
Provided the implementation is fast enough and you have a large hard drive, it might even allow you to say: "I want to restore the system to the same stage it had on Monday, 11.04PM"
That's it. Please, shoot at the idea not at the idealist :-)
One problem is that the on-disk state may not match the state of the running programs on resume, which could lead to all sorts of bad things happening.
Dave
Signature · 1 line
http://www.codemonkey.org.uk
Quoted 2 lines
Quoted 2 lines
The "continuous hibernation" is some kind of memory snapshots taken, say, every 5 minutes. The next time your system starts after a crash, it'd say "oh
You really want a system, which freezes for 10-20 seconds every 5 minutes, and thaws again when the image is written?
Quoted 7 lines · Michael Buesch
Quoted 3 lines
Quoted 2 lines
The "continuous hibernation" is some kind of memory snapshots taken, say, every 5 minutes. The next time your system starts after a crash, it'd say "oh
You really want a system, which freezes for 10-20 seconds every 5 minutes, and thaws again when the image is written?
The snapshot could be taken in the background, by marking all pages read-only, starting a thread to write them to disk, and continuing normal processing.
Such systems have been implemented in the past, see for example http://www.eros-os.org/.
Signature · 1 line
error compiling committee.c: too many arguments to function
Quoted 9 lines
Quoted 2 lines
You really want a system, which freezes for 10-20 seconds every 5 minutes, and thaws again when the image is written?
The snapshot could be taken in the background, by marking all pages read-only, starting a thread to write them to disk, and continuing normal processing.
Such systems have been implemented in the past, see for example
http://www.eros-os.org/.
Another one is VMware's background snapshot feature. Granted, it writes "quite much" (IMO) to disk, but it's better than a foreground snapshot. :)
Jan Engelhardt
Hi there,
Quoted 1 line · Pau Garcia i Quiles
[interesting idea with complex implementational problems]
I think it would be cheaper ("costs" for your solutin in terms of required I/O power and hard disk space) to use two or more lead batteries which are charged and discharged in a round-robin fashion, controlled by some smart home-brew circuitry, and connect the beast to some control/monitoring software via RS-232 ; )
The logic should at least completely drain the battery before recharging, and maybe even do a quick-and-hot charge-discharge-charge cycle every now and then to reduce chemical byproducts at the cathode - or was it the anode? Well, one of them is dissolved over time, and the other one collects some sulfate or sulfide or something. If you want it really complicated and robust, you might want to monitor the electric parameters of the batteries at all times, to estimate the minimum remaining time once the power is cut. You'd then have to shut down, or better hibernate, the system cleanly within that time frame to be safe from data loss.
I'd love to do something like that sort of in-between the PSU for a single machine, for this would avoid the need to go from AC to DC and back, but lacking the electrotechnical skills I'm not self-confident enough to try and waste my PSU. Anyway, this has gone way off-topic by now.
Kind regards,
Chris
Quoted 9 lines · Christian Trefzer
I think it would be cheaper ("costs" for your solutin in terms of required I/O power and hard disk space) to use two or more lead batteries which are charged and discharged in a round-robin fashion, controlled by some smart home-brew circuitry, and connect the beast to some control/monitoring software via RS-232 ; )
The logic should at least completely drain the battery before recharging,
I thought deep discharge cycles were unhealthy for lead batteries?
Quoted 8 lines · Jan Knutar
Quoted 7 lines · Christian Trefzer
I think it would be cheaper ("costs" for your solutin in terms of required I/O power and hard disk space) to use two or more lead batteries which are charged and discharged in a round-robin fashion, controlled by some smart home-brew circuitry, and connect the beast to some control/monitoring software via RS-232 ; )
Quoted 4 lines
Quoted 2 lines
The logic should at least completely drain the battery before recharging,
I thought deep discharge cycles were unhealthy for lead batteries?
Yes. It's some of the more modern chemistries that need deep discharges because they tend to "remember". Lead acid batteries, both wet cells and gel cells should be taken down to about 66 percent capacity and that's 66 percent capacity, not some arbitrary voltage. For instance, a 24 ampere-hour battery, fully charged at 25 degC, has a terminal voltage of 13.2 volts after the load is applied. Presumably it contains 13.2 * 24 * 3600 = 1,140,480 joules (watt-seconds) of energy. You get to use 66 percent of this, i.e., 752,717 joules before it needs charging. You can't detect the charge state by looking at the terminal voltage! You need to actually measure the voltage and current during charge and discharge to maintain battery health. Otherwise, you just throw them away every year or so. The telephone company has lead-acid batteries that have been running for 50 years and they will be good "forever" because they carefully (automatically) maintain them.
NICAD batteries used in aircraft will wear out in a short time no matter what you do with them. They are used only because they have a high power density (are lighter than lead acid). They will "remember" shallow discharge cycles and fail unless they are subjected to deep discharge cycles. If they are discharged too deeply, they will fail to charge. Portable power drills and such use this chemistry and it sucks. If you leave your battery pack on the charger, the battery will fail. If you charge it once a week it will fail as well. Only people who use these tools daily will find that they work when they need them! Same thing for airplanes. If your Lear spends too much time sitting in the hanger, the batteries fail. Doesn't everybody have a Lear?
Cheers,
Dick Johnson
Penguin : Linux version 2.6.16.4 on an i686 machine (5592.89 BogoMips). New book: http://www.AbominableFirebug.com/
_
****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to [email protected] - and destroy all copies of this information, including any attachments, without reading or disclosing them.
Thank you.
Quoted 5 lines · linux-os (Dick Johnson)
Quoted 1 line · Jan Knutar
I thought deep discharge cycles were unhealthy for lead batteries?
Yes. It's some of the more modern chemistries that need deep discharges because they tend to "remember".
And if you truly deep discharge them, they drop dead and won't remember they've been charged. Topping off won't do any good either. So there's some security margin your daily e.g. LiIon appliance in your cellphone will force upon you, in order to keep the battery alive. You can turn the thing on over and over, but it will shut down on you after seconds. It just won't suck the thing dry. And the charging process will be stopped slightly before the battery is entirely full, to avoid overcharge.
Quoted 5 lines
Lead acid batteries, both wet cells and gel cells should be taken down to about 66 percent capacity and that's 66 percent capacity, not some arbitrary voltage. For instance, a 24 ampere-hour battery, fully charged at 25 degC, has a terminal voltage of 13.2 volts after the load is applied. Presumably it contains 13.2 * 24 * 3600 = 1,140,480
Quoted 8 lines
joules (watt-seconds) of energy. You get to use 66 percent of this, i.e., 752,717 joules before it needs charging. You can't detect the charge state by looking at the terminal voltage! You need to actually measure the voltage and current during charge and discharge to maintain battery health. Otherwise, you just throw them away every year or so. The telephone company has lead-acid batteries that have been running for 50 years and they will be good "forever" because they carefully (automatically) maintain them.
Except for the slow and irreversible chemical transformations at the poles, I guess. Acid is corrosive, after all. So with careful handling, those things last a long time, but not forever, unfortunately. But the approximation is good enough, anyway.
So it appears to me that those lead acid beasts make up a rather constant source of DC - with other solutions the state can be measured by means of voltage alone. But the circuitry might be a bit more complicated for this exact reason. Do you by any chance know where I might look for schematics of such circuitry? Any hint greatly appreciated : )
Kind regards,
Chris
Quoted 42 lines · Christian Trefzer
Quoted 5 lines · linux-os (Dick Johnson)
Quoted 1 line · Jan Knutar
I thought deep discharge cycles were unhealthy for lead batteries?
Yes. It's some of the more modern chemistries that need deep discharges because they tend to "remember".
And if you truly deep discharge them, they drop dead and won't remember they've been charged. Topping off won't do any good either. So there's some security margin your daily e.g. LiIon appliance in your cellphone will force upon you, in order to keep the battery alive. You can turn the thing on over and over, but it will shut down on you after seconds. It just won't suck the thing dry. And the charging process will be stopped slightly before the battery is entirely full, to avoid overcharge.
Quoted 5 lines
Lead acid batteries, both wet cells and gel cells should be taken down to about 66 percent capacity and that's 66 percent capacity, not some arbitrary voltage. For instance, a 24 ampere-hour battery, fully charged at 25 degC, has a terminal voltage of 13.2 volts after the load is applied. Presumably it contains 13.2 * 24 * 3600 = 1,140,480
Quoted 8 lines
joules (watt-seconds) of energy. You get to use 66 percent of this, i.e., 752,717 joules before it needs charging. You can't detect the charge state by looking at the terminal voltage! You need to actually measure the voltage and current during charge and discharge to maintain battery health. Otherwise, you just throw them away every year or so. The telephone company has lead-acid batteries that have been running for 50 years and they will be good "forever" because they carefully (automatically) maintain them.
Except for the slow and irreversible chemical transformations at the poles, I guess. Acid is corrosive, after all. So with careful handling, those things last a long time, but not forever, unfortunately. But the approximation is good enough, anyway.
So it appears to me that those lead acid beasts make up a rather constant source of DC - with other solutions the state can be measured by means of voltage alone. But the circuitry might be a bit more complicated for this exact reason. Do you by any chance know where I might look for schematics of such circuitry? Any hint greatly appreciated : )
Quoted 3 lines
Kind regards,
Chris
Telco used watt-meters and clocks to directly monitor the batteries. In the event that the batteries had been floating for a month (not used and trickle-charging), the timer would send them an equalizing charge of about 10 amperes for 10 minutes. That would blast away any surface corruption and bring the individual cells up to an equal terminal voltage.
Modern chargers just don't bother unless the batteries are used for medical equipment. In our portable CAT Scanners, we monitor current, voltage, and time using a uP. This guarantees that once you start a scan, the scan will complete (as required by regulatory agencies).
We also charge at a constant current until getting to the correct terminal voltage. In other words, the charger is current-limited until the voltage is correct, then it becomes voltage regulated. The regulated voltage depends upon temperature and you can get the numbers off from battery vendor's specifications. We don't set an "equalizing charge" as telco did. We found with our specific batteries it wasn't necessary.
Cheers,
Dick Johnson
Penguin : Linux version 2.6.16.4 on an i686 machine (5592.89 BogoMips). New book: http://www.AbominableFirebug.com/
_
****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to [email protected] - and destroy all copies of this information, including any attachments, without reading or disclosing them.
Thank you.
Quoted 6 lines · linux-os (Dick Johnson)
Telco used watt-meters and clocks to directly monitor the batteries. In the event that the batteries had been floating for a month (not used and trickle-charging), the timer would send them an equalizing charge of about 10 amperes for 10 minutes. That would blast away any surface corruption and bring the individual cells up to an equal terminal voltage.
Nice : )
Quoted 8 lines
Modern chargers just don't bother unless the batteries are used for medical equipment. In our portable CAT Scanners, we monitor current, voltage, and time using a uP. This guarantees that once you start a scan, the scan will complete (as required by regulatory agencies).
We also charge at a constant current until getting to the correct terminal voltage. In other words, the charger is current-limited until the voltage is correct, then it becomes voltage regulated.
Constant-current / constant-voltage - just like Li-Ion batteries are supposed to be charged. Talk about complexity ; )
IMHO battery "care" even in modern laptops sucks, so I'd rather have two battery packs, one in use and the other one being charged. External chargers don't seem to exist, AFAICS, so I'd very much like to build one. Welcome to utopia...
Quoted 4 lines
The regulated voltage depends upon temperature and you can get the numbers off from battery vendor's specifications. We don't set an "equalizing charge" as telco did. We found with our specific batteries it wasn't necessary.
Yup, the chemical processes inside the cells depend on temperature - do your chargers monitor that as well?
Thanks a bunch,
Chris
Quoted 6 lines · Jan Knutar
Quoted 2 lines · Christian Trefzer
The logic should at least completely drain the battery before recharging,
I thought deep discharge cycles were unhealthy for lead batteries?
Guess the chosen terminology was a bit unlucky, with "completely" I meant in fact "completely, within the constraints implied by the technology used" ; ) So no deep discharge, but "as far as it gets without killing the battery".
Kind regards,
Chris
Quoted 4 lines
Guess the chosen terminology was a bit unlucky, with "completely" I meant in fact "completely, within the constraints implied by the technology used" ; ) So no deep discharge, but "as far as it gets without killing the battery".
Lead acid batteries should be kept well charged to avoid sulphation and always full charged when recharging, preferably using a charger that will do proper three step charging. "Cycling" a lead acid battery is a great way to destroy it.
Alan
Quoted 6 lines · Alan Cox
Lead acid batteries should be kept well charged to avoid sulphation and always full charged when recharging, preferably using a charger that will do proper three step charging. "Cycling" a lead acid battery is a great way to destroy it.
So it is better to use only one battery (or an array thereof) which is sort of charged and discharged at the same time, or is this idea just as screwed..? I don't have a degree in electronics, mind you : )
Might be easier to build something that keeps a battery well maintained and switches in case of power outage. With large enough condensors to bridge the gap, which would also iron out any peaks and stuff, this should work pretty well.
Kind regards,
Chris
Quoted 9 lines · Christian Trefzer
Quoted 5 lines · Alan Cox
Lead acid batteries should be kept well charged to avoid sulphation and always full charged when recharging, preferably using a charger that will do proper three step charging. "Cycling" a lead acid battery is a great way to destroy it.
Quoted 8 lines
So it is better to use only one battery (or an array thereof) which is sort of charged and discharged at the same time, or is this idea just as screwed..? I don't have a degree in electronics, mind you : )
Might be easier to build something that keeps a battery well maintained and switches in case of power outage. With large enough condensors to bridge the gap, which would also iron out any peaks and stuff, this should work pretty well.
You just described the working-principle of a "line-interarctive" UPS.
AFAICT this is the most used UPS-type, at least for every "small" UPSes i've seen in the last few years.
Bis denn
Signature · 4 lines
Real Programmers consider "what you see is what you get" to be just as bad a concept in Text Editors as it is in women. No, the Real Programmer wants a "you asked for it, you got it" text editor -- complicated, cryptic, powerful, unforgiving, dangerous.
Quoted 3 lines · Matthias Schniedermeyer
You just described the working-principle of a "line-interarctive" UPS. AFAICT this is the most used UPS-type, at least for every "small" UPSes i've seen in the last few years.
Exactly, and since I cannot afford to buy one I'd have to build it myself using mainly car batteries. The most complex part would be to charge the batteries in a way that won't kill them over time. Building such stuff into the PSU after the secondary coil and AC/DC converter would save the double-conversion loss, therefore making this ideal for a single machine. But I'm still brainstorming, lacking both money and time.
Kind regards,
Chris
Quoted 9 lines · Christian Trefzer
Exactly, and since I cannot afford to buy one I'd have to build it myself using mainly car batteries. The most complex part would be to charge the batteries in a way that won't kill them over time. Building such stuff into the PSU after the secondary coil and AC/DC converter would save the double-conversion loss, therefore making this ideal for a single machine. But I'm still brainstorming, lacking both money and time.
Led/acid batteries are dangerous. Don't use them unless you know exactly what you are doing.
Signature · 1 line
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
Quoted 9 lines
Quoted 7 lines
Exactly, and since I cannot afford to buy one I'd have to build it myself using mainly car batteries. The most complex part would be to charge the batteries in a way that won't kill them over time. Building such stuff into the PSU after the secondary coil and AC/DC converter would save the double-conversion loss, therefore making this ideal for a single machine. But I'm still brainstorming, lacking both money and time.
Led/acid batteries are dangerous. Don't use them unless you know exactly what you are doing.
Buy an intelligent charger for an RV. They're designed to do pretty much exactly that (deep cycle marine batteries, probably).
M.
Quoted 3 lines · Christian Trefzer
Exactly, and since I cannot afford to buy one I'd have to build it myself
I bought a used APC Back-UPS Pro 1400 VA from Ebay for 60 EUR. Batteries in top condition, like new. I didn't follow the complete thread, but.. you must have a lot of time on your hands =).
Regards, Nuri
Quoted 6 lines · Nuri Jawad
On Mon, 22 May 2006, Christian Trefzer wrote:
I bought a used APC Back-UPS Pro 1400 VA from Ebay for 60 EUR. Batteries in top condition, like new.
I didn't follow the complete thread, but.. you must have a lot of time on your hands =).
Not quite, unfortunately. Just some strange thoughts at times, that's about it.
So far the quality of the electricity network here is quite in order, if not perfect. But since it's all about money these days, that quality will drop sooner or later. Until that time has come I'd better be in a position to afford the UPS and the space to tuck it in. Anyway, all this self-made consideration is more out of interest. In case I'd actually go into production, I know a few guys I can ask in advance whether what I want to do is entirely insane or actually worth thinking over in terms of a fun-to-do project.
Kind regards,
Chris
Quoted 15 lines · Christian Trefzer
Quoted 7 lines · Alan Cox
Lead acid batteries should be kept well charged to avoid sulphation and always full charged when recharging, preferably using a charger that will do proper three step charging. "Cycling" a lead acid battery is a great way to destroy it.
So it is better to use only one battery (or an array thereof) which is sort of charged and discharged at the same time, or is this idea just as screwed..? I don't have a degree in electronics, mind you : )
Quoted 9 lines
Might be easier to build something that keeps a battery well maintained and switches in case of power outage. With large enough condensors to bridge the gap, which would also iron out any peaks and stuff, this should work pretty well.
Kind regards,
Chris
You know, these old lead acid batteries are a fire hazard, not to mention they produce free hydrogen gas when discharging to charging.
Guys, stick to nicads or a fuel cell to avoid burning down your house or the neighborhood. Ever see a lead acid battery explode? I have. It throws sulphuric acid all over the place.
Jeff
Quoted 6 lines · On Sunday May 21, [email protected] wrote:
A short description would be "continuous system hibernation". Say you are running Firefox, writing an e-mail in mutt and compiling the next X.org release. The power goes off, your computer crashes or something happens and you lose everything you were doing (yes, sadly you haved saved your e-mail as a draft yet).
You need an editor that auto-saves regularly. May I suggest emacs ;-)
One of my biggest grips about the current fad of web-based interactions is that you get to use the editor built into your browser rather than your editor of choice - and the editor built into firefox is pretty lame....
Now if only firefox could embed a window from my running emacs ....
Or to put it another way: you don't need to save the whole system
state: just save the bits you actually need to save.
NeilBrown
Quoted 1 line · Neil Brown
Now if only firefox could embed a window from my running emacs ....
actually, it can somehow
Quoted 5 lines · On Sunday May 21, [email protected] wrote:
Quoted 1 line · Neil Brown
Now if only firefox could embed a window from my running emacs ....
actually, it can somehow
Come on!!! you cannot just leave me dangling like that :-) Knowing that it can be done, but not how...
Is it a config option, or do I have to write pages of XUL, or do I have to bribe some developer or .... ???
NeilBrown
Quoted 11 lines · Neil Brown
Quoted 5 lines · On Sunday May 21, [email protected] wrote:
Quoted 1 line · Neil Brown
Now if only firefox could embed a window from my running emacs ....
actually, it can somehow
Come on!!! you cannot just leave me dangling like that :-) Knowing that it can be done, but not how...
Is it a config option, or do I have to write pages of XUL, or do I have to bribe some developer or .... ???
Maybe this does the trick?
http://mozex.mozdev.org/
Heard about it a few days ago, didn't try it out yet, but sounds like it is what you're searching for.
HTH
Björn
Quoted 13 lines · On Monday May 22, [email protected] wrote:
Quoted 11 lines · Neil Brown
Quoted 5 lines · On Sunday May 21, [email protected] wrote:
Quoted 1 line · Neil Brown
Now if only firefox could embed a window from my running emacs ....
actually, it can somehow
Come on!!! you cannot just leave me dangling like that :-) Knowing that it can be done, but not how...
Is it a config option, or do I have to write pages of XUL, or do I have to bribe some developer or .... ???
Quoted 5 lines
Maybe this does the trick?
http://mozex.mozdev.org/Heard about it a few days ago, didn't try it out yet, but sounds like it is what you're searching for.
Coooool, thanks.
It doesn't seem to pass a window-id so I cannot get emacs to place it's window exactly over the text-area (not that I'm sure emacs can be told to do that...) but it is certainly close enough.
Much obliged :-)
NeilBrown
Hi!
Quoted 2 lines
This is an idea a had some time ago. It might be a waste of time or it might be a good idea, you decide.
Well, it depends on "are you willing to work on it"?
Quoted 7 lines
The "continuous hibernation" is some kind of memory snapshots taken, say, every 5 minutes. The next time your system starts after a crash, it'd say "oh oh, looks like something went wrong" and offer you a list of the last N (for instance, 4) snapshots and you can recover your system to the very same state it was before power went off or your dog unplugged your CPU. It might even ask you which individual applications you want to start from that snapshot:
maybe you don't want to start Quake 3.
See suspend.sf.net and probably dm snapshotting functionality. Most of what you want can be done today, and in userspace.
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html