headlamp icon indicating copy to clipboard operation
headlamp copied to clipboard

frontend: high CPU usage on a normal-sized cluster

Open agologan opened this issue 11 months ago • 1 comments

Running self-hosted headlamp v0.23.0 on a cluster with 1000+ pods and 50 nodes. While initially responsive frontend locks up in Firefox asking to terminate tab or chugs along at 100% on one core in Chrome. Tried profiling it a bit but there are many slowdowns b/c (i assume) the way data is constantly refreshed. Even /c/main/settings causes high CPU usage as notifications are refreshed showing high usage in notificationsSlice.ts/setNotifications Other views are better or worse depending the refreshes. With one namespace have 500+ pods it just gets upset calling sort() on the results.

By comparison Lens loads all the pods in the same namespace with less than 2-10% cpu usage.

LE: Created a quick fork and removed notifications https://github.com/agologan/headlamp/commit/29cc4fe7d94759089ed625b8c251b4cce2b36fda Headlamp is again usable. CPU usage is still high in some views 10-50% mostly due to all the frontend recomposition and refreshes, but at least /settings can now sit quietly.

agologan avatar Mar 14 '24 15:03 agologan

Thanks @agologan . Performance is one of our priorities, we will look into this and appreciate your input as we push some updates out.

joaquimrocha avatar Mar 15 '24 10:03 joaquimrocha