[gelöst] Performanceprobleme in der containerisierten Version

Begonnen von ronzo, 10 Mai 2023, 13:02:34

Vorheriges Thema - Nächstes Thema

ronzo

Mein nicht containerisiertes FHEM zeigt für "apptime max" in etwa folgende Ausgabe:

active-timers: 34; max-active timers: 41; max-timer-load: 2  min-tmrHandlingTm: 0.1ms; max-tmrHandlingTm: 79.7ms; totAvgDly: 1.0ms

 name                                     function                               max    count      total  average   maxDly   avgDly TS Max call     param Max call
 tmr-ONKYO_AVR_connectionCheck            HASH(0x55e49f3344a8)                    79        9     441.51    49.06     1.89     0.55 10.05. 12:43:03 HASH(PioneerVSX)
 tmr-CUL_HM_ActCheck                      ActionDetector                          41        1      41.83    41.83     0.53     0.53 10.05. 12:40:59 ActionDetector
 tmr-CUL_HM_cfgStateUpdate                cfgStateUpdate                          34       15     107.26     7.15     1.41     0.68 10.05. 12:38:02 cfgStateUpdate:thermostatWohnzimmerWand
 hmLanGw03                                HMUARTLGW_Read                          19      504     694.65     1.38     0.00     0.00 10.05. 12:43:13 HASH(hmLanGw03)
 hmLanGw01                                HMUARTLGW_Read                          17      712     626.44     0.88     0.00     0.00 10.05. 12:38:16 HASH(hmLanGw01)
 tmr-CUL_HM_respPendTout                  respPend                                16       11      99.37     9.03     1.70     0.68 10.05. 12:46:19 respPend:3CE215
 tmr-Wunderground_GetStatus               HASH(0x55e49f801f08)                    14        2      26.18    13.09     1.10     1.05 10.05. 12:46:01 HASH(WuWeatherSomewhere)
 autoLichtAbstellraum                     DOIF_Notify                             13        1      13.71    13.71     0.00     0.00 10.05. 12:43:13 HASH(autoLichtAbstellraum); HASH(Abstellraum)
 tmr-OctoPrint_GetStatus                  HASH(0x55e4a15c1668)                    11       11      91.85     8.35     2.13     0.88 10.05. 12:39:12 HASH(PrusaMini)
 LichtschalterAbstellraum_Sw_02           CUL_HM_Set                              11        1      11.42    11.42     0.00     0.00 10.05. 12:43:13 HASH(LichtschalterAbstellraum_Sw_02); LichtschalterAbstellraum_Sw_02; off
 tmr-Jabber_PollMessages                  HASH(0x55e49e45fdc8)                    10      254    2624.43    10.33     2.81     1.10 10.05. 12:39:51 HASH(JabberInterface)
...

Die containerisierte Variante hingegen:
active-timers: 36; max-active timers: 39; max-timer-load: 3  min-tmrHandlingTm: 0.1ms; max-tmrHandlingTm: 417.3ms; totAvgDly: 52.3ms

 name                                     function                               max    count      total  average   maxDly   avgDly TS Max call     param Max call
 hmLanGw03                                HMUARTLGW_Read                         934       25    2725.97   109.04     0.00     0.00 10.05. 12:50:04 HASH(hmLanGw03)
 DBLogging                                DbLog_Log                              930       33    4503.75   136.48     0.00     0.00 10.05. 12:50:04 HASH(DBLogging); HASH(RaumthermostatWohnzimmer_Climate)
 tmr-CUL_HM_respPendTout                  respPend                               417        3     417.83   139.28   275.22    92.04 10.05. 12:50:15 respPend:6B1FD2
 zwd                                      ZWDongle_Read                          307        1     307.35   307.35     0.00     0.00 10.05. 12:50:29 HASH(zwd)
 tmr-CUL_HM_motionCheck                   BewegungsmelderAussen                  280        1     280.59   280.59     1.72     1.72 10.05. 12:50:17 BewegungsmelderAussen:motionCheck
 hmLanGw01                                HMUARTLGW_Read                         267      291    1129.26     3.88     0.00     0.00 10.05. 12:50:12 HASH(hmLanGw01)
 tmr-OctoPrint_GetStatus                  HASH(0x557b1aa2bae8)                   143        1     143.74   143.74     0.59     0.59 10.05. 12:50:25 HASH(PrusaMini)
 DBLogging                                DbLog_SBP_Read                          21       16     230.23    14.39     0.00     0.00 10.05. 12:50:23 HASH(DBLogging)
 tmr-Jabber_PollMessages                  HASH(0x557b17e4a5d0)                    11       19     198.87    10.47   248.89    50.20 10.05. 12:50:27 HASH(JabberInterface)
 WEB_10.42.4.0_46674                      FW_Read                                 10        3      19.98     6.66     0.00     0.00 10.05. 12:50:29 HASH(WEB_10.42.4.0_46674)
...

Jegliches Schalten von Z-Wave- oder HM-Devices passiert in der containerisierten Variante mit merklicher Verzögerung. (bis zu 2 Sekunden)

Dank dieser Metriken konnte ich bereits feststellen, dass eine DB-Verbindung in der Hostname noch nicht passt und die Verbindung nicht möglich ist. Octoprint ebenso. Beides korrigiert und die Perfomance schaut schon deutlich besser aus.

Das Jabberinterface scheint gar nicht zu funkionieren. Vielleicht hat das hiermit zu tun: https://github.com/fhem/fhem-docker/issues/40

Warum aber habe ich bei HMUARTLGW_Read und  ZWDongle_Read so hohe Werte? HM- wie ZW-Dongles sind über LAN angebunden.

Kann mir jemand anhand einer Zeile vielleicht verdeutlichen, was die einzelnen Spalten exakt bedeuten. (So vermute ich nur, weiß es aber nicht sicher...)


ronzo

Es sieht nun schon viel besser aus. Das JabberInterface muss ich noch zum laufen bringen...

active-timers: 33; max-active timers: 39; max-timer-load: 7  min-tmrHandlingTm: 0.0ms; max-tmrHandlingTm: 352.1ms; totAvgDly: 11.0ms

 name                                     function                               max    count      total  average   maxDly   avgDly TS Max call     param Max call
 tmr-Jabber_PollMessages                  HASH(0x558453196958)                   351      875   11031.27    12.61  6500.15    10.49 10.05. 13:31:18 HASH(JabberInterface)
 tmr-ONKYO_AVR_connectionCheck            HASH(0x558453d92ef0)                   172       29    1844.30    63.60     2.44     1.37 10.05. 13:50:23 HASH(PioneerVSX)
 WEB_10.42.4.0_15186                      FW_Read                                166       10     273.22    27.32     0.00     0.00 10.05. 13:52:54 HASH(WEB_10.42.4.0_15186)
 DBLogging                                DbLog_Set                               61        4     185.26    46.32     0.00     0.00 10.05. 13:52:15 HASH(DBLogging); DBLogging; ?
 tmr-CUL_HM_ActCheck                      ActionDetector                          49        3      53.95    17.98     2.28     1.32 10.05. 13:31:14 ActionDetector
 tmr-Wunderground_GetStatus               HASH(0x55845432e3e0)                    39        6     151.04    25.17     3.43     1.74 10.05. 13:51:16 HASH(WuWeatherSomewhere)
 hmLanGw01                                HMUARTLGW_Read                          26      728    1125.44     1.55     0.00     0.00 10.05. 13:23:49 HASH(hmLanGw01)
 tmr-OctoPrint_GetStatus                  HASH(0x558455c40c98)                    21       77     474.97     6.17     2.66     1.16 10.05. 13:24:11 HASH(PrusaMini)
 hmLanGw03                                HMUARTLGW_Read                          17      639     781.26     1.22     0.00     0.00 10.05. 13:29:46 HASH(hmLanGw03)
 tmr-CUL_HM_cfgStateUpdate                cfgStateUpdate                          17        1      17.73    17.73     1.26     1.26 10.05. 13:25:18 cfgStateUpdate:LichtschalterGarderobe
 tmr-MPD_try_idle                         HASH(0x55844dfa77d8)                    13       29     181.34     6.25     1.54     1.02 10.05. 13:51:17 HASH(MyMPD)

ronzo

Jabber läuft, wenn man libauthen-sasl-cyrus-perl entfernt. Jetzt muss ich mir wohl glatt ein eigenes Image bauen...