Re: [Gimp-developer] tile cache size (was Re: The Occasional Bug List)

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

 



On Wed, 6 Nov 2002 23:55:20 +0100, "Guillermo S. Romero / Familia Romero" <famrom@xxxxxxxxxxxxxxxxxxxx> wrote:
> rock@xxxxxxxx (2002-11-06 at 1430.05 -0800):
> > Regardless, it should only be used to create a suggestion -- the tile
> > cache size should still be determined by the user.
> 
> Yes, cos it still does not cover shared machines, nor machines with
> peaks in other tasks, nor disk tweaking, nor "is the current situation
> at startup the normal situtation". And then you get complains, again.

This has been discussed on this list several times in the past.  I do
not know if there was a real consensus on what the best solution is,
but here are the most important points that I have in mind:

- There is no optimal way to set the tile cache size (or the value of
  max-new-image-size, which can be different).  This depends on too
  many parameters (single or multi-user machine, background tasks,
  configuration of the swap space, etc.).  So whatever we do, it will
  never be a perfect solution.

- Although the user should be able to change the tile cache size at
  any time, the value that is suggested during the initial user
  installation should be improved.  Any guess is probably better than
  the current fixed value of 32 MB.

- Since the inital value needs to be computed only once during the
  installation, it can be guessed by any means, including running some
  helper programs.  This is very useful for the platforms on which a
  normal user does not have the privileges to get this information
  directly from the kernel (no /proc filesystem or no permission to
  access it).

- The inital guess should be tuned for a single-user machine.  The
  majority of the users are on single-user systems.  Those that are on
  multi-user systems will usually have a system administrator who can
  take care of adjusting the installation script or the global gimprc
  in such a way that the tile cache size is set to a lower value than
  what would be used for a single-user system with the same amount of
  memory.  We know that the solution will not be perfect anyway, so we
  have to take care of the most common case (single-user systems).

- We need to support many operating systems (Linux, Windows, MacOS X,
  Solaris and many others).  But if we cannot have a good way to guess
  the appropriate value of the tile cache size for all systems, then
  we should at least try to get a good guess for the systems that we
  can support.  The other systems can still use a fixed default.
  Again, this is a matter of taking care of the most common case.

- A good rule of thumb for setting the tile cache size seems to be:
  90% of the memory available when the GIMP is running for the first
  time, or total amount of memory - 64 MB, whichever is the largest.
  So the formula would be something like:
    min (32 MB, max (free * 0.9, total - 64 MB))
  It should probably be rounded to the closest multiple of 10 MB or
  32 MB in order to get a nice value.  Anyway, this is only the
  initial proposed value that the user can change at any time.

Just to show that it would be impossible to guess the optimal value
for the tile cache size: at work, I have a home directory that is
NFS-mounted on many machines.  As a result, I use the same gimprc for:
- my Sparc Ultra 10 (mostly single-user) with 256 MB RAM
- several Sparc Ultra 1 to Ultra 60 that have the same amount of
  memory or more but are shared by 5 to 10 users at any time
- several i686 Linux PCs with 128 to 768 MB RAM
I do not want to maintain dozens of gimprc files for each machine, so
I just setted for a size (200 MB) that seems to work most of the time.
I adjust it sometimes when I know that I will work for some amount of
time on a machine that has more memory and is not used by anybody
else.  Otherwise, I just keep the default because that's good enough.

But despite the fact that it would be impossible to find the optimal
value for all cases, I think that it is very important to provide a
better initial value than what we currently have.

-Raphaël

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux