Slow loading of entrypoint.js for HACS, NodeRed and File Editor on VM server

Hi,

First post here, hoping I’m posting properly. I am running HA as Home Assistant OS installed in a VM through the official image.

The VM is running on a physical server that serves two VMs (HA and PiHole) and does nothing else. It’s a Xeon 4C4T @ 3,1 GHz with 32 GB of RAM. The HA VM has access to 80 % utilisation on all four cores and up to 20 GB of RAM. The server has a NIC teamed 2 Gb connection to a switch, my PC 1 Gb to its switch and our Internet, if it matters, is 70/70.

The HA instance is fairly small, as its so far mainly an experiment before our home extension. Theres a few Hue devices, a car integration, weather, some printers, etc. Nothing insane.

The issue is that while all of HA generally works very snappy, certain parts are very slow. I realise some of these are add-ons, but this also happened with certain native pages (e.g. the settings and in particular the info page), but an update significantly sped up those. It also seems to happen to a lesser degree (enough to notice, not enough to really wonder) for several native pages, for example logbookz histories and such.

But while lovelace dashboards load faster than I can collapse the menu again, particularly File Editor (2m45s), HACS (30s to a half loaded version but 1m30s before “Integrations”, “front end”, etc. appear) and especially NodeRed (4m45s) take a very long time to load, and it feels as if a large portion of the time is spent “just waiting for nothing”. NodeRed even seems to load the same files twice, not sure what that’s about or if it’s related.

I checked CPU, RAM and disk usage of both VM and host with nothing at all to report. And I checked various logs which seem to contain nothing of relevance. And everything does technically work, albeit rather slowly.

So I checked with Chrome’s developer tools, and it seems that in particular a file named entrypoint.cd79763.js is a common issue, often taking over a minute to download despite a ~1M file size.

Can anyone tell me, what this file does, or point me in a direction of what to look for that would cause a small subset of files to serve slowly on an otherwise fast server? Or maybe other steps to look at?

I found a bunch of topics on this general issue, but all with entrypoint had it missing entirely, and slowdowns seemed to be dominated by UAS issues with SSDs on Pis, but I’m using neither of those.

And especially after seeing in the waterfall view, that it’s only certain files that seem to cause the slowdown, I’m perplexed. I know the network is solid and stuff like RDP feels like being local on the machine, and network file transfer speeds indicate that the connection is indeed around the 1Gb mark.

I should add that this happens regardless of client device. My phone on WiFi with the android companion app will load just as slow as my desktop PC.

Anyone?
Nicolai

What OS is your physical server running?
Docker like to use some of the virtualization hardware features of the hardware and those can be a bit tricky to get access to in VMs, especially Hyper-V.

Completely forgot that, sorry. And you may very well be on to the core of the issue; the host OS is Windows Server 2012 R2, and I’m using HyperV to host the two VMs.

How do I remedy this best? Install HA in a different version where it doesn’t need HAOS/HASSio? Like hosting some Linux flavor in a HyperV, and then installing HA directly, without Docker?

I originally wanted to simply use docker for hosting the VMs, but as I recall, although it was possible, it had some major issues?

I just know that a Linux host OS is better, but others may have answer if VMWare or something else can be used too.

I have solved the problem and the thread may be closed. Thank you for your help @WallyR.

I was previously planning to migrate from the HDD to 2x enterprise SSDs I had purchased but not yet had time to install. In light of this problem, I decided to change the hostOS and swap the drives at the same time, and after reading up on it, I chose Proxmox as a direct install on bare metal.

So this is not isolated to just a change of hostOS and hypervisor, changing disks also play a part of course. But the performance before was so slow, it couldn’t possibly be explained by just the disk change.

I also noticed several performance issues with HyperV, for example when testing Debian in a HyperV VM, performance would be very laggy and disabling IPv6 seemed to reduce lag greatly. Same with NIC teaming (bonding) which I had setup with 2xGbe as 802.11ad/LACP with a supporting switch. Disabling this made even the physical server faster. It’s now reenabled in Proxmox with no performance issues and same switch setup.

I contemplated installing HA Supervised in a Debian container for near-host performance levels, but opted to try a VM on Proxmox first to enjoy the more simple management and maintenance of HAOS. If performance was still an issue, I would try the containerised approach.

Luckily that was not necessary at all, the performance increased not just dramatically but rather to an unbelievable extend. To compare:

Loading HACS (1m30 before) now 400 ms
Loading File Editor (2m45s) now 1,7 s
Loading NodeRed (4m45s) now 4 s
Making a full HA backup (32 min) now 6 min.

I believe there must have been some (or even several) issue(s) with HyperV in my install, although I’ve followed every guide to the letter, and it’s essentially as simple as enabling a role.

But in conclusion for anyone else experiencing slow behavior on HA under HyperV, simply testing a different hypervisor would be well worth a shot.

As a bonus, USB passthrough is now a possibility, in case I want to use Frigate with HA and a USB mounted accelerator for example.