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

Affinity Photo memory usage/relinquishing questions


Recommended Posts

On 7/18/2022 at 11:06 PM, nickbatz said:

Affinity Photo (...) The issue is that it doesn't relinquish all that RAM when I quit the program. I'm not ready to use words like "memory leak' that are supposed to make one sound intelligent, but something doesn't seem right.

What makes you assume that it is actually Affinity that "doesn't relinquish all that RAM"? – As in the first reply in your thread recommended by Callum (Serif) you can use the Activity Monitor app for a closer look.

Not only an app takes or discards RAM, it is macOS which assigns it if needed, or decides to free it, or compresses it or moves it into the swap on disk, e.g. to keep it available or faster accessible in case it might get required by an app again. Thus, it is not generally a disadvantage or malfunction if your RAM appears to be used but can rather be an indicator for efficient memory management of macOS. With other words: empty RAM doesn't do anything, the purpose of RAM is rather to be used.

So, why shouldn't 40 GB be kept in use as long 24 GB are still free? It gets critical only if an app doesn't get enough RAM to work smoothly, this would be indicated in the Activity Monitor's diagram with colours other than green: yellow respectively red.

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1 only

Link to comment
Share on other sites

3 hours ago, thomaso said:

With other words: empty RAM doesn't do anything, the purpose of RAM is rather to be used.

Exactly!

Besides, if there is 30GB or so of empty (free) RAM, it should be obvious that memory pressure is quite low, so there is no reason for the OS to free up any more of it.

All 3 1.10.6, & all 3 V2.03 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.6; Affinity Designer 1.10.6; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

14 hours ago, R C-R said:

All that says is you have 39.51 GB free. It says nothing about memory pressure being sufficiently high enough to force releasing any more of it so other processes can use it. In fact, like has already been mentioned, absent high memory pressure the OS will try to avoid releasing recently used data already in memory in case it might be needed again because it is much quicker to move it from inactive to active memory than fetching it again from even the fastest SSD.

 

Sigh.

No.

Example: if Ioad my large music template into Apple Logic Pro X, the available memory display you're looking at will go down to roughly 20GB.

Then when I quit Logic, the display will go back up roughly to where it was before launching it, maybe 50GB.

That happens with AF sometimes, sometimes it doesn't.

Bear in mind that I may be stupid, but I've been dealing with memory access for 20 years, since the dawn of streaming sampling when it was a very scarce resource. I've been a music tech magazine editor for a long time - point being not to brag, but to say that this is something I've had to pretend to understand for a long time in order to keep how stupid I am hidden from public view!

Link to comment
Share on other sites

2 hours ago, nickbatz said:

That happens with AF sometimes, sometimes it doesn't.

That is to be expected because it all depends on the demand other processes (including both user-launched apps & other processes being run by the OS) are putting on the available RAM.

You can monitor this by opening Activity Monitor to the Memory tab & checking the Memory Pressure graph & by setting the View to show all processes, System processes, & so on.

Again, if the graph stays in the green, there is no reason for the OS to page things out of memory. So please show us a screenshot of that graph before & after quitting AP if you want us to understand what makes you think there is something wrong with AP that is causing the OS not to release RAM when it is needed by other processes.

Also, it may help if you start up AP, find it in the Activity Monitor window, & double-click on it to show all its open files & ports. Note that many of these items like fonts & various system level items may be used by several other apps & precesses so they will still use some RAM even after AP has quit.

All 3 1.10.6, & all 3 V2.03 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.6; Affinity Designer 1.10.6; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

1 minute ago, R C-R said:

That is to be expected because it all depends on the demand other processes (including both user-launched apps & other processes being run by the OS) are putting on the available RAM.

You can monitor this by opening Activity Monitor to the Memory tab & checking the Memory Pressure graph & by setting the View to show all processes, System processes, & so on.

Again, if the graph stays in the green, there is no reason for the OS to page things out of memory. So please show us a screenshot of that graph before & after quitting AP if you want us to understand what makes you think there is something wrong with AP that is causing the OS not to release RAM when it is needed by other processes.

Also, it may help if you start up AP, find it in the Activity Monitor window, & double-click on it to show all its open files & ports. Note that many of these items like fonts & various system level items may be used by several other apps & precesses so they will still use some RAM even after AP has quit.

Nope. Programs free up their RAM when you quit them.

And the reason I posted about this originally is that I've experienced instability in other programs (specifically Logic) after quitting Affinity Photo.

Link to comment
Share on other sites

14 minutes ago, nickbatz said:

Nope. Programs free up their RAM when you quit them.

1. Programs cannot free up RAM. Only the OS can do that.

2. The OS will not free up any RAM that is being shared by more than one process unless & until all those processes end, & often that won't happen immediately anyway because the OS tries to anticipate what data currently in RAM might be needed in the immediate future & will leave it there until either that RAM is needed by some other process or sufficient time has elapsed to make it unlikely it will be needed.

3. Whatever problems you are having with memory management, using Activity Monitor as has been suggested should give you clues about the cause. If you do not want to do that & share what it shows with us, that's your call, but there is little anybody can do to help you figure this out if you do not. Insisting that it works differently than it really does is not going to get you anywhere closer to a solution.

All 3 1.10.6, & all 3 V2.03 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.6; Affinity Designer 1.10.6; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

4 minutes ago, nickbatz said:

Please. It has been suggested that you give it a rest.

I have no problem with that. However, you might find it useful to read https://support.apple.com/guide/activity-monitor/view-memory-usage-actmntr1004/10.14/mac/10.14, particularly considering what it says about Cached Files & performance.

All 3 1.10.6, & all 3 V2.03 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.6; Affinity Designer 1.10.6; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

23 hours ago, R C-R said:

I have no problem with that. However, you might find it useful to read https://support.apple.com/guide/activity-monitor/view-memory-usage-actmntr1004/10.14/mac/10.14, particularly considering what it says about Cached Files & performance.

Look, I don't come here to be rude to people.

But first, my understanding of RAM cache is that it's used by the system. Second, it's supposed to be available if programs need to overwrite it.

Remember, the reason I posted was not because I care about what the display says but because I was experiencing instability when running Logic after Affinity Photo.

Link to comment
Share on other sites

2 hours ago, nickbatz said:

Remember, the reason I posted was not because I care about what the display says but because I was experiencing instability when running Logic after Affinity Photo.

As has been mentioned more than once now, this is why it would be helpful to share what Activity Monitor says about memory use when you are running or have recently run these apps. Otherwise, there is nothing anybody can do about helping identify the cause of this besides make some uneducated guesses.

All 3 1.10.6, & all 3 V2.03 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.6; Affinity Designer 1.10.6; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

6 minutes ago, nickbatz said:

Not "as has been suggested" - YOU want me to do that...

Actually the first request for that came from staff member @Callum in the 2nd post of this topic.

 

All 3 1.10.6, & all 3 V2.03 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.6; Affinity Designer 1.10.6; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

16 hours ago, nickbatz said:

Not "as has been suggested" - YOU want me to do that,

Not only R C-R and Callum – but me too, here and here.

I wonder what prevents you from using/displaying it, preferring instead your additional, less informative non-Apple menu bar tool, which, by the way, as a product of macpaw, might be harmful, as reported on some websites at least for another product of macpaw. (Just in case, this thread in the Apple discussions might help to detect third party apps possibly causing issues: "Using EtreCheck to Troubleshoot Potential Mac Issues". The mentioned "EtreCheck" used to be free until version 3.4.6. (2018). If you find a download: it runs well in macOS 10.14. Mojave)

Now, trying to discern/reflect on what exactly this thread is about, I read two questions in your first post:

On 7/18/2022 at 11:06 PM, nickbatz said:

So two questions:

1. Is it just me?

2. Is this better in M1/M2 Macs?

This questions seem easy to answer:

1. Yes. – Respectively it is not me.
2. No. – If I have do not have this issue then M1/M2 would not make this better.

However, a comparison with M1/M2 might mislead or not work properly because of its different technology. Thus it might possibly result in new, different issues which you currently do not have yet. This article might give a bit of an inside, in particular the paragraph about "Unified memory": https://eclecticlight.co/2021/08/24/whats-in-an-m1-chip-and-what-does-it-do-differently/

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1 only

Link to comment
Share on other sites

1 hour ago, thomaso said:

Not only R C-R and Callum – but me too, here and here.

I wonder what prevents you from using/displaying it...

Only a guess but I think the OP isn't really interested in delving into the details of how the macOS manages memory to determine if that is the cause of the instability he is seeing in Logic after running AP, or at least if he is, that he does not want anybody's help in doing that.

All 3 1.10.6, & all 3 V2.03 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.6; Affinity Designer 1.10.6; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

15 minutes ago, R C-R said:

does not want anybody's help

This reminds me to Ron's recent impression: "I see … comment as the typical stereotype of men, at least here in the US. We don't need to read instruction manuals, and we certainly will not ask for directions to our destination, no matter how lost we may be. It's just not manly."

However, the whole thread seems strange to me, I mean, answers to these two initial questions would not solve any problem that may exist. But also it is not asking for pros/cons of M1/M2. So I don't see the real goal at all. Maybe just an experiment in public relations: "Bear in mind that I may be stupid, but I've been dealing with memory access for 20 years, (…) I've been a music tech magazine editor for a long time - point being not to brag, but to say that this is something I've had to pretend to understand for a long time in order to keep how stupid I am hidden from public view!"

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1 only

Link to comment
Share on other sites

Come on.

You people need a grasp of the very basic subtleties of language.

I appreciate help, I don't appreciate being patronized. Things like "and how exactly are you determining that your memory isn't being freed [the implication being that I'm an idiot who needs to be taught the different kinds of RAM use in macOS]" are just annoying.

Again, it's in the way it's said.

thomaso, you don't know me from Adam. Pease stop insulting me.

You are contributing nothing other than antagonizing me. No, I'm not a dickbrain.

And I asked the question about M1 and M2 separately BECAUSE I'M INTERESTED IN THE BLEEDIN' ANSWER! Sorry you find that strange.

***

As to the remark about my preferring Memory Clean to looking at Activity Monitor... the two are not mutually exclusive.

I use Memory Clean to free up memory. In the past RAM access has been a major issue for music software, as I wrote. Again, Memory Clean typically frees up less RAM than it used to for whatever reason, but it's useful to have it running nonetheless.

Link to comment
Share on other sites

The way I've left it: next time this happens I will look more closely and try to figure out what's going on. In the meantime there's not much I can do.

Early in this thread someone suggested that it could be the clipboard. That actually could be *part* of the answer - when I've copied something from the screen, because Affinity flushes the clipboard when you copy "internally."

Link to comment
Share on other sites

1 hour ago, nickbatz said:

Early in this thread someone suggested that it could be the clipboard. That actually could be *part* of the answer - when I've copied something from the screen, because Affinity flushes the clipboard when you copy "internally."

The clipboard contents on Macs normally shouldn't be the APh problem here, since it's usually cleared after such operations. - Instead it may be more related to ...

Quote

... especially when I have multiple pictures open with Save History With Doc enabled ...

... since that's a longer task operation when saving and then clearing/freeing up all the used memory by the app, especially if some pictures might not be saved and just closed and thus some background recovering saving operation is performed for those then too.

However, under MacOS your best option for closer processes & threads mem consumption inspection is the Activity Monitor, or terminal CLI tools like top & leaks etc. The later leaks is especially useful for searching a process's memory for unreferenced malloc buffers and thus possible memeory leaks!

Related to M1/M2 Macs, those are architecture wise overall more efficient in (shared-)memory handling in contrast to the older Intel based Macs, but here too it also always depends on how much RAM memory a specific machine is equiped with and of course what sort & how many processes are usually executed. - So the good old rule of thumb "...the more RAM you have the better..." still applies here too!

 

☛ Affinity Designer 1.10.6 ◆ Affinity Photo 1.10.6 ◆ Affinity Publisher 1.10.6 ◆ OSX El Capitan
☛ Affinity V2 apps still not installed and thus momentary not in use under MacOS

Link to comment
Share on other sites

Thanks v_kyr.

Yes, I'm definitely going to order the Mac Studio with 64GB (the one that can hold 128GB is twice the price, which is just too much money for a computer). What I want to know is whether having 32 vs 24 graphics cores makes any difference and if so how much difference to Affinity Photo - i.e. is it worth $200 or not. It doesn't make any difference for the music and audio programs I use.

As to the clipboard, what I discovered (thanks to this thread) is that - in clearer language than I wrote above - if you copy from one open Affinity picture to another, the clipboard is flushed when you quit. But if you do a screen capture it isn't, as expected (because that's a PNG rather than in Affinity's own format).

I'm starting to think it's wise to use more shapshots and less saving the undo history. At the least it saves drive space.

Link to comment
Share on other sites

3 minutes ago, nickbatz said:

Yes, I'm definitely going to order the Mac Studio with 64GB.

Good RAM choice, especially for running certain memory hungry apps in parallel!

5 minutes ago, nickbatz said:

What I want to know is whether having 32 vs 24 graphics cores makes any difference and if so how much difference to Affinity Photo - i.e. is it worth $200 or not. It doesn't make any difference for the music and audio programs I use.

Well honestly I doubt it will make that much difference GPU wise here for the actual Affinity apps, but maybe or probably for other multithreaded programmed GPU intensive apps. The whole depends on how apps are programmed and build-up in order to make full use of all possible GPU cores. AFAIK there are actually only few apps which will make use of those and thus will benefit from a full blown set of GPU cores.

However, you can take a look through the Benchmark lists here in order to see & find out if it possibly makes any valuable difference or not!

17 minutes ago, nickbatz said:

I'm starting to think it's wise to use more shapshots and less saving the undo history. At the least it saves drive space.

You have to test & try out which pleases you more and is also overall less storage memory consuming for you!

 

☛ Affinity Designer 1.10.6 ◆ Affinity Photo 1.10.6 ◆ Affinity Publisher 1.10.6 ◆ OSX El Capitan
☛ Affinity V2 apps still not installed and thus momentary not in use under MacOS

Link to comment
Share on other sites

Just now, v_kyr said:

Good RAM choice, especially for running certain memory hungry apps in parallel!

Oh, I need every bit of it for music and audio apps.

Just now, v_kyr said:

Well honestly I doubt it will make that much difference GPU wise here for the actual Affinity apps, but maybe or probably for other multithreaded programmed GPU intensive apps. The whole depends on how apps are programmed and build-up in order to make full use of all possible GPU cores. AFAIK there are actually only few apps which will make use of those and thus will benefit from a full blown set of GPU cores.

Thinking about it, I should ask Topaz about Gigapixel AI. Last time I looked they hadn't updated it for Apple Silicon, but it does use the graphics card for processing (there's even a preference). And it can easily take half an hour to process a file on my current main machine.

 

Just now, v_kyr said:

However, you can take a look through the Benchmark lists here in order to see & find out if it possibly makes any valuable difference or not!

You have to test & try out which pleases you more and is also overall less storage memory consuming for you!

 

Yeah, I don't really care about storage - it's cheap.

Thanks for the link. Benchmark scores are usually sort of abstract (in that they tend not to mean a lot in the real world), but that's a good guide.

Link to comment
Share on other sites

10 minutes ago, nickbatz said:

Benchmark scores are usually sort of abstract (in that they tend not to mean a lot in the real world), but that's a good guide.

Depends on the sort of Benchmarks, so if it's just a synthetic small benchmark, or instead a whole execution app suite then (like the BAPCo app suite). The later stress tests CPU/GPU much more under longer real time app usage conditions & pressure, thus such app suite benchmarks are often more meaningful at all here then.

☛ Affinity Designer 1.10.6 ◆ Affinity Photo 1.10.6 ◆ Affinity Publisher 1.10.6 ◆ OSX El Capitan
☛ Affinity V2 apps still not installed and thus momentary not in use under MacOS

Link to comment
Share on other sites

56 minutes ago, v_kyr said:

Depends on the sort of Benchmarks, so if it's just a synthetic small benchmark, or instead a whole execution app suite then (like the BAPCo app suite). The later stress tests CPU/GPU much more under longer real time app usage conditions & pressure, thus such app suite benchmarks are often more meaningful at all here then.

Well, in my experience with music and audio software, even quite specific benchmark tests don't necessarily mean a whole lot.

There's one going around for Logic Pro X that... okay, now I forget, but they run 50 billion reverbs or something. There's one with a number of tracks count... maybe the same one.

But aside from the fact that you're unlikely to push your computer all the way in those directions, your storage subsystem makes a huge difference, so does whether you're running plug-ins that tax a single processor rather than ones that are divided... there are many factors that determine whether you're going to bring a computer to its knees.

Benchmarks can certainly be useful for comparisons, but more often they're just a rough guide.

Link to comment
Share on other sites

There won't be a single benchmark that will give meaningful results that can be applied to audio and video and still images. Video and Audio are needing 'realtime' effects applied during playback. Images don't have any 'realtime' implications, the effects are perhaps more fine grained and applied to a much larger number of pixels.

Best you can do is find a set of benchmarks for your current setup and see how those worked for the new machines. That may not be possible if the current setup is old enough or unique in its use of components.

Mac Pro (Late 2013) Mac OS 11.7.6 
Affinity Designer 2.1.0 | Affinity Photo 2.1.0 | Affinity Publisher 2.1.0 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

9 minutes ago, Old Bruce said:

Images don't have any 'realtime' implications,

Interesting view. I'd rather say in Affinity every task runs in realtime – whereas for audio, video and especially 3D the rendering speed matters and is not necessarily in realtime / can be a separate procedure (play, respectively render).

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1 only

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.