Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Gimp Script Memory Problem Question
#11
(12-21-2021, 05:03 PM)Ofnuts Wrote: What is your Gimp version? I tested on 2.10.22 (not on 2.10.28 yet).

 It is: GIMP 2.10.24
Reply
#12
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
#13
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
#14
(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
#15
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
#16
(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
#17
I think it is a Memory Leak from Gimp or maybe just Gimp for MacOS. If it would be an error in the code/loop it would increase very fast from the beginning and crash quickly, whereas in my case it starts really slow, builds up, then gets faster towards the end until it crashes. Perhaps I would need to try this on Ubuntu when I get time to confirm this. In any case I will let you know. Thanks for your help so far.
Reply


Forum Jump: