Why does my mac use virtual memory when I still have free physical memory?

I have a 2011 i7 quad core mac, I was hoping it would scream. Most of the time it does. However when trying to edit within FCPX I get a very disappointing experience with many pauses and pin wheels if I don't close every single other program.
I have 8GB of physical memory and when i'm experiencing these problems I see that i still have 1-2 gb of physical memory free or inactive. At the same time FCPX is only using 2gb of memory. I just happened to keep an eye on the VM page in/outs and noticed them going up.
Right now i'm doing some browsing and emailing, that's about it.. its sat with over 4gb of memory free or inactive and yet still the page in/outs is still going up occasionally. It's currently at over 2 million page ins, and over 1 million page outs.
So with so much physical memory free why is this happening!? At the moment the mac feels nice and responsive, but if i start trying to use FCPX i'll start to experience these slowdowns, stalls... whenever i see these i see my main hdd is being accessed whilst the pinwheel is displayed.. I mean i get it, its VM, the hdd is too full, a bit fragmented perhaps, its stalling... but i've got gigs of memory sitting free or inactive... why wont the OS use it!!!
Would my experience improve if i took the plunge and got 16gb of memory instead of 8gb!?
Thanks for your help!

Because without virtual memory, managing computer RAM is a royal pain in the ...
Virtual memory cost you nothing, and gains you huge benefits, even if you do not notice it
What cost you is when you need more real RAM than is available, and things are thown out of RAM, either back to the original file it came from (Read Only information), or pushed out to the swapfiles (/var/vm/*).  Then the system has to wait for slower disk access.  But even this is better than not being able to run the apps until you quit something else.
(speaking as someone that starting his professional life working with 1" punch paper tape, 80 columns cards, 7-track and 9-track mag tapes, 1MB disks (you heard me right 1 Megabyte), etc..., and trust me when I tell you that virtual memory is a god send to software development).
There are a lot of problems running a modern operating system with out virtual memory.  For example all the shared libraries and frameworks that provide services to an application would all need to be compiled into the application, which means every application gets bigger and instead of having a single copy of the shared library or framework, you would have dozens of copies wasting your RAM.
Without virtual memory, you would be required to find a contiguous chunk of RAM to run your application.  Think of this like going out to dinner by yourself, you can find any available table, but if you go to dinner with your extended family, you need a table for 10 to 15, and if you are going to dinner with your high school graduation class, you will need hundreds of seats all next to each other and a very large table.  In the later situations you have to wait until the resturante has enough contiguous space, which means you have to wait until other diners finish.  There may be lots of empty tables, but they are not together, and your group wants/needs to sit together.  Virtual memory allows gathering any 4K chunk of RAM, building a virtual memory map for all those random 4K chunks, and make it look like one big contiguous chunk of RAM, so you can run your application right away, no waiting.
Going back to shared libraries and frameworks.  This code will need to have addresses resolved so they branch to the correct locations during execution, and it will need to have addresses resolved on where its program variables are located in RAM.  Using virtual memory, you can local a shared object into RAM, then place it in everyone's virtual memory map at the exact same RAM address.  This means everyone can use the exact same code, and since everyone is using it at the same RAM address, it makes life so much easier for the operating system (translation, less work, less wasted CPU time, faster execution).
When a program wants to grow, for example a web browser loading a web page (and its images) into RAM, it needs to allocate additional RAM.  In the contiguous RAM model, you need to get control of the RAM that imediately following your program, but if that RAM is being used by someone else, you have to wait until that program goes away.
Virtual memory provides protection from another program looking at and modifying your program's RAM.  Malware would just love for virtual memory to go away.
You want virtual memory.  What you do not want is excessive paging activity.
If you are concerned, then you can launch Applicaitons -> Utilities -> Terminal.  Once you have a terminal command prompt, enter the following command:
sar -g 60 100
which will tell you the number of 4k pages written to /var/vm/pagefile ever minute for 100 minutes (modify the numbers to suit your tastes).  You can then go about your normal usage, and come back later to see how much you have been using the pagefiles.  If you have mostly zeros, and an occasional small burst, this is noise, and not worth worrying about.  If you have sustained pageout activity, with higher numbers, then you should either consider running less things all at the same time, or looking for an application that is being greedy with its memory use (or has a memory leak), OR get more RAM for your Mac if you need to do all those things at once.
But do not complain about virtual memory.  Life would be much worse without it.  Then again if you have a better idea, write a research paper, and get operating system vendors (as well as hardware vendors) to implement your ideas.  I am serious, as I've seen many accepted computing ideas be overturned by good new ideas.

Similar Messages

  • Why does itunes charge my credit card when I still have itunes credit on my account?

    I have a credit on my itunes account but each time my wife or I purchase something on itunes or the App Store, it defaults and charges my credit card? I have a credit that never gets used? Help!

    Either the credit's not applicable to that purchase(as opposed to iTunes Store credit, individual song credits can't be used on album purchases), or something's wrong on Apple's servers. If needed, click here and contact the iTunes Store staff.
    (108273)

  • Why does my mac air always restart when I open it in our university?

    Why does my mac air always restart when I open it in our university?
    This has been always bothering me for some time already. Whenever I open my macbook air in our university it always warns me to restart my device. When I do the same thing happens over and over again until it reached 27 reports.

    I'd make a sound too if i was put into a bag haha.
    Only thing i could think of it it has a mind of its own or your putting your computer to sleep. Try shutting down your mac before placing in your bag and see if that changes things.

  • Why does FaceTime keep saying "connection lost" when we both have full bars on our wifi?

    Why does FaceTime keep saying "connection lost" when we both have full bars on our wifi? My friend in Texas has tried to call my via FaceTime but for some reason, every time she does, it keeps saying "connection lost" when we both have full bars on our wifi. Keep in mind, I am from Nebraska so we have the same time zone and I have an iPod 4 while she has a iPhone of some sort but that shouldn't matter because I am still able to FaceTime my friend in California, which is two hours behind me. So, I guess I just want to know why I cannot reach my friend in Texas. Please, someone help me!
    -Mukestina

    Apple has released a document which is reported to address the recent FaceTime issue.
    http://support.apple.com/kb/TS5419

  • Why does my mac book pro freeze when using photo shop

    Why does my mac book pro freeze a lot when using photo shop?

    What version of Photoshop are you using?
    Clinton

  • Why does my Macbook Pro tell me that I only have 1GB of memory, when I have 2GB?

    Hello all, I'm a new user so forgive me if I'm asking something already asked.
    I'm looking to download OSX Lion on a 2010 Macbook Pro, 13 inch.  When I tried to download it, an error message came up saying that Lion needs 2GB of memory.  I checked "About this Mac" and it told me I only have 1GB of memory.  I opened up my Macbook, and there are two seperate 1GB sticks inside...call me crazy, but doesn't that mean I have 2GB?  I ordered two more 2GB sticks to upgrade myself to 4GB just for the sake of having more memory, but I'm confused and concerned.

    Try re-seating the sticks.
    Trouble shoot,  swap the location and monitor the results here:
    >About this Mac>More Info>Memory
    Is it a bad bank or a bad stick of RAM
    or no issue after you more firmly seat the RAM

  • Why does my mac overheat and shutdown when i play games?

    It used to happen when i had windows on bootcamp, i got fed up with this and stoped using it.
    However yesterday i was using it to play a simple game of pool on facebook, full screen, and it turned off.
    I touched the top left and it was way too hot like almost too hot to touch.
    I just clicked my mouse and it came back on and i closed everything down and just let it cool off and it stayed on.
    Anything i can do to help the problem?
    Cheers
    Jay

    Make sure the vents at the bottom of the screen are clear of dust (shut it down and vacuum).
    When running, bring up Activity Monitor to see if anything is driving CPU usage to excess, say consistently greater than 25% to 30% or more
    Install iStat Pro to monitor what is generating heat.
    Run the Apple hardware test to see if it spots any obvious hardware issues that could contribute to the problem. You'll need your original OS X disk to run it.

  • Why does my mac use the wireless network when the wired network (faster) is available?

    My mac is connected to my gigabit wired network, but insists on using the (decidedly slower) wireless network.  When I connect the ethernet cable, I can see that Ethernet moves to the top of the list in my network options... but investigation using the Network Utility shows that all the data is still transferred over AirPort unless I disable it.  That shouldn't be necessary.

    Do you NEED Airport and Ethernet on at the same time?
    Like @PAHU said you can use Locations to set up a different connection and/or network when you only need the Wireless.
    Setting a "Location" is an excellent way to separate the networks. If you use a "Location" for DSL/Cable and another for "File Sharing" then you can set up which "connection" you want to use and can turn off the others. Or a wireless OR wired Network.
    If you also go to the left side of the Network window and select Airport and turn it OFF and you won't have to worry about it anymore. You will have to set each "connection" for each "Location".
    I have all my computers hooked to a wired Gigabit switch and the Wired/Wireless router is connected to that. I have "Ethernet-DSL", "Wireless DSL", "DSL OFF", "Wireless Games", "Ethernet Games" (also for file transfers between computers) all on different networks. Takes all of 5 seconds to switch back and forth.

  • HT1338 why does my mac keep right clicking when i am not trying to right click?

    New mac is only 2 months old.
    I will be happily typing along and click on something and then it keeps popping up with drop downs as if i right clicked!
    I must be doing something wrong?

    Check System Preferences Mouse pane (or Trackpad pane).  For the Mouse pane, make sure the Primary mouse button is set for the one on the left.
    The Control key toggles the "right-click" with the primary button, when the Control key is pressed down while clicking the primary mouse button (or on a Magic Trackpad).  So make sure you are not pressing the Control key inadvertently.
    Also, if you are using a Magic Trackpad (separate or on a MacBook), the botton portion (along the edge closest to you) is sensitive to clicking on the right side versus left side.  The rest of the trackpad is not.  So, if you are clicking near that edge closest to you, a click on the right side will be a right-click.  It is designed this way, because some people use their thumb along that edge to click (not their "pointing" finger); on old-school trackpads, physical buttons were located there.  So, you can still point with the index finger and click with the thumb on the right or left "button."  You should be able to adjust this behavior in System Preferences Trackpad pane.

  • Why does my Mac Pro now crash when screen saver starts?

    I've upgraded my Mac Pro Mid 2010 (5,1) from 10.8.5 to 10.9.3 and I have a problem.  When I use one of the screen savers without a photo, the screen saver works fine.  But when I try to point it to one of my existing photos on the machine, it hangs when the screen saver kicks in and I have to force quit to get it running again.
    I believe this must have to do with some permissions issues with where my image files are, but am not sure how to fix it. 
    Anybody else have this problem?
    Thanks....

    But does it then come fully awake? My MB Pro comes on with out of focus screen as if in a fog but once it comes awake it clears up, there is a progress bar at the bottom showing the progress from sleep

  • Why does my Mac Mini keep crashing when I try backing up to the Time Machine?

    I have a Seagate Barracuda internal harddrive stuck in an external enclosure. I have formatted the harddrive to meet with the Mac's standards. I am trying to backup using the Time Machine feature and the computer has crashed three times so far. Is there something I can do? It is getting aggravating.

    Alright, the computer just crashed again and this is the error report log that was generated. If need be, I will post the other 3 or 4 from last night to now:
    Interval Since Last Panic Report:  693 sec
    Panics Since Last Report:          1
    Anonymous UUID:                   
    Sun Mar 24 12:14:23 2013
    panic(cpu 0 caller 0xffffff8021e43dae): "a freed zone element has been modified in zone: kalloc.256"@/SourceCache/xnu/xnu-2050.22.13/osfmk/kern/zalloc.c:219
    Backtrace (CPU 0), Frame : Return Address
    0xffffff81f38eb330 : 0xffffff8021e1d626
    0xffffff81f38eb3a0 : 0xffffff8021e43dae
    0xffffff81f38eb3e0 : 0xffffff8021e435f2
    0xffffff81f38eb4c0 : 0xffffff8021e245ed
    0xffffff81f38eb4f0 : 0xffffff8022159e20
    0xffffff81f38eb520 : 0xffffff8021ed76d2
    0xffffff81f38ebd80 : 0xffffff8021ed8dec
    0xffffff81f38ebf50 : 0xffffff80221e063a
    0xffffff81f38ebfb0 : 0xffffff8021ecdd23
    BSD process name corresponding to current thread: backupd
    Mac OS version:
    12D78
    Kernel version:
    Darwin Kernel Version 12.3.0: Sun Jan  6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64
    Kernel UUID:
    Kernel slide:     0x0000000021c00000
    Kernel text base: 0xffffff8021e00000
    System model name: Macmini5,1 (Mac-8ED6AF5B48C039E1)
    System uptime in nanoseconds: 905838718889
    last loaded kext at 41617411543: com.apple.driver.AppleHWSensor    1.9.5d0 (addr 0xffffff7fa36ea000, size 36864)
    last unloaded kext at 248838443343: com.apple.driver.AppleUSBUHCI    5.2.5 (addr 0xffffff7fa2712000, size 65536)
    loaded kexts:
    com.apple.driver.AppleHWSensor    1.9.5d0
    com.apple.driver.AudioAUUC    1.60
    com.apple.driver.AppleMikeyHIDDriver    122
    com.apple.driver.AppleHDA    2.3.7fc4
    com.apple.driver.AppleBluetoothMultitouch    75.19
    com.apple.iokit.IOBluetoothSerialManager    4.1.3f3
    com.apple.driver.AGPM    100.12.87
    com.apple.driver.ApplePlatformEnabler    2.0.6d1
    com.apple.filesystems.autofs    3.0
    com.apple.driver.AppleUpstreamUserClient    3.5.10
    com.apple.driver.AppleMCCSControl    1.1.11
    com.apple.iokit.IOUserEthernet    1.0.0d1
    com.apple.Dont_Steal_Mac_OS_X    7.0.0
    com.apple.driver.ApplePolicyControl    3.3.0
    com.apple.driver.ACPI_SMC_PlatformPlugin    1.0.0
    com.apple.driver.AppleMikeyDriver    2.3.7fc4
    com.apple.driver.AppleIntelHD3000Graphics    8.1.0
    com.apple.driver.AppleSMCPDRC    1.0.0
    com.apple.iokit.BroadcomBluetoothHCIControllerUSBTransport    4.1.3f3
    com.apple.driver.AppleLPC    1.6.0
    com.apple.driver.AppleIntelSNBGraphicsFB    8.1.0
    com.apple.driver.AppleIRController    320.15
    com.apple.AppleFSCompression.AppleFSCompressionTypeDataless    1.0.0d1
    com.apple.AppleFSCompression.AppleFSCompressionTypeZlib    1.0.0d1
    com.apple.BootCache    34
    com.apple.driver.XsanFilter    404
    com.apple.iokit.IOAHCIBlockStorage    2.3.1
    com.apple.driver.AppleUSBHub    5.5.5
    com.apple.driver.AppleFWOHCI    4.9.6
    com.apple.driver.AppleAHCIPort    2.5.1
    com.apple.driver.AppleSDXC    1.4.0
    com.apple.driver.AirPort.Brcm4331    614.20.16
    com.apple.iokit.AppleBCM5701Ethernet    3.6.0b1
    com.apple.driver.AppleUSBEHCI    5.5.0
    com.apple.driver.AppleEFINVRAM    1.7
    com.apple.driver.AppleRTC    1.5
    com.apple.driver.AppleACPIButtons    1.7
    com.apple.driver.AppleHPET    1.8
    com.apple.driver.AppleSMBIOS    1.9
    com.apple.driver.AppleACPIEC    1.7
    com.apple.driver.AppleAPIC    1.6
    com.apple.driver.AppleIntelCPUPowerManagementClient    196.0.0
    com.apple.nke.applicationfirewall    4.0.39
    com.apple.security.quarantine    2
    com.apple.driver.AppleIntelCPUPowerManagement    196.0.0
    com.apple.driver.DspFuncLib    2.3.7fc4
    com.apple.driver.IOBluetoothHIDDriver    4.1.3f3
    com.apple.driver.AppleMultitouchDriver    235.29
    com.apple.iokit.IOSerialFamily    10.0.6
    com.apple.kext.triggers    1.0
    com.apple.iokit.IOSurface    86.0.4
    com.apple.iokit.IOBluetoothFamily    4.1.3f3
    com.apple.driver.AppleGraphicsControl    3.3.0
    com.apple.driver.IOPlatformPluginLegacy    1.0.0
    com.apple.driver.AppleSMBusController    1.0.11d0
    com.apple.driver.AppleSMBusPCI    1.0.11d0
    com.apple.iokit.IONDRVSupport    2.3.7
    com.apple.driver.AppleUSBAudio    2.9.0f6
    com.apple.iokit.IOAudioFamily    1.8.9fc11
    com.apple.kext.OSvKernDSPLib    1.6
    com.apple.driver.AppleHDAController    2.3.7fc4
    com.apple.iokit.IOHDAFamily    2.3.7fc4
    com.apple.iokit.AppleBluetoothHCIControllerUSBTransport    4.1.3f3
    com.apple.driver.IOPlatformPluginFamily    5.3.0d51
    com.apple.iokit.IOGraphicsFamily    2.3.7
    com.apple.iokit.IOFireWireIP    2.2.5
    com.apple.driver.AppleSMC    3.1.4d2
    com.apple.driver.CoreStorage    296.16
    com.apple.driver.AppleUSBHIDKeyboard    170.2
    com.apple.driver.AppleHIDKeyboard    170.2
    com.apple.driver.AppleThunderboltDPOutAdapter    1.8.9
    com.apple.driver.AppleThunderboltDPInAdapter    1.8.9
    com.apple.driver.AppleThunderboltDPAdapterFamily    1.8.9
    com.apple.driver.AppleThunderboltPCIDownAdapter    1.2.6
    com.apple.driver.AppleUSBMergeNub    5.5.5
    com.apple.iokit.IOSCSIBlockCommandsDevice    3.5.5
    com.apple.iokit.IOUSBMassStorageClass    3.5.1
    com.apple.iokit.IOSCSIArchitectureModelFamily    3.5.5
    com.apple.iokit.IOUSBHIDDriver    5.2.5
    com.apple.driver.AppleUSBComposite    5.2.5
    com.apple.driver.AppleThunderboltNHI    1.6.3
    com.apple.iokit.IOThunderboltFamily    2.2.6
    com.apple.iokit.IOUSBUserClient    5.5.5
    com.apple.iokit.IOFireWireFamily    4.5.5
    com.apple.iokit.IOAHCIFamily    2.3.1
    com.apple.iokit.IO80211Family    522.4
    com.apple.iokit.IOEthernetAVBController    1.0.2b1
    com.apple.iokit.IONetworkingFamily    3.0
    com.apple.iokit.IOUSBFamily    5.5.5
    com.apple.driver.AppleEFIRuntime    1.7
    com.apple.iokit.IOHIDFamily    1.8.1
    com.apple.iokit.IOSMBusFamily    1.1
    com.apple.security.sandbox    220.2
    com.apple.kext.AppleMatch    1.0.0d1
    com.apple.security.TMSafetyNet    7
    com.apple.driver.DiskImages    345
    com.apple.iokit.IOStorageFamily    1.8
    com.apple.driver.AppleKeyStore    28.21
    com.apple.driver.AppleACPIPlatform    1.7
    com.apple.iokit.IOPCIFamily    2.7.3
    com.apple.iokit.IOACPIFamily    1.4
    com.apple.kec.corecrypto    1.0
    Model: Macmini5,1, BootROM MM51.0077.B10, 2 processors, Intel Core i5, 2.3 GHz, 16 GB, SMC 1.76f0
    Graphics: Intel HD Graphics 3000, Intel HD Graphics 3000, Built-In, 512 MB
    Memory Module: BANK 0/DIMM0, 8 GB, DDR3, 1600 MHz, 0x802C, 0x31364B544631473634485A2D314736453120
    Memory Module: BANK 1/DIMM0, 8 GB, DDR3, 1600 MHz, 0x802C, 0x31364B544631473634485A2D314736453120
    AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0xE4), Broadcom BCM43xx 1.0 (5.106.98.100.16)
    Bluetooth: Version 4.1.3f3 11349, 2 service, 18 devices, 1 incoming serial ports
    Network Service: Wi-Fi, AirPort, en1
    Serial ATA Device: APPLE HDD HTS547550A9E384, 500.11 GB
    USB Device: hub_device, 0x0424  (SMSC), 0x2513, 0xfa100000 / 2
    USB Device: Keyboard Hub, apple_vendor_id, 0x1006, 0xfa120000 / 4
    USB Device: Apple Keyboard, apple_vendor_id, 0x024f, 0xfa122000 / 8
    USB Device: BRCM20702 Hub, 0x0a5c  (Broadcom Corp.), 0x4500, 0xfa110000 / 3
    USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x8281, 0xfa113000 / 5
    USB Device: hub_device, 0x0424  (SMSC), 0x2513, 0xfd100000 / 2
    USB Device: HL-2270DW series, 0x04f9  (Brother International Corporation), 0x0042, 0xfd130000 / 5
    USB Device: Rocketfish HD Webcam, 0x19ff, 0x0218, 0xfd120000 / 4
    USB Device: IR Receiver, apple_vendor_id, 0x8242, 0xfd110000 / 3

  • TS1702 Why does my mac open with iphoto when I connect my iPhone

    When I connect my iPhone to my Mac Mini the Mini opens automatically to iPhoto and just sits with the wheel spinning.  I have to force quit to exit.   My mini is set to automatically open in Itunes when conncected to an iPhone.  Not happening.  Any thoughts?

    iPhoto SHOULD open if you have photos in the Camera Roll, just like it would with any digital camera.
    For the problem with it not appearing in iTunes see: http://support.apple.com/kb/TS1591

  • Why does my Mac stall and glitch when playing movies?

    I got my Mac Pro halway through 2012 and recently it's been really slow but what really annoys me is when it glitches and stalls when I try to watch a movie on VLC or iTunes how can I fix this?????

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    The title of the Console window should be All Messages. If it isn't, select
    SYSTEM LOG QUERIES ▹ All Messages
    from the log list on the left. If you don't see that list, select
    View ▹ Show Log List
    from the menu bar at the top of the screen.
    Click the Clear Display icon in the toolbar. Then try the action that you're having trouble with again. Select any messages that appear in the Console window. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    ☞ The log contains a vast amount of information, almost all of which is irrelevant to solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    ☞ Some private information, such as your name, may appear in the log. Anonymize before posting.

  • Why does my ipod randomly colse apps when im still using them???

    Can anyone help?

    Apps crashing
    See:
    iOS: Troubleshooting applications purchased from the App Store
    Contact the developer/go to their support site if only one app.
    Restore from backup. See:
    iOS: How to back up              
    Restore to factory settings/new iPod

  • Why does my bus list display 64 when i only have 32 in my environment

    Hi in audio hardware and drivers 64 busses is unchecked, and my environment only has 32 busses yet when i select a bus there is 64 available, 32 in bold and 32 greyed out (out of use). How can i get around this so i can only have 32 busses.
    Thanks, Ben

    When i select a bus send on a channel there is a list of 64
    busses and the first 32 are only enabled.
    There has been a thread about this a few months ago.
    You have enabled the 64-busses option at some point, hence the bus list has geon from 32 to 64 items. Then you turned it off again, so only 32-busses are available.
    However, Logic doesn't shrink the flip menu back to 32 entries, so you still see 64-entries, but only the first 32 are enabled, and the remaining 32 inactive ones are greyed out and disabled.
    It's a minor display glitch - do a search for the original thread for more info.

Maybe you are looking for