GNOME Bugzilla – Bug 697443
GIMP uses huge amounts of memory
Last modified: 2013-05-18 09:55:37 UTC
Hi! I have 4 scans here, each with a size of 2480 x 3437 pixels in JPG format. My goal was to combine them into one image, so I've opened them all at once in GIMP, then selected all in each image and copied and pasted it as a new layer in a new image with 5000x7000 pixels size. It worked, but the user interface lagged quite a bit while doing that, and memory usage (only for GIMP) went up to about 5-6 GB. You should really do something about this memory usage, as not everyone has enough RAM. Also the images needs only some MB of memory, which is not even close to 1 GB, let alone 5 GB. This has problem has occurred at several occasions now. OS is XUbuntu 12.10, the installed GIMP is the one from the Ubuntu repositories. If you need more info (a valgrind report or something), I'll try provide it.
The file sizes of JPEG image are not an indication of the size their contents will take up in memory. Please read the last paragraph here for an explanation: http://www.gimp.org/unix/howtos/tile_cache.html
Hi! I'm experiencing this again, it is obviously a bug in Gimp or the Ubuntu package, if they changed something. Hence I'm reopening it. Here is what I have done: 1. Open a scan (3437 x 2480, jpg) 2. Select a rectangular area in it. 3. Hit Ctrl + C to copy the selected area. After step 3, the amount of used memory starts to climb and seemed to have stopped after using about 5 GB of main memory (the memory stays allocated, but allocation of more memory stoped). Clicking Edit -> Copy starts the memory allocation again. Additionally, Gimp uses about half a CPU core in processing power while the memory usage increases. OS is still XUbuntu 12.10, Gimp is Gimp 2.8.2-1ubuntu1.1.
According to the docs, GIMP uses about 11 bytes per pixel. This is bad, of course, but not a bug per se.
That would be about 89 MB for the image, and a bit less for the area copied to the clipboard, but surely less than 500 MB. But in this case, Gimp uses about 5 GB of memory (checked that after a restart, so nothing old consumes memory). Here are more accurate figures: - After starting Gimp without any image opened, it uses 38.2 MB of memory. - After opening the scan in question, Gimp uses a stable 138.1 MB of memory. - After selecting the area to copy it uses 142.4 MB of memory. - Directly after hitting Ctrl-C it uses 170.3 MB of memory. - About 30 seconds after that, it uses 770 MB of memory and about 60% of one CPU. - About one minute after hitting Ctrl-C it uses 1.3 GB of memory and about 60% of one CPU. - After about 2-3 Minutes it uses 2.2 GB of memory and no more CPU. The memory consumption seems to stop at a random point in time, this time it stopped after 2.2 GB and 2-3 minutes, sometimes it uses up to 5 GB, sometimes it uses up all the main memory (8 GB). I've even seen it to exceed main memory, even if swapping is switched off, even if that should never happen according to the article linked above. Sometimes (can't reproduce it), the UI seems to hang from this - menu entries take a notable time to get highlighted on mouse hover and to open. I'm not sure about this symptom, it could have other reasons. So I am quite sure this is a bug, probably some thread or process running in the background. Hope this helps - if you can't reproduce it and want to have a valgrind report or something, just say so.
Maybe something similar to bug #699625?
Exactly the same thing - if I quit jDownloader the problem goes away, if I start it again, the problem is there again. Thanks for the info. *** This bug has been marked as a duplicate of bug 669625 ***
*** This bug has been marked as a duplicate of bug 699625 ***