Hi Leute,
es ist bei mir wieder soweit: sporadisch bemerke ich Freezes in FHEM. Zum Beispiel drücke ich einen Schalter, aber die Reaktion erfolgt erst viele Sekunden später. Läuft bei mir in einer Ubuntu-VM auf einem Windows10-Host mit Intel-i5.
Ich hab mal apptime etwas laufen lassen und das sieht dann so aus:
name function max count total average maxDly avgDly TS Max call param Max call
tmr-YAMAHA_AVR_GetStatus HASH(0x55dcb38f0d28) 833 1310 6073.11 4.64 11539.41 11.71 16.02. 09:36:03 HASH(wz_avr)
tmr-PRESENCE_StartLocalScan HASH(0x55dcb9c23908) 637 327 6240.24 19.08 12565.25 40.99 16.02. 00:16:25 HASH(fl_tabletAutoRemoteWifi)
tmr-Calendar_PollChild HASH(0x55dcb699e938) 618 11 4576.98 416.09 5.61 2.07 16.02. 00:23:00 HASH(env_calGoogle)
tmr-PRESENCE_StartLocalScan HASH(0x55dcb84f4110) 582 1186 22018.21 18.57 1305.54 3.75 16.02. 08:59:33 HASH(wz_sub)
tmr-PRESENCE_StartLocalScan HASH(0x55dcb82be248) 295 1185 21501.41 18.14 2578.72 5.12 16.02. 09:12:27 HASH(fl_ben)
sz_co2mini co2mini_Read 281 70133 42944.62 0.61 0.00 0.00 15.02. 23:48:25 HASH(sz_co2mini)
tmr-SB_PLAYER_GetStatus HASH(0x55dcb5a42410) 262 129 1485.18 11.51 23.87 2.59 16.02. 09:36:48 HASH(bd_sb)
sbserver SB_SERVER_Read 248 1444 5820.55 4.03 0.00 0.00 16.02. 09:17:30 HASH(sbserver)
tmr-PRESENCE_StartLocalScan HASH(0x55dcb9156a00) 215 1074 18798.98 17.50 3276.68 5.88 16.02. 08:18:05 HASH(wz_htpc)
sys_culHm HMUARTLGW_Read 213 6522 64105.98 9.83 0.00 0.00 15.02. 23:29:50 HASH(sys_culHm)
WEB FW_Read 204 8310 7767.46 0.93 0.00 0.00 16.02. 08:18:19 HASH(WEB)
sys_mqtt MQTT2_CLIENT_Read 187 11834 31616.88 2.67 0.00 0.00 15.02. 23:11:18 HASH(sys_mqtt)
sys_cul868 CUL_Read 173 3600 33113.87 9.20 0.00 0.00 16.02. 08:02:53 HASH(sys_cul868)
wz_lightLedCouch EspLedController_Read 173 3423 19986.62 5.84 0.00 0.00 16.02. 09:14:07 HASH(wz_lightLedCouch)
sys_cul433 CUL_Read 169 3605 26987.37 7.49 0.00 0.00 16.02. 08:02:53 HASH(sys_cul433)
sys_di_env_wallPushButtons DOIF_Notify 164 27 238.40 8.83 0.00 0.00 15.02. 23:29:50 HASH(sys_di_env_wallPushButtons); HASH(sz_presenceTaster_Btn1)
env_presence dummy_Set 162 4 301.79 75.45 0.00 0.00 15.02. 23:29:50 HASH(env_presence); env_presence; sleep
tmr-PRESENCE_StartLocalScan HASH(0x55dcb954a440) 156 1307 22507.36 17.22 2178.33 4.83 16.02. 08:40:03 HASH(sz_s8_pres)
sys_di_updateLights DOIF_Notify 146 336 3784.40 11.26 0.00 0.00 15.02. 23:29:50 HASH(sys_di_updateLights); HASH(env_presence)
sys_di_motionLight DOIF_Notify 143 59 1925.73 32.64 0.00 0.00 16.02. 02:07:00 HASH(sys_di_motionLight); HASH(fl_motion)
tmr-__ANON__ HASH(0x55dcb9a62968) 142 5533 14749.28 2.67 0.00 0.00 15.02. 23:06:40 HASH(sys_mqtt)
sys_lightCycleStop notify_Exec 141 17356 4002.21 0.23 0.00 0.00 16.02. 09:04:56 HASH(sys_lightCycleStop); HASH(env_gasMeter_Sen)
tmr-DOIF_SleepTrigger HASH(0x55dcb880d050) 141 1 141.18 141.18 3.36 3.36 16.02. 08:12:16 HASH(sys_di_bathActivity)
sys_f_fl_motionLight dummy_Set 141 48 992.80 20.68 0.00 0.00 16.02. 02:07:00 HASH(sys_f_fl_motionLight); sys_f_fl_motionLight; off
tmr-SB_SERVER_tcb_Alive SB_SERVER_Alive 132 249 1913.89 7.69 29.02 2.48 16.02. 09:36:30 SB_SERVER_Alive:sbserver
wz_lightLedTv EspLedController_Read 124 2044 17032.27 8.33 0.00 0.00 16.02. 09:04:58 HASH(wz_lightLedTv)
tmr-WINCONNECT_GetStatus HASH(0x55dcb9fd3e28) 116 874 2862.30 3.27 1307.78 4.19 16.02. 00:10:27 HASH(wz_dyadWin)
tmr-PRESENCE_StartLocalScan HASH(0x55dcbaf6a2d0) 108 1066 18050.82 16.93 336.10 2.99 16.02. 04:35:01 HASH(katja_phone)
tmr-at_Exec HASH(0x55dcb99de5d8) 106 218 5099.69 23.39 111.14 3.82 16.02. 08:16:38 HASH(fl_atBenStatsUpdate)
bd_lightCeil YeeLight_Ready 103 248367 26496.62 0.11 0.00 0.00 16.02. 08:44:59 HASH(bd_lightCeil)
smartlights SMARTLIGHTS_Set 99 1912 1876.81 0.98 0.00 0.00 16.02. 08:45:05 HASH(smartlights); smartlights; submit
tmr-PRESENCE_StartLocalScan HASH(0x55dcb7a7bf88) 99 1186 20716.37 17.47 104.32 2.98 16.02. 09:38:18 HASH(wz_dyad)
tmr-HMUARTLGW_CheckCredits HMUARTLGW_CheckCredits 98 2628 9049.85 3.44 7547.54 5.76 16.02. 08:39:58 HMUARTLGW_CheckCredits:sys_culHm
tmr-FRITZBOX_Readout_Start env_fritzbox.Readout 92 328 5705.12 17.39 60.01 2.88 16.02. 08:51:36 env_fritzbox.Readout
WEB_127.0.0.1_54356 FW_Notify 91 17356 43587.07 2.51 0.00 0.00 16.02. 09:26:34 HASH(WEB_127.0.0.1_54356); HASH(wz_dyadWin)
telnetPort telnet_Read 91 8963 32657.69 3.64 0.00 0.00 16.02. 09:17:51 HASH(telnetPort)
sz_lightLedWall EspLedController_Read 90 692 1000.77 1.45 0.00 0.00 15.02. 23:29:51 HASH(sz_lightLedWall)
tmr-DOIF_SleepTrigger HASH(0x55dcb9216c98) 88 3 162.90 54.30 1.38 1.22 16.02. 08:12:16 HASH(sys_di_presenceChange)
wz_rg_dvbReceiver readingsGroup_Notify 84 17356 1026.16 0.06 0.00 0.00 15.02. 23:39:17 HASH(wz_rg_dvbReceiver); HASH(wz_dvbReceiver)
fl_lightChain CUL_HM_Set 80 68 370.12 5.44 0.00 0.00 16.02. 08:45:05 HASH(fl_lightChain); fl_lightChain; 0; 0; 480
sys_f_ku_motionLight dummy_Set 77 20 151.15 7.56 0.00 0.00 15.02. 23:36:10 HASH(sys_f_ku_motionLight); sys_f_ku_motionLight; on
Also interessanterweise keine konkrete Funktion, die gehangen hat (alle max < 1000 ms), aber trotzdem bei vielen Timern "maxDly"-Werte bis zu 12 Sekunden. Das scheint wohl das Problem zu sein?
Also ich lese daraus, dass nicht FHEM selbst gehangen hat und die Timer verzögert hat, sondern dass das wohl das Linux gehangen hat oder ausgelastet war und dadurch die Timer nicht zeitnah an die Reihe kamen? Kann natürlich auch sein, dass der ganze Host gehangen hat und darum die VM nicht zum Zuge kam...
Seht ihr das auch so? Und wenn ja: habt ihr Ideen, wie ich dem auf die Schliche kommen könnte?
Danke!
Nachricht an Interessierte und mein zukünftiges Ich:
Scheint jetzt gelöst zu sein, indem ich die Priorität der VM hochgesetzt habe, damit sie auf dem Host Vorfahrt hat:
https://docs.vmware.com/en/VMware-Workstation-Pro/17/com.vmware.ws.using.doc/GUID-5B898B52-34BF-45C7-B107-65BD5315E97F.html
Und auch den fhem-Prozess in der Linux-VM mit Realtime-Scheduler (CPUSchedulingPolicy) ausgestattet (Holzhammermethode):
[Unit]
Description=FHEM Home Automation Server
Documentation=
[Service]
Type=forking
User=fhem
Restart=on-failure
PermissionsStartOnly=true
PIDFile=/var/run/fhem/fhem.pid
WorkingDirectory=/opt/fhem
ExecStartPre=-/bin/mkdir /var/run/fhem
ExecStartPre=/bin/chown -R fhem /var/run/fhem
ExecStart=/usr/bin/perl fhem.pl fhem-vbs.cfg
CPUSchedulingPolicy=rr
CPUSchedulingPriority=99
[Install]
WantedBy=multi-user.target