Mocha Hitfilm has no RAM limits

In Mocha Hitfilm there is a Cache limit slider percentage. Setting this to anything still results in my system maxing out as I playback footage, I have 56GB of RAM and am dealing with 4k video. But it should be deleting cached frames as I playback. This is causing my system to lock up and I have to restart the computer.

EDIT: Make a Mocha Hitfilm category, otherwise I am using AE because it is most related…

Hi @erosion139

Which Cache limit slider are you referring to? Do you mean the Memory limit?


We recommend this value is around 50% to keep balance on large shots, but if the system is locking up that usually points to a disk space issue. How much disk space do you have in the cache folder here?

Yes I am referring to the maximum memory limit, I have the slider set to 35%, as you can see in task manager the memory usage has gone steadily up as I was caching frames. If I clear the cache it all goes away. You can also see my settings, the disk used for the cache also has 250GB free give or take.

Apologies, here is the cache

and this is what happens when I clear the cache

Thanks for this.

In this version of Mocha (v7.5.2) the memory use is relative to the host use. We moved Mocha Pro out of process from version 8 onwards so it could manage its own memory better and it’s a vast improvement.
Currently, Mocha Hitfilm has v7.5.2 so it’s utilizing shared memory with HitFilm.

We might be able to manage the memory a bit better on the Hitfilm side for this, but I have a few questions:

  1. How long is the clip you are tracking?
  2. What are your settings in the GPU preferences?

Currently, Mocha Hitfilm has v7.5.2 so it’s utilizing shared memory with HitFilm.

This raises a concern. As hitfilm no longer has a preference for RAM allocation, the option simply vanished from the settings menu. From what I remember before it was always a “low” and “high” switch. So maybe the underlying problem here is that hitiflm doesn’t specify an allocation anymore and mocha is not adhering to anything.

The clip in question is only around 500 frames at 4k. Pretty heavy but mocha is performant so long as I don’t let the cache overfill. But setting that cache percentage limit in my testing is not functional.

Here are the GPU preferences also

Start by defining your openCL device to your main display GPU. Automatic is helpful, but it’s better to specifically pick the GPU. Don’t change any other settings there.

But memory management is obviously a problem here as HitFilm appears to be unable to release the memory.

Try this: Track a portion of the shot (perhaps a third), clear the Mocha cache, then keep tracking. Does the memory maintain better with this approach?

Your alternative is to track using a HD proxy, which will scale to the UHD /4K requirements.

If I clear the cache out the RAM releases and in task manager it seems that all of the mocha cache has successfully cleared. But again as the footage is cached it goes above and beyond what the system can handle. Filling the physical RAM and bleeding into the SSDs. The GPU has been selected to the primary display GPU.

Using a proxy is definitely an option, but it isn’t ideal if I have to keep guessing which resolutions and frame counts ill have to proxy in order to cache it all. In the end, I don’t really have to cache it at all, the tracking will finish regardless, but with the cache overfilling it actually crashes the computer.