Bug 714794 - setting a limit on thumbnail cache does not work
Summary: setting a limit on thumbnail cache does not work
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: nautilus
Version: 6.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Tomáš Bžatek
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks: 637248
TreeView+ depends on / blocked
 
Reported: 2011-06-20 19:06 UTC by Matthew Mosesohn
Modified: 2015-03-03 23:01 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-13 15:37:37 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Matthew Mosesohn 2011-06-20 19:06:51 UTC
Description of problem:
The default limit for thumbnail cache is 512mb for Nautilus.  This does not work, and modifying the setting does not seem to change anything either. Schema key is: /apps/nautilus/preferences/thumbnail_limit

This is a major problem for users with low disk quotas, where their entire quota can be occupied by thumbnail cache.

Version-Release number of selected component (if applicable):
nautilus-2.28.4-15.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. Create a folder with 20,000+ images to thumbnail
2. Watch ~/.thumbnails folder grow behind the max size
3. Reboot to see if cleanup occurs
  
Actual results:
No cleanup or deletion of old thumbnails takes place

Expected results:
Old thumbnails should be removed to make room for new ones.

Additional info:

Comment 2 Matthew Mosesohn 2011-06-21 13:05:54 UTC
Correction:

The cache doesn't always seem to balloon beyond 512mb.  Instead, it seems to stop at 248904kb and won't make any new thumbnails.  Still, the cache limit I set of 10mb is not being honored.

Comment 4 Tomáš Bžatek 2011-07-28 17:47:23 UTC
Matthew, reading nautilus code, it seems everything is correct. Settings from gconf is reflected in runtime. There might be a confusion about the key you're using (and corresponding GUI settings in nautilus-file-management-properties) - the key actually limits thumbnailing on files (images) larger than the specified value. It's applied on every single file assigned for thumbnailing. No cache directory management. 

This is the key description:
 <short>Maximum image size for thumbnailing</short>
 <long>Images over this size (in bytes) won't be thumbnailed. The purpose of this setting is to avoid thumbnailing large images that may take a long time to load or use lots of memory.</long>


The correct key for your needs is /desktop/gnome/thumbnail_cache/maximum_size with default of 512MB. Can you please try if changing this one works? The only occurrence of this key usage I've found so far is the housekeeping plugin in gnome-settings-daemon - i.e. apps would let you exceed the limit and after some time the housekeeping plugin is activated and proceeds with cleaning. Perhaps because applications are free to use ~/.thumbnails without going through gnome libs (think of gqview/geeqie).

Comment 5 Matthew Mosesohn 2011-07-28 17:51:49 UTC
Tomas,

Can you tell me if it's possible to trigger the housekeeping plugin to see if it actually works?

Comment 6 Tomáš Bžatek 2011-07-29 10:02:52 UTC
(In reply to comment #5)
> Can you tell me if it's possible to trigger the housekeeping plugin to see if
> it actually works?
Not sure how to trigger cleanup manually, but at least you can watch messages by running `/usr/libexec/gnome-settings-daemon --no-daemon --debug` and replacing the running g-s-d. Reading the code there's a two-minute cleanup timeout after start, then next periodical cleanups every day. Or, simple logoff & logon should trigger cache cleaning as well.


Note You need to log in before you can comment on or make changes to this bug.