Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Gimp Script Memory Problem Question
#11
Ok, so tried on 2.10.24. Still OK for me. But there is still a big difference... In my case, the memory usage by Gimp plateaus because I have a tile cache set to 16GB. Beyond that Gimp uses its own swap file (see Edit>Preferences>Folders). So if your tile cache isn't set to something pretty close to or above you actual RAM size, you have another problem.
Reply
#12
Ok thats interesting. It was set to 20GB. So I have only 8GB RAM physical memory on my Laptop. The MacOS and standard apps consume around 4 GB so I am left with 4GB. That means as soon as GIMP crosses 4GB it should write on the GIMPs Swap/HardDisk and the rest of the system should be able to handle it if theres enough space on my Hard Disk and not produce an error? I will test this.

Can I also define an external Hard Disk as Swap Disk in case the HD space would not be enough? I also can't find the exact location of the swap folder on the MacOs it only says Edit>Preferences>Folders>Temporary Folder> 2.1 and Edit>Preferences>Folders>Swap Folder> 2.1 on Gimp. Whats the difference of the Swap Folder and Temporary Folder? Do you know where i could find these folders on MacOS?
Reply
#13
(12-22-2021, 01:04 PM)KoalaBear2022 Wrote: Ok thats interesting. It was set to 20GB. So I have only 8GB RAM physical memory on my Laptop. The MacOS and standard apps consume around 4 GB so I am left with 4GB. That means as soon as GIMP crosses 4GB it should write on the GIMPs Swap/HardDisk and the rest of the system should be able to handle it if theres enough space on my Hard Disk and not produce an error? I will test this.

Can I also define an external Hard Disk as Swap Disk in case the HD space would not be enough? I also can't find the exact location of the swap folder on the MacOs it only says Edit>Preferences>Folders>Temporary Folder> 2.1 and  Edit>Preferences>Folders>Swap Folder> 2.1 on Gimp. Whats the difference of the Swap Folder and Temporary Folder?  Do you know where i could find these folders on MacOS?

If you try to change them you get a dialog showing their full path. IIRC the default place for the swap is the Gimp user profile directory, but you can put it on another disk if needed.

Still, if the script deletes the image object in each iteration you should not be using all that memory, whether it's RAM (and OS paging) or Gimp's own swap.
Reply
#14
Thanks. I found after giving writing permissions to the GIMP Folders a .EXE /Swap File is created but it only writes a little bit then the MacOS takes over and uses its own Memory management. So I guess this will not work anyway on this operating system.

It is strange why GIMP is increasing in size the Pictures are 1MB on average max. Even if each Image would be saved that would not build up 60GB after 10k iterations. There is no layer created in addition to the project. I will check my code again very carefully perhaps there is something missing.
Reply
#15
(12-23-2021, 10:28 PM)KoalaBear2022 Wrote: Thanks. I found after giving writing permissions to the GIMP Folders a .EXE /Swap File is created but it only writes a little bit then the MacOS takes over and uses its own Memory management. So I guess this will not work anyway on this operating system.

It is strange why GIMP is increasing in size the Pictures are 1MB on average max. Even if each Image would be saved that would not build up 60GB after 10k iterations. There is no layer created in addition to the project. I will check my code again very carefully perhaps there is something missing.

If you want a second pair of eyes on your code, put it on some pastebin/github project/dropbox and PM me the URL, or ZIP with a decent PWD, attach ZIP here and PM me the pwd.
Reply
#16
SOLVED. Thanks a lot to OFNUTS for troubleshooting and helping me to solve this!
My bad and stupid code was causing it. Gimp is totally fine.
Reply
#17
(04-28-2022, 10:00 AM)KoalaBear2022 Wrote: SOLVED. Thanks a lot to OFNUTS for troubleshooting and helping me to solve this!
My bad and stupid code was causing it. Gimp is totally fine.

Well, there was a problem with Gimp, but easy to circumvent with code that was also a better way to do things: replaced duplicate image/flatten by layer-new-from-visible.
Reply
#18
I call it the 'Gimp memory wall' when Gimp uses swap. A solution I found for processing hundreds or thousands of images is to use gmic from the command line.
Start Gimp from a terminal, apply a gmic filter to one frame and look at the command in the terminal. Put this into a batch file and run it with the command line version of gmic.
It would be good if gimp had a command line version. I use Mandelbulber 2 a lot and it's good at handling thousands of frames. It has net rendering built-in if you want it. It uses graphics cards (gpu's) rather than cpu's to do rendering using OpenCL.

OpenCL is experimental in Gimp and I'm too scared to use it.
Reply


Forum Jump: