RSS/Atom feed Twitter
Site is read-only, email is disabled

GIMP 2.9 doesn't seem to release RAM

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

3 of 3 messages available
Toggle history

Please log in to manage your subscriptions.

GIMP 2.9 doesn't seem to release RAM Elle Stone 11 Mar 17:11
  GIMP 2.9 doesn't seem to release RAM Jon Tait 11 Mar 17:46
   GIMP 2.9 doesn't seem to release RAM Elle Stone 11 Mar 18:31
Elle Stone
2016-03-11 17:11:58 UTC (about 8 years ago)

GIMP 2.9 doesn't seem to release RAM

My system has 32GB RAM. I'm running Gentoo Linux and using GIMP 2.9 updated very recently.

I opened five or six large (1 to 2 GB each) XCF files and then closed all but one of the files (not having an image browser that can produce a thumbnail for GIMP 2.9 XCF files, I was trying to figure out which file was which).

After closing all but one of the files, GIMP was still using 27GB virtual/25GB resident, and 79% of total RAM. I tried to decompose a layer in the single remaining open file and got the following two error messages:

Unable to run plug-in "decompose" (/home/elle/code/gimplch/install/lib/gimp/2.0/plug-ins/decompose)

Failed to fork (Cannot allocate memory) Execution error for 'Decompose':
Failed to run plug-in "decompose"

Closing GIMP and then restarting and reopening just the one file resulted in much less RAM usage, and there was no problem with decomposing the layer.

There are several RAM-related open bug reports, but all of them seem to be about Windows and/or GIMP 2.8.

Tying up all that memory means other applications sometimes don't have enough temp space to function properly. For example I repeated the "open a bunch of XCF files and close all but one" procedure to verify that it really is a reproducible problem, and Thunderbird couldn't save a copy of this email as a draft message.

I think maybe GIMP (and/or GEGL?) really isn't releasing RAM when it should. But maybe also I have some incompatible settings:

1. In System Resources in GIMP Preferences, I have the tile cache size set to 15GB - too much?

2. I allocated 12GB as a dynamically expanding tmp file in fstab (tmpfs /tmp tmpfs noatime,nodiratime,size=12G 0 0).

3. I use the following lines to start GIMP: GEGL_USE_OPENCL=no
export GEGL_USE_OPENCL
GEGL_SWAP=RAM
export GEGL_SWAP

Are the above three settings for RAM usage perhaps in conflict with one another?

Best,
Elle

Jon Tait
2016-03-11 17:46:03 UTC (about 8 years ago)

GIMP 2.9 doesn't seem to release RAM

Yes, the way GIMP uses GLIB's memory allocation needs to be reviewed.

This problem was reported before in https://bugzilla.gnome.org/show_bug.cgi?id=759874 (re-assigned to GEGL, though I believe this is really a GIMP problem).

Try running GIMP thus:

export MALLOC_MMAP_MAX_=200000 export MALLOC_MMAP_THRESHOLD_=128*1024 gimp-2.9 ....

On Fri, Mar 11, 2016 at 5:11 PM, Elle Stone wrote:

My system has 32GB RAM. I'm running Gentoo Linux and using GIMP 2.9 updated very recently.

I opened five or six large (1 to 2 GB each) XCF files and then closed all but one of the files (not having an image browser that can produce a thumbnail for GIMP 2.9 XCF files, I was trying to figure out which file was which).

After closing all but one of the files, GIMP was still using 27GB virtual/25GB resident, and 79% of total RAM. I tried to decompose a layer in the single remaining open file and got the following two error messages:

Unable to run plug-in "decompose" (/home/elle/code/gimplch/install/lib/gimp/2.0/plug-ins/decompose)

Failed to fork (Cannot allocate memory) Execution error for 'Decompose':
Failed to run plug-in "decompose"

Closing GIMP and then restarting and reopening just the one file resulted in much less RAM usage, and there was no problem with decomposing the layer.

There are several RAM-related open bug reports, but all of them seem to be about Windows and/or GIMP 2.8.

Tying up all that memory means other applications sometimes don't have enough temp space to function properly. For example I repeated the "open a bunch of XCF files and close all but one" procedure to verify that it really is a reproducible problem, and Thunderbird couldn't save a copy of this email as a draft message.

I think maybe GIMP (and/or GEGL?) really isn't releasing RAM when it should. But maybe also I have some incompatible settings:

1. In System Resources in GIMP Preferences, I have the tile cache size set to 15GB - too much?

2. I allocated 12GB as a dynamically expanding tmp file in fstab (tmpfs /tmp tmpfs noatime,nodiratime,size=12G 0 0).

3. I use the following lines to start GIMP: GEGL_USE_OPENCL=no
export GEGL_USE_OPENCL
GEGL_SWAP=RAM
export GEGL_SWAP

Are the above three settings for RAM usage perhaps in conflict with one another?

Best,
Elle

_______________________________________________ gimp-developer-list mailing list
List address: gimp-developer-list@gnome.org List membership:
https://mail.gnome.org/mailman/listinfo/gimp-developer-list List archives: https://mail.gnome.org/archives/gimp-developer-list

Elle Stone
2016-03-11 18:31:03 UTC (about 8 years ago)

GIMP 2.9 doesn't seem to release RAM

On 03/11/2016 12:46 PM, Jon Tait wrote:

Yes, the way GIMP uses GLIB's memory allocation needs to be reviewed.

This problem was reported before in https://bugzilla.gnome.org/show_bug.cgi?id=759874 (re-assigned to GEGL, though I believe this is really a GIMP problem).

Try running GIMP thus:

export MALLOC_MMAP_MAX_=200000 export MALLOC_MMAP_THRESHOLD_=128*1024 gimp-2.9 ....

Thanks! that does seem to fix the problem of GIMP not releasing the memory for closed images.

Best, Elle