8 Replies Latest reply: Apr 27, 2007 12:54 AM by Dj RaYz
Ryan Sommers Level 1 (0 points)
I'm trying to figure out why my machine always has so many page outs.

I understand the theory of inactive memory, and it sounds great. My problem is that inactive memory just seems to sit there saving itself at the expense of using virtual memory instead.

Looking at Activity Monitor a couple hours after I start working, I almost always have between 500MB and 1GB of "Inactive" memory, 25MB or so of "Free" memory, and about 50% page outs. RIght now it's 120,000 page ins to 60,000 page outs.

I'm a graphic designer and use a lot of programs, but none of them are using too much real memory right now. Photoshop for instance is allowed up to 1.3GB of memory in its preferences, but is currently only using 400MB real (1GB virtual).

Why isn't my machine using the inactive memory rather than paging out to virtual memory? These excessive page outs cause real slow down.

I know this topic has been covered, but I wasn't able to find any specific answers in relation to excessive page outs when plenty of memory is available. Any help would be greatly appreciated.

17" 2.33GHZ Core 2 Duo, Mac OS X (10.4.9)
  • infinite vortex Level 7 (21,400 points)
    having applications open, whether they're doing anything or not require RAM and the more applications you have open the more RAM that is utilised for often no good reason.

    Additionally, by having many open applications you run into RAM fragmentation issues. So just because there's RAM being unused does not make it readily available. The larger the applications and their RAM requirements be bigger this problem becomes.

    I would simply reduce the number of open applications you have at any one time. Your RAM is a limited resource and for best perforamance it's best to use it wisely. Just because you "can" do something doesn't mean you should.

    You should also consider upgrading to 3GB RAM.
  • J D McIninch Level 5 (4,060 points)
    Page-outs are not bad unless accompanied by an equal number of page-ins in a short period of time. Ideally, your machine ought to page-out stale memory pages (i.e., those that have been allocated but since gone untouched for a while) as much as possible.

    You can load a large app, but the majority of the app may never be accessed. For example, if you use something like Safari, but never the RSS features, the whole RSS support part will load, initilize, and never be touched. If the machine's otherwise idle, it might as well move that to disk and keep RAM as free as possible. If you exit Safari without ever touching RSS, the paged out pages are freed in-place.

    Paging in an out is only adverse when done under load. Preemptory page-outs should increase the overall performance of a machine if it isn't already under high load.
  • Riot Mac Level 1 (0 points)
    I too have the same problem... I think. I have 1GB of RAM in my MacBook Pro C2D and right now I only have 15.37MB Free. I only have a few apps open too. After a restart I have something like 800MB free. After working for an hour or so it is down to almost nothing! I can close out all apps and it never goes back to 800MB free unless I restart. Any ideas? When I am down to 15MB my computer will run really slow at times.
  • Ryan Sommers Level 1 (0 points)
    That makes sense, and makes it hard to argue for a "fix".

    My machine definitely feels slow as soon as it starts to page out. And I don't remember having this issue on my Powerbook G4 1.5Ghz with 2GB RAM... But then again, how good is my own memory?

    When in the above situation, I can keep a minimum number of applications open. But when I open an application, since "Free" memory is already so low, it seems to start using inactive memory about as fast as it's paging out. So it ends up taking longer than it should to open, and inactive memory seems to be protected against use and lets this new application just keep paging out.

    I can't pretend to know all the details of how OS X handles memory, but it seems like in this situation, it should be looking at the 700MB of inactive memory I have as ripe pickings for the newly opened application that needs it. If I closed an application, I'm not planning to use it again real soon, and would much rather that inactive memory be allocated to this new application I'd really, really like to use as fast as I should be able to.

    Anyway, I know I can't change the underlying architecture of how the OS swaps memory, but man... It just seems like 2GB of memory should be faster.

    I don't see how people can post on here that they almost never have any page outs, while I'm suffering at 83% page outs vs page ins right now. On to upgrading to that magical third GB I guess...
  • Riot Mac Level 1 (0 points)
    I have a ton of page outs on my MacBook Pro too! I just checked my other computers and they all have 0 page outs. What exactly is a page out? Is it bad?

    Sorry... i figured it out. It is when all your memory is used up and it draws from the hard drive.

    There is definitely something wrong with my setup here. I am not using all my RAM right nowI have one app open and only 147MB left!
  • infinite vortex Level 7 (21,400 points)
    What exactly is a page out?

    A page out is when memory in physical RAM is "paged" to virtual memory on your hard disk. This happens when you do not have sufficient RAM for what you are trying to do.

    Is it bad?

    Yes, in performance terms there's no such thing as a good page out.
  • Ryan Sommers Level 1 (0 points)
    Well I have a 2GB memory module on the way, so we'll see if 3GB total helps...

    But, just for giggles, I figured I'd post this screenshot of Activity Monitor. Photoshop is especially impressive...


  • Dj RaYz Level 1 (5 points)
    41GB of Virtual Memory taken up!! My laptop would die!!! I always close my apps after I use them. I noticed in Safari, after browsing around for 1-3 hours, the virtual memory increases to about 2GB.