Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-3751

LP:859051 - Periodic aria checkpoints prevent power management

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      A customer reports that even in the absence of any workload, there are periodic writes to the Aria log file, which in turn prevents his laptop from sleeping.

      It seems possible to not do a checkpoint if no queries have been executed since previous checkpoint.

      Attachments

        Activity

          Re: Periodic aria checkpoints prevent power management
          Having aria doing checkpoints should not stop a laptop from sleeping.
          A 'sleep' will suspend all processes as first part of the sleep so mysqld should be doing nothing.
          I have a Lenovo laptop running OpenSuse 11.3 and there is no problem with putting it to sleep even if mysqld is running (I am doing that frequently).

          Here is how the checkpoint works:

          repeat
          Sleep 'checkpoint-time' seconds.
          If enough new data in transaction log file
          Do checkpoint

          In other words, if there is nothing happening on the laptop, there is just a very short check once in a while if there is something that should be done (which is the feature that was requested).

          InnoDB is doing something similar and there are dozen of processes in Linux that checks things once in a while (For example any 'clock' or process watching application will wake up once a second/minute but will not stop a laptop from sleeping).

          Summary: I don't know of anything special in Aria checkpoint that would interfere with laptop sleep and I don't know of any way to test/prove that.

          monty Michael Widenius added a comment - Re: Periodic aria checkpoints prevent power management Having aria doing checkpoints should not stop a laptop from sleeping. A 'sleep' will suspend all processes as first part of the sleep so mysqld should be doing nothing. I have a Lenovo laptop running OpenSuse 11.3 and there is no problem with putting it to sleep even if mysqld is running (I am doing that frequently). Here is how the checkpoint works: repeat Sleep 'checkpoint-time' seconds. If enough new data in transaction log file Do checkpoint In other words, if there is nothing happening on the laptop, there is just a very short check once in a while if there is something that should be done (which is the feature that was requested). InnoDB is doing something similar and there are dozen of processes in Linux that checks things once in a while (For example any 'clock' or process watching application will wake up once a second/minute but will not stop a laptop from sleeping). Summary: I don't know of anything special in Aria checkpoint that would interfere with laptop sleep and I don't know of any way to test/prove that.

          Re: Periodic aria checkpoints prevent power management
          Maybe the original author of the bug report was refering not to a system-wide sleep, but to the HDD not being able to spin down due to some periodic HDD activity that was going on.

          philipstoev Philip Stoev (Inactive) added a comment - Re: Periodic aria checkpoints prevent power management Maybe the original author of the bug report was refering not to a system-wide sleep, but to the HDD not being able to spin down due to some periodic HDD activity that was going on.

          Re: Periodic aria checkpoints prevent power management
          There should not be any spin up because of checkpoints in Aria.
          If there is no write transactions in Aria, there is no checkpoint written to disk.

          I did very this on my machine and noticed that it works as expected on 5.1 but on 5.2 there was a bug in the test
          if changes has happened and the aria_log files was touched. As they where just touched and not getting larger I had not noticed this before.

          Will now fix this in 5.2 and above.

          monty Michael Widenius added a comment - Re: Periodic aria checkpoints prevent power management There should not be any spin up because of checkpoints in Aria. If there is no write transactions in Aria, there is no checkpoint written to disk. I did very this on my machine and noticed that it works as expected on 5.1 but on 5.2 there was a bug in the test if changes has happened and the aria_log files was touched. As they where just touched and not getting larger I had not noticed this before. Will now fix this in 5.2 and above.

          Launchpad bug id: 859051

          ratzpo Rasmus Johansson (Inactive) added a comment - Launchpad bug id: 859051

          People

            monty Michael Widenius
            philipstoev Philip Stoev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.