FHEM Forum

FHEM => Frontends => Thema gestartet von: herman am 17 Februar 2014, 14:25:46

Titel: Preformance-Probleme beim Zugriff auf FHEMWEB von IOS
Beitrag von: herman am 17 Februar 2014, 14:25:46
Hallo,

ich leide gerade unter HMLAN-Disconnects weil irgendetwas zu Verzögerungen in FHEM führt. Ich habe notifies etc. schon weg optimiert und event-on-change-reading .* überall wo es Sinn macht eingebaut.

Mit Apptime verfolge ich Verzögerungen. Es verhält sich ruhig. Nur beim Zugriff von extern über IOS auf WEBphone treten starke Verzögerungen auf. Beim Zugriff über einen Desktop-Rechner auf den gleichen Port habe ich keine Probleme:


                                name             function    max  count    total  average maxDly
           FHEMWEB:x.x.x.x:55055              FW_Read  10098      1    10098 10098.00      0 HASH(0x167cda8)



                                name             function    max  count    total  average maxDly
            tmr-YAMAHA_AVR_GetStatus      HASH(0x157ceb8)      4     70      146     2.09   6318 HASH(0x157ceb8)
                 tmr-HMLAN_KeepAlive     keepAlive:HMLAN1      2    104      208     2.00   2997 keepAlive:HMLAN1
              tmr-FW_closeOldClients                           9     34      175     5.15     87
                tmr-HMLAN_UpdtMsgCnt       UpdtMsg:HMLAN1      1     21        8     0.38      9 UpdtMsg:HMLAN1
                 tmr-CUL_HM_ActCheck       ActionDetector     68      4      122    30.50      6 ActionDetector
            tmr-HMLAN_KeepAliveCheck   keepAliveCk:HMLAN1      0    104        0     0.00      5
                   tmr-CUL_HM_procQs        CUL_HM_procQs     12      8       23     2.88      3 CUL_HM_procQs
                  AZ_HZ_Stellantrieb           CUL_HM_Set     11      1       11    11.00      0 HASH(0x131a2b0); AZ_HZ_Stellantrieb; ?
                          AZ_Heizung           CUL_HM_Set      6      1        6     6.00      0 HASH(0x1118f98); AZ_Heizung; ?
                  AZ_Heizung_Climate           CUL_HM_Set      9      1        9     9.00      0 HASH(0x15003e0); AZ_Heizung_Climate; ?
                  AZ_Heizung_Weather           CUL_HM_Set      3      1        3     3.00      0 HASH(0x1500020); AZ_Heizung_Weather; ?
                AZ_Heizung_WindowRec           CUL_HM_Set      3      1        3     3.00      0 HASH(0x1500698); AZ_Heizung_WindowRec; ?
                            AZ_Licht               IT_Set      0      1        0     0.00      0
                              AZ_MAC           CUL_HM_Set      5      1        5     5.00      0 HASH(0x1319fb0); AZ_MAC; ?
                           AZ_Remote           CUL_HM_Set      3      1        3     3.00      0 HASH(0x10e3558); AZ_Remote; ?
                          Absenktemp            dummy_Set      0      1        0     0.00      0
                      ActionDetector           CUL_HM_Set      2      1        2     2.00      0 HASH(0x160a190); ActionDetector; ?
                          BM_Eingang           CUL_HM_Set      3      1        3     3.00      0 HASH(0x1481488); BM_Eingang; ?
                        Bewaesserung            dummy_Set      0      5        0     0.00      0
                  Bewaesserung_Dauer            dummy_Set      0      1        0     0.00      0
                                CUL1              CUL_Set      0      1        0     0.00      0
                CUL_HM_remote_1D2FA3           CUL_HM_Set      3      1        3     3.00      0 HASH(0x16112c8); CUL_HM_remote_1D2FA3; ?
         CUL_HM_remote_1D2FA3_Btn_01           CUL_HM_Set      3      1        3     3.00      0 HASH(0x1611d90); CUL_HM_remote_1D2FA3_Btn_01; ?
         CUL_HM_remote_1D2FA3_Btn_02           CUL_HM_Set      3      1        3     3.00      0 HASH(0x16121c8); CUL_HM_remote_1D2FA3_Btn_02; ?
             DG_SZ_HZ_Stellantrieb_1           CUL_HM_Set     11      1       11    11.00      0 HASH(0x1602948); DG_SZ_HZ_Stellantrieb_1; ?
             DG_SZ_HZ_Stellantrieb_2           CUL_HM_Set     11      1       11    11.00      0 HASH(0x1602dc8); DG_SZ_HZ_Stellantrieb_2; ?
                       DG_SZ_Heizung           CUL_HM_Set      6      1        6     6.00      0 HASH(0x1604260); DG_SZ_Heizung; ?
               DG_SZ_Heizung_Climate           CUL_HM_Set      9      1        9     9.00      0 HASH(0x1604f38); DG_SZ_Heizung_Climate; ?
               DG_SZ_Heizung_Weather           CUL_HM_Set      3      1        3     3.00      0 HASH(0x1602f60); DG_SZ_Heizung_Weather; ?
             DG_SZ_Heizung_WindowRec           CUL_HM_Set      3      1        3     3.00      0 HASH(0x1606cb0); DG_SZ_Heizung_WindowRec; ?
                    DG_WZ_Balkontuer           CUL_HM_Set      4      1        4     4.00      0 HASH(0x1609e30); DG_WZ_Balkontuer; ?
             DG_WZ_HZ_Stellantrieb_1           CUL_HM_Set     12      1       12    12.00      0 HASH(0x15fd570); DG_WZ_HZ_Stellantrieb_1; ?
             DG_WZ_HZ_Stellantrieb_2           CUL_HM_Set     11      1       11    11.00      0 HASH(0x1602060); DG_WZ_HZ_Stellantrieb_2; ?
             DG_WZ_HZ_Stellantrieb_3           CUL_HM_Set     11      1       11    11.00      0 HASH(0x16024e0); DG_WZ_HZ_Stellantrieb_3; ?
             DG_WZ_HZ_Stellantrieb_4           CUL_HM_Set     11      1       11    11.00      0 HASH(0x1607028); DG_WZ_HZ_Stellantrieb_4; ?
                       DG_WZ_Heizung           CUL_HM_Set      6      1        6     6.00      0 HASH(0x15fda78); DG_WZ_Heizung; ?
               DG_WZ_Heizung_Climate           CUL_HM_Set      9      1        9     9.00      0 HASH(0x1607820); DG_WZ_Heizung_Climate; ?
               DG_WZ_Heizung_Weather           CUL_HM_Set      3      1        3     3.00      0 HASH(0x1607388); DG_WZ_Heizung_Weather; ?
             DG_WZ_Heizung_WindowRec           CUL_HM_Set      3      1        3     3.00      0 HASH(0x1609aa0); DG_WZ_Heizung_WindowRec; ?
                          EZ_Kommode           CUL_HM_Set      5      6       30     5.00      0 HASH(0x15d3968); EZ_Kommode; ?
                            EZ_Licht           CUL_HM_Set      5      6       30     5.00      0 HASH(0x1575eb0); EZ_Licht; ?
                       Eingang_Licht           CUL_HM_Set      5      2       10     5.00      0 HASH(0x1481f10); Eingang_Licht; ?
           FHEMWEB:x.x.x.x:55054              FW_Read     52      2       79    39.50      0 HASH(0x17f8c98)
           FHEMWEB:x.x.x.x:55055              FW_Read  10098      1    10098 10098.00      0 HASH(0x167cda8)



List WEBphone sieht so aus:


Internals:
   CONNECTS   79
   DEF        8084 global
   FD         7
   NAME       WEBphone
   NR         8
   NTFY_ORDER 50-WEBphone
   PORT       8084
   STATE      Initialized
   TYPE       FHEMWEB
   Helper:
     Bm:
       Fw_notify:
         cnt        398
         dmx        0
         mAr       
         max        0
         tot        0
       Fw_read:
         cnt        7
         dmx        0
         mAr        HASH(0xe6d7c8)
         max        3
         tot        15
Attributes:
   fwcompress 0
   stylesheetPrefix smallscreen


Ich habe mich noch nicht dem Thema mit den Logos gewidmet. Diese verschwinden bei mir nach dem Aufbau der Seite. Kann es damit zusammenhängen.
Vielen Dank für die Unterstützung.
Grüße,
Merhan
Titel: Antw:Preformance-Probleme beim Zugriff auf FHEMWEB von IOS
Beitrag von: rudolfkoenig am 17 Februar 2014, 14:36:56
Kannst Du bitte nach einem "attr WEBphone verbose 5" den iOS Aufruf wiederholen, und den Inhalt des FHEM-Logs hier posten?
Titel: Antw:Preformance-Probleme beim Zugriff auf FHEMWEB von IOS
Beitrag von: herman am 17 Februar 2014, 15:16:34
Hallo Rudi,

Ich habe attr WEBphone verbose 5 ausgeführt und diverse Anfragen gestellt. Die meisten waren gerade sehr schnell.

Hier im Log eine schnell und etwas später eine langsame, die ich abgebrochen habe, weil ich Angst hatte, dass FHEM hängen bleibt und ich nicht mehr an die Events komme:
Hier die Ausgabe im Log:


2014.02.17 15:05:21 4: Connection accepted from FHEMWEB:x.x.x.x:55193
2014.02.17 15:05:21 4: HTTP FHEMWEB:x.x.x.x:55193 GET /fhem?room=1_Home
2014.02.17 15:05:22 4: /fhem?room=1_Home / RL:14453 / text/html; charset=UTF-8 /  /
2014.02.17 15:05:23 4: HTTP FHEMWEB:x.x.x.x:55193 GET /fhem/pgm2/style.css
2014.02.17 15:05:23 4: HTTP FHEMWEB:x.x.x.x:55193 GET /fhem/pgm2/svg.js
2014.02.17 15:05:23 4: HTTP FHEMWEB:x.x.x.x:55193 GET /fhem/pgm2/fhemweb_textField.js
2014.02.17 15:05:23 4: Connection accepted from FHEMWEB:x.x.x.x:55194
2014.02.17 15:05:23 4: Connection accepted from FHEMWEB:x.x.x.x:55195
2014.02.17 15:05:23 4: HTTP FHEMWEB:x.x.x.x:55194 GET /fhem/pgm2/fhemweb_colorpicker.js
2014.02.17 15:05:23 4: Connection accepted from FHEMWEB:x.x.x.x:55196
2014.02.17 15:05:23 4: HTTP FHEMWEB:x.x.x.x:55195 GET /fhem/pgm2/fhemweb.js
2014.02.17 15:05:23 4: HTTP FHEMWEB:x.x.x.x:55196 GET /fhem/pgm2/fhemweb_noArg.js
2014.02.17 15:05:23 4: Connection accepted from FHEMWEB:x.x.x.x:55197
2014.02.17 15:05:23 4: HTTP FHEMWEB:x.x.x.x:55193 GET /fhem/pgm2/dashboard_style.css
2014.02.17 15:05:23 4: HTTP FHEMWEB:x.x.x.x:55197 GET /fhem/pgm2/fhemweb_slider.js
2014.02.17 15:05:23 4: Connection accepted from FHEMWEB:x.x.x.x:55198
2014.02.17 15:05:23 4: HTTP FHEMWEB:x.x.x.x:55198 GET /fhem/pgm2/fhemweb_svg.js
2014.02.17 15:05:23 4: HTTP FHEMWEB:x.x.x.x:55198 GET /fhem/images/default/icoBaum.png
2014.02.17 15:05:23 4: HTTP FHEMWEB:x.x.x.x:55195 GET /fhem/images/default/icoRolladen.off.png
2014.02.17 15:05:23 4: HTTP FHEMWEB:x.x.x.x:55194 GET /fhem/images/default/icoPirAuto.png
2014.02.17 15:05:23 4: HTTP FHEMWEB:x.x.x.x:55193 GET /fhem/images/default/off.png
2014.02.17 15:05:23 4: HTTP FHEMWEB:x.x.x.x:55196 GET /fhem/images/default/icoHaus.png
2014.02.17 15:05:23 4: HTTP FHEMWEB:x.x.x.x:55197 GET /fhem/images/default/icoRolladen.on.png
2014.02.17 15:05:23 4: HTTP FHEMWEB:x.x.x.x:55198 GET /fhem/images/default/icoKLIMA.png
2014.02.17 15:05:23 4: HTTP FHEMWEB:x.x.x.x:55194 GET /fhem/images/default/fhemicon_smallscreen.png
2014.02.17 15:05:23 4: HTTP FHEMWEB:x.x.x.x:55198 GET /fhem/images/default/icoBELEUCHTUNG.png
2014.02.17 15:05:26 4: Connection closed for FHEMWEB:x.x.x.x:55198
2014.02.17 15:05:26 4: Connection closed for FHEMWEB:x.x.x.x:55195
2014.02.17 15:05:26 4: Connection closed for FHEMWEB:x.x.x.x:55196
2014.02.17 15:05:26 4: Connection closed for FHEMWEB:x.x.x.x:55197
2014.02.17 15:05:26 4: Connection closed for FHEMWEB:x.x.x.x:55194
2014.02.17 15:05:26 4: Connection closed for FHEMWEB:x.x.x.x:55193
2014.02.17 15:06:37 4: Closing connection FHEMWEB:x.x.x.x:60352
2014.02.17 15:06:37 4: Closing connection FHEMWEB:x.x.x.x:60344
2014.02.17 15:06:37 4: Closing connection FHEMWEB:x.x.x.x:60347
2014.02.17 15:06:37 4: Closing connection FHEMWEB:x.x.x.x:60350
2014.02.17 15:06:37 4: Closing connection FHEMWEB:x.x.x.x:60349
2014.02.17 15:13:17 4: Connection accepted from FHEMWEB:x.x.x.x:55202
2014.02.17 15:13:17 4: HTTP FHEMWEB:x.x.x.x:55202 GET /fhem?room=1_Home
2014.02.17 15:13:18 4: /fhem?room=1_Home / RL:14453 / text/html; charset=UTF-8 /  /
2014.02.17 15:13:19 4: HTTP FHEMWEB:x.x.x.x:55202 GET /fhem/pgm2/style.css
2014.02.17 15:13:19 4: HTTP FHEMWEB:x.x.x.x:55202 GET /fhem/pgm2/svg.js
2014.02.17 15:13:19 4: HTTP FHEMWEB:x.x.x.x:55202 GET /fhem/pgm2/fhemweb_textField.js
2014.02.17 15:13:19 4: Connection accepted from FHEMWEB:x.x.x.x:55203
2014.02.17 15:13:19 4: HTTP FHEMWEB:x.x.x.x:55203 GET /fhem/pgm2/fhemweb_colorpicker.js
2014.02.17 15:13:19 4: Connection accepted from FHEMWEB:x.x.x.x:55204
2014.02.17 15:13:19 4: HTTP FHEMWEB:x.x.x.x:55204 GET /fhem/pgm2/fhemweb.js
2014.02.17 15:13:19 4: Connection accepted from FHEMWEB:x.x.x.x:55205
2014.02.17 15:13:19 4: HTTP FHEMWEB:x.x.x.x:55205 GET /fhem/pgm2/fhemweb_noArg.js
2014.02.17 15:13:19 4: Connection accepted from FHEMWEB:x.x.x.x:55206
2014.02.17 15:13:19 4: HTTP FHEMWEB:x.x.x.x:55206 GET /fhem/pgm2/fhemweb_slider.js
2014.02.17 15:13:19 4: Connection accepted from FHEMWEB:x.x.x.x:55207
2014.02.17 15:13:19 4: HTTP FHEMWEB:x.x.x.x:55207 GET /fhem/pgm2/fhemweb_svg.js
2014.02.17 15:13:19 4: Connection accepted from FHEMWEB:x.x.x.x:55208
2014.02.17 15:13:19 4: HTTP FHEMWEB:x.x.x.x:55208 GET /fhem/pgm2/dashboard_style.css
2014.02.17 15:13:38 4: Connection closed for FHEMWEB:x.x.x.x:55207
2014.02.17 15:13:38 4: Connection closed for FHEMWEB:x.x.x.x:55206
2014.02.17 15:13:38 4: Connection closed for FHEMWEB:x.x.x.x:55202
2014.02.17 15:13:38 4: Connection closed for FHEMWEB:x.x.x.x:55203
2014.02.17 15:13:38 4: Connection closed for FHEMWEB:x.x.x.x:55208
2014.02.17 15:13:38 4: Connection closed for FHEMWEB:x.x.x.x:55205
2014.02.17 15:13:38 4: Connection closed for FHEMWEB:x.x.x.x:55204


Danke & Grüße,
Merhan
Titel: Antw:Preformance-Probleme beim Zugriff auf FHEMWEB von IOS
Beitrag von: rudolfkoenig am 17 Februar 2014, 16:24:40
Ich sehe im Log nichts auffaelliges. Falls FHEM auf einem "richtigen" Linux laeuft, dann bitte ein Problemfall mit "strace -tt -p <fhem-pid>" beobachten. Sonst am besten den globalen verbose auf 5 setzen, und alles wieder ausfuehren.
Titel: Antw:Preformance-Probleme beim Zugriff auf FHEMWEB von IOS
Beitrag von: herman am 18 Februar 2014, 10:00:16
So ich bin soweit mit der Fehlersuche fertig.

Das Problem war wie folgt:

Mein FHEM ist recht umfangreich. Somit legt ein XMLLIST mein FHEM von extern aufgerufen ca. Sekunden lahm. Da ich die App FHEMobile seit kurzem nutze und diese auch im Hintergrund zyklisch die XMLLIST abruft, hing mein FHEM zyklisch um 10 Sekunden.

Zur Fehlersuche für solche Fälle kann ich http://forum.fhem.de/index.php/topic,16347.0.html (http://forum.fhem.de/index.php/topic,16347.0.html) empfehlen.

Evtl. sollten XMLLIST und FEHMobile überarbeitet werden.

Grüße,
Merhan
Titel: Antw:Preformance-Probleme beim Zugriff auf FHEMWEB von IOS
Beitrag von: rudolfkoenig am 18 Februar 2014, 10:22:35
Ist wohl ein FHEMWEB bug, es wird nicht ueberall das nicht-blockierende Schreiben verwendet.
Koentest du noch messen, wie gross diese Daten sind (steht direkt nach RL: im fhem-log auf verbose 4).

Titel: Antw:Preformance-Probleme beim Zugriff auf FHEMWEB von IOS
Beitrag von: herrmannj am 18 Februar 2014, 11:47:13
bin zwar nicht merhan:

RL:892249

aus: http://forum.fhem.de/index.php/topic,20071.msg139279.html#msg139279

vg
jörg
Titel: Antw:Preformance-Probleme beim Zugriff auf FHEMWEB von IOS
Beitrag von: herman am 18 Februar 2014, 11:56:12
Danke Jörg!
da war doch vorhin noch ein Post von jemand anderem. Ich dachte die Frage wäre darauf bezogen.

- der Post ist jetzt weg - komisch.
Titel: Antw:Preformance-Probleme beim Zugriff auf FHEMWEB von IOS
Beitrag von: rudolfkoenig am 18 Februar 2014, 12:31:09
Sorry fuer falsch-Posting, hier nochmal:

Deine komprimierte Konfiguration ist 1MB?
Kann ich davon eine Kopie sehen?
 
Titel: Antw:Preformance-Probleme beim Zugriff auf FHEMWEB von IOS
Beitrag von: rudolfkoenig am 18 Februar 2014, 12:44:26
1. Die Daten sind unkomprimiert ca 1MB, komprimiert ca 70k -> es waere sinnvoll, wenn FHEMobile die Daten komprimiert bestellt (im HTTP Header:  Accept-Encoding: gzip)
2. FHEMobile koennte (theoretisch) auch eine Untermenge der Daten bestellen.
3. Vielleicht sollte FHEM auch weniger detaillierte XML-Listen anbieten

Trotzdem bleibt das ein FHEMWEB Bug, und bleibt auf meinem TODO