Jump to content
You must now use your email address to sign in [click for more info] ×

Batch Process fills up the RAM


Recommended Posts

When I run a batch process (very simple: autocontrast, some saturation and sharpening) in Affinity Photo (v 1.6 an new v 1.7 windows) with each image Affinity fills the RAM of may PC. Allthough I have 16 GB RAM, after app. 100 images the RAM is full and the performance of Affinity goes to zero (2 min per image). I tried it with a lower number of images but when the batch is finished, Affinity keeps the RAM filled and with the next batch it fills it further. The only way to clean the RAM is to close Affintiy. Is there another way to clean the RAM without closing the program?

During the batch run I saw that Affinity does not use my grafic card at all (NVidia GTX 1070 with 8 GB VRAM) but only the processor although I set in the settings the grafic card as defalult. Do I missed something?

Link to comment
Share on other sites

  • 2 months later...
  • Staff

Hey Man48,

It seems your query was overlooked and I am sincerely sorry about that.

Affinity will use all the available RAM and will usually only release it once something else needs it. However, at no point should it be causing you to experience poor performance. I can batch process well in excess of 100 images without much trouble. 

Our apps will use your CPU for the majority of the work and only rely on your GPU for drawing to the screen.

Have you updated to 1.7.2 and checked to see if anything has improved?

Link to comment
Share on other sites

Hello Chris B,

thank you for responding to my topic. I am happy to discuss the issue with somebody.

I updated to 1.7.2 some days ago and just now run a batch process. I saw again that Affinity fills the RAM up to 99% and the performance slowed down but then the RAM was emptied a little bit to 90% and the performance increased to the old time. This looked good, but now comes the bad. When the batch was finished the RAM stayed filled. When I started a new batch (again with around 100 photos (big size 25 MB each) the RAM got very fast filled again up to 99% and this time the RAM stayed filled and the time for the batch of a photo increased to double and tripple the normal time. Is there any possibility that Affinity clears the RAM after the batch run?

Link to comment
Share on other sites

On 6/9/2019 at 1:27 PM, Man48 said:

Is there another way to clean the RAM without closing the program?

The free utility Wise Memory Optimiser does a great job of forcing APhoto to release the memory it holds onto.  (Which I'm not sure is an actual problem)

When using the Optimise Now button the release of memory is "immediate".  When Auto Optimisation is ticked, it seems to take a minute or 2 to cut in.

Not sure if it will cure your underlying problem but you can try it in between your batch file runs to see if it helps you. At least it will give you the peace of mind that APhoto has released the memory that it appears to hold onto.

At the very least Wise Memory Optimiser when set to automatic mode ensures no other program is holding onto any system memory unnecessarily.  So whatever you use your PC for, the current task will "always" have access to the maximum free memory available.

 

wise.png

To save time I am currently using an automated AI to reply to some posts on this forum. If any of "my" posts are wrong or appear to be total b*ll*cks they are the ones generated by the AI. If correct they were probably mine. I apologise for any mistakes made by my AI - I'm sure it will improve with time.

Link to comment
Share on other sites

Your other option is to limit the amount of memory that APhoto can use which is set in Edit > Preferences > Performance

But to be honest, limiting the memory seems counterintuitive if you want APhoto to run as fast as it can. 

So, personally, I would only do this if APhoto was using so much memory that I could not use my PC for anything else and I had other stuff I wanted to do whilst my batch files were running

To save time I am currently using an automated AI to reply to some posts on this forum. If any of "my" posts are wrong or appear to be total b*ll*cks they are the ones generated by the AI. If correct they were probably mine. I apologise for any mistakes made by my AI - I'm sure it will improve with time.

Link to comment
Share on other sites

  • Staff

I've just done a quick test:

  1. 100 PNG files at 30.6mb each
  2. Batch processed them to JPEG files (unchecked afphoto)
  3. Converted them to Black & White
  4. Saved in the original location
  5. The Batch Process itself took 2m 01s to complete and it took about 1m 30s to add the 100 images
  6. RAM usage hit 81% usage whereas CPU was sitting at 100% (expected) and Disk Usage happily sat at 98-100%
  7. 5 mins after the process completed, my RAM usage was sat at 75% and did not budge (fine—nothing else is asking to use it yet)
  8. I repeated the above steps and got the exact same results bar the sitting ram after the process finished which is now 76%

I'm really not sure why this isn't the case for you. I would try suggesting what carl123 said and see if limiting the RAM usage helps.

 

Link to comment
Share on other sites

Thank you Carl123 and Chris B for your input,

I limited the amount of use that APhoto can use (about 60%) and yes the problem is solved but then APhoto is not running as fast as it can. Therefore I started this topic to see if this problem is only on my pc or if other people have the same problem and solved it.

When I run a batch I save the photos under a new location on another SSD. I thought this will speed up the batch process because the pc does not read and write on the same drive. Another point is, I do not wait for 5 min to start the next batch (may be I am too impatient...?). I use JPEG files and the batch process includes 1. autocontrast, 2. 10% saturation, and then 3 times unsharp mask ( I realised that 2 or 3 time small amount of sharpening gives better results as one time big sharpening).

May be Chris B you can try it in my way and tell me  if your RAM usage is better than mine.

Link to comment
Share on other sites

@Man48

Can you upload the macro(s) you use in the batch process, that may be relevant to the results you are seeing?

To save time I am currently using an automated AI to reply to some posts on this forum. If any of "my" posts are wrong or appear to be total b*ll*cks they are the ones generated by the AI. If correct they were probably mine. I apologise for any mistakes made by my AI - I'm sure it will improve with time.

Link to comment
Share on other sites

  • Staff

Hey Man48,

I've tried this using your macro and managed to get my Memory to hit 96% however I don't get any slowdowns whatsoever. 

This time, I wasn't waiting between batch processing and was immediately going in and doing it again. I did this a few times in a row and each time I included the newly added processed images so by the time I was done, I was processing about 600 images.

I then went away from my machine for 15 minutes and when I came back it was sat on 68% Memory usage...

I'm really not sure why this is causing your machine trouble as the specs aren't too dissimilar from mine. However, I was testing this on my brand new machine that I got yesterday so there's almost nothing on it meaning I've got really low idle usage too.

I wouldn't limit your RAM to 60% as like you said, it's running slow but I'd aim for 90% and see if that finds the right balance. 

Link to comment
Share on other sites

Hello Chris B,

thank you for the testings. It shows me, that I only have the problem. May be it is because I don´t have a new computer, it runs with an I5-3450 processor and win 7 (64bit) Home Premium. I will try to find an optimum with limitting the RAM and then hope that Santa brings a new computer.

Thank you again for your help.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.