Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER General Discussion Forum

Reply
 
Thread Tools Display Modes
Old 01-19-2022, 10:17 PM   #1
panomax
Human being with feelings
 
Join Date: Jun 2014
Posts: 50
Default Reaper keep RAM assumption after closing project

I don't know if this is related to the other issue I reported earlier:
https://forum.cockos.com/showthread.php?t=261997

When I close the project in Reaper, basically nothing loaded in Reaper, Reaper still occupied large amount of RAM. In my case with the troublesome project, 1.78G.

This seems to be accumulative. I just load another small project. Doing nothing with it, then close the project. Now Reaper still used 1.84G.

A third time with the same small project open and close. Now 1.82G.

4th time with a bigger project. Now 2.20G.

So basically I just close Reaper totally to get rid of its RAM consumption.

I have noticed this kind of behaviour for quite a while. Just reported today with Reaper 6.46 on Windows 11.
panomax is offline   Reply With Quote
Old 01-19-2022, 10:30 PM   #2
panomax
Human being with feelings
 
Join Date: Jun 2014
Posts: 50
Default

I start Reaper fresh with a project of initial RAM usage of about 3G. After closing the project, and Reaper has nothing loaded, the RAM consumption is still 767M.
panomax is offline   Reply With Quote
Old 01-20-2022, 07:46 PM   #3
panomax
Human being with feelings
 
Join Date: Jun 2014
Posts: 50
Default

Today I opened 2 small projects, together about 230M RAM usage. After closing them all, Reaper still consumed 124.53M.
panomax is offline   Reply With Quote
Old 01-21-2022, 07:13 AM   #4
thevisi0nary
Human being with feelings
 
thevisi0nary's Avatar
 
Join Date: Nov 2011
Posts: 531
Default

Just replied to your other post lol. I’m using a 4790k and noticed the same thing a few days ago. Definitely a memory leak.
thevisi0nary is offline   Reply With Quote
Old 01-21-2022, 11:18 AM   #5
panomax
Human being with feelings
 
Join Date: Jun 2014
Posts: 50
Default

Quote:
Originally Posted by thevisi0nary View Post
Just replied to your other post lol. I’m using a 4790k and noticed the same thing a few days ago. Definitely a memory leak.
Sorry, 4790k? So you are seeing this issue, not the RAM doubling thing, right?

Edit: OK, 4790k is an Inter CPU

Last edited by panomax; 01-21-2022 at 11:40 AM.
panomax is offline   Reply With Quote
Old 01-21-2022, 12:43 PM   #6
thevisi0nary
Human being with feelings
 
thevisi0nary's Avatar
 
Join Date: Nov 2011
Posts: 531
Default

Quote:
Originally Posted by panomax View Post
Sorry, 4790k? So you are seeing this issue, not the RAM doubling thing, right?

Edit: OK, 4790k is an Inter CPU
4th gen Intel cpu with ddr3 so it’s old. I didn’t notice the play head issue but definitely noticed reaper not releasing memory after closing. I work almost exclusively with kontakt, so I’m not sure if it’s an issue with that as opposed to reaper itself however.
thevisi0nary is offline   Reply With Quote
Old 01-21-2022, 02:42 PM   #7
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 29,260
Default

Quote:
Originally Posted by thevisi0nary View Post
Definitely a memory leak.
Not quite it would be terrible if every app completely freed every bit of memory it could like that. This should be cached memory in the event Reaper needs it again, so it doesn't have to reallocated it all over again, which is expensive from a performance standpoint.

It is important to understand what a memory leak is...

If you open a project, close it, open it, close it and the memory keeps growing in a stair-step fashion until Reaper consumes all available memory then crashes, that would be a memory leak. Being a good citizen and caching memory that isn't needed by other apps, is exactly the right thing to do and improves performance and snappiness of applications, not to mention much of this is actually handled by the OS itself and out of Reaper's hands.

I do think you guys should worry less about memory unless you see it causing a real issue like crashes, glitches, slowness (panomax's 'might' be). Memory ain't so simple as it's there then it goes away, it's far smarter and more complex than it was in the 1990s.
__________________
Music is what feelings sound like.

Last edited by karbomusic; 01-21-2022 at 02:50 PM.
karbomusic is offline   Reply With Quote
Old 01-21-2022, 03:41 PM   #8
thevisi0nary
Human being with feelings
 
thevisi0nary's Avatar
 
Join Date: Nov 2011
Posts: 531
Default

Quote:
Originally Posted by karbomusic View Post
Not quite it would be terrible if every app completely freed every bit of memory it could like that. This should be cached memory in the event Reaper needs it again, so it doesn't have to reallocated it all over again, which is expensive from a performance standpoint.

It is important to understand what a memory leak is...

If you open a project, close it, open it, close it and the memory keeps growing in a stair-step fashion until Reaper consumes all available memory then crashes, that would be a memory leak. Being a good citizen and caching memory that isn't needed by other apps, is exactly the right thing to do and improves performance and snappiness of applications, not to mention much of this is actually handled by the OS itself and out of Reaper's hands.

I do think you guys should worry less about memory unless you see it causing a real issue like crashes, glitches, slowness (panomax's 'might' be). Memory ain't so simple as it's there then it goes away, it's far smarter and more complex than it was in the 1990s.
That's not what is happening here, normally ram gets reallocated over the course of a minute at most but it wasn't releasing for awhile in this case. I'm not worried about it at all for now though as I only recalled noticing it one time.
thevisi0nary is offline   Reply With Quote
Old 01-21-2022, 03:46 PM   #9
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 29,260
Default

Quote:
Originally Posted by thevisi0nary View Post
That's not what is happening here, normally ram gets reallocated over the course of a minute at most but it wasn't releasing for awhile in this case.
Memory allocated by Reaper or any app, can technically remain allocated until it is closed, and even some of that after it is closed for some amount of time - this is why you can open a project after closing reaper and it load faster than when opening reaper for the first time - the OS is giving back memory (with contents) from the previously closed session.

That's what I'm trying to explain, there will be little rhyme or reason expectation wise because it is internally handled by the OS and the totality of all memory pressure (or not) at that time, at the OS level.

The only time it's a true memory leak is if it actually leaks by never being returned until something tips over like a crash because of it. That's the literal technical definition just to help out.
__________________
Music is what feelings sound like.
karbomusic is offline   Reply With Quote
Old 01-21-2022, 03:59 PM   #10
thevisi0nary
Human being with feelings
 
thevisi0nary's Avatar
 
Join Date: Nov 2011
Posts: 531
Default

Quote:
Originally Posted by karbomusic View Post
Memory allocated by Reaper or any app, can technically remain allocated until it is closed, and even some of that after it is closed for some amount of time - this is why you can open a project after closing reaper and it load faster than when opening reaper for the first time - the OS is giving back memory (with contents) from the previously closed session.

That's what I'm trying to explain, there will be little rhyme or reason expectation wise because it is internally handled by the OS and the totality of all memory pressure (or not) at that time, at the OS level.

The only time it's a true memory leak is if it actually leaks by never being returned until something tips over like a crash because of it. That's the literal technical definition just to help out.
No for sure I get what you mean, in this case it was just a lot longer than normal, I may have even restarted my system (it was about two weeks ago). It could potentially be a problem if memory does not get released at all, but I only noticed it once and I'm not going to stress over a problem that doesn't exist yet.
thevisi0nary is offline   Reply With Quote
Old 01-21-2022, 04:13 PM   #11
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 29,260
Default

Quote:
Originally Posted by thevisi0nary View Post
No for sure I get what you mean, in this case it was just a lot longer than normal, I may have even restarted my system (it was about two weeks ago). It could potentially be a problem if memory does not get released at all, but I only noticed it once and I'm not going to stress over a problem that doesn't exist yet.
The short explanation is you can't watch memory like that and make a determination unless it grows and grows until something crashes. Though there is certainly nothing wrong with watching it do it's thing in case something really is awry. I was just providing some possible reasoning as to why you saw what you did.

Windows Memory Manager (or most OS's) will by design hold onto certain memory as long as it can *until* something else needs it because it is magnitudes faster to get it from memory than disk, so if it can keep it in memory it will, sometimes even after the app is closed. There's a whole lot of "snappiness" in OS's from the last 10 years directly due to this.

There is an adage: "Unused memory is wasted memory". Provided it is released when something else needs it.
__________________
Music is what feelings sound like.

Last edited by karbomusic; 01-21-2022 at 04:18 PM.
karbomusic is offline   Reply With Quote
Old 01-21-2022, 04:17 PM   #12
thevisi0nary
Human being with feelings
 
thevisi0nary's Avatar
 
Join Date: Nov 2011
Posts: 531
Default

Quote:
Originally Posted by karbomusic View Post
The short explanation is you can't watch memory like that and make a determination unless it grows and grows until something crashes. Though there is certainly nothing wrong with watching it do it's thing in case something really is awry.

Windows Memory Manager (or most OS's) will by design hold onto memory as long as it can it can *until* something else needs it because it is magnitudes faster to get it from memory than disk, so if it can keep it in memory it will, sometimes even after the app is closed.

There is an adage: "Unused memory is wasted memory".
I can inquire or speculate if I tend to frequently monitor the task bar for different reasons and happen to notice a new trend.
thevisi0nary is offline   Reply With Quote
Old 01-21-2022, 04:20 PM   #13
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 29,260
Default

Quote:
Originally Posted by thevisi0nary View Post
I can inquire or speculate if I tend to frequently monitor the task bar for different reasons and happen to notice a new trend.
Of course, just providing reasons as to why you might see that and why the trend may change. Many reasonably assume and expect that as soon as some resource goes away, so should all it's memory, and if not, memory is leaking, that's not the case in modern operating systems.
__________________
Music is what feelings sound like.
karbomusic is offline   Reply With Quote
Old 01-21-2022, 04:39 PM   #14
thevisi0nary
Human being with feelings
 
thevisi0nary's Avatar
 
Join Date: Nov 2011
Posts: 531
Default

Quote:
Originally Posted by karbomusic View Post
Of course, just providing reasons as to why you might see that and why the trend may change. Many reasonably assume and expect that as soon as some resource goes away, so should all it's memory, and if not, memory is leaking, that's not the case in modern operating systems.
Totally, never reasonable to assume.
thevisi0nary is offline   Reply With Quote
Old 01-22-2022, 11:28 AM   #15
panomax
Human being with feelings
 
Join Date: Jun 2014
Posts: 50
Default

@karbomusic This hold-RAM thing was there every time I used Reaper. For testing, I just open a project whose initial RAM is 3.11G. After closing it, Reaper still hold 739.56M

I then reload the same project again. The loading not feel fast or not obvious. The initial RAM is now 3.37G. Closing it, now hold 1014.81M.

A 3rd time, 3.62G => 1.26G

4th, 3.85G => 1.46G

5th, 4.09G => 1.76G

Enough now? Could you please explain this series of observations?
panomax is offline   Reply With Quote
Old 01-22-2022, 03:28 PM   #16
LouDorn
Human being with feelings
 
LouDorn's Avatar
 
Join Date: Mar 2009
Location: Vermont
Posts: 45
Default

Showing my age here.
At least you don't have to deal with Quarterdeck's QEMM or QRAM to try and access more then 640k of memory. :-)
__________________
ASRock X670E Taichi Carrara (AM5), 64Gig DDR5,ATI Radeon RX6600 ASROCK,
AMD Ryzen 9 7900 12-Core, Thunder Bolt 4
LouDorn is offline   Reply With Quote
Old 01-22-2022, 03:37 PM   #17
cyrano
Human being with feelings
 
cyrano's Avatar
 
Join Date: Jun 2011
Location: Belgium
Posts: 5,246
Default

Ah, memories...

Can't say I miss QEMM, or Ram Doubler, or...

__________________
In a time of deceit telling the truth is a revolutionary act.
George Orwell
cyrano is offline   Reply With Quote
Old 01-22-2022, 06:37 PM   #18
Dstruct
Human being with feelings
 
Join Date: Jul 2006
Posts: 12,480
Default

Do you have "Allow complete unload VST ..." enabled in preferences?
Dstruct is offline   Reply With Quote
Old 01-22-2022, 11:30 PM   #19
panomax
Human being with feelings
 
Join Date: Jun 2014
Posts: 50
Default

Quote:
Originally Posted by Dstruct View Post
Do you have "Allow complete unload VST ..." enabled in preferences?
I don't have many customization of preferences. So no, "Allow complete unload VST ..." is not enabled as it is the default.

I just enabled it and retried. However, I have an unexpected discovery.

The project I tried did not have the RAM-increase-with-moving-playhead problem before. Now each time I move the playhead (without playing!), the RAM just keep increase. From the initial 3.14G till 3.89G. Then stable.

After closing the project, Reaper still hold 242.65M.

2nd, initial 3.19G. Moving playhead cause the RAM fluctuating around 3.90G. After closing, Reaper still hold 317.64M.

3rd, initial 3.25G. Again fluctuate with moving playhead till 4.06G. After closing, 397.45M.

The trend is clear, right? These observations were easy to try. Could someone try with your projects?

Compared with the previous observations with the option disabled, enabling this option did reduce RAM consumption and holding.

Last edited by panomax; 01-22-2022 at 11:36 PM.
panomax is offline   Reply With Quote
Old 01-23-2022, 01:22 AM   #20
lizzard
Human being with feelings
 
lizzard's Avatar
 
Join Date: Sep 2009
Posts: 307
Default

What are we looking for here ?

As far as I know there have been no BSOD's with reaper .
In fact its one of THE best however it does it.

Some plugins are un predictable we know that .

While it may be interesting I doubt that the reasoning behind what causes this
will be within the scope of most users.

I'm still watching with curiosity though
lizzard is offline   Reply With Quote
Old 01-23-2022, 08:47 AM   #21
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 29,260
Default

Quote:
Originally Posted by panomax View Post
Enough now? Could you please explain this series of observations?
I appreciate the effort. If it continues to increase and never settles, that's a problem. Up to you on how far you take that to be sure, and how long you are willing to wait to see if it releases back down some time later.

With no projects loaded my install uses about 160MB - that's all the settings, theme and VSTs it knows about etc.

I opened a project (44 tracks, 2GB used after loading). Moved the playback position multiple times, play, stop move etc., no significant change other than the audio file buffering I mentioned early on.

I then closed and opened it 8 times, each time it closed it was 390MB or above, sometimes 450-500 but after waiting a few minutes (2-5), it would consistently settle back down to 390MB. I would consider this normal.

I then scanned Reaper's memory footprint with VMMap, didn't see anything obviously wrong. 390 MB of Total Working set and Reaper wasn't leaking any memory.

I performed the same with a clean portable install, with blank project + two empty tracks, no plugins, no audio or midi. Used roughly 160 MB consistently after multiple open/closes since there are no files or plugins loaded. When the portable launches and sees my VST3s etc. it's about 60MB idle, so there's roughly 100MB being cached there. Reaper isn't leaking any memory here either.

But we don't know really know much about your project, we don't have a copy of it to load ourselves (with any audio tracks removed). Obviously no need making it available if you aren't comfortable, but we really don't know that much about the actual project other than sometimes removing VSTs seems to help or not and that memory grows when you move the play head (and/or anything I forgot about).

I won't say you can't possibly have a memory leak, remember my 100% rule? But I'm still curious as to how you found this? Did the project start glitching or other problems then you saw all the memory use?
__________________
Music is what feelings sound like.

Last edited by karbomusic; 01-23-2022 at 08:59 AM.
karbomusic is offline   Reply With Quote
Old 01-23-2022, 11:56 AM   #22
panomax
Human being with feelings
 
Join Date: Jun 2014
Posts: 50
Default

Quote:
Originally Posted by lizzard View Post
What are we looking for here ?

As far as I know there have been no BSOD's with reaper .
In fact its one of THE best however it does it.

Some plugins are un predictable we know that .

While it may be interesting I doubt that the reasoning behind what causes this
will be within the scope of most users.

I'm still watching with curiosity though
We all agree that Reaepr is THE best DAW. Otherwise, we won't chat here. We all want Reaper to become even better. To report possible bugs is a small thing we can contribute back to the developers and the community.
panomax is offline   Reply With Quote
Old 01-23-2022, 12:03 PM   #23
panomax
Human being with feelings
 
Join Date: Jun 2014
Posts: 50
Default

Quote:
Originally Posted by karbomusic View Post
I appreciate the effort. If it continues to increase and never settles, that's a problem. Up to you on how far you take that to be sure, and how long you are willing to wait to see if it releases back down some time later.

With no projects loaded my install uses about 160MB - that's all the settings, theme and VSTs it knows about etc.

I opened a project (44 tracks, 2GB used after loading). Moved the playback position multiple times, play, stop move etc., no significant change other than the audio file buffering I mentioned early on.

I then closed and opened it 8 times, each time it closed it was 390MB or above, sometimes 450-500 but after waiting a few minutes (2-5), it would consistently settle back down to 390MB. I would consider this normal.

I then scanned Reaper's memory footprint with VMMap, didn't see anything obviously wrong. 390 MB of Total Working set and Reaper wasn't leaking any memory.

I performed the same with a clean portable install, with blank project + two empty tracks, no plugins, no audio or midi. Used roughly 160 MB consistently after multiple open/closes since there are no files or plugins loaded. When the portable launches and sees my VST3s etc. it's about 60MB idle, so there's roughly 100MB being cached there. Reaper isn't leaking any memory here either.

But we don't know really know much about your project, we don't have a copy of it to load ourselves (with any audio tracks removed). Obviously no need making it available if you aren't comfortable, but we really don't know that much about the actual project other than sometimes removing VSTs seems to help or not and that memory grows when you move the play head (and/or anything I forgot about).

I won't say you can't possibly have a memory leak, remember my 100% rule? But I'm still curious as to how you found this? Did the project start glitching or other problems then you saw all the memory use?
Thanks for your investigation! The project I used in the issue is not the troublesome one in the other issue. But both have no audio tracks, just midi, vsti, and vst ones.

I have a relatively old PC with only 16G RAM. The troublesome project often lead the PC hang and I have to reboot. That's why I noticed the RAM consumption 'problems' in this and the other issue.

I tried upload the troublesome project but encountered an error message which I reported in the other issue. The project used in the issue has a even biger size. So I doubt it to be uploadable too.
panomax is offline   Reply With Quote
Old 01-23-2022, 12:05 PM   #24
panomax
Human being with feelings
 
Join Date: Jun 2014
Posts: 50
Default

Yes, I got the same message while uploading the project:

Your submission could not be processed because a security token was missing.

If this occurred unexpectedly, please inform the administrator and describe the action you performed before you received this error.
panomax is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:20 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.