System cache filling up with Gimp AppImage - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions) +--- Thread: System cache filling up with Gimp AppImage (/Thread-System-cache-filling-up-with-Gimp-AppImage) |
System cache filling up with Gimp AppImage - CtrlAltDel - 12-13-2021 I'm using the latest Gimp AppImage available, 2.10.25, on Linux Mint. I have lately starting working with some very large files and will have 7 or 8 of them open sometimes in Gimp. After a while, my cache will max out and start swapping to the SSD. There is 16GB of RAM in the system and I have swappiness set to 20, but have tried setting it to 10 also and there doesn't seem to be that much difference as the same thing happens after a while. Most of the time it happens after multiple usages of Gimp; it just seems to build up after awhile. The cache never seems to be reclaimed, except with a restart of the computer. Closing Gimp has no effect. I had the VFS Cache set to 50, then tried 60, then 75 and finally just deleted the line in etc/sysctl.conf altogether and let it go back to its default pressure of 100, as no setting really seemed to be better than any other one as far as releasing cache back into usage. No Gimp preferences that might seemingly affect this have been changed and are all standard. With the AppImage, is there a folder where I can manually clean the cache out after finishing with Gimp? I realize that there probably isn't, as I'm talking about RAM, but maybe someone has some sort of suggestion or thought about what may be happening or what I could do different. RE: System cache filling up with Gimp AppImage - rich2005 - 12-13-2021 Try in a terminal either sudo echo 3 > /proc/sys/vm/drop_caches or sync && sudo sh -c "echo 3 > /proc/sys/vm/drop_caches" Edit: A quick look around, check out https://www.gimpusers.com/forums/gimp-developer/21205-is-there-any-way-to-free-gimp-memory-and-avoid-restarting-it RE: System cache filling up with Gimp AppImage - CtrlAltDel - 12-13-2021 (12-13-2021, 10:25 AM)rich2005 Wrote: Try in a terminal either Thank you, Rich. I'll try that as soon as cache starts to fill up again. I'll come back to the board with a follow-up probably this afternoon or tonight at some time as I'm not doing anything with Gimp right at the moment. It's good to have something to try. Edit: I just tried the second command, although only about 20 percent of cache was being used and it wiped it clean. It went immediately down to 1 or 2%. Thanks a lot. I'll just do that when I start noticing it growing too large. RE: System cache filling up with Gimp AppImage - CtrlAltDel - 12-14-2021 (12-13-2021, 10:25 AM)rich2005 Wrote: Edit: A quick look around, check out https://www.gimpusers.com/forums/gimp-developer/21205-is-there-any-way-to-free-gimp-memory-and-avoid-restarting-it I read over the link, with Ofnuts contributing and testing memory usage, and he seems to think it's pretty normal behavior. I guess the problem is just working with such large images on a regular basis. I think the command you provided will work okay for me. Maybe while using Gimp, after all of the memory is being used/cached and it starts writing to disk, I'll just close Gimp and use sync && sudo sh -c "echo 3 > /proc/sys/vm/drop_caches" and restart Gimp. I'm not sure that I wish to decrease the amount of memory available to Gimp before it swaps tiles of the image out to disk because I like for Gimp to have what it needs and run smoothly. I certainly don't think I want to increase tile-cache-size either, as that would seemingly be counterproductive considering the problems I'm currently having. 16GB of RAM just doesn't seem to be enough memory when working with multiple 10-20MB images over several Gimp sessions. If someone wants to work with big images, I guess they need to have a larger amount of memory and that is understandable. Like the original poster in the thread you gave a link to was curious about, it was kind of baffling to me how Gimp doesn't "seemingly" release the massive amounts of memory it uses when Gimp is closed but, I guess that is normal. Gimp can be closed for hours and other things are being done on the computer for hours and the system still has virtually all of its memory cached from the previous Gimp usage, no matter how long ago that was or how many apps have been opened and used since then. There is a cure now with the command you provided. That's a lot better than having to restart the computer to regain memory to be able to use other programs comfortably. RE: System cache filling up with Gimp AppImage - Ofnuts - 12-14-2021 Are you using any scripts? Because some of them could leave unused (and unreachable) images around. If you have the Python console, try either: Code: print gimp.image_list() # Raw And see if you can relate all the output with open images. RE: System cache filling up with Gimp AppImage - CtrlAltDel - 12-14-2021 (12-14-2021, 09:46 AM)Ofnuts Wrote: Are you using any scripts? Because some of them could leave unused (and unreachable) images around. If you have the Python console, try either: Thanks for the great suggestion, Ofnuts. I ran the commands and all the images that I had open matched the output. I think I'm probably overdoing it with Gimp with the amount of memory I have. Sometimes I might have 8 or 9 10-20mb images open and it's probably just too much to ask. It may be time to order some more RAM. Then again, it may not have anything to do with Gimp at all. Last night, I copied a simple 4.7GB folder full of FoxClone image backup files over to a flash drive and that too also ate up every bit of available memory and wrote about 1MB of information to the swap file before finally completing. |