Memory allocation and usage question

Discussion in 'Mac Pro' started by Shelton, Mar 30, 2008.

  1. Shelton macrumors member

    Joined:
    Feb 16, 2008
    #1
    I am a recent switcher. Before I got my mac pro, I had used Windows my entire life. Mac OS X is an infinitely superior operating system. My productivity has increased ten-fold practically. OS X is a pleasure to use, whereas Windows is absolutely painful.

    There is one thing I simply do not understand, though: Mac OS X's memory management. With 2 gigs of RAM, I was pretty regularly maxing it out, so I recently upgraded to 4. It has made a world of difference, but I still find myself maxing out my RAM and using the pagefile, yet I have 2+ Gigs of inactive RAM. Sometimes, I will have 3 gigs of inactive RAM, and my page outs will steadily increase. I just don't understand.

    I searched Google and the forums, and it seems like inactive RAM is supposed to be freed up when needed, but that doesn't seem to be happening. Is this normal? Is there anything I can do to free up that "inactive" RAM, or is the easiest solution to just buy more?
     

    Attached Files:

  2. martinlk macrumors member

    martinlk

    Joined:
    Jun 20, 2005
    Location:
    Aalborg, Denmark
    #2
    Inactive memory is not free memory, so it cannot just be re-allocated to another process. Inactive memory must be paged to disk before that can happen. In fact, I think that just before a chunk of memory becomes inactive, it is paged to disk so that another process can allocate memory from the inactive chunk without having to wait for paging.

    Inactive memory will not be freed up since it has been allocated to a process. It is kept in memory in case that process tries to access it again, but it has also been paged to disk in case another process wants to allocate more memory. If that happens, the memory will be freed by the OS's memory management and allocated to the other process.

    The fact that your machine sucks a lot of memory is not necessarily a bad thing, just as long as you don't have an excessive amount of page outs. So inactive memory is kinda like free memory, only there's a slight catch: it has been paged to disk in case another process wants to allocate more memory, and there is no reason for freeing up inactive memory before this happens.

    It's been a while since I had my operating systems course at uni, so my knowledge about virtual memory is slightly rusty :eek:
     
  3. Infrared macrumors 68000

    Infrared

    Joined:
    Mar 28, 2007
    #3
    What's that process up the top with a frog-like thing next to it?
     
  4. -=Pingus=- macrumors newbie

    Joined:
    Mar 26, 2008
    #4
    Azureus

    That process is Azureus and it is a torrent download/upload manager.

    cheers
     
  5. Shelton thread starter macrumors member

    Joined:
    Feb 16, 2008
    #5
    Azureus. It is such a ram hog. My last computer could barely run it; it would come to a grinding halt whenever I did heavy downloading. I never even notice it is running on the Mac Pro.
     
  6. Shelton thread starter macrumors member

    Joined:
    Feb 16, 2008
    #6

    Hmm. That means I need more RAM? I don't use many pro apps, but I do multitask heavily.

    At what point do you not use virtual memory? Like, how much RAM would I need to hold me over for the next few years of computing, considering I don't use pro apps (photoshop) very often? I was hoping 4 gigs would do it.
     
  7. Infrared macrumors 68000

    Infrared

    Joined:
    Mar 28, 2007
    #7
    Ah, thanks. It was the 80 thread figure that caught my eye.
     
  8. nick9191 macrumors 68040

    Joined:
    Feb 17, 2008
    Location:
    Britain
    #8
    Use transmission instead of Azureus :)

    The thing with *nix operating systems, is the more memory you give them, the more they will use. Same with Windows, actually I'd say Windows is superior in this sense.
     
  9. martinlk macrumors member

    martinlk

    Joined:
    Jun 20, 2005
    Location:
    Aalborg, Denmark
    #9
    Not necessarily. If you notice that your machine is paging a lot (lots of page outs), then you would benefit from adding more RAM. If not, then you're fine.

    Your OS always uses virtual memory. It's the fundamental principle of how memory is managed in a modern OS. If you ask me, 4 gigs is fine—especially if you don't run a lot of pro apps.
     

Share This Page