/etc/logrotate.d/unattended-upgrades should not have compress option

Bug #840333 reported by Jérôme
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
unattended-upgrades (Ubuntu)
Opinion
Low
Unassigned

Bug Description

I think that log files compression lowers the system performance on desktop computers which have now enough disk space for storing old logs.

The "nocompress" and "compress" options of logrotate configure 2 different behaviours of logrotate.

If the log file isn't compressed,
logrotate will just rename it to something like 'log_file_name.log.1'
with quite no disk input/output.

If the log file is compressed,
logrotate will read the file, compress it and rewrite the content into a new file with a name like 'log_file_name.log.1.gz'.

I think that files compression is a good tradeoff only in case the compressed files have a longer lifetime than the log files (i. e. man pages, documentation, fonts, Debian package files, ...).

Drawbacks of log files compression :
- increases disk input/output
- increases cpu and memory usage
- increases energy consumption
- slightly decreases the disk lifetime

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: unattended-upgrades 0.72.1ubuntu1
ProcVersionSignature: Ubuntu 2.6.38-11.48-generic 2.6.38.8
Uname: Linux 2.6.38-11-generic x86_64
Architecture: amd64
Date: Sat Sep 3 15:16:34 2011
InstallationMedia: Lubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427)
PackageArchitecture: all
ProcEnviron:
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
SourcePackage: unattended-upgrades
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Jérôme (jerome-bouat) wrote :
Revision history for this message
Jérôme (jerome-bouat) wrote :

This becomes more important with SSD disks whose lifetime depends on the number of write cycles.

Revision history for this message
Balint Reczey (rbalint) wrote :

There is a relevant bug report against logrotate: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=656060

I generally agree with the bug, but in practice u-u's logs compress well and in compressed form take one block:

$ du -sh /var/log/unattended-upgrades/*
16K /var/log/unattended-upgrades/unattended-upgrades-dpkg.log
4.0K /var/log/unattended-upgrades/unattended-upgrades-dpkg.log.1.gz
4.0K /var/log/unattended-upgrades/unattended-upgrades-dpkg.log.2.gz
4.0K /var/log/unattended-upgrades/unattended-upgrades-dpkg.log.3.gz
4.0K /var/log/unattended-upgrades/unattended-upgrades-dpkg.log.4.gz
4.0K /var/log/unattended-upgrades/unattended-upgrades-dpkg.log.5.gz
4.0K /var/log/unattended-upgrades/unattended-upgrades-dpkg.log.6.gz
0 /var/log/unattended-upgrades/unattended-upgrades-shutdown.log
4.0K /var/log/unattended-upgrades/unattended-upgrades-shutdown.log.1.gz
4.0K /var/log/unattended-upgrades/unattended-upgrades-shutdown.log.2.gz
24K /var/log/unattended-upgrades/unattended-upgrades.log
4.0K /var/log/unattended-upgrades/unattended-upgrades.log.1.gz
4.0K /var/log/unattended-upgrades/unattended-upgrades.log.2.gz
4.0K /var/log/unattended-upgrades/unattended-upgrades.log.3.gz
4.0K /var/log/unattended-upgrades/unattended-upgrades.log.4.gz
4.0K /var/log/unattended-upgrades/unattended-upgrades.log.5.gz
4.0K /var/log/unattended-upgrades/unattended-upgrades.log.6.gz

If logrotate switches to detect the need for compression automatically, I will stop overriding that in the package.

Changed in unattended-upgrades (Ubuntu):
status: New → Confirmed
status: Confirmed → Opinion
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.