Extremely poor performance of homelab reddit / selfhosted ---------------------------------------------------------------------- CYCLONOUS_69 · 2023-11-03 16:10 Hi all! Im currently using Ubuntu 22.04 server install image for self hosting my stuff on my laptop which is connected to the wall for all the time. I am accessing my stuff over local network and through cloudflare tunnel too. If I left my laptop unused for like 12-24 hours, I can't do a single SSH connection properly. It takes ages to do SSH or to even access my services over either the web or even in local network. Many times, SSH just fails. I have kept my server very up to date. I'm running all my services in docker containers. I am running a daily cronjob which restarts the laptop but it didn't resolve the issue at all. I have tried many things which are as follows, * Memory consumption is less than 50% all the time. * No swap is being utilized even though it is enabled just in case. * Temps never cross 50 degree Celcius which is pretty good imo. * I have abundant storage. * I'm using 4 core 8 threaded CPU which is kinda latest and very power efficient. * I have enabled C-States in BIOS for power savings. I'm very new to this self-hosting stuff so any help, advice is appriciated. ---------------------------------------------------------------------- FeZzko_ · 2023-11-03 16:32 Look, I'm just saying, it may have nothing to do with your problem, but it may be a clue for you. With an "old device" running proxmox with a ryzen processor, I would randomly get a kernel error. At such times, the system would suddenly become slow and after a while would stop responding. Only a reboot could temporarily solve the problem. In short, take a look at your logs and you might find something interesting :) ---------------------------------------------------------------------- Fluffer_Wuffer · 2023-11-03 16:38 Could be any number of things... have you installed Unvitu directly on the laptop, or is it running as a VMWare? This sounds very much like a virtual memory / page file. It's been a loooonng time since I've had that switched, I tend to disable it on all OS's these days.. but if something in RAM is not used for a while, it will write it to virtual memory on disk, so the physical RAM can be used by other processes.. so when you try accessing it again, it's.extremely slow. This just a guess.. BTW ---------------------------------------------------------------------- dazchad · 2023-11-03 17:08 Does using your laptop directly also show lag? Or just SSH/network? Usually when this sort of problem with SSH happens for me, is when the OS doesn't have enough space on the volume. This really crash the OS. Make sure that the OS has enough space, even though you may have lots of storage in other volumes/drives. ---------------------------------------------------------------------- SouthNo6340 · 2023-11-03 19:21 Hmm it’s strange. Can you check SMART, dmesq, messages log on your HDD? ---------------------------------------------------------------------- j0nathanr · 2023-11-03 21:49 Only thing you left out was the storage your using, is it all SSD? If not you definitely want to consider moving to an SSD at least for the OS ---------------------------------------------------------------------- CYCLONOUS_69 · 2023-11-04 00:13 I'm using SSD and the SSD is just one year old. I'll check SMART. I'll give it a go for turning off power saving features. ---------------------------------------------------------------------- CYCLONOUS_69 · 2023-11-04 00:14 I'm not using proxmox and the CPU is Ryzne 3 5300U. I have install server image of ubuntu directly on the SSD. I have checked the logs but everything looks very normal. I'll take one more look to the logs of each service. ---------------------------------------------------------------------- CYCLONOUS_69 · 2023-11-04 00:17 I have installed server image directly on the SSD as my laptop don't have ethernet port. I'm using 5GHz Wifi and the laptop is close to the router. I have checked the signal strength and it is very good with low noise. In case of swap file, it is not using any. It is using but like 4-5 MB at max. ---------------------------------------------------------------------- CYCLONOUS_69 · 2023-11-04 00:22 Using my laptop directly does not show any type of lag at all. It is just over SSH and the internet. I have allocated plenty of storage for both home, root, boot and swap. ---------------------------------------------------------------------- CYCLONOUS_69 · 2023-11-04 00:23 The system is directly installed over a unused and new SSD that's why I'm even more confused. Logs are not showing either any types of error or deadlocks. ---------------------------------------------------------------------- Jbrewu · 2023-11-04 01:20 I think that means it’s a networking issues then, not a hardware issue. Perhaps the router is causing you some problems. ---------------------------------------------------------------------- 5662828 · 2023-11-04 15:11 Could be a DNS problem (ssh lags when the liniux hostname is not set, dns is not set in linux) ---------------------------------------------------------------------- CYCLONOUS_69 · 2023-11-04 16:34 I tried different network but the result is the same. I have made some changes to SSH configs but will have to see overtime how it performs. ​ I don't use any kind of VPN. I use Cloudflare tunnel to access it outside of local network. I did traceroute / ping and it is neither showing extra hops or high ping at all. I have logged ping over the span of 2 weeks and its the same with 2ms ping deviation. I have assigned static IP to my laptop and made sure the router is up to date in terms of configurations and firmware. I did stopped tunnel and tried but the results are exactly the same so I outed that tunnel is the issue. ---------------------------------------------------------------------- YaMoef · 2023-11-04 20:39 Maybe a shitty response, but have you checked the issue isn't the pc your are sshing from (client)? ---------------------------------------------------------------------- operator207 · 2023-11-04 23:40 Wifi as a network interface for a server? That's not the best option. Even a usb ethernet adapter would be preferable to wifi. What does `sudo wconfig` output when you run it from a terminal? Does it show power management to be on in the output? if so, run `sudo pconfig (wifi_interface_name) power off` See if that helps any. Should not need to reboot, and if you do, it might turn back on. I don't use NetworkManager, but I do believe you will need to possibly run the above as a post script for the profile you use. Or at least when it reboots. My laptop tends to need the above for wifi, or it will grind to a crawl. ---------------------------------------------------------------------- CYCLONOUS_69 · 2023-11-06 00:32 My computer, some smartphones.