Fusion Memory Cache Setting in Resolve

Get answers to your questions about color grading, editing and finishing with DaVinci Resolve.
  • Author
  • Message
Offline
User avatar

Bernd Klimm

  • Posts: 81
  • Joined: Sun Dec 04, 2016 7:37 am

Fusion Memory Cache Setting in Resolve

PostMon Mar 29, 2021 9:18 am

Does anybody know what this setting in DaVinci Resolve is supposed to do?

Fusion Memory Cache.png
Fusion Memory Cache.png (26.12 KiB) Viewed 10170 times


I couldn't find any documentation on it and after some testing, I can only think of what it's not doing:

- I don't see any impact on the Memory usage in the Fusion page whether this is on or off. The Fusion cache is definitely still built up and utilized when this is off.

- I don't see any difference from the edit page in using the Fusion cache. Playback in the edit page still uses the Fusion cache and triggers new memory being built up in the Fusion cache in the background - or not, depending on the comp, but independent of the setting...

- I don't see any difference when monitoring System RAM, so any additional mysterious caching also seems unlikely.

I cannot think of any equivalent setting in Fusion Studio that this might be based on either.

Maybe it is restricted to certain scenarios or just broken in v17? But what is it meant to do in the first place?
https://vfxstudy.com
Offline

Jim Simon

  • Posts: 30545
  • Joined: Fri Dec 23, 2016 1:47 am

Re: Fusion Memory Cache Setting in Resolve

PostMon Mar 29, 2021 3:44 pm

In Auto, Cache will be created whenever Resolve can't play a Fusion clip in real time.

On will create a Cache for all Fusion clips regardless.

Off will not create a Cache for Fusion clips ever.
My Biases:

You NEED training.
You NEED a desktop.
You NEED a calibrated (non-computer) display.
Offline

jacklib

  • Posts: 54
  • Joined: Tue Jan 26, 2021 10:17 am
  • Real Name: Jacek Hensoldt

Re: Fusion Memory Cache Setting in Resolve

PostMon Mar 29, 2021 6:30 pm

I think it is important to consider where you are working. I see that the setting in the Edit Page has no function, but in the Fusion Page the memory consumption increases significantly when I set Fusion Memory Cache to on (but not immediately, I have to run the clip 1-3 times until the cache is created). Fusion Memory Cache looks like a global setting, but it only works in Fusion Page, I think so.

The cache settings are really very confusing and user unfriendly. The settings partly influence each other and you can never be sure what is being cached and why. The blue bar unfortunately provides no information about this and you can not look at a clear place, but must - if something does not run smoothly - always test everything.... that really costs a lot of time and nerves.
iMac Pro 2017, 3,2 GHz 8 Core Xeon W, Radeon Pro Vega 56 8 GB, 32 GB RAM, Davinci Resolve Studio
Offline
User avatar

Bernd Klimm

  • Posts: 81
  • Joined: Sun Dec 04, 2016 7:37 am

Re: Fusion Memory Cache Setting in Resolve

PostMon Mar 29, 2021 7:11 pm

Jim Simon wrote:In Auto, Cache will be created whenever Resolve can't play a Fusion clip in real time.

On will create a Cache for all Fusion clips regardless.

Off will not create a Cache for Fusion clips ever.


Where do you base this information on? I did turn it to Off, cleared my Fusion Memory cache and played the clip and the Fusion cache did built up. As evidenced by the green line above the fusion timeline and by the resource monitor bottom right and my RAM monitoring.
https://vfxstudy.com
Offline
User avatar

Bernd Klimm

  • Posts: 81
  • Joined: Sun Dec 04, 2016 7:37 am

Re: Fusion Memory Cache Setting in Resolve

PostMon Mar 29, 2021 7:24 pm

jacklib wrote:I think it is important to consider where you are working. I see that the setting in the Edit Page has no function, but in the Fusion Page the memory consumption increases significantly when I set Fusion Memory Cache to on (but not immediately, I have to run the clip 1-3 times until the cache is created). Fusion Memory Cache looks like a global setting, but it only works in Fusion Page, I think so.


I couldn't confirm that. The fact that it increases after playing multiple times could just mean that different nodes are cached or frames that were initially skipped were cached on subsequent passes. But this happened to me also when the memory cache was turned off.

In Fusion itself, nodes are cached based on some priority determined by which nodes are displayed in the viewer and then the computational intensity of the nodes. I don't know the exact algorithm unfortunately - also undocumented as far as I know.

The cache settings are really very confusing and user unfriendly. The settings partly influence each other and you can never be sure what is being cached and why. The blue bar unfortunately provides no information about this and you can not look at a clear place, but must - if something does not run smoothly - always test everything.... that really costs a lot of time and nerves.


The blue bar relates to the render cache, which is actually documented quite well. It is a disk cache which is either manually triggered or off or follows the logic of the smart render cache. It operates on those levels in sequence:
- Fusion render cache (previously source cache): Takes effect after Fusion (if Fusion is used) and in smart render node is also triggered by processor intensive media (h.264,h.265, raw) or clip attributes like rescale
- Cache on OFX or Fusion FX effects (can only be manually activated)
- Node level Cache in color page (triggered by Noise Removal, Motion Blur, OFX)
- Color Page Cache - cache the full color page output
- Sequence cache - triggered by edit transitions and any type of edit page compositing with transparency or blend mode other than "normal".

Dependency here is also clear: if you make any change, every cache down the line is impacted and needs to be updated as per the sequence.

However, the whole render cache thing (blue line) starts after the Fusion output. So this is definitely after any Fusion "Memory" cache so I don't think that's related to the feature.

I'm preparing a detailed Resolve-Fusion performance tutorial and this feature is the one that still confuses me.
https://vfxstudy.com
Offline

Hendrik Proosa

  • Posts: 3069
  • Joined: Wed Aug 22, 2012 6:53 am
  • Location: Estonia

Re: Fusion Memory Cache Setting in Resolve

PostMon Mar 29, 2021 8:48 pm

Bernd Klimm wrote:I'm preparing a detailed Resolve-Fusion performance tutorial and this feature is the one that still confuses me.

I can’t add anything of value to question at hand but this caught my eye. Do you also plan to prepare some kind of performance test script or scripts that would stress test various different comp types?
I do stuff
Offline

jacklib

  • Posts: 54
  • Joined: Tue Jan 26, 2021 10:17 am
  • Real Name: Jacek Hensoldt

Re: Fusion Memory Cache Setting in Resolve

PostMon Mar 29, 2021 11:07 pm

I have not been able to observe Fusion Memory Cache doing anything in the Edit Page yet, but I can definitely say that on my computer it visibly degrades performance in Fusion Page immediately. When I enable Fusion Memory Cache, the clip no longer plays smoothly in Fusion Page, it immediately starts to jerk. Normally, one would expect better performance, but the opposite happens.

Bernd Klimm wrote:The blue bar relates to the render cache, which is actually documented quite well.


Lastly, I created a speed ramp and wondered why it didn't play smoothly even though the bar was blue. Then I understood that the bar was blue because it was Fusion cache. So the blue bar only affected Fusion and not the speed changes. Then I asked here in the forum what I can do to cache speed changes. I learned that I need to enable Render Cache Color Output. That worked, but how do you know to cache Color Output if you want to cache speed changes? The bar was blue every time, but you can't see what is in the cache. This can be confusing.

Bernd Klimm wrote:I'm preparing a detailed Resolve-Fusion performance tutorial


This is an exciting thing and I wish you success with it, you do excellent tutorials!

Unfortunately, the resources of a single computer are relatively limited and scale poorly. If cache is created on the production computer, the overall performance will always suffer and you will always have to look for a compromise here. Unless you can at least offload the disk cache to external servers, it will never really work well and every machine will be too slow. Here it would be really important that Blackmagic sometime brings an appropriate server solution on the market, or perhaps opens the API for a cache server and starts a corresponding open source project. I think this could raise the performance to a completely different level.
iMac Pro 2017, 3,2 GHz 8 Core Xeon W, Radeon Pro Vega 56 8 GB, 32 GB RAM, Davinci Resolve Studio
Offline
User avatar

Bernd Klimm

  • Posts: 81
  • Joined: Sun Dec 04, 2016 7:37 am

Re: Fusion Memory Cache Setting in Resolve

PostTue Mar 30, 2021 7:53 am

Hendrik Proosa wrote:Do you also plan to prepare some kind of performance test script or scripts that would stress test various different comp types?


That would be a very useful thing but also a massive project - at the moment I'm first focusing on the high-level Resolve parameters and different levels of caching and proxy options from Resolve - which already seems to be a big and confusing topic.

What you are suggesting sounds like the next level - and maybe a collaborative project to test different flows on different systems - not sure if something like that was ever done by anybody? I see the benchmarks from Pudgetsystems but usually, they only test performance for stuff like raw debayering decoding/encoding and maybe the occasional noise reduction or OFX...
https://vfxstudy.com
Offline
User avatar

Bernd Klimm

  • Posts: 81
  • Joined: Sun Dec 04, 2016 7:37 am

Re: Fusion Memory Cache Setting in Resolve

PostTue Mar 30, 2021 8:31 am

jacklib wrote:I have not been able to observe Fusion Memory Cache doing anything in the Edit Page yet, but I can definitely say that on my computer it visibly degrades performance in Fusion Page immediately.

After a few more tests, I realized that turning it on actually does increase the RAM usage slightly on some comps. In my case it did not have any performance impact, but depending on the system and comp, I can see that it could be the case.

After comparing the same comp with Fusion Studio - I believe that the setting in resolve is equivalent to this setting here:

Fusion Studio Playback Memory Cache.png
Fusion Studio Playback Memory Cache.png (84.04 KiB) Viewed 9830 times


"Auto" presumably might do something similar to the "Only if slower than X frames" - whatever X might be here...

This feature in Fusion Studio is equally well documented - that is it's also absent from the manual.

My best guess is that it forces to cache nodes that are directly used for playback but which otherwise are not considered processor-intensive enough to require caching. If that setting is off, there is definitely still caching going on. But when adding a node with low computational demands, like a Brightness&Contrast at the end before viewing, in my tests that node wasn't cached unless this setting was turned on.

If my observation is correct, then depending on RAM speed and processor performance it could be that enabling it might in some cases reduce the initial performance while building it up but could possibly improve subsequent playback - if RAM is running low overall I could also imagine that it might have detrimental effect.

I still feel like I'm more guessing than knowing here... Also better overall understanding of the cache logic would help.

Lastly, I created a speed ramp and wondered why it didn't play smoothly even though the bar was blue. Then I understood that the bar was blue because it was Fusion cache. So the blue bar only affected Fusion and not the speed changes.

Did you have smart cache on? In smart cache I believe some retime effects should trigger the next cache level automatically. But I think only the processor intensive ones like Optical Flow.

In user mode Fusion is cached automatically if you have enabled that in the Optimized Media and Render Cache settings but other caching doesn't happen unless you manually trigger it.

Edit page retime curves and other edit transforms are computed after Fusion in the processing pipeline but the manual claims that they are still cached together with the Fusion Output Cache.

Since the Color Output Cache is coming later it would ultimately cache everything, but if the manual is correct, retime effects should be cached before already.
https://vfxstudy.com
Offline

OliverZ

  • Posts: 102
  • Joined: Wed Feb 17, 2021 8:42 am
  • Real Name: Oliver Zoffi

Re: Fusion Memory Cache Setting in Resolve

PostTue Mar 30, 2021 9:13 am

jacklib wrote:
Unfortunately, the resources of a single computer are relatively limited and scale poorly. If cache is created on the production computer, the overall performance will always suffer and you will always have to look for a compromise here. Unless you can at least offload the disk cache to external servers, it will never really work well and every machine will be too slow.


How can access to an internal cache on an M.2 PCIe SSD be slower than on a server that is connected via LAN?
Regards
Oliver

PC: W10p64 (21H2), i7-5820k, 32GB, GTX1660Ti (6GB), 2x1TB M.2, 1x4TB SSD
NB: W11h64, AMD RYZEN 7 5800H, 64GB, RTX3060 (6GB), 1x512GB M.2, 1x1TB M.2, 1x8TB SSD
Resolve Studio 17.4.6/4, NVIDIA Studio 512.15
Offline

jacklib

  • Posts: 54
  • Joined: Tue Jan 26, 2021 10:17 am
  • Real Name: Jacek Hensoldt

Re: Fusion Memory Cache Setting in Resolve

PostTue Mar 30, 2021 10:36 am

The access speed is only one factor and should actually not be a problem. But first the cache must be created, that means it has to be calculated and saved first. This happens when the red bar slowly turns into a blue bar. This task needs a lot of resources, which are then missing elsewhere and disturb the work. This process could be completely outsourced to a second computer. All the cache server needs is the footage and the instructions on how to create cache files from it. Once the cache is ready, it is then made available to the main computer. This would have no negative impact on the work at the main workstation and would also be easily scalable. If at some point the cache server becomes too slow, then a second and a third etc. could be added and the computers share the task. This is not possible with a single computer responsible for everything. Of course, a cache server should not be connected via LAN, but e.g. via Thunderbolt.
iMac Pro 2017, 3,2 GHz 8 Core Xeon W, Radeon Pro Vega 56 8 GB, 32 GB RAM, Davinci Resolve Studio
Offline

Hendrik Proosa

  • Posts: 3069
  • Joined: Wed Aug 22, 2012 6:53 am
  • Location: Estonia

Re: Fusion Memory Cache Setting in Resolve

PostTue Mar 30, 2021 11:03 am

Bernd Klimm wrote:
Hendrik Proosa wrote:Do you also plan to prepare some kind of performance test script or scripts that would stress test various different comp types?

What you are suggesting sounds like the next level - and maybe a collaborative project to test different flows on different systems - not sure if something like that was ever done by anybody? I see the benchmarks from Pudgetsystems but usually, they only test performance for stuff like raw debayering decoding/encoding and maybe the occasional noise reduction or OFX...

I don't recall having seen any for Fusion specifically. It would also be interesting because would allow comparing different softwares in more apples to apples way, because at least some comp types and workloads can be translated to others. I frequently read the "this or that is soo fast and everyone knows this" but I never see any hard data to back it up.
I do stuff
Offline
User avatar

Bernd Klimm

  • Posts: 81
  • Joined: Sun Dec 04, 2016 7:37 am

Re: Fusion Memory Cache Setting in Resolve

PostTue Mar 30, 2021 11:07 am

That's what you basically have with network rendering in Fusion Studio. You create your render jobs and they can be executed on any number of machines in the network as long as they all have access to the same shared (fast) storage. Each render node receives a copy of the comp and is assigned individual frames for processing and you can use it for background rendering while continuing your work on the main machine.

Since resolve is also creating disk cache frame by frame, that same principle could indeed work.
Maybe a topic for the feature request forum?

Any further insights about the RAM cache logic?

Sent from my SM-G960F using Tapatalk
https://vfxstudy.com
Offline

OliverZ

  • Posts: 102
  • Joined: Wed Feb 17, 2021 8:42 am
  • Real Name: Oliver Zoffi

Re: Fusion Memory Cache Setting in Resolve

PostTue Mar 30, 2021 1:54 pm

@Jacklib thank you, that makes sense! Unfortunately I only have one workstation ...
Regards
Oliver

PC: W10p64 (21H2), i7-5820k, 32GB, GTX1660Ti (6GB), 2x1TB M.2, 1x4TB SSD
NB: W11h64, AMD RYZEN 7 5800H, 64GB, RTX3060 (6GB), 1x512GB M.2, 1x1TB M.2, 1x8TB SSD
Resolve Studio 17.4.6/4, NVIDIA Studio 512.15
Offline

swordinhand

  • Posts: 44
  • Joined: Tue Nov 26, 2013 2:07 am
  • Real Name: Luke Sommer

Re: Fusion Memory Cache Setting in Resolve

PostFri Jan 07, 2022 6:21 pm

Hey Bernd,

I have been reading the manual and couldn't find anything regarding "Fusion Memory Cache" either. But I think I figured out some of its functionality. It's essentially a RAM renderer / cache, which allows for much faster caching in Fusion, but can only be used in certain scenarios. The way I got it to work was by making sure the Fusion Memory Cache was set to On, the Render Cache is None or Smart (I think User would work, but still learning all cache levels, so might be wrong about User) and the clip level Render Fusion Cache Output was set to Auto. Then if you play the Fusion clip in Fusion the green render bar progresses considerably faster than doing it with the Disk Cache. I also believe that the "Limit Fusion memory cache to" setting in the Preferences -> System -> Memory and GPU tab, controls how much RAM is allocated to the Fusion Memory Cache. I have 72GB of RAM on my machine and I maxed it out for my testing (40.5 GB).

If you cache the fusion output to disk, then the Memory Cache won't work. So, in other words, any disk caching has to be off or memory caching won't take effect. The one thing I couldn't figuring out was the Auto setting in Fusion Memory Cache. I thought that it might override disk caching, but that didn't seem to work. So maybe uses memory caching for certain nodes or processes in Fusion. But I'm just starting to learn Fusion, so I can't speak to that.

Bottom line: If you need quicker rendering / caching while working on a Fusion clip and you have enough ram for the clip, using Memory Caching will speed up your workflow. Otherwise, don't worry about it and leave it turned off.
Offline

Butters

  • Posts: 3
  • Joined: Thu Mar 30, 2023 5:20 pm
  • Real Name: Thai Tran

Re: Fusion Memory Cache Setting in Resolve

PostThu Apr 13, 2023 6:19 pm

Newish user to Fusion (in Resolve) but a semi-advanced user of Resolve in general coming from Premiere.

I'm having a similar issue in the Fusion page where frames are either not caching no matter what the cache settings are OR frames DO cache but they do not playback properly (green bar builds up in the Fusion timeline but no realtime playback).

I'm working at 4k but within the node tree I have a Resize node that scales everything down to 1920x1080 before the MediaOut node. Sometimes frames don't cache at all, sometimes they do cache but still do not playback properly. Has ANYONE found out why this is the case? I really want to do more compositing and animation/mograph work within Fusion but if I can't reliably get realtime previews of my work then this can't be my main tool. (This isn't even talking about the buggy Keyframe window where tools either won't show up or sometimes won't go away. So frustrating!)

Return to DaVinci Resolve

Who is online

Users browsing this forum: AdAstra, andrewsciba, bentheanimator, Cary Knoop, Davster, Johannes Jonsson, Mads Johansen, PaoloSanta, rsf123 and 185 guests