Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

End of day file maintenance #333

Closed
jshep321 opened this issue May 2, 2024 · 1 comment
Closed

End of day file maintenance #333

jshep321 opened this issue May 2, 2024 · 1 comment

Comments

@jshep321
Copy link

jshep321 commented May 2, 2024

I happened to walk past a motion sensor at exactly 12am that usually instantly turns on a light via an automation in node red. It took several seconds to turn on. I looked at the cpu usage and it was crazy high on my pi5. Looking at the icloud3 log and the HA logbook I see a ton of updates during the file maintenance.

I have a nvme SSD directly attached.

I am using iCloud3 v3.

Any way to "nice" this end of day maintenance so the system doesn't get loaded?

@gcobb321
Copy link
Owner

gcobb321 commented May 2, 2024

There are several tasks that are done at midnight:

  1. The log files are archived and renamed.
  2. Various counters are reset.
  3. The Waze History DB maintenance is done. This includes deleting duplicate records and compressing the DB files.
  4. The Waze History DB route times and distances are recalculated for all records if it is detected that a tracked from zone (Home) location has moved more than 100m or it was requested in the Event Log Actions.. This can take some time based on the number of records. It usually runs in a separate thread (controlled by HA and Python) and should not impact what is going on too much. This doesn't happen very often and a message is displayed in the Event Log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants