• SONAR
  • [SOLVED] Unloading a Synth Does Not Reduce RAM Usage?
2016/07/29 09:19:41
PeteL
After reading the manual and searching the forum, I was under the impression that unloading a synth by clicking the freeze button in the Synth Rack would free up the memory used by the synth. This doesn't appear to work in my case below.

I've set up an project with all the audio tracks and soft synths I think I'll need. Currently it's just an empty project with no audio or MIDI data. One of the synths is UVI Workstation with a huge preset loaded nearly maxes out my 8GB of RAM, consuming 2 GB when loaded, and taking about 6 minutes to load the synth with preset. I find this annoying, and I thought I could unload that synth until I actually work on that instrument's part near the end of the process (and freeze the track once the part is complete).

When I press the freeze button in the Synth Rack - nothing happens (I would think the button would stay lit) and RAM usage remains where it was. This possibly may have something to do with the fact the associated MIDI track is currently blank. ????? Does anyone have insight into this situation? I would think that the freeze method ought to work.

I currently am using the workaround of replacing the UVI Workstation preset with an empty one, which is working, but I'm wondering if I'm missing something in my attempted use of the freeze function.

Thanks in advance for your thoughts!
Pete
2016/07/29 09:45:17
bitflipper
Windows caching? If you unload the synth, it should (must) de-allocate any RAM it's claimed. However, Windows likes to hang on to loaded data for awhile in case you need it again. It's not necessarily a problem, as that memory will be re-allocated to other processes as needed.
 
There are occasional exceptions, that usually come down to programs not managing memory properly. It usually manifests itself as a so-called "memory leak". Even Windows itself is sometimes guilty of it, which is why over the years users have gotten into the habit of periodically rebooting. Quashing memory leaks has been a priority at Microsoft for the last couple decades, though, and it's not nearly as big a problem as it was in, say, Windows 95. But it's still there, usually in 3rd-party drivers and services that Microsoft has no control over.
 
Memory leaks are typically a few kilobytes at a time and only become problematic over time, like weeks. A six-gigabyte memory leak would be highly unusual - I've never heard of such a thing. In my experience, SONAR's been pretty good at memory management, and in any case we don't usually run SONAR for weeks at a time anyway. 
 
After removing the UVI instrument from your template and closing out of SONAR, does it still eat lots of RAM when you start a new project?
2016/07/29 10:16:59
tlw
It's possible to force Windows to clear any RAM it doesn't currently have a running process associated with, but as Bitflipper says it's pretty pointless. Windows will re-allocate RAM as required, and also tends to keep stuff in RAM rather than the pagefile if possible. So if it sees a lot of unused RAM it will fill it with content from the page file and the RAM will then show up in task manager as in use because it is.

When something is loaded that wants RAM Windows reverses the process and shoves some stuff out of RAM and into the page file as required. So seeing continually high RAM usage on even a lightly loaded system isn't unusual.

You only move away from this once you have somewhat more RAM than your running applications, including Windows processes, require. And even then Windows will be putting some things into swap if they haven't been used for a while.
2016/07/29 10:20:29
PeteL
Hi Bit!
 
bitflipper
After removing the UVI instrument from your template and closing out of SONAR, does it still eat lots of RAM when you start a new project?



Actually, I didn't remove UVI Workstation, I just "emptied out" the preset being used within UVI Workstation, replacing it with an empty preset ... and that immediately decreased RAM usage by about 2GB on the spot.
 
Let me rephrase what I think the problem is ... normally when a freeze a synth in a project, in the Synth Rack the synth's freeze button stays lit, the synth's name gets parentheses around it, the associated tracks render, and the associated tracks' freeze buttons light up.  That is with actual MIDI data in the associated tracks.
 
In my current case, the project is basically an empty template if you will, with no audio or MIDI data yet.  I press the UVI Workstation's freeze button and nothing happens.  I now postulate that since there's no data to freeze, the operation is therefore precluded, and hence doesn't occur, leaving the synth in memory without any error messages.  Now that I've said that, I realize I could probably enter one dummy note into the associated MIDI track, and then freeze.  I bet it would work and release the memory.
 
I don't think it's a memory leak issue.  I once had a horrible memory leak problem while setting up VSL preset and matrices, which involved a lot of saving, closing, re-loading matrices and such.  Eventually my memory was full and I had to restart!  Not too long ago, lo and behold - VSL released a fix for "improper memory management" and the problem hasn't occurred since.
 
Hey, by the way, thank you for all your excellent and well thought out posts and explanations over the years.  I find them most useful!  You have a real  talent for that.
 
Pete
2016/07/29 10:25:17
PeteL
tlw
It's possible to force Windows to clear any RAM it doesn't currently have a running process associated with, but as Bitflipper says it's pretty pointless. Windows will re-allocate RAM as required, and also tends to keep stuff in RAM rather than the pagefile if possible. So if it sees a lot of unused RAM it will fill it with content from the page file and the RAM will then show up in task manager as in use because it is.

When something is loaded that wants RAM Windows reverses the process and shoves some stuff out of RAM and into the page file as required. So seeing continually high RAM usage on even a lightly loaded system isn't unusual.

You only move away from this once you have somewhat more RAM than your running applications, including Windows processes, require. And even then Windows will be putting some things into swap if they haven't been used for a while.



I thought that wasn't "quite as true" as it was with the initial W10 release when people claimed their memory was always full.  Anyway, both in Sonar's memory meter and resource monitor my memory is usually 1/2 to 5/8 full when running most Sonar projects.  With my current project, the UVI with huge sample preset brings it up to about 9/10, equating to about 2GB extra.  But, only with the preset loaded into UVI.
 
Pete
2016/07/29 10:34:48
BobF
Freezing a synth processes the MIDI track and produces an audio clip.  You don't have a MIDI clip, so a 'freeze' didn't actually happen.
 
I happen to have a project in front of me with an Addictive Drums track that has MIDI clips and an ST3 Bass synth with no MIDI yet.
 
When I 'freeze' the AD track, it processes, lights the 'freeze' indicator, and unloads some memory.
 
When I try to 'freeze' the ST3 track, the 'freeze' indicator doesn't change and there is no change in memory used by the Sonar process.
 
 
 
2016/07/29 10:38:19
BobF
If you undock the Browser, or dock it in the multidock, you'll see power buttons for each synth.  Clicking these to turn off the synths will free up memory even for synths that have no MIDI.
 
2016/07/29 10:44:04
PeteL
Bit & BobF -
 
I just tried inserting a dummy MIDI note into the UVI Workstation's MIDI track - and freeze worked and immediately unloaded 2GB from memory.
 
So I guess there's no clean way to accomplish my intent of lowering project load time by 6 minutes and reducing RAM usage?  If the consensus is no, and I either have to clear the huge preset until I'm actually working on that part or add a dummy note to the MIDI track and freeze, I will mark this as solved later today.
2016/07/29 10:45:36
Bristol_Jonesey
You need to do what BobF said and disconnect the synth from the undocked Browser
2016/07/29 10:45:45
PeteL
BobF
If you undock the Browser, or dock it in the multidock, you'll see power buttons for each synth.  Clicking these to turn off the synths will free up memory even for synths that have no MIDI.



HI BobF!  I didn't see this post prior to writing my last response.  Very nice!  Thank you - I like this one!
12
© 2026 APG vNext Commercial Version 5.1

Use My Existing Forum Account

Use My Social Media Account