[MDEV-3751] LP:859051 - Periodic aria checkpoints prevent power management Created: 2011-09-25  Updated: 2015-02-02  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Philip Stoev (Inactive) Assignee: Michael Widenius
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug859051.xml    

 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.



 Comments   
Comment by Michael Widenius [ 2011-10-04 ]

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.

Comment by Philip Stoev (Inactive) [ 2011-10-04 ]

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.

Comment by Michael Widenius [ 2011-10-05 ]

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.

Comment by Rasmus Johansson (Inactive) [ 2011-10-05 ]

Launchpad bug id: 859051

Generated at Thu Feb 08 06:50:56 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.