[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: KDE 4.4.3 upgrade eats 141 MB of /home



Am Mittwoch 12 Mai 2010 schrieb Mike Kasick:
> On Wed, May 12, 2010 at 04:51:23PM +0200, Alejandro Exojo wrote:
> > I think that disk usage is an issue in most software, not just KDE
> > apps. For example, look at ~/.thumbnails, and you will see that is
> > probably filled with many thumbnails of images that you deleted long
> > ago or that you saw just once. Same thing for apps that store some
> > data about all files that you open, without limit and without
> > expiration.
> 
> I purge .thumbnails occasionally for this reason.  I also wasn't happy
> to see my /var/tmp/kdecache-* grow to 400 MBish either, so I regularly
> purge that now on apt-get upgrades.  Most recently I saw
> .xsession-errors grow to ~600 MB in just under a few days, so I've
> /dev/nulled that too except for when I need it.

I would run a cron job like this:

martin@shambhala:~> du -sh .thumbnails 
434M    .thumbnails

martin@shambhala:~> find ~/.thumbnails -atime +30 -type f | wc -l
10030

martin@shambhala:~> find ~/.thumbnails -atime +30 -type f -delete

martin@shambhala:~> du -sh .thumbnails
30M     .thumbnails

This way you have the most recently accessed thumbnails at hand while 
still reducing the size of the directory by a big margin.

Note: This will not work with noatime ;-). There you could go after mtime 
or ctime, but this might delete thumbnails created long before even so 
they are still being accessed regularily.

I use relatime here.

Of course, the user should be not be required to create a cronjob for 
that, but I have a lot of those already, so i do not mind for now. I use 
the handy fcron for it:

martin@shambhala:~> fcrontab -l
17:04:44 listing martin's fcrontab
# Backup der KDE-Konfiguration
@ 2d /usr/bin/rdiff-backup ~/.kde/ ~/Backup/KDE
@ 2m /usr/bin/rdiff-backup --remove-older-than 2M --force ~/Backup/KDE

# Backup der Iceweasel-Konfiguration
@ 2m /usr/bin/rdiff-backup --remove-older-than 2M --force 
~/Backup/Iceweasel
@ 2d /usr/bin/rdiff-backup ~/.mozilla/ ~/Backup/Iceweasel

# Spam wegräumen
@ 2d /usr/bin/find ~/.crm114/reaver_cache -type f -and -mtime +1 -delete

# Thumbnails aufräumen, 17.5.2010
@ 10d find ~/.thumbnails -atime +30 -type f -delete

# Statistiken
@ 5d /home/martin/bin/machine-update -m
@ 5d (w ; cat /sys/power/tuxonice/debug_info) | mail -s "TuxOnIce stats" 
martin@localhost
@ 1m uprecords | mail -s "Uptime records" martin@localhost
 
> So yeah, it's a fairly epidemic problem.  I probably notice more than
> most because I do daily remote-incremental backups over a DSL line, so
> an incremental backup of a few hundred MB definitely gets noticed. 
> Sometimes it's OK, sometimes it's not.

Deactivating all debug output in kdebugdialog has helped here a lot:

martin@shambhala:~> ls -lh .xsession-errors
-rw------- 1 martin martin 3,9M 17. Mai 16:31 .xsession-errors

Just check the checkmark option at the bottom of the window. In case of 
debugging a problem, you can activate it again.

I think debugging should be off by default.

-- 
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: