Can you assign disk space to be used as RAM like you can in Windows?

Can you assign disk space to be used as RAM like you can in Windows?


I know using disk space as RAM is no way near as quick as the RAM itself but it has been helpful on Windows machines in the past and as I only have a 2GB Macbook Air I wanted to know if it was possible?


On Windows it's called Virtual Memory. To quote my Win 7 installation "A Paging file is an area on the hard disk that Windows uses as if it were RAM".


Any information would be great, knowing Apple I'm guessing it won't be possible, or I'll have to buy an app!


Thanks

MacBook Air, Mac OS X (10.7)

Posted on Sep 26, 2011 12:29 PM

Reply
Question marked as Top-ranking reply

Posted on Sep 26, 2011 12:45 PM

danjpalmer wrote:


knowing Apple I'm guessing it won't be possible, or I'll have to buy an app

Such lack of faith! 🙂 as the truth is the opposite of what you're thinking. Not only is using disk space as RAM possible, it's always happening, as needed. You can't even completely turn it off without hacking the system.


You mentioned Photoshop...it uses its own virtual memory system, where you can assign which of your disks is used as virtual memory. Also, if you did want more control over which disk OS X uses for the VM swap file, you can reassign it using the command line. But 99% of Mac users will never bother.

10 replies
Question marked as Top-ranking reply

Sep 26, 2011 12:45 PM in response to danjpalmer

danjpalmer wrote:


knowing Apple I'm guessing it won't be possible, or I'll have to buy an app

Such lack of faith! 🙂 as the truth is the opposite of what you're thinking. Not only is using disk space as RAM possible, it's always happening, as needed. You can't even completely turn it off without hacking the system.


You mentioned Photoshop...it uses its own virtual memory system, where you can assign which of your disks is used as virtual memory. Also, if you did want more control over which disk OS X uses for the VM swap file, you can reassign it using the command line. But 99% of Mac users will never bother.

Sep 26, 2011 12:34 PM in response to danjpalmer

There is no need. It's handled automatically and internally by OS X.


About OS X Memory Management and Usage


Reading system memory usage in Activity Monitor

Memory Management in Mac OS X

Performance Guidelines- Memory Management in Mac OS X

A detailed look at memory usage in OS X


Understanding top output in the Terminal


The amount of available RAM for applications is the sum of Free RAM and Inactive RAM. This will change as applications are opened and closed or change from active to inactive status. The Swap figure represents an estimate of the total amount of swap space required for VM if used, but does not necessarily indicate the actual size of the existing swap file. If you are really in need of more RAM that would be indicated by how frequently the system uses VM. If you open the Terminal and run the top command at the prompt you will find information reported on Pageins () and Pageouts (). Pageouts () is the important figure. If the value in the parentheses is 0 (zero) then OS X is not making instantaneous use of VM which means you have adequate physical RAM for the system with the applications you have loaded. If the figure in parentheses is running positive and your hard drive is constantly being used (thrashing) then you need more physical RAM.


Adding RAM only makes it possible to run more programs concurrently. It doesn't speed up the computer nor make games run faster. What it can do is prevent the system from having to use disk-based VM when it runs out of RAM because you are trying to run too many applications concurrently or using applications that are extremely RAM dependent. It will improve the performance of applications that run mostly in RAM or when loading programs.

Sep 26, 2011 12:39 PM in response to Kappy

Thanks for your prompt response!


That's the issue I'm trying to solve really (I didn't realize at purchase that I couldn't upgrae my RAM in the future, which is a big shame).


I will quite often have Dreamweaver, Photoshop, Eclipse, Thunderbird etc open at the same time. I haven't had a lot of trouble but the memory does run very low with these open at the same time.


I'm aware of how RAM works and I'm glad to see that the operating system judges when to use disk space as RAM.


Thanks for your help

Sep 26, 2011 1:26 PM in response to danjpalmer

danjpalmer wrote:

Well as a Windows man until very recently it'll take a while for me to get over Apples need to control everything 🙂 as the Macbook Air is the Megan Fox of laptops I thought I'd give it a chance.

I find it amusing how you prefaced your question ("like you can in Windows"), and your follow up, seemingly uncomfortable a tad for OS X handling of swapping.


You see, Apple had Virtual Memory on Macs while Microsoft was still toying with the idea. In those Macs, you set your Virtual Memory size (like you are used to). It is with maturity of memory management that you CAN completely leave that task up to the operating system to handle it better than and more fluidly that you ever could under most iterations of Windows. That you would want to allocate a given quantity is actually constraining.


I'm sorry to say, that you may have to get used to other superiorities as well. LOL

Sep 27, 2011 1:43 AM in response to danjpalmer

danjpalmer wrote:


Thanks for the tip regarding Photoshop, I'll certianly give that a go. Is it the same for all Adobe products?

No, only the ones that have a tendency to make unusual demands on RAM. So Photoshop, and some of their high end video products have special memory handling/disk cache preference settings you can tweak, but most of their other apps like InDesign apparently find the OS virtual memory to be sufficient for their needs.

danjpalmer wrote:


Well as a Windows man until very recently it'll take a while for me to get over Apples need to control everything 🙂 as the Macbook Air is the Megan Fox of laptops I thought I'd give it a chance.


The Megan Fox of laptops? Meaning it's slim, sexy, but not the most powerful brain? 😉

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Can you assign disk space to be used as RAM like you can in Windows?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.