Public bug reported:

I've been trying to figure out why my HDD keeps on flushing metadata out
every minute on an idle laptop and discovered that gnome-calendar opens
/usr/share/zoneinfo/Europe/London on my machine every minute. This
causes the access time (atime) to be updated causing a metadata flush
afterwards. On an idle laptop this makes the HDD spin up, write data and
then spin down again.  This consumes power.

Can this periodic open/closing be fixed or at least try to use O_NOATIME
on the opening to reduce the metadata atime updates?

I diagnosed this by running:

sudo fnotifystat -v -x/sys,/proc,/home

one can see that the gnome-calendar is opening and closing the file.

Looking deeper, I used health-check on gnome-calendar to gather the
attached activity log of 5 minutes of activity of gnome-calendar on the
idle machine. One can see it sleeps for ~60 seconds on a poll() system
call and every 60 seconds opens and closes the zoneinfo file.

To capture the activity I used:

sudo health-check -p gnome-calendar -d 300 -f -r -v > gnome-calendar-
5min.log

I'm pretty sure that opening the zoneinfo file with O_NOATIME will avoid
the metadata atime flushes and because the data has not changed on disk
it should avoid the HDD spinup/spindown cycling. Alternatively, can the
zoneinfo reads be avoided totally every 60 seconds to save power?

** Affects: gnome-calendar (Ubuntu)
     Importance: Undecided
         Status: New

** Attachment added: "capture of gnome-calendar activity using heath-check tool"
   
https://bugs.launchpad.net/bugs/1846768/+attachment/5294333/+files/gnome-calendar-5min.log

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1846768

Title:
  gnome-calendar opens /usr/share/zoneinfo/* every 30 seconds

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-calendar/+bug/1846768/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to