Performance Issues After Power Outage

Update: I've concluded that performance issues are unrelated to power outages after additional testing. This topic can be closed.

Also posted on reddit...

Whenever you cross-post, it's considered a courtesy to include the link(s) to the other site(s) you've posted the issue on.

It helps eliminate confusion, and wasting other people's time researching and suggesting things that have already been done.


Hey! Sorry about that. I am new to the forum. Just created an account to post this. Will make sure to include all the links for any cross-posts from now.

Thanks for taking the time to help out new users like me

How would the system know that there was a power outage event as compared to any other restart? Honestly, I'm not sure if there is an easy way to figure that out... and if you do it wrong, you'll have a constant reboot loop.

One way I can think of (but this is not necessarily a good idea)...

  • Modify the reboot routine to always write a file to the storage*
  • run a script in rc.local that looks for that file.
    • if it finds the file, it knows a graceful reboot has happened previously.
      • erase the file, but don't do anything else.
    • if the file is not found, issue a reboot.
      • the reboot would write the file (as described earlier), so the next run of rc.local would see that this was an intentional/graceful.

*you could wear out your flash storage with these writes and erases. So this could damage things long term.

I would recommend that you look more into why you're getting lower performance and what is causing it. Try to fix that. OpenWrt is designed to be able to handle power-out events without issue the vast majority of the time... most everything runs in RAM unless you are actively editing files or if you have set stuff to write to the internal flash storage. This means that power events should have minimal risk on the general integrity of an OpenWrt installation. But obviously there is something that might not be coming up right -- maybe it is the negotiation with the upstream connection (modem/ONT, etc.) due to a timing issue. Maybe issuing a simple down/up of the WAN will solve that problem (you could test this by simply unplugging your WAN cable and then plugging it back in... if it solves the performance issue, it could be timing related wrt the upstream device connection).