why is virtual memory same as physical memory

Why does Activity Monitor show the Virtual Memory to be the same as the Physical memory?


I thought VM was what was being used. My Mac seemed slow at times, it shows 3.98 Physical Memory used, and 4Gb VM used. So I thought my physcial memory was full at 4Gb, so VM was being used at 4Gb (8Gb total) hence why it may be slow, accessing the VM. So I upgraded my MAC RAM to 16Gb. Now it shows Physical Memory 16Gb as expected, and VM as 16Gb too. So this tells VM is NOT what is being used, but probably the space allocated to it. The memort used in total when I opened all my applications was about 6Gb, so I could have got away with 8Gb RAM saving me a lot of money. So quite annoyed VM is available VM and not VM being used.

iMac, Mac OS X (10.7.3)

Posted on Jan 9, 2014 6:03 AM

Reply
14 replies

Jan 9, 2014 6:09 AM in response to amityweb

VM is always being used in Mac OS X. All memory used by all apps is virtual memory, with the physical RAM used as necessary to support the VM scheme. It's not particularly useful to try to interpret the memory stats in Activity Monitor unless you have a very thorough understanding of the way the system works "under the hood."


Are you having a problem with your Mac? If so, what is the problem?

Jan 9, 2014 6:35 AM in response to thomas_r.

I thought when the RAM (physcial memory) is full, the MAC starts writing to the virtual memory. I would have expected to see a full physical memory (4Gb) then the amount of virtual memory being used. Now I know this is wrong, I guess the "memory used" is completely self explanatory. I had no idea what "swap used" was. So I interpreted it all wrong by the looks of it.


The problem I had was at times it started to slow down quite a bit. I looked at Activity monitor and thought I was using 8Gb RAM. I cant recall what the actual memory used or swap was now as I was looking at VM thinking this was the amount stored on the hard drive in addition to the physcial memory used, so I cant say what I WAS actually using. I couldn't find much online about these figures.


I do use a lot of apps at times, e.g. chrome with loads of tabs open, Panic Coda coding app, Mail, maybe an image program (not Photoshop on the Macbook), iTunes & Devonthink. Thats probably an average of what I have open at the same time. I can see now the RAM I use with these goes up to between 5Gb and 6Gb, so I needed more RAM, but I think I could have got away with 8Gb.


Saying all that, i sometimes may run Virtualbox, I can now allocate 4Gb to a Windows 7 box, so I stretched up to between 9Gb and10Gb earlier, but I rarely use VirtualBox on the Mac. But at least I have enough if I do I suppose.

Jan 9, 2014 6:41 AM in response to amityweb

I thought when the RAM (physcial memory) is full, the MAC starts writing to the virtual memory.

No, it starts writing to your drive. Don't think of virtual memory as "in use." It is only a technique for memory management.


I cant recall what the actual memory used or swap was now as I was looking at VM thinking this was the amount stored on the hard drive in addition to the physcial memory used

The 'swap' is the only important factor to consider. Specifically, the number of page outs to your hard drive. This is an indication that your system has run out of physical memory and is using your drive as a scratch disk. This greatly slows down performance.

Jan 9, 2014 8:09 AM in response to amityweb

Mavericks will strive to keep your physical RAM full at all times. After all, unused RAM is wasted RAM. It will try to cache as much as possible. For example, if you quit an app and then decide later you need it again, if the OS has been able to keep that app data cached in RAM, it will pop open very quickly, as just one example of how this allows the OS to maximize RAM usage to keep your machine running fast.


As for your performance issues, see my Mac Performance Guide.

Jan 9, 2014 10:12 AM in response to amityweb

Yeah, Mavericks doesn't show that info in Activity Monitor anymore. Instead, it shows the memory pressure graph. If it starts go get high, as shown below, that's an indication that the tasks you're performing could benefit from additional RAM.


User uploaded file


If it's fairly low, that tells you that any problems you're having are not the result of memory issues.


User uploaded file

Jan 10, 2014 1:18 AM in response to thomas_r.

This is all useful info thanks, and at first I thought I had purchased too much RAM, I am considering sending it back swapping for 8Gb if Crucial do that even, but then I left my Macbook on all night and activity monitor today states 16Gb memory used. I doubt the list of apps add up to 16Gb, not one app is particularly high. File Cache is high, is this related to high RAM usage? I assume a restart would clear all this out so again probably wouldn't need the 16Gb.

User uploaded file

Jun 19, 2014 7:37 PM in response to amityweb

I am having major slow downs on my apps, especially web browsers . I use Chrome, but same thing with Safari. When I launch, it takes 5-8 min for the windows to appear (4 tabs) and load. This is crazy. I have 8 GB of Ram on my late 2011 MBP. My Virtual memory seems extremely high and so does the swap used. Any suggestions to speed things up?


User uploaded file


User uploaded file

Jun 19, 2014 8:18 PM in response to amityweb

Last night I upgraded my Macbook Pro from 8GB to 16GB because I could not run as many concurrent apps on Mavericks 10.9 as I had been able to run on Lion 10.7. I had to keep quitting apps to avoid suffering from very slow performance. So keep the RAM, especially if it is working for you.


And running Virtual Machines locks up a lot of RAM, so that 16GB will be very useful when they are running.


Now the next thing to consider is replacing your hard disk with an SSD 😁 That will really perk up your Mac.

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.

why is virtual memory same as physical memory

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