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

chrono1081

macrumors G3
Original poster
Jan 26, 2008
8,937
6,700
Isla Nublar
Hi guys,

I was always under the impression that page outs are caused by the ram being used up. I have 24 gigs of ram, and these page outs mysteriously happen when I'm not by the computer so I cant catch them in Activity Monitor.

The weird thing is is they happen when I have nothing in the background running. Programs (only a few like Maya, Unity and Photoshop) will be open, but they won't be doing anything. Even when doing heavy stuff, the most they have topped is 16 gigs.

Is this just something writing to the disk for the heck of it? Or is something snarfing my ram?

It doesn't really matter, Im more curious than anything.
 
What kind of apps do you use on a regular basis? 24GB is a LOT of RAM and I wouldn't worry about it, unless you are seeing 1GB+ in page outs.
 
It's probably just things that the OS wants to write to disk, and has no need to keep in RAM. Other programs could be doing it too. There's no reason to keep data in RAM if it doesn't need to be there.

It's called pre-cleaning. The OS will write pages that change out to disk when possible, so it doesn't have to worry about doing so when it starts to run out of memory. If a page is "clean", i.e. the changes in memory have been written to disk, then that page can be easily discarded to make room for a new page coming in from disk. Otherwise the OS would have to write that page out to disk. So really these phantom page outs you're seeing are a feature, not a problem :)
 
I was always under the impression that page outs are caused by the ram being used up. I have 24 gigs of ram, and these page outs mysteriously happen when I'm not by the computer so I cant catch them in Activity Monitor.

In my experience some page-outs happen regardless of free memory. It's irksome because you feel like "How can this be?"

The key thing seems to be the rate at which the page-outs happen, i.e. they shouldn't grow fast (e.g. as a % of pages-in). Well that and, is your system performing well?

Matt
 
It's probably just things that the OS wants to write to disk, and has no need to keep in RAM. Other programs could be doing it too. There's no reason to keep data in RAM if it doesn't need to be there.

Isn't that "pages in" (as in pages into the swap)?

Matt.
 
My understanding was that it was not the absolute number of page outs, but the ratio of page in to page outs that was the useful metric to assess if you have sufficient RAM.
 
I could be wrong ?

I thought their was some that happens in a sleep mode when it makes a memory dump to disc to shut itself into sleep mode safely ?
so it has a state to come back to ?

again its morning my mocha is not gone and I am not awake yet :)

but is your puter set to sleep ? this could be something to do with it ?

set it not to sleep (if its set to) then come back and see what happens ?
 
IIRC the OS will automatically page out memory that you haven't used in a while. No need to keep it in RAM if you're not using it.

The more RAM you're using, the slower your computer can get as it looks for free blocks of memory, which can become rarer and rarer as memory fills. When you have 24 gigs of RAM, it can take the computer a while to look through all of it for free space. This is why it's a better idea to page out things you aren't using, even if you have enough RAM in theory for all of it.
 
The more RAM you're using, the slower your computer can get as it looks for free blocks of memory, which can become rarer and rarer as memory fills. When you have 24 gigs of RAM, it can take the computer a while to look through all of it for free space. This is why it's a better idea to page out things you aren't using, even if you have enough RAM in theory for all of it.

This is misleading. Searching for a free entry in physical memory does not slow down your computer. That's really not how things work. Memory Management in modern Operating Systems is pretty sophisticated.

You can have 4KB, 2MB, or 4MB page sizes in x86 architecture. If you have 4MB pages then we're only talking about 6144 pages that could be "free" or not, based on 24GB of physical memory. That's a completely trivial calculation, even if it were a linear operation. If you have 4KB pages then that's 6,291,456 pages to address 24GB of physical memory.

To find a free page to page into you can use a bitmask to map those pages to a value to determine if they are free or not. A bitmask for those 6 million pages would require less than 1 MB (786KB). The binary operation to perform the mask would take a completely trivial amount of time.

I'm sure the optimizations used by all modern operating systems are even more complex than that, and even more optimized. But the point is that addressing more physical memory does not slow down your computer at all.
 
What kind of apps do you use on a regular basis? 24GB is a LOT of RAM and I wouldn't worry about it, unless you are seeing 1GB+ in page outs.

I use Maya, ZBrush, Corel Painter, Photoshop CS5, and Unity the most. I'll also have iTunes open and every few days Aperture will be open too. The page outs are really small which is why don't think its a big problem. Usually 6 - 8 mb. I was more curious then anything.

In my experience some page-outs happen regardless of free memory. It's irksome because you feel like "How can this be?"

The key thing seems to be the rate at which the page-outs happen, i.e. they shouldn't grow fast (e.g. as a % of pages-in). Well that and, is your system performing well?

Matt
\

It's performing excellent! I love it :) The percentage is very very small.

How much paging are we talking here? Can you give us some actual numbers?

Around 6 - 8 mb, the highest being around 20.

I could be wrong ?

I thought their was some that happens in a sleep mode when it makes a memory dump to disc to shut itself into sleep mode safely ?
so it has a state to come back to ?

again its morning my mocha is not gone and I am not awake yet :)

but is your puter set to sleep ? this could be something to do with it ?

set it not to sleep (if its set to) then come back and see what happens ?

I do notice it after sleep so it may be that this is what it is doing. It always happens when I am away from the machine. I've been trying to catch it for a few days now and it never happens when I am around.

24 gigs of ram!!!!!!!!!!!!!!!!!!

Lol ya I use a lot of stuff. The most I've ever got this thing to use at once was this morning at 22 gigs. Thats not normal, I was doing a lot extra this morning but usually I will hover around the 10 - 16 gig mark. A lot of it is when I am texturing in Maya since Maya and Photoshop are open at the same time, I then export those models into Unity (which also will link with Photoshop) and those three combined like to eat up lots of ram. ZBrush is also usually open and will link with Maya haha.
 
It's probably just things that the OS wants to write to disk, and has no need to keep in RAM. Other programs could be doing it too. There's no reason to keep data in RAM if it doesn't need to be there.

It's called pre-cleaning. The OS will write pages that change out to disk when possible, so it doesn't have to worry about doing so when it starts to run out of memory. If a page is "clean", i.e. the changes in memory have been written to disk, then that page can be easily discarded to make room for a new page coming in from disk. Otherwise the OS would have to write that page out to disk. So really these phantom page outs you're seeing are a feature, not a problem :)

This is the most cromulent explanation I've seen for this behavior that I've ever seen!

Thanks, this is very helpful.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.