Kubectl port-forward performance weirdness

Hi,

I’m having a weird performance issue with kubectl port-forward. I’m port-fowarding an application (temporal.io) running on EKS which exposes a web-UI. I’ve noticed that navigation within the web UI is extremely slow under normal conditions. i.e, the browser statusbar shows “waiting for localhost” for more than 10 seconds before the page starts loading. Also, opening multiple pages simultaneously in different tabs leads to timeout errors and lost connection to pod errors from kubectl port-forward.

However, I accidentally discovered that performance improves drastically when there is an unrelated upload running in the background such as a torrent, for example. Everything is very snappy in the web-UI of the port-forwarded application and no errors are seen from port-forward. I’ve confirmed this behavior several times. The same web pages that used to take >10s to load now load in <2s. The difference is night and day.

I can’t seem to understand why having an unrelated upload running continuously in the background seems to make such a big difference to performance of port-forward.

Figured it out. It was due to wifi powersave being enabled.Followed the instructions here and everything is working fine now.