Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ptrael

macrumors newbie
Original poster
Jun 19, 2006
14
0
I've noticed some strange memory consumption on Intel Macs, compared to PPC Macs. I thought that my Mac mini (1GB RAM) at work was only affected, but when I replaced my PowerBook G4 (640MB RAM) with a MacBook (1GB RAM) I also noticed this behaviour.

Basically it appears as though half of the memory is not being used properly, as evidenced by the screenshot of Activity Monitor. Usually there is ~10MB of free memory, a virtual machine in Parallels was just shut down in the screenshot. I actually experience a performance hit when running less applications than I did on the PowerBook, which had closer to half the memory of the MacBook.

Is this expected behaviour? The private memory looks correct, but iterating through the memory output of /bin/ps adds up to nowhere near 1GB.
 

Attachments

  • ActivityMonitor.png
    ActivityMonitor.png
    132.9 KB · Views: 242
I see that you're using parallels, if you had been using that earlier, then it would essentially give you half of that memory. I assume that's why you are seeing so many page outs, I would suggest upping the RAM to 2GB if you are using parallels.
 
I see that you're using parallels, if you had been using that earlier, then it would essentially give you half of that memory. I assume that's why you are seeing so many page outs, I would suggest upping the RAM to 2GB if you are using parallels.
2GB would be nice. What can explain the disparity with the total memory usage and the usage in the columns?
 
2GB would be nice. What can explain the disparity with the total memory usage and the usage in the columns?

Wired memory is explained here, Active memory is the memory that is being used right now, that's what you're seeing in the activity monitor, and inactive memory is memory that has been used and it still in RAM, so that it will be faster if you ever use it again. And 2GB of RAM is dirt cheap now, I have these in my MacBook Pro and they work great.
 
So theoretically what should all the real memory in the columns add up to? I thought that the used (wired + inactive + active) would add up to the sum of the columns.

There has been such a large difference in the memory consumption of the PowerBook and the MacBook. Almost always there will be ~10MB free memory on the MacBook/mini, which isn't necessarily a bad thing, but there is such poor performance sometimes, sometimes often. Applications with a sum of about 400MB real memory.
 
So theoretically what should all the real memory in the columns add up to? I thought that the used (wired + inactive + active) would add up to the sum of the columns.

There has been such a large difference in the memory consumption of the PowerBook and the MacBook. Almost always there will be ~10MB free memory on the MacBook/mini, which isn't necessarily a bad thing, but there is such poor performance sometimes, sometimes often. Applications with a sum of about 400MB real memory.

I don't believe that wired and inactive are counted in the columns, so it would only be active memory that in the columns. Once you get down to ~10MB free, then you should upgrade the RAM. When you see the applications getting slow, that's when the hard disk is being used, because there is no more RAM available, and the hard disk is significantly slower than RAM.
 
So theoretically what should all the real memory in the columns add up to? I thought that the used (wired + inactive + active) would add up to the sum of the columns.

It won't add up to anything in particular.

The "real" memory number for a process is an attempt to describe how much of the virtual space in its task is backed by physical pages. There are several factors that complicate this accounting, most particularly that physical pages can be present in more than one task simultaneously.

Without more details on your part, I can't work out what you mean by "not being used correctly". There's nothing particularly untoward in your Activity Monitor screenshot; it looks like you just quit something with a large amount of private memory that's been dumped into the freelist, but while you were running it you were pretty tight on memory (hence the high pageout count).

= Mike
 
So theoretically what should all the real memory in the columns add up to? I thought that the used (wired + inactive + active) would add up to the sum of the columns.
No, because inactive memory isn't going to show up in any of the columns - because it's inactive, ie not being used by anything at the moment. Deduct inactive memory from your calculation and you might get a number that's more accurate.
 
No, because inactive memory isn't going to show up in any of the columns - because it's inactive, ie not being used by anything at the moment. Deduct inactive memory from your calculation and you might get a number that's more accurate.

This is not correct. Memory accounted as 'real' can be in any state (other than 'free').

The two queues are part of the traditional Mach LRU page replacement algorithm. You can read more about it in Amit Singh's book, or in any decent Operating Systems textbook.

= Mike
 
Thanks for the responses Mike. I've attached an image of typical usage. The sum of the real column came to 742.38 MB.

How different is the memory management with the Intel version of Mac OS X? It seems to handle memory very differently, the Leopard beta memory requirements are double for Intel-based Macs.
 

Attachments

  • ActivityMonitor.png
    ActivityMonitor.png
    133.7 KB · Views: 172
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.