JimmyJimmyBTM wrote: ↑17 Feb 2020, 11:12
So in short, everytime my solar panels sends an
update through my power cables it disrupts the sinus wave and causes huge spikes that can result in frametime spikes, or worse.
First, congratulations on tracing your frametime spikes to power issues. A complex home electricity system, is a 21st century problem -- solar panel installations -- rube-goldberging its way to a 100ms frametime spike? Who'd thought. Even though very rare, you're not the first. It makes sense, since the science checks out fully and it does definitely happen from time to time...Just extremely difficult to confirm without purchasing power-analysis tools and untold number of hours of research.
P.S. In forums, I would not use the word "update" (it confuses a few), but use the phrase "solar panels sends a power disruption" (which may include interference, surges, etc). Your electrician may have used the word "power update", but that is a bit terminologically confusing.
Scientifically, it is more probably a plain power disruption (power switching), like either
(A) Momentary distortion to sinewave as the power switches between power sources (solar / battery / main grid); and/or
(B) Radio-frequency interference (RFI).
You might have sinewave distortions everytime your AC power source switches (as the clouds go over your house, the solar panel inverter switches to your utility grid and then back); i.e. the sinewave don't line up during the changeovers -- and the sinewave might not be true sinewave (more like rounded squarewave in the worst-case) -- you might have to deal with that, some computer power supplies don't work well with those. Other times, it's not the dirty power waveform (imperfect sine wave isn't the issue), but RFI over the power (interference), like a surge of radio frequency that matches the frequency of one of your computer components, temporarily jamming it up (Error correcting stall).
A great computer power supply will merrily gobble up this distorted wave, but not all of them do. And that's only one moat of protection, you really need multiple moats of power protection -- like a real data centre. Solar isn't inherently bad (Google and Facebook data centers are often solar powered anyway) but you do need to up your power conditioning game, be careful of cheap solar inverters!
Given sufficient power interference injected into a computer -- that filters through -- it will wreak havoc to all the error correction layers inside a PC -- including all buses & controllers, whether SATA or RAM or PCI-Express or network cables, or all the above, etc.
In the past, your computer simply crashed but today, sometimes it just stalls briefly (for milliseconds to hundreds of milliseconds) as the error correction layers does its own thing.
Error Correction is a common feature of many computer protocols that simply tells the other device to repeat. For example, data got corrupted, error correction detects it, and says "whoa, please repeat that data", and then good data comes. A modern computer is error corrected to the hilt -- error correction is built into a lot of protocols, network protocols, Internet protocols (The last letter in both TCP/IP is "Protocol!"), hard disk SATA protocols, M.2 flash drive protocols, USB protocols, WiFi network protocols, you name it -- there are hundreds more error corrected chains in a modern computer than a 1980s-early 1990s computer. It's a good thing when a computer doesn't crash, or display corrupted data, or writes corrupted data to disk. But it does briefly stall -- a momentary freeze in a component -- that can lead to freezes and latency spikes even for LAN gaming.
Computer merrily keeps working, but may simply delayed a few microseconds, or milliseconds, or even hundreds of milliseconds (yes, I've seen chained error correcting-surges go that bad in a modern PC electrical environment). A computer that can keep running for days and weeks is in part thanks to error correction.
To try and solve power-supply induced interference (including interference from imperfect solar power inverters), you may need to do several of:
(A) Put your computer far away from large elecricity flows (especially transformers, power panels, dryer machines, refrigerators, solar panel power controllers, etc). Especially if they're in the wall behind your computer.
(B) Upgrade your computer power supply; and overprovision generously (get an 800 watter even if you only use 400 watts), preferably 80plus Platinum that has a great guarantee or serverroom cred. This will help some AC issues.
(C) Finally, plug everything into a high-rated power conditioner (with voltage regulation) with true sine-wave AC. Some of these doubles as a UPS.
Just a plain common UPS won't be enough. Then anything that touches both your computer and the power, needs to plug into this to be protected. This includes all accessories, monitors, etc.
Doing all the above, will build a multiple moats against power transients, power surges, power distortions, RFI, etc. Including those caused by cheap solar inverter units. As a bonus, you'll also be better protected against lightning storms too.
If you want to go overkill, protect all wires that connect to the computer. Phone filter, Ethernet filter, etc. These may relay power interference indirectly from another RFI-noisy part of the house (e.g. Ethernet run from router connected elsewhere), but you can easily replace any problematic Ethernet links with an ~$80 optical fiber link (a pair of Ethernet-to-optical media converters are now cheap at places like fs.com) so that no unconditioned metal wires (power and non-power) ever touch your computer from elsewhere in your house. But that's a bit overkill.
You might also want to hire an electrician with power conditioning experience (the "good electrician" stuff that datacenteres hire!) but that can be more expensive than simply purchasing the equipment in (A)+(B)+(C), moat-off your computer room into its clean electricity island, and then calling it a day.
Congratulations for successfully confirmation power-supply-induced frametime spikes in the fog of red herrings -- mains-supply-induced computer problems is one of the most difficult kinds of computer problems to troubleshoot. Because of the danger of wild-goose-chases on power-related issues -- we very very rarely ask anyone to consider Sherlock Holmes on power issues, but we're glad that our suggestion on electricity troubleshooting helped!