Skip to content

Monitor::UpdateFPS() clobbers database every second #4199

Open
@alandpearson

Description

Describe Your Environment

  • Version of ZoneMinder [v1.37.65, development ]
  • How you installed ZoneMinder [e.g. .deb package for Debian bookworm]
  • Full name and version of OS
  • Browser name and version (if this is an issue with the web interface)

Describe the bug
In the current master branch zm_monitor.cpp Monitor::UpdateFPS() updates the database every second, causing high io when several cameras are in use. In previous versions (1.36 branch) updates were constrained to every ten seconds.
This causes large IO on the mysql transaction log.
Suggest ten-second behaviour is restored or, behaviour of the database update matches the FPSReportInterval in monitor->misc_>options ?

Either way, once a second seems a little aggressive.

To Reproduce
Steps to reproduce the behavior:

  1. setup a monitor
  2. enable mysql general_log to see all queries
  3. notice every second, every monitor issuing UPDATE LOW_PRIORITY Monitor_Status SET statements

Expected behavior
Database should not be updates each second for monitor status

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions