Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Grokking The Gimp
Previous Page Home Next Page

Notes on Swap and GIMP Memory Management

The GIMP uses memory as specified by the Toolbox:File/Preferences dialog. Figure  4

  
Figure 4: Specifying GIMP Memory Usage
Figure 4

shows the Environment Settings branch of the Preferences dialog. As seen in the figure, the associated entry box for the tile cache   size has the default value of 10 Mb. The cache is a piece of RAM that the GIMP reserves for caching the images you are working on. If you are working with large images or with many medium-sized ones, you can easily exceed this cache size. Under these circumstances, the additional required memory is obtained by creating a GIMP swap file in the user's .gimp directory. Since this memory is not necessarily located in RAM, this can significantly diminish the performance of the GIMP. Thus, if the user has good RAM resources and is working with large images, it makes sense to increase the 10 Mb value of the cache.

For example, with 128 Mb of RAM and with the GIMP running as the primary application, perhaps a reasonable size for the cache is 50 to 75 Mb. This number can be tuned to the user's needs. A useful tool for determining how much memory is required by your applications is the Linux/Unix command, top. This command dynamically shows many of the characteristics of running processes on your machine. In particular, the column %MEM gives the percentage memory used by each process. Typing S-m (i.e., an uppercase M) makes top display the processes sorted by memory use. The following is a truncated output from top on my Linux machine after sorting by memory use:

 11:51am  up  2:31,  2 users,  load average: 0.00, 0.02, 0.05
63 processes: 62 sleeping, 1 running, 0 zombie, 0 stopped
CPU states:  1.3% user,  0.9% system,  0.0% nice, 97.6% idle
Mem:  128012K av, 124096K used,   3916K free,  31492K shrd,  21908K buff
Swap: 136040K av,   2612K used, 133428K free                 47028K cached

  PID USER     PRI  NI  SIZE  RSS SHARE STAT  LIB %CPU %MEM   TIME COMMAND
 6253 cbunks     0   0 14888  14M  2908 S       0  0.0 11.6   0:01 gimp
  653 root      14   0 14324  13M  1304 S       0  1.1 11.1   4:50 X
  679 cbunks     0   0 13172  12M  4024 S       0  0.0 10.2   0:17 netscape
  663 cbunks     3   0  5236 5236  2088 S       0  0.0  4.0   0:05 emacs
 6234 cbunks     0   0  5072 5072  1784 S       0  0.0  3.9   0:00 knews
 6269 cbunks     0   0  3252 3252  1964 S       0  0.0  2.5   0:00 xfig
 6254 cbunks     0   0  2360 2360   928 S       0  0.0  1.8   0:00 script-fu
  555 xfs        0   0  2280 2280   244 S       0  0.0  1.7   0:00 xfs
  673 cbunks     0   0  1532 1532   976 S       0  0.0  1.1   6:14 Xquote
  607 news       0   0  1216 1216    76 S       0  0.0  0.9   0:00 innd
  662 cbunks     3   0  1088 1088   676 S       0  0.3  0.8   0:00 xterm
 6287 cbunks    16   0  1056 1056   848 R       0  0.7  0.8   0:01 top
As can be seen from the display, there is 128 Mb of RAM, of which GIMP is occupying 11.6%. In conjunction with the other processes, including X, Netscape, and Emacs, about 50% of the RAM is being used. The remaining 50% equals 64 Mb of RAM. Thus, for my machine, it might be reasonable to set the GIMP cache to 50 Mb. Of course, your mileage will vary.

Grokking The Gimp
Previous Page Home Next Page


 
 
  Published under the terms of the Open Publication License Design by Interspire