Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Compatibility

Reply
 
Thread Tools Display Modes
Old 07-18-2011, 08:17 AM   #1
-R-
Human being with feelings
 
-R-'s Avatar
 
Join Date: Mar 2010
Posts: 305
Default Virtual memory in Windows Xp: what to do about it?

Hi all,

As an enlightened computer-savy that knows everything and a little bit more, I discovered, after years of use, that XP use something called virtual memory...

I searched the web for tips on how to set it for audio work, found several answers, but all are contradictory. Some say to disable it, some say to set min and max values to the same amount, in proportion with your physical ram, and some give numbers quite close from the default settings.

So the question is: Is there a "best" way to set it for audio production? Does it depends on wether you are doing a midi project that use huge sample libraries or a heavy mix with tons fx? ( I wouldn't mind changing it each time I change the context )Do you have a "philosophy"?


Thank you. Have a nice day
-R- is offline   Reply With Quote
Old 07-18-2011, 09:36 AM   #2
reapercurious
Human being with feelings
 
reapercurious's Avatar
 
Join Date: Jul 2007
Posts: 1,661
Default

its been 10+ years and i never heard a convincing argument either way.

i would just go ahead and ignore it. if there was something to be gained by fiddling with this, we would already know a definite answer.
reapercurious is offline   Reply With Quote
Old 07-18-2011, 12:43 PM   #3
Mr. Data
Human being with feelings
 
Mr. Data's Avatar
 
Join Date: Sep 2008
Location: Location
Posts: 5,329
Default

If you have a motherboard that is able to hold more than 2 GB it might be a good idea to put in as many ram as it can hold, install a ramdisk that recognizes and handles this memory and put the virtual memory there instead of having it on the HD.



-Data
__________________
German Language Pack for REAPER? Get it here! ... Donate? Yeah!! | Are you nuts? | Maybe
Deutsche Sprachdatei für REAPER? Hier zu haben! ... Spenden? Klar! | Spinnst wohl!? | Vielleicht
Mr. Data is offline   Reply With Quote
Old 07-18-2011, 05:12 PM   #4
-R-
Human being with feelings
 
-R-'s Avatar
 
Join Date: Mar 2010
Posts: 305
Default

Waow! Sounds exciting. Didn't know about ramdisk. Actually, my motherboard has four slots that can handle 1Gb each. I have now 4X 512 Mg and just found 2X1Gb of ram. I'll have 3 Gb, which is the most my os can handle.
So if I can find another set of 1Gb, I'll try your brilliant advice.

Do you think it would be hard to put the virtual memory there? Does it depends on the ramdisk software you use?

Thank you
-R- is offline   Reply With Quote
Old 07-18-2011, 05:18 PM   #5
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 24,350
Default

Quote:
Originally Posted by -R- View Post
Hi all,

As an enlightened computer-savy that knows everything and a little bit more, I discovered, after years of use, that XP use something called virtual memory...

I searched the web for tips on how to set it for audio work, found several answers, but all are contradictory. Some say to disable it, some say to set min and max values to the same amount, in proportion with your physical ram, and some give numbers quite close from the default settings.

So the question is: Is there a "best" way to set it for audio production? Does it depends on wether you are doing a midi project that use huge sample libraries or a heavy mix with tons fx? ( I wouldn't mind changing it each time I change the context )Do you have a "philosophy"?


Thank you. Have a nice day
You can't "disable" virtual memory. You are probably talking of page file which makes up part of the memory space that is virtualized. In that case, whatever you do, leave at least 200MB paging file on the boot disk.

Karbo
__________________
If it requires a null test to find it, it is by definition minuscule.
karbomusic is online now   Reply With Quote
Old 07-18-2011, 05:19 PM   #6
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 24,350
Default

Quote:
Originally Posted by Mr. Data View Post
If you have a motherboard that is able to hold more than 2 GB it might be a good idea to put in as many ram as it can hold, install a ramdisk that recognizes and handles this memory and put the virtual memory there instead of having it on the HD.



-Data
Call it the page file guys.
__________________
If it requires a null test to find it, it is by definition minuscule.
karbomusic is online now   Reply With Quote
Old 07-19-2011, 05:32 AM   #7
Mr. Data
Human being with feelings
 
Mr. Data's Avatar
 
Join Date: Sep 2008
Location: Location
Posts: 5,329
Default

Yeah, I actually was searching for the word, but it didn't come to my mind.



-Data
__________________
German Language Pack for REAPER? Get it here! ... Donate? Yeah!! | Are you nuts? | Maybe
Deutsche Sprachdatei für REAPER? Hier zu haben! ... Spenden? Klar! | Spinnst wohl!? | Vielleicht
Mr. Data is offline   Reply With Quote
Old 07-19-2011, 05:43 AM   #8
JonnyGinese
Human being with feelings
 
JonnyGinese's Avatar
 
Join Date: Mar 2010
Location: Chattanooga, TN
Posts: 1,373
Default

I would set min and Max to he same values so that the HD isn't changing size values in the middle of a recording session.

Other then that it doesn't really matter.

As far as disabling the virtual memory... this sounds like a great idea until you load up VSTi's and you run out of memory... and then your program crashes because because you don't have an "over flow" area.
JonnyGinese is offline   Reply With Quote
Old 07-19-2011, 06:07 AM   #9
Jcschild
Human being with feelings
 
Join Date: Feb 2010
Posts: 93
Default

the best answer is Win7 past that
set the min and max to equal the amount of ram you have

Scott
ADK

Quote:
Originally Posted by -R- View Post
Hi all,

As an enlightened computer-savy that knows everything and a little bit more, I discovered, after years of use, that XP use something called virtual memory...

I searched the web for tips on how to set it for audio work, found several answers, but all are contradictory. Some say to disable it, some say to set min and max values to the same amount, in proportion with your physical ram, and some give numbers quite close from the default settings.

So the question is: Is there a "best" way to set it for audio production? Does it depends on wether you are doing a midi project that use huge sample libraries or a heavy mix with tons fx? ( I wouldn't mind changing it each time I change the context )Do you have a "philosophy"?


Thank you. Have a nice day
Jcschild is offline   Reply With Quote
Old 07-19-2011, 07:49 AM   #10
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 24,350
Default

Quote:
Originally Posted by Jcschild View Post
the best answer is Win7 past that
set the min and max to equal the amount of ram you have

Scott
ADK
My apologies but that's not accurate. What if you have 2GB of RAM + 2GB of page file and 3 processes running consuming 1.5 GB each of commited memory?? Your gonna knock your box over because your asking the OS to allocate 4.5 GB and you just set a hard limit of 4 GB.

I'll get you guys the actual correct way to do this tonight when I get home along with full explanations, how, why and screenshots. There is no formula per se that fits all machines which will be our first topic.
__________________
If it requires a null test to find it, it is by definition minuscule.
karbomusic is online now   Reply With Quote
Old 07-19-2011, 09:08 AM   #11
Jcschild
Human being with feelings
 
Join Date: Feb 2010
Posts: 93
Default

really?
are you completely sure about that?

funny 1000's of audio boxs shipped over the span of Xp's life and never an issue with that setting..
but hey what do i know....

Scott
ADK
Jcschild is offline   Reply With Quote
Old 07-19-2011, 09:14 AM   #12
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 24,350
Default

Quote:
Originally Posted by Jcschild View Post
really?
are you completely sure about that?

funny 1000's of audio boxs shipped over the span of Xp's life and never an issue with that setting..
but hey what do i know....

Scott
ADK
Yea, I'm sure. No worries though, if I can sit down for a couple hours tonight I'll get some worthwhile explanations together. You are right though that its an "if" scenario, the setting you make for your audio boxes will be just fine provided that somewhat rare scenario I mentioned doesn't occur and it probably won't. I didn't say it was really wrong, just not really an accurate calculation across the board; hope that makes sense.

Secondly, the main reason for the "set the min/max to the same size" (started back in the win 95/98 days) was to prevent interrupting the audio stream if the commit charge grew large enough to force the page file to be expanded. The OS sees that as an emergency measure (it is actually) so any other process such as a DAW would be second fiddle to that expansion causing pops/crackles etc. I'll get more later...

Karbo
__________________
If it requires a null test to find it, it is by definition minuscule.

Last edited by karbomusic; 07-19-2011 at 09:21 AM.
karbomusic is online now   Reply With Quote
Old 07-19-2011, 07:33 PM   #13
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 24,350
Default Page File Follow Up

So, to follow up on the page file/virtual memory thing. I'll try to keep it as simple as possible. First off, there are several challenges concerning DAW performance that I would like to rant about first.

1. The vast majority of information on the internet concerning computers and performance is hearsay and/or just plain wrong. Even from credible sources at times. The high percentage of the information is often nothing more than the blind leading the blind. "I did this and it seemed to work, you should try it". Arggg...

2. Most of us musicians are more than intelligent enough to understand all of this but there is a time investment in both the learning curve and on top of that, measuring the performance in such a way as to come to valid conclusions can take up lots of time better spent making music.

As far as performance goes, every situation is different and should be approached as such when possible. Outside of the no-brainer stuff, chasing symptoms by blindly making changes because "dude on the Internet had a similar issue" without actually being able to verify first, eventually leads to lots of unstable machines then blaming the OS. The long and short of it is don't make the change unless you KNOW it applies to you and why.

==================
Virtual Memory
==================

Again, trying to keep it simple as possible for the time being. Virtual memory is part of the VMM (Virtual Memory Manager). It is a layer of sorts between a process and physical memory/paging file. In the simplest terms the VMM "Maps" virtual memory to physical memory and page file and the process only sees the virtual memory as one large piece of memory. Typically the process doesn't know or care what is physical or what is page file.

For those in the know, I purposely left out kernel mode memory, user mode memory, 3GB, USERVA, PAE and AWE out of this post in order to get the basic idea across. Adding all of that minutia right out of the gate is part of the problem Moving on... here is a very simple diagram showing the memory manager mapping physical memory resources to appear as real memory to a process. Why of course is another discussion but it is basically a method that allows the computer to act as if it has more physical memory that it actually does:

Code:
==============    ==============
Physical RAM        PAGE FILE
==============    ==============
    \                   /
================================
	Virtual Memory
================================
          \       /
     ===================
         Process.exe
     ===================
================
Page File Size
================

So the heart of the matter in this thread was page file size. As I stated before there is no one size fits all rule or algorithm that will tell you what the proper page file size is. Why? Because every system has different performance and memory requirements. This is precisely why OS's tend to have dynamically adjusting page files out-of-the-box. Thus, you need to do a few simple investigations on your own to calculate the size that's best for your system. I also mentioned that Task Manager doesn't always tell the right story, the numbers are somewhat accurate but the ones it displays and what it calls them is misleading and has changed from OS version to OS version.

The best tool to use instead is Process Explorer and there are three values it displays that are critical in determining the best page file size for your system. They are listed under "Commit Charge".




Notice on the bottom left of the picture above under commit charge (Current, Limit, Peak). Commit Charge is a true committal by Windows that a process will have the memory it has promised to that process. Meaning it must be available as virtual memory (even if it is a mix of page/physical, see diagram from before). Here are the definitions:

Current: The current amount of committed memory that is the sum of commited memory for all processes.
Limit: The current hard limit that can safely be committed. (Appx. calculated by adding Page file size + Physical RAM).
Peak: The highest amount of of memory that has been committed since the last reboot.

It's important to note that if you do not set a fixed page size the commit limit can grow/shrink based on system needs. If you do have a fixed size then it is pretty much a hard limit because the page file cannot be expanded to meet unexpected demands in the future. Historically DAW users have set fixed page file sizes so that growing/shrinking of the page file doesn't cause audio glitches. I will say that it is somewhat rare these days for this to happen once the machine is "settled in" and you don't hit any sudden extremes and have a decent amount of RAM. However, fixed is perfectly fine so long as it is calculated with proper headroom to meet sudden demand.

Finally, in order to find what is the best "fixed" page file size for YOUR DAW (should you choose to use fixed) is to look at the peak AFTER the machine has ran for a few days, a week or however long it takes for you to use the system to the maximum performance limits it usually ever sees without reboots. For example, if this peak after that period of time is 6GB and you have 3GB of RAM installed then a safe page file setting might be 4GB which includes 1GB of emergency memory headroom. IE: 3GB physical + 4GB page file = 7GB Commit Charge Limit which would be decently above the 6GB peak you previously measured.

Reminder: I purposely left out 32bit/64bit and 3GB switch discussions for now because the basic ideas above are more important to understand first. Even if the numbers I quoted don't align with 32 or 64bit boundaries, the basic concept is the same.

"I have a 64 bit machine and a huge amount of memory, I don't need no stinkin' page file."

True. Windows will run just fine without a page file but there are a couple of things to be aware of:

1. If the system BSODs and creates a kernel dump it must be written to the system drive because even disk drivers are bypassed to write the dump. Since for all we know the BSOD was caused by a disk driver, the dump is literally written from memory directly to the page file sector by sector. Later, when the system reboots, the .dmp file is extracted from the page file during reboot. If you have no page file on the system drive and you need that dump for troubleshooting by a vendor or even Cockos, its not going to get written. To cover for this, keep it around 200-256MB.

2. It can actually hurt performance in some cases because with no page file since every single resource that uses memory on the system must remain in memory at all times even if you aren't actively using it. Even processes and data structures that have nothing to do with your DAW and won't ever be needed while running it are now being managed in memory at all times because it cannot be paged out until later.

"I heard that a large page file hurts performance due to excessive paging"

False. Excessive paging is due to not having enough physical memory to supply demand. If the page file size is larger but not used much (machine isn't memory starved), its not hurting performance outside of the chance it gets fragmented over time (different topic) but then again, just sitting there isn't causing fragmentation either. If fragmentation is ever a concern, just recreate the page file, reboot and problem solved.

I hope this helps at least a little.
__________________
If it requires a null test to find it, it is by definition minuscule.

Last edited by karbomusic; 07-19-2011 at 08:02 PM.
karbomusic is online now   Reply With Quote
Old 07-20-2011, 09:08 AM   #14
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 24,350
Default

I thought I would bump this just once before the information fades into history.

http://forum.cockos.com/showpost.php...7&postcount=13
__________________
If it requires a null test to find it, it is by definition minuscule.
karbomusic is online now   Reply With Quote
Old 07-20-2011, 11:01 AM   #15
-R-
Human being with feelings
 
-R-'s Avatar
 
Join Date: Mar 2010
Posts: 305
Default

Not in mine! I 'm certainly gonna try your method

KarboMusic, you are a true gentleman!

Thank you very much for all of this, it's much more than what I expected.
-R- is offline   Reply With Quote
Old 07-20-2011, 11:02 AM   #16
-R-
Human being with feelings
 
-R-'s Avatar
 
Join Date: Mar 2010
Posts: 305
Default

But what do you mean by recreating the page file? Disable and re-able it? Change the numbers?
Anyway thanks again
-R- 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 04:01 PM.


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