lange Ladezeit von Frontend und Floorplan

Begonnen von Tristec, 28 Dezember 2013, 18:53:12

Vorheriges Thema - Nächstes Thema

Tristec

Hallo zusammen,

ich habe fhem auf einem Raspi Model B Rev.2 laufen und seit Anfang an starke Performance Probleme. Meistens dauert das laden der Seiten länger als 30 sec, dann geht es auch mal wieder relativ zugig.


  • Die CPU Auslastung liegt bei ca. 4 %
  • free -m
    Mem:       total       used       free     shared    buffers     cached
                    438        296        141          0         23        152
  • iotop -u fhem
    Total DISK READ:       0.00 B/s | Total DISK WRITE:      14.07 K/s
    5706 be/4 fhem        0.00 B/s    0.00 B/s  ?unavailable?  perl fhem.pl fhem.cfg

Im fhem Log fällt auf, dass bei bestimmten Aktionen die Zeitdifferenz am größten ist:

2013.12.28 18:47:19 4: /fhem/icons/fhem_smallscreen / RL:20 / text/html; charset=UTF-8 / Content-Encoding: gzip
/
2013.12.28 18:48:50 4: Closing connection FHEMWEB:192.168.2.3:63008
2013.12.28 18:48:50 4: Closing connection FHEMWEB:192.168.2.3:63014

2013.12.28 15:26:07 4: HTTP FHEMWEB:192.168.2.3:57986 GET /fhem/pgm2/fhemweb_colorpicker.js
2013.12.28 15:26:30 5: CUL/RAW: /A0FDF861021F96A0000000AA8EA10001602
----------------------------------------------------------------------------------------------
2013.12.28 15:26:30 4: CUL_Parse: CUL1 A 0F DF 8610 21F96A 000000 0AA8EA10001602 -73
2013.12.28 15:26:30 5: CUL1 dispatch A0FDF861021F96A0000000AA8EA100016::-73:CUL1
2013.12.28 15:26:30 5: Triggering CUL_HM_HM_CC_RT_DN_21F96A (5 changes)
2013.12.28 15:26:30 5: Notify loop for CUL_HM_HM_CC_RT_DN_21F96A battery: ok
2013.12.28 15:26:30 4: eventTypes: CUL_HM CUL_HM_HM_CC_RT_DN_21F96A battery: ok -> battery: ok
2013.12.28 15:26:30 4: eventTypes: CUL_HM CUL_HM_HM_CC_RT_DN_21F96A batteryLevel: 3.1 V -> batteryLevel: .* V
2013.12.28 15:26:30 4: eventTypes: CUL_HM CUL_HM_HM_CC_RT_DN_21F96A measured-temp: 23.4 -> measured-temp: .*
2013.12.28 15:26:30 4: eventTypes: CUL_HM CUL_HM_HM_CC_RT_DN_21F96A desired-temp: 21 -> desired-temp: .*
2013.12.28 15:26:30 4: eventTypes: CUL_HM CUL_HM_HM_CC_RT_DN_21F96A actuator: 0 % -> actuator: .* %
2013.12.28 15:26:30 5: Triggering CUL_HM_HM_CC_RT_DN_21F96A_Clima (6 changes)
2013.12.28 15:26:30 5: Notify loop for CUL_HM_HM_CC_RT_DN_21F96A_Clima motorErr: ok
2013.12.28 15:26:30 4: eventTypes: CUL_HM CUL_HM_HM_CC_RT_DN_21F96A_Clima motorErr: ok -> motorErr: ok
2013.12.28 15:26:30 4: eventTypes: CUL_HM CUL_HM_HM_CC_RT_DN_21F96A_Clima measured-temp: 23.4 -> measured-temp: .*
2013.12.28 15:26:30 4: eventTypes: CUL_HM CUL_HM_HM_CC_RT_DN_21F96A_Clima desired-temp: 21 -> desired-temp: .*
2013.12.28 15:26:30 4: eventTypes: CUL_HM CUL_HM_HM_CC_RT_DN_21F96A_Clima ValvePosition: 0 % -> ValvePosition: .* %
2013.12.28 15:26:30 4: eventTypes: CUL_HM CUL_HM_HM_CC_RT_DN_21F96A_Clima mode: auto -> mode: auto
2013.12.28 15:26:30 4: eventTypes: CUL_HM CUL_HM_HM_CC_RT_DN_21F96A_Clima T: 23.4 desired: 21 valve: 0 % -> T: .* desired: .* valve: .* %
2013.12.28 15:26:35 4: Connection closed for FHEMWEB:192.168.2.3:57984
2013.12.28 15:26:35 4: HTTP FHEMWEB:192.168.2.3:57986 GET /fhem
----------------------------------------------------------------------------------------------
2013.12.28 15:24:11 4: Connection accepted from FHEMWEB:192.168.2.3:57918
2013.12.28 15:24:11 4: HTTP FHEMWEB:192.168.2.3:57918 GET /fhem/images/default/fhemicon.png
2013.12.28 15:24:11 4: HTTP FHEMWEB:192.168.2.3:57918 GET /fhem?room=all&XHR=1&inform=1&timestamp=1388240650597
2013.12.28 15:25:17 4: Closing connection FHEMWEB:192.168.2.3:57915
2013.12.28 15:25:17 4: Closing connection FHEMWEB:192.168.2.3:57914
2013.12.28 15:25:17 4: Closing connection FHEMWEB:192.168.2.3:57913
2013.12.28 15:25:17 4: Closing connection FHEMWEB:192.168.2.3:57916
2013.12.28 15:25:17 4: Closing connection FHEMWEB:192.168.2.3:57917
2013.12.28 15:25:17 4: Closing connection FHEMWEB:192.168.2.3:57912
2013.12.28 15:25:17 4: Closing connection FHEMWEB:192.168.2.3:57911
2013.12.28 15:25:48 4: Connection closed for FHEMWEB:192.168.2.3:57918
2013.12.28 15:25:48 4: Connection accepted from FHEMWEB:192.168.2.3:57936
----------------------------------------------------------------------------------------------
2013.12.28 15:24:11 4: Connection accepted from FHEMWEB:192.168.2.3:57917
2013.12.28 15:24:11 4: HTTP FHEMWEB:192.168.2.3:57917 GET /fhem/images/default/icoEverything.png
2013.12.28 15:24:11 4: Connection accepted from FHEMWEB:192.168.2.3:57918
2013.12.28 15:24:11 4: HTTP FHEMWEB:192.168.2.3:57918 GET /fhem/images/default/fhemicon.png
2013.12.28 15:24:11 4: HTTP FHEMWEB:192.168.2.3:57918 GET /fhem?room=all&XHR=1&inform=1&timestamp=1388240650597
2013.12.28 15:25:17 4: Closing connection FHEMWEB:192.168.2.3:57915
2013.12.28 15:25:17 4: Closing connection FHEMWEB:192.168.2.3:57914
2013.12.28 15:25:17 4: Closing connection FHEMWEB:192.168.2.3:57913
2013.12.28 15:25:17 4: Closing connection FHEMWEB:192.168.2.3:57916
2013.12.28 15:25:17 4: Closing connection FHEMWEB:192.168.2.3:57917
2013.12.28 15:25:17 4: Closing connection FHEMWEB:192.168.2.3:57912
2013.12.28 15:25:17 4: Closing connection FHEMWEB:192.168.2.3:57911
2013.12.28 15:25:48 4: Connection closed for FHEMWEB:192.168.2.3:57918
2013.12.28 15:25:48 4: Connection accepted from FHEMWEB:192.168.2.3:57936
----------------------------------------------------------------------------------------------
2013.12.28 15:23:27 4: Connection accepted from FHEMWEB:192.168.2.3:57891
2013.12.28 15:23:27 4: Connection accepted from FHEMWEB:192.168.2.3:57892
2013.12.28 15:23:27 4: HTTP FHEMWEB:192.168.2.3:57891 GET /fhem/images/default/icoEverything.png
2013.12.28 15:23:27 4: HTTP FHEMWEB:192.168.2.3:57892 GET /fhem/images/default/fhemicon.png
2013.12.28 15:23:27 4: HTTP FHEMWEB:192.168.2.3:57892 GET /fhem?room=all&XHR=1&inform=1&timestamp=1388240607003
2013.12.28 15:24:00 5: CUL/RAW: /A0FDE861021F96A0000000AA8EA10001608
----------------------------------------------------------------------------------------------
2013.12.28 15:22:39 4: Connection accepted from FHEMWEB:192.168.2.3:57876
2013.12.28 15:22:39 4: HTTP FHEMWEB:192.168.2.3:57875 GET /fhem/images/default/icoEverything.png
2013.12.28 15:22:40 4: HTTP FHEMWEB:192.168.2.3:57876 GET /fhem/images/default/fhemicon.png
2013.12.28 15:22:40 4: HTTP FHEMWEB:192.168.2.3:57876 GET /fhem?room=all&XHR=1&inform=1&timestamp=1388240559411
2013.12.28 15:23:17 4: Closing connection FHEMWEB:192.168.2.3:57869
2013.12.28 15:23:26 4: Connection closed for FHEMWEB:192.168.2.3:57876
2013.12.28 15:23:26 4: Connection closed for FHEMWEB:192.168.2.3:57875
2013.12.28 15:23:26 4: Connection accepted from FHEMWEB:192.168.2.3:57885
2013.12.28 15:23:26 4: Connection closed for FHEMWEB:192.168.2.3:57871
2013.12.28 15:23:26 4: Connection closed for FHEMWEB:192.168.2.3:57870
2013.12.28 15:23:26 4: HTTP FHEMWEB:192.168.2.3:57885 GET /fhem?detail=SZ_Thermostat_EnableBoost
----------------------------------------------------------------------------------------------
2013.12.28 15:22:39 4: Connection accepted from FHEMWEB:192.168.2.3:57876
2013.12.28 15:22:39 4: HTTP FHEMWEB:192.168.2.3:57875 GET /fhem/images/default/icoEverything.png
2013.12.28 15:22:40 4: HTTP FHEMWEB:192.168.2.3:57876 GET /fhem/images/default/fhemicon.png
2013.12.28 15:22:40 4: HTTP FHEMWEB:192.168.2.3:57876 GET /fhem?room=all&XHR=1&inform=1&timestamp=1388240559411
2013.12.28 15:23:17 4: Closing connection FHEMWEB:192.168.2.3:57869
2013.12.28 15:23:26 4: Connection closed for FHEMWEB:192.168.2.3:57876
2013.12.28 15:23:26 4: Connection closed for FHEMWEB:192.168.2.3:57875
2013.12.28 15:23:26 4: Connection accepted from FHEMWEB:192.168.2.3:57885
2013.12.28 15:23:26 4: Connection closed for FHEMWEB:192.168.2.3:57871
2013.12.28 15:23:26 4: Connection closed for FHEMWEB:192.168.2.3:57870
2013.12.28 15:23:26 4: HTTP FHEMWEB:192.168.2.3:57885 GET /fhem?detail=SZ_Thermostat_EnableBoost



Habt ihr eine Idee woran das liegen könnte? System und Fhem sind jeweils auf dem aktuellsten Stand.

Gruß Tristan

juppzupp

Was sagt die sdcard ? Fragmentiert?
Lesefehler ?
Geschwindigkeit?

hdparm -tT /dev/root


Tristec

Guten Morgen,

ich habe noch ein paar Informationen zusammengetragen:

[root@raspberrypi]:~ > hdparm -tT /dev/root
/dev/root:
Timing cached reads:   388 MB in  2.01 seconds = 193.46 MB/sec
Timing buffered disk reads:  58 MB in  3.03 seconds =  19.12 MB/sec


[root@raspberrypi]:~ > vcgencmd measure_temp
temp=50.8'C


[root@raspberrypi]:~ > vcgencmd measure_volts
volt=1.20V


[root@raspberrypi]:~ > vcgencmd measure_clock arm
frequency(45)=700072000




[root@raspberrypi]:~ > fdisk -l

Disk /dev/mmcblk0: 31.7 GB, 31674335232 bytes
4 heads, 16 sectors/track, 966624 cylinders, total 61863936 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000b03b7

           Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1            8192      122879       57344    c  W95 FAT32 (LBA)
/dev/mmcblk0p2          122880    61863935    30870528   83  Linux


[root@raspberrypi]:~ > cat /var/log/fsck/checkroot
Log of fsck -C -a -t ext4 /dev/mmcblk0p2
Sat Dec 28 12:59:11 2013

fsck from util-linux 2.20.1
/dev/mmcblk0p2: clean, 110341/1933312 files, 782742/7717632 blocks

Sat Dec 28 12:59:11 2013
----------------


Das sieht doch eigentlich soweit in Ordnung aus oder nicht?

Gruß Tristan

juppzupp

#3
Das sieht soweit OK aus. mein raspberry ist allerdings 10 grad kuhler.
Sicherheitshalber(auch wenn ich jetzt nicht an die sdcard als Problem glaube) :
root@fhem:~# filefrag /opt/fhem/*
/opt/fhem/?: 1 extent found
/opt/fhem/0: 0 extents found
/opt/fhem/all: 1 extent found
/opt/fhem/backup: 1 extent found
/opt/fhem/CHANGED: 1 extent found
/opt/fhem/contrib: 1 extent found
/opt/fhem/docs: 1 extent found
/opt/fhem/FHEM: 2 extents found
/opt/fhem/fhem.cfg: 1 extent found
/opt/fhem/fhem.cfg.lcd: 1 extent found
/opt/fhem/fhem.pl: 1 extent found
/opt/fhem/log: 1 extent found
/opt/fhem/unused: 1 extent found
/opt/fhem/www: 1 extent found
root@fhem:~#


Und (nicht erschrecken, kann ein paar Sekunden dauern):

root@fhem:~# e4defrag /dev/root -c
<Fragmented files>                             now/best       size/ext
1. /opt/fhem/log/CUL_HM_HM_LC_SW1_FM_1F45E9-2013-12.log
                                                15/1              4 KB
2. /opt/fhem/log/CUL_HM_HM_SEC_SC_200D90-2013-12.log
                                                13/1              4 KB
3. /opt/fhem/log/CUL_HM_HM_LC_SW1_FM_1F45E9-2013.log
                                                10/1              4 KB
4. /var/log/auth.log.1                          10/1              4 KB
5. /opt/fhem/log/CUL_HM_HM_SEC_SC_200D90-2013-10.log
                                                 9/1              4 KB

Total/best extents                             58389/57386
Average size per extent                        32 KB
Fragmentation score                            2
[0-30 no problem: 31-55 a little bit fragmented: 56- needs defrag]
This device (/dev/root) does not need defragmentation.
Done.


Ansonsten mal mit z.b. SCP große Dateien kopieren und gucken ob es dabei gleichmäßig läuft oder auch kleben bleibt.

Hier gab es ein Modul zur performance Messung, da habe ich aber keine Ahnung von :
http://forum.fhem.de/index.php?topic=16347.0

Oder fhem mit her 'nackten' config starten und gucken wie es sich verhält.



Tristec

Hallo,

sorry dass ich mich erst jetzt melde, ich wollte schon seit längerem meinen Raspi und fhem neu aufsetzen und habe die letzten Tage zum experimentieren genutzt.

Aufgefallen ist mir, dass selbst nach der Neuinstallation der Aufruf in Firefox nach wie vor gähnend langsam ist (auch im Private Modus wo keine Cookies etc. gespeichert werden). In Chrome ist fhem innerhalb von Sekunden verfügbar.

Leider habe ich bis jetzt noch keine Lösung für das Firefox Problem finden können und nutze vorerst ausschließlich Chrome...

Gruß Tristan


micomat

Wenn das Netzwerk beim RasPi saulahm ist kann das auch an einem zu schwachen Netzteil liegen.
Da das Netzwerkinterface des RasPi via USB intern angeschlossen ist kann bei viel USB Aktion die Spannung abfallenw as dann zu uebertragungsfehlern fuehrt.

Ich empfehle erfahrungsgemaess mind. 2000mA Netzteile fuer den RasPi Mod. B.

Gruß,
Markus
Synology DS218+ with fhem+iobroker in docker, 2x RasPi w. ser2net, CUL433+868, IT, EGPM2LAN, THZ/LWZ, FB_Callmonitor, HMS100TF, Homematic, 2x TX3-TH, Pushover, USB-IR-SML-Head, SONOS, GHoma, MBus, KLF200

Tristec

mhh ne daran scheints nicht zu liegen, hab ein Nokia USB Netzteil mit 1200mah dran und das Systembackup mit Rsync läuft i.d.R. auch gut durch. Irgendwas stimmt mit Firefox net, die Ladezeit ist aktuell beim IE und Chrome sehr gering.

Gruß Tristan

Deinjo

Hallo,

wollte mal nachfragen, ob das Thema inzwischen gelöst wurde. Ich habe nämlich mit dem gleichen Problem zu kämpfen.

Gruß
Deinjo
rPi3, Jessie, FHEM 5.7
CUL, Homematic, WeMos, FritzDect, TableUI,...