Ankündigung

Einklappen
Keine Ankündigung bisher.

Smarthome.py liest sehr viel von der Platte

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    Smarthome.py liest sehr viel von der Platte

    Hallo,

    ich versuche gerade herauszufinden, warum mein Rechner so eine hohe load hat.
    Dabei ist mir aufgefallen, dass iotop sehr viel "read" Aktivität von smarthome berichtet - ca 2.4Gb in weniger als 5 minuten.

    Ist das bei Euch auch so (Kommando: iotop -a -P)?

    Wie kann ich herausfinden, woran das liegt?

    Gruß,
    Hendrik

    #2
    Habs bei meinem Raspi 4 Image mal 10 Minuten laufen lassen. Read 248KB, Write 19MB
    Welche Plugins hast du im Einsatz? Kann's an der Datenbank liegen? Wobei Lesen wär da ja auch komisch.. Ich hab die MARIADB ausgelagert auf einem anderen Rechner.

    Kommentar


      #3
      Hallo,

      vielen Dank für den Test.
      Die Plugins sind:
      Code:
      Alexa4P3
      alexa4shng
      avdevice
      FritzBox
      database
      exman
      influxdb
      knx
      mqtt
      onewire
      openweathermap
      smartvisu
      solarforecast​
      Das klingt ja alles nicht verdächtig, oder?

      Gruß,
      Hendrik

      Kommentar


        #4
        Hallo,

        innerhalb von einem Tag waren es jetzt 71G lesend und 8G schreibend.
        Das kann ich mir nicht erklären.
        Ein lsof -p PID gibt:
        Code:
        lsof -p 30 |grep -v IPv |grep -v lib  |more
        COMMAND PID      USER   FD      TYPE             DEVICE    SIZE/OFF     NODE NAME
        python3  30 smarthome  cwd       DIR               0,69        2328    34615 /usr/local/smarthome/plugins
        python3  30 smarthome  rtd       DIR               0,69         218      256 /
        python3  30 smarthome  txt       REG               0,69       14416     5586 /usr/local/bin/python3.9
        python3  30 smarthome  mem       REG               0,50                 5586 /usr/local/bin/python3.9 (path dev=0,69)
        python3  30 smarthome    0u      CHR              136,0         0t0        3 /dev/pts/0
        python3  30 smarthome    1u      CHR              136,0         0t0        3 /dev/pts/0
        python3  30 smarthome    2u      CHR              136,0         0t0        3 /dev/pts/0
        python3  30 smarthome    3w      REG               0,75         354 27330801 /usr/local/smarthome/var/log/smarthome-alexa.log
        python3  30 smarthome    4w      REG               0,75        1968 27253379 /usr/local/smarthome/var/log/smarthome-alexa4shng.log
        python3  30 smarthome    5w      REG               0,75           0 18531071 /usr/local/smarthome/var/log/smarthome-bewaesserung-dbg.log
        python3  30 smarthome    6w      REG               0,75         232 27320553 /usr/local/smarthome/var/log/smarthome-forecastsolar.log
        python3  30 smarthome    7w      REG               0,75        3108 27253510 /usr/local/smarthome/var/log/smarthome-knx-plugin-debug.log
        python3  30 smarthome    8w      REG               0,75           0 18531073 /usr/local/smarthome/var/log/smarthome-landroid.log
        python3  30 smarthome    9w      REG               0,75       58421 27313320 /usr/local/smarthome/var/log/smarthome-lichtstatus-dbg.log
        python3  30 smarthome   10w      REG               0,75    33108289 27313383 /usr/local/smarthome/var/log/smarthome-mqtt-dbg.log
        python3  30 smarthome   11w      REG               0,75        1136 27339173 /usr/local/smarthome/var/log/smarthome-telegram.log
        python3  30 smarthome   12w      REG               0,75      277647 27313482 /usr/local/smarthome/var/log/smarthome-uvr-dbg.log
        python3  30 smarthome   13w      REG               0,75         891 27317793 /usr/local/smarthome/var/log/smarthome-xiaomi.log
        python3  30 smarthome   14w      REG               0,75      163237 27313354 /usr/local/smarthome/var/log/ow_busmonitor.log
        python3  30 smarthome   15w      REG               0,75    15877205 27313323 /usr/local/smarthome/var/log/knx_busmonitor.log
        python3  30 smarthome   16w      REG               0,75     5487695 27380694 /usr/local/smarthome/var/log/smarthome-details.log
        python3  30 smarthome   17w      REG               0,75         129 27317483 /usr/local/smarthome/var/log/item-value-change.log
        python3  30 smarthome   18w      REG               0,75      775569 27313355 /usr/local/smarthome/var/log/smarthome-warnings.log
        python3  30 smarthome   19r      REG               0,75           2 26049223 /usr/local/smarthome/var/run/smarthome.pid
        python3  30 smarthome   20u  a_inode               0,14           0     1048 [eventpoll]
        python3  30 smarthome   21u  a_inode               0,14           0     1048 [eventpoll]
        python3  30 smarthome   24u  a_inode               0,14           0     1048 [eventpoll]
        python3  30 smarthome   26u  a_inode               0,14           0     1048 [eventpoll]
        python3  30 smarthome   29u     unix 0x0000000016d600b6         0t0    53007 type=STREAM
        python3  30 smarthome   30u     unix 0x000000004bfa2264         0t0    53008 type=STREAM
        python3  30 smarthome   32u      REG               0,75 17666276352   106710 /usr/local/smarthome/var/db/smarthome.db
        python3  30 smarthome   42u     sock                0,8         0t0  1252348 protocol: TCPv6
        python3  30 smarthome   46u  a_inode               0,14           0     1048 [eventpoll]
        ​
        dabei habe ich alles was "lib" ist rausgefiltert. Wenn ich das nicht mache, werden eine ganze menge Python-libraries angezeigt.
        Aber eigentlich sollte python ja jede library nur beim Import laden und dann im Speicher behalten...
        Also so recht kann ich mir keinen Reim daraus machen..

        Gruß,
        Hendrik

        Kommentar


          #5
          Leider keine Ahnung. Musst wohl mal alle plugins raus nehmen und sukzessive wieder rein holen und beobachten?

          Kommentar


            #6
            Hallo,

            ich habe jetzt alle Plugins aus gemacht. Da hatte ich wenig Daten-Leseaktivität in 10min.
            Danach hab ich alles außer Influx und Database wieder angeschaltet, 10min gemessen, Database an, gemessen, Influx an, gemessen:
            Code:
            Alle Plugins aus:
              10 min 7.5MB
            Database und Influx aus:
              10 min 129MB
            Influx aus:
              10 min 361MB
            Alles an:
              10 min 479MB​
            Sowohl Influx als auch Database lesen also recht viel bei mir. Ich frage mich allerdings, warum.
            Allerdings: Das sind jetzt nicht mehr 2.4Gb in 5 min, wie im ersten Post.

            Die 479MB in 10min sind aber immernoch konsistent mit den 71Gb/Tag aus meinem letzten Post.

            Und alles ist viel mehr, als bei dir.

            Ich bin ein wenig ratlos...

            Gruß,
            Hendrik

            Kommentar

            Lädt...
            X