66

Is there any quantifiable evidence to support power cycling routers for 10 seconds or any arbitrary amount of time, instead of just unplugging and plugging back in?

This is related to troubleshooting a misbehaving router. The theory is based on 'things' needing to be cleared from memory, and that this could take a few seconds.

This is also a theory related to electronics from over a decade ago, and I'm sure it was equally as anecdotal then.

As a person allergic to anecdotes, I became curious when I recognized that I never investigated this issue.

Is there any quantifiable reason to support power cycling routers for 10 seconds or any arbitrary amount of time, instead of just unplugging and plugging back in? Sources welcome

7
  • 4
    The power-cycle time suggested is usually general so that it can be applied to any device, not just routers. Jan 15, 2015 at 13:36
  • 2
    @cqm Keep in mind that depending on the device, plug cycling may take longer than power cycling with a power switch. A good example actually is my router, when unplugging its cord it takes nearly 3 seconds for the LEDs to all fully extinguish. Using the power button the same happens nearly instantly. The differnce being the power button method does not disrupt ground, thus giving those "charges" talked about in other answers a place to go.
    – Tyson
    Jan 15, 2015 at 15:21
  • 2
    It really has nothing to do with the grounding - most PSUs for equipment like that wouldn't have the ground actually connected anyway - it's more to to with power-soak from the capacitors. Switching off from the device itself is a total power interrupt; from the mains allows power to gradually soak out of the capacitors, keeping the device partly powered for several seconds.
    – Tetsujin
    Jan 15, 2015 at 16:09
  • 1
    @cqm Have you ever taken note of what happens when you unplug (from the wall) a laptop or desktop power supply that has an LED on it? The LED stays on for a few seconds. Depending on the model, it might be just one second, or several seconds. Visibly quantifiable.
    – Jason
    Jan 15, 2015 at 17:24
  • 1
    I know this is a dupe, I cant find the original question on the site
    – Keltari
    Jan 15, 2015 at 21:10

9 Answers 9

74

Yes there is.

Any electronics device will have capacitors that will store energy even after you unplug it. You may have noticed when you unplug, say a monitor or TV, the little diode will take another second or two to discharge remaining energy from the capacitors in form of electricity and stop glowing.

This residue energy may not allow memory chips to wipe and you may have problems once your router starts again.

As for the sources - well it's really common sense to someone with basic electronics knowledge, like the sky is blue, water is wet, so I recommend reading about capacitors to see what they do and you will understand it.

The point is that electronics components are far from perfect and any interference may produce unpredictable results.

0
16

Ten seconds is an arbitrarily long amount of time, but yes, it does take time for electronic devices to discharge themselves completely because of the capacitance of the circuits within. Some of this capacitance is intentional; some of it is not.

It's impossible to say exactly how much time is needed, as the bleed-off of that capacitance varies with environmental factors like temperature, humidity, and background EMI generated by nearby electronics. The RAM in your computer, for example, can take minutes to discharge fully.

But there is a shortcut. If the router has a button of any kind on it (WPS button, or a reset button), this will usually discharge any residual electric charge immediately. This is because the button places a load on the circuit(s) holding the charge and there is no power going into the device.

In fact, in the old days of parallel ports, this used to be a guaranteed way to correct a stubborn printer. Unplug the printer, unplug the computer, and unplug the parallel cable. Then hit the power button on both devices. Then plug everything back in. Worked every time. Parallel SCSI busses had this problem sometimes too.

2
  • I once cycled my power strip for my desktop and there might have been RAM corruption, but I was in the BIOS and nothing happened. Jan 16, 2015 at 1:36
  • Reminds me of a friend's findings. He logged into a (DSL) modem and read the script that runs when the device starts up. The script ran a command that caused the light to blink for 20 seconds and then to turn on solid. Then the script did some other stuff that took 8 seconds to do. The device wasn't doing anything noteworthy during the remaining 12 seconds of blinking, and after it was done with its 8 second bunch of tasks, the modem worked just as well as if you waited for the blinking to stop.
    – TOOGAM
    Jan 18, 2015 at 6:39
10

I think its worth considering what you're actually trying to do. Turning off a router for 10 seconds is probably longer than the time it takes for any residual power to discharge (likewise, the old 30/30/30 technique could be a 10/10/10 technique). Ten seconds is a simple and arbitrarily large enough time for this to work.

I would however consider any troubleshooting techniques involving singing, or animal sacrifice somewhat suspect, but you're free to unplug and wait longer than 10 seconds.

2
  • 4
    I agree no animal sacrifice should be needed, since it is highly unlikely there are any SCSI devices connected to the router.
    – kasperd
    Jan 16, 2015 at 0:37
  • 1
    If you tell someone 30 seconds, and they don't have a stopwatch, they usually do 10-15 seconds... Jan 16, 2015 at 1:14
9

Working as tech support for 3+ years, I can tell you that 10 seconds is surely arbitrary, but easy to communicate, and is intended to be a little longer than necessary (probably 5 or 6 would work well) but when you power-cycle, you only need to do it once. Unplug your modem and router, wait 10 seconds (my counting is likely different than the customer's), plug in the modem first, wait till the connect light comes on (or wait 10 seconds more) then plug in the router. If the issue is a frozen modem/router, this works like a charm. Every time. Guaranteed.

PS- When I have network issues with my ADSL/router/2x Internet TV boxes/NAS + Webserver setup, I still count to 10. :)

1
  • 1
    10 seconds is also good as it gives equipment upstream and downstream a decent chance to notice that the router or modem is no longer available. Jan 16, 2015 at 3:10
3

Another reason for cable modems specifically, which I heard from a technician:

Modems will "phone home" to the ISP every 30(ish)-seconds to let the ISP know they're still connected. Some types of failures or settings-updates can only be resolved after the ISP's systems know the modem has been disconnected. They can't know that until the 30-seconds have passed, which is why they ask you to wait at least 1 minute.

1
  • 2
    Anecdotally, several 30+ minute outages I've had over the last decade did end within a minute of my giving my cable modem a 2+ minute off period. OTOH the other ~80% of the time I tried doing so it didn't help. Jan 16, 2015 at 2:18
2

The "it's the capacitors" answer has already been given, but that's not the whole story. Let's look into that a little deeper.

Most devices run from house-voltage AC (110V or 220V AC), at 50Hz or so, through a power adapter, to low-voltage DC (5V or 12V DC).

AC current is current which cycles back and forth, from positive to negative... which means passing through zero. So, for a fraction of a second, 100 times a second, there's no voltage provided to your device.

Obviously, then, your device must be capable of handling a /very brief/ power interruption, or it wouldn't stay on for more than a hundredth of a second. The way this is done is first by stepping the voltage down to reasonable levels in a transformer (a couple of coils around a core: the big heavy bit in most power supplies). That changes you from 110V AC to, say, 20V AC.

Next step is to convert it from AC to a lumpy kind of DC: a "bridge rectifier" (four diodes arranged so that whether the voltage is flowing one way or the other on the input, it flows only one way on the output). So instead of waves up and down from +10 to -10, you get a series of lumps, from 0 to +10.

Then that voltage needs "smoothing": that's where the capacitors come in, and we get rid of the zero-voltage dips. Each voltage "lump" charges the capacitors up; each dip discharges it. The bigger the capacitor, the more current it can store as charge from that "lump", and the slower the discharge time is. Which means, the smoother the output is.

But there's always some fluctuation, so there's often a "voltage regulator" as the last step, a chip which takes anything from, say, 20V to 3V, and outputs a reliable 5V or so.

Then all the components take that 5v, and convert it into 5v and 0v to mean 1 and 0... except, they don't. They convert it to "voltages above or below a couple of volts" to mean 1 or 0: so there's lots of leeway there.

The processor (and most devices like routers have one) is basically a black box which reads in a command, performs the actions the command says, goes to the next command in the sequence, and repeats. And it does this constantly, from the moment it's turned on.

The processor uses some of the charge from those voltages to store things in its internal memory, in a "volatile" form, which discharges fairly quickly, so needs constant power to "remember".

One of those things it stores is the "program counter" - that is, which command it last read in, so it knows how to do the "go to the next command in the sequence" bit above.

When you turn a processor on for the first time, it tries to read in the program counter, and because the memory has completely discharged, the program counter contains the value zero. That means it's booting up... so it reads in the command from address zero, which is the boot code. [nb: big simplification here! In truth, other things also need to hit zero for a reboot.]

So, when you power cycle, you need to wait long enough for:

  • the smoothing capacitors to discharge enough that...
  • the voltage regulator's ability to regulate the voltages up is insufficient to keep the voltage above...
  • the processor's level needed to keep the program counter stored, for long enough that...
  • the processor's program counter storage discharges.

If you don't do that, then it's possible that only part of it discharged: that the program counter stores a random value. The same is true of any other volatile memory on the system, too, so even if the CPU has not discharged at all, the data stored in memory at the address the program pointer points at, may have degraded.

Either way, you then have the processor not knowing it needs to run the boot code, and instead trying to run some random code somewhere. That's not good and probably won't un-crash your router.

One second is probably enough. Five seconds is almost certain to be enough. Counting to ten is almost certain to be enough time for five seconds to have passed. Therefore, unplug, count to ten, plug back in.

This is why, when you get a brief power brown-out and the lights go dim for a moment, sometimes your router works fine (nothing discharged, it carried on as it was); sometimes it crashes (memory got corrupted); sometimes it reboots (power was out long enough that the processor fully discharged the program counter).

If we're separating the device from the heavy parts of the PSU (that is, our router has a wall-wart power supply, and we're unplugging from the back of the router, rather than from the wall) then we can be faster, since we've separated the capacitors from the device. But we still need to give the volatile memory time to discharge. Odds are, the time it takes us to unplug and plug back in again is sufficient. But... are those extra nine seconds so valuable? Probably not. Count to five, maybe.

So, without dismantling the device and plotting the current drop and memory discharge time across each component, the summary is:

NO. The minimum safe reboot time is not precisely quantifiable. It's not constant even per-device, or even per-reboot for the same device.

[Note: all the above is a dramatic simplification of reality, but it's at least somewhat better than "it's the capacitors!"]

[Edit: from having worked tech support, I know that if you tell someone to unplug and then plug it in again, they'll quite often just not do it, but tell you they did. It seems that people are reluctant to just do an action and then undo it: they will shortcut the action to its logical conclusion, where nothing has changed. Equally, if you think a cable has been unplugged and ask them to check, they will often confirm to you that it is plugged in perfectly without ever getting out of their seat to check.

But when unplugging is just a step to doing something else (waiting ten seconds), then it's OK. So, if you tell them to unplug, wait ten seconds, and replug, they are FAR more likely to do it. So that ten seconds has a psychological use, too!

The very best, though, is to ask them to pull the cable out, blow on it to make sure there's no dust breaking the contacts and introducing noise, and then push it back in. I have NEVER known someone not to unplug when given this instruction. The blowing, obviously, does nothing other than ensure they first unplugged the cable and then waited a moment before replugging. Asking them to follow this procedure is also far, FAR more likely to succeed if you think the cable has just been unplugged. It obviously fixes 100% of those situations, but only a fraction of them will ever admit "when I went to do that, I found it was unplugged..."]

1
  • 1
    Further to K7AAY's answer: capacitors typically discharge exponentially, the voltage out from them dropping sharply and then trailing off as it approaches 0V, so they theoretically take forever to fully discharge: not "8 seconds"! Practically, their discharge rate depends on the current drawn from them. For a smoothing capacitor, you want it to stay almost completely charged between voltage cycles, since you want its output voltage to stay as close to the input voltage as possible: so, hitting them with voltage before full discharge won't damage them, as it happens 100x/sec in normal use! Jan 16, 2015 at 1:57
1

I concur with the other technicians here, regarding the 10 seconds being arbitrary. The exact time needed to fully drain a device's capacitors will vary depending on the capacitors themselves.

I can also lend further credence to the comment by "user2813274", because I've experienced a similar event with a motherboard... except in the case of this motherboard in question, the time allocated to fully drain the board was 6 months. Oddly, it seems that until the board was completely drained, it would not properly power on. But after some 6 months of sitting on a shelf, I tried the board out again and it came right up, and is still working perfectly to this day. The particular board was an Asus M2N4-SLI (if memory serves me), which began having problems when it was first installed, due to being paired with a Radeon card that didn't quite match up with the voltage requirements of the bus, and kept shutting down in the middle of games during fast action sequences. The initial impression was that the problem was simply overheating, but after adding in some pretty radical cooling solutions, the behavior continued and eventually the board stopped working at all. I figured it was fried, but I didn't want to just throw in the trash that day... and I'm glad I didn't, because its turned out to be one of the best boards I have.

Anyways, I have a Linksys WRT54GS-v2.1 and a Cradlepoint 1100, both of which I've reconfigured and tasked as WAPs, because my routing/firewalling needs exceed the capabilities of both devices (so I built a really fast pfSense IPS/IDS/Firewall and retasked the other two). In the case of both devices, it's best to give them at least 10 seconds, if not 30 seconds, so that they'll drain completely enough to avoid memory corruption on boot due to fragments of the last run-time environment hanging around after a power-dump. Both of my WAPs are more or less equal in terms of power requirements, but have different capacitor layouts, and tend to drain out at different rates. It would be difficult to gauge the exact time needed without a very sensitive oscilloscope to monitor the board at every avenue of current transmission.

2
  • On the ASUS board, that's why those boards usually have a jumper you can short (once battery is safely removed) to drain the stored power. It's basically shorting the system to force an immediate dissipation. Jan 15, 2015 at 20:27
  • Do you recall when that feature came into use? I ask because I'm not certain my board has that jumper, although that is possible, and I may have simply missed it during the stress of the moment. Jan 30, 2015 at 14:06
1

In normal circumstances, the amount of time a device must be unplugged to ensure a clean reset will be much shorter than ten seconds. Many microcontrollers and microprocessors, however, have various kinds of low-power modes. Even if a device never intentionally invokes such modes, it would be possible that they may get entered as a result of some kind of unexpected glitch. Generally if a device appears to be acting even halfway normally, that's a pretty good sign that it hasn't accidentally entered a minimal-power state, but instructions don't assume that users will be able to tell that.

If a device is designed with low-power operation in mind, even the ordinary power-supply caps may be able to maintain the processor in an (unwanted) low-power mode for over a minute, but devices which aren't designed to absolutely minimize power consumption will draw enough current, even in low-power mode, to deplete the caps within a few seconds. For example, while some memory chips draw less than 1uA (one millionth of an amp) when idle, some cheaper-but-equivalent ones may draw closer to 100uA. If everything else in a battery-powered device like a phone would draw an average of 5uA when idle, having a memory chip draw 100uA would massively reduce battery life. On the other hand, if a device is expected to draw 100mA whenever it's plugged in (100 thousandths, or one tenth, of an amp), a memory chip which drew 100uA more than necessary would only increase power consumption by 0.1%.

Note that some battery-powered devices include a reset button; that is because, although removing and reinstalling batteries will usually reset them cleanly, it would be possible for them to get into a situation where they weren't functional but drew almost no current. If a device gets into such a state, it may be almost impossible to restore it to operation without the reset button.

Note that on devices with reset buttons, it's possible that powering a device down may be more effective than using the button alone, but pushing the button while the device has power removed will almost always drain any power-supply caps quickly even if the device has gotten into an otherwise-problematic low-power state.

0

Think about it this way,

if you unplugged the device and touched any capacitor on the circuit with an LED

how many seconds would you have to wait before there wouldn't be enough residual power to light the bulb up?

that's your answer.

1
  • 1
    Obviously, you have good intuition about the behaviour of electronic components. However, somebody with intuition good enough to understand your answer wouldn't need to ask the question in the first place. Jan 15, 2015 at 23:33

Not the answer you're looking for? Browse other questions tagged .