 |
 |
More page outs than page ins?
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Jun 2004
Status:
Offline
|
|
What does it mean if Activity Monitor says I have more page outs than page ins? It's by a fairly wide margin, also. Mac Pro/2.66 Ghz/3GB RAM
|
|
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Oct 2000
Location: Los Angeles
Status:
Offline
|
|
If it's by a wide margin, you need more RAM.
|

"The natural progress of things is for liberty to yield and government to gain ground." TJ
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: Binghamton, New York, USA
Status:
Offline
|
|
It means that your Mac Pro is having to use your HD as memory because you're running out of RAM space. This won't hurt anything, just slow your Mac Pro down a lot.
|
|
2.3Ghz 17" SandyBridge MBP 8GB RAM 7.2k 750GB HD anti-glare display|Dell 2408WFP|64GB iPad2 ATT 3G
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Mar 2007
Location: San Jose
Status:
Offline
|
|
Page ins = number of 'pages' (chunks) of unused data in main memory (RAM) written to virtual memory (disk). Page outs = number of 'pages' of that data read back from the disk to the main memory.
Basically, if page outs is high, it means that the data written to virtual memory wasn't really unused: it was read back out from VM to main memory. This is not ideal, since disk is far slower than main memory.
|
|
|
| |
|
|
|
 |
|
 |
|
Moderator 
Join Date: Apr 2000
Location: Gothenburg, Sweden
Status:
Offline
|
|
Sorry, it's the other way around on ins and outs. A page in means that something was loaded from disk into memory. This is always higher than page outs, because when an application loads from disk, it is loaded using the virtual memory subsystem. Page outs happen when a page is written from RAM back to disc. That happens (among other things) when the amount of free memory is lower than some value, and if that value is high, it can be an indication that you are running out of memory. More important than either is the number of translation faults. If that value is high, you may need more RAM.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Feb 2007
Status:
Offline
|
|
How do I find the number of translation faults, P?
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2006
Status:
Offline
|
|
Oh lordy, I thought I understood this...! I get it that when there is not enough ram then the system pages out data to the disk. But then wouldn't paging in be just as bad? And wouldn't paging in be more significant, because that is data that the system really does need? In other words, paging out might at worst be a waste of effort. But paging in means that the data really should have remained in ram?
And what are translation faults?!
|
|
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Oct 2000
Location: Los Angeles
Status:
Offline
|
|
Memory Usage Performance Guidelines: Memory Management in Mac OS X
Paging in is reading from disk back to RAM, while paging out is writing to disk from RAM. Both operations involve the drive, both incur speed penalties. But paging out is a bigger problem because disk write activity is slower than read activity, and excessive paging out signifies that memory is being prematurely written to disk while it was still needed and should have stayed in RAM. Also, I believe that page-ins are often the result of the recall of inactive memory that was written to the virtual memory; the fact that it was cached on disk means the read back into RAM is a little faster than it would be for the drive to have to go back to the original location on some random spot on the drive (referred to as a page hit). That's my explanation.
(Last edited by Big Mac; Apr 18, 2007 at 01:17 PM.
)
|

"The natural progress of things is for liberty to yield and government to gain ground." TJ
|
| |
|
|
|
 |
|
 |
|
Moderator 
Join Date: Apr 2000
Location: Gothenburg, Sweden
Status:
Offline
|
|
If you had a machine with 2 TB of RAM, you would still get lots of pageins, because they happen when data is read from the disk into RAM, and that happens whenever an application is launched - the code to be executed is read from disk into RAM. OTOH, you can certainly have a computer with 0 pageouts - it's quite common when you have just booted, and with a 512 MB G3 under 10.2, I had that for quite a long time.
A pageout is a sign that the system needs to remove something from RAM that it was keeping around. If the paging algorithm is a good one, that page probably won't be needed again in a hurry, but the higher the number of pageouts, the higher the risk that you may have to page that page back in.
You get all of this data from vm_stat in the Terminal - that's also where you can see the number of translation faults. Apple does show some of it in Activity Monitor, but seems to show the total number since reboot, which isn't a very useful stat. With vm_stat you can ask for the data to be updated every 10 seconds or so, which gives you a chance to see how doing different things will trigger different actions. Launch iTunes - a few hundred pageins. Start playing, a few more. Skip to the next song, yet some. Still no pageouts. If you're curious, do this while working to see what actions trigger what.
Apple means well by showing this data in Activity Monitor, but it isn't very useful unless you know what it means - and there is absolutely no help available on most of the stats, unless you start digging in the Terminal. I wish they had a simple mode that only showed CPU usage and RAM usage (defined as wired + active) as two bars and with a line graph because that's all most people need to know. If they have to show pagein/pageout, show the stats for the last minute or so, not the total.
When the drive finds something in its cache, it's a cache hit, not a page hit. What you're thinking of is probably a page fault (=translation fault), which is what happens when a memory page can't be read straight from RAM. Either it is a soft fault (ie, the data is somewhere else in RAM, because it has been shuffled around) or a hard fault (the data is not in RAM, but only on disk. Hard faults are what kill performance when you run low on RAM.
|
|
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Aug 2000
Location: Brighton, UK
Status:
Offline
|
|
Edited, and removed because I clearly had my brains set on Off...
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Feb 2007
Status:
Offline
|
|
P, does this look ok to you:
Mach Virtual Memory Statistics: (page size of 4096 bytes)
Pages free: 34569.
Pages active: 212369.
Pages inactive: 230555.
Pages wired down: 46795.
"Translation faults": 266339068.
Pages copy-on-write: 583937.
Pages zero filled: 195908903.
Pages reactivated: 5033330.
Pageins: 1870098.
Pageouts: 173959.
Object cache: 97077 hits of 278771 lookups (34% hit rate)
?
that's with safari, adium, colloquy, newsfire, smultron, and itunes open...haven't rebooted in a couple days.
thanks 
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Mar 2006
Status:
Offline
|
|
It's hard to tell, because those look like totals, and over a couple of days, it's impossible to know given we don't know what you were doing.
Basically, as someone above mentioned, you want to looks for what causes page-ins. If they are happening as a matter of course when you are doing routine stuff, you need more ram, if they are happening as you play through your itunes or edit gbs of digital video (and you don't do that for a living) you probably don't
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|