dastrix80
(Kris K)
December 8, 2018, 11:57am
1
Hi All
I need to solve why this is so slow, its absolutely killing my whole system. Its unusable slow.
Its slow on my gigabit/10gbit lan with Ubiqiti wifi, its slow via 4G.
BasicUI is just fine. Doesnt matter what browser or what device I use, they are all slow. OH2 is sitting at about 5% CPU and runs on a Xeon processor with Hardware raid and SAS disks so it’s not the hardware.
Is anyone able to help me pinpoint the issue? It’s so bad, I can barely even change dashboards in HabPanel
Thank you
vzorglub
(Vincent Regaud)
December 8, 2018, 12:00pm
2
When did it start?
Did you make recent modifications to the panel?
Do you have a back-up of the HABpanel json?
ysc
(Yannick Schaus)
December 8, 2018, 6:17pm
3
Also try this to verify your items
requests isn’t taking too long for some reason, this would explain the delay when switching dashboards:
Correct.
If by tabs you mean dashboards, no only the visible widgets are rendered.
To debug performance problems, open the developer tools in Chrome, go to the Network tab and refresh the page. Check the Waterfall column.
If there’s a request, for instance “items”, taking a long time to complete (i.e. a long bar, disregard “events” because it’s a long-running SSE connection as explained above), that might be the cause of your dashboard taking a long time to appear.
dastrix80
(Kris K)
December 8, 2018, 8:14pm
4
Hi Vincent, its been fairly slow for as long as I can recall (I’ve made some posts in the past) but now its just terrible.
I’ve added a few items to existing dashboards.
@ysc , OK I shall.
dastrix80
(Kris K)
December 8, 2018, 8:23pm
5
Had a look at this, 167 errors in Chrome (i use firefox generally)
https://code.angularjs.org/1.5.11/docs/error/$rootScope/infdig?p0=10&p1=%5B%5B%7B%22msg%22%3A%22fn%3A%20function%28c%2Ce%2Cf%2Cg%29%7Bf%3Dd%26%26g%3Fg%5B0%5D%3Aa%28c%2Ce%2Cf%2Cg%29%3Breturn%20b%28f%2Cc%2Ce%29%7D%22%2C%22newVal%22%3A392%2C%22oldVal%22%3A391%7D%2C%7B%22msg%22%3A%22fn%3A%20function%28c%2Ce%2Cf%2Cg%29%7Bf%3Dd%26%26g%3Fg%5B0%5D%3Aa%28c%2Ce%2Cf%2Cg%29%3Breturn%20b%28f%2Cc%2Ce%29%7D%22%2C%22newVal%22%3A392%2C%22oldVal%22%3A391%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20function%28c%2Ce%2Cf%2Cg%29%7Bf%3Dd%26%26g%3Fg%5B0%5D%3Aa%28c%2Ce%2Cf%2Cg%29%3Breturn%20b%28f%2Cc%2Ce%29%7D%22%2C%22newVal%22%3A393%2C%22oldVal%22%3A392%7D%2C%7B%22msg%22%3A%22fn%3A%20function%28c%2Ce%2Cf%2Cg%29%7Bf%3Dd%26%26g%3Fg%5B0%5D%3Aa%28c%2Ce%2Cf%2Cg%29%3Breturn%20b%28f%2Cc%2Ce%29%7D%22%2C%22newVal%22%3A393%2C%22oldVal%22%3A392%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20function%28c%2Ce%2Cf%2Cg%29%7Bf%3Dd%26%26g%3Fg%5B0%5D%3Aa%28c%2Ce%2Cf%2Cg%29%3Breturn%20b%28f%2Cc%2Ce%29%7D%22%2C%22newVal%22%3A394%2C%22oldVal%22%3A393%7D%2C%7B%22msg%22%3A%22fn%3A%20function%28c%2Ce%2Cf%2Cg%29%7Bf%3Dd%26%26g%3Fg%5B0%5D%3Aa%28c%2Ce%2Cf%2Cg%29%3Breturn%20b%28f%2Cc%2Ce%29%7D%22%2C%22newVal%22%3A394%2C%22oldVal%22%3A393%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20function%28c%2Ce%2Cf%2Cg%29%7Bf%3Dd%26%26g%3Fg%5B0%5D%3Aa%28c%2Ce%2Cf%2Cg%29%3Breturn%20b%28f%2Cc%2Ce%29%7D%22%2C%22newVal%22%3A395%2C%22oldVal%22%3A394%7D%2C%7B%22msg%22%3A%22fn%3A%20function%28c%2Ce%2Cf%2Cg%29%7Bf%3Dd%26%26g%3Fg%5B0%5D%3Aa%28c%2Ce%2Cf%2Cg%29%3Breturn%20b%28f%2Cc%2Ce%29%7D%22%2C%22newVal%22%3A395%2C%22oldVal%22%3A394%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20function%28c%2Ce%2Cf%2Cg%29%7Bf%3Dd%26%26g%3Fg%5B0%5D%3Aa%28c%2Ce%2Cf%2Cg%29%3Breturn%20b%28f%2Cc%2Ce%29%7D%22%2C%22newVal%22%3A396%2C%22oldVal%22%3A395%7D%2C%7B%22msg%22%3A%22fn%3A%20function%28c%2Ce%2Cf%2Cg%29%7Bf%3Dd%26%26g%3Fg%5B0%5D%3Aa%28c%2Ce%2Cf%2Cg%29%3Breturn%20b%28f%2Cc%2Ce%29%7D%22%2C%22newVal%22%3A396%2C%22oldVal%22%3A395%7D%5D%5D
And
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 404 Not Found</title>
</head>
<body><h2>HTTP ERROR 404</h2>
<p>Problem accessing /habpanel/UNDEF. Reason:
<pre> Not Found</pre></p><hr><a href="http://eclipse.org/jetty">Powered by Jetty:// 9.3.21.v20170918</a><hr/>
</body>
</html>
dastrix80
(Kris K)
December 8, 2018, 8:29pm
6
Some screenshots. Items taking 7 seconds? is that how I read that?
Here is my OH2 server CPU load
top - 07:33:35 up 1 day, 10:49, 2 users, load average: 0.33, 0.38, 0.36
Tasks: 209 total, 1 running, 138 sleeping, 0 stopped, 0 zombie
%Cpu(s): 1.2 us, 1.0 sy, 0.0 ni, 95.9 id, 1.9 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 16371408 total, 12248372 free, 1967200 used, 2155836 buff/cache
KiB Swap: 4194300 total, 4194300 free, 0 used. 14068076 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1946 root 20 0 154708 31452 8916 S 3.1 0.2 32:42.11 python
1949 root 20 0 154712 31320 8888 S 3.1 0.2 32:18.38 python
1957 root 20 0 154712 31220 8792 S 3.1 0.2 32:01.06 python
13116 kris 20 0 42884 4032 3320 R 3.1 0.0 0:00.18 top
14120 openhab 20 0 9.773g 863080 20944 S 3.1 5.3 68:56.88 java
1943 root 20 0 154708 31244 8820 S 1.5 0.2 32:33.59 python
1 root 20 0 225664 9552 6784 S 0.0 0.1 0:13.32 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.04 kthreadd
4 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/0:0H
6 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 mm_percpu_wq
7 root 20 0 0 0 0 S 0.0 0.0 0:08.87 ksoftirqd/0
8 root 20 0 0 0 0 I 0.0 0.0 3:48.36 rcu_sched
9 root 20 0 0 0 0 I 0.0 0.0 0:00.00 rcu_bh
10 root rt 0 0 0 0 S 0.0 0.0 0:00.04 migration/0
11 root rt 0 0 0 0 S 0.0 0.0 0:00.49 watchdog/0
12 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/0
13 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/1
14 root rt 0 0 0 0 S 0.0 0.0 0:00.53 watchdog/1
15 root rt 0 0 0 0 S 0.0 0.0 0:00.04 migration/1
16 root 20 0 0 0 0 S 0.0 0.0 0:01.54 ksoftirqd/1
18 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/1:0H
19 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/2
20 root rt 0 0 0 0 S 0.0 0.0 0:00.53 watchdog/2
21 root rt 0 0 0 0 S 0.0 0.0 0:00.04 migration/2
22 root 20 0 0 0 0 S 0.0 0.0 0:08.10 ksoftirqd/2
24 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/2:0H
25 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/3
26 root rt 0 0 0 0 S 0.0 0.0 0:00.55 watchdog/3
27 root rt 0 0 0 0 S 0.0 0.0 0:00.04 migration/3
28 root 20 0 0 0 0 S 0.0 0.0 0:06.01 ksoftirqd/3
30 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/3:0H
31 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/4
32 root rt 0 0 0 0 S 0.0 0.0 0:00.55 watchdog/4
33 root rt 0 0 0 0 S 0.0 0.0 0:00.04 migration/4
34 root 20 0 0 0 0 S 0.0 0.0 0:01.15 ksoftirqd/4
36 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/4:0H
37 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/5
38 root rt 0 0 0 0 S 0.0 0.0 0:00.53 watchdog/5
39 root rt 0 0 0 0 S 0.0 0.0 0:00.04 migration/5
40 root 20 0 0 0 0 S 0.0 0.0 0:05.88 ksoftirqd/5
42 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/5:0H
43 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/6
44 root rt 0 0 0 0 S 0.0 0.0 0:00.52 watchdog/6
45 root rt 0 0 0 0 S 0.0 0.0 0:00.04 migration/6
46 root 20 0 0 0 0 S 0.0 0.0 0:02.99 ksoftirqd/6
48 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/6:0H
49 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/7
50 root rt 0 0 0 0 S 0.0 0.0 0:00.53 watchdog/7
51 root rt 0 0 0 0 S 0.0 0.0 0:00.04 migration/7
52 root 20 0 0 0 0 S 0.0 0.0 0:01.23 ksoftirqd/7
54 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/7:0H
55 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kdevtmpfs
56 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 netns
57 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_tasks_kthre
58 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kauditd
59 root 20 0 0 0 0 I 0.0 0.0 0:07.75 kworker/0:1
vzorglub
(Vincent Regaud)
December 8, 2018, 8:37pm
7
Wow, dude, your attic is sure damp!!
dastrix80
(Kris K)
December 8, 2018, 8:37pm
8
Thats Sydney humidity for you!
7 Seconds to load my items! That can’t be right!
vzorglub
(Vincent Regaud)
December 8, 2018, 8:38pm
9
I am sure that Yves will make sense of your error codes
1 Like
dastrix80
(Kris K)
December 8, 2018, 8:43pm
10
Managed to fix a few issues, missing icons or scripts etc. They are now present and the pages load without error, mostly.
Theres still this one:
And also the 7seconds for items
dastrix80
(Kris K)
December 8, 2018, 11:22pm
11
Fixed the issue! at least with speed!
Hi All
Ive just found this post, and I have the exact same issue.
Thanks zolakk for posting, I commented out those items and my REST items speed reduced from 7seconds to 139ms.
The HabPanel dashboard is incredibly snappy now!!!
This definitely needs looking at.
Hopefully Yannick can reply on those script errors @ysc
ysc
(Yannick Schaus)
December 10, 2018, 6:26pm
12
sprintf errors are likely caused by widget trying to format states of items that happen to be non-numeric at that time (i.e. NULL or UNDEF or others). They are pretty benign.
You can prevent the CSP violation error by only using server-relative URLs when including external files (like /layout/weather/example.css
), provided they are on the same origin (scheme-host-port) as HABPanel.
dastrix80
(Kris K)
December 10, 2018, 9:19pm
13
Ive absolutely no idea what that means All the files I load are on the same server, nothing is loaded externally that I’m aware of.
How do I change them to server relative URLs as I thought thats what Ive already got (given they are local)
1 Like