 |
 |
pageouts, yet free RAM?
|
 |
|
 |
|
Mac Elite
Join Date: Oct 2000
Location: Amboy Navada, Canadia.
Status:
Offline
|
|
I've noticed that OS X.3, as did 10.2, has been pagingout a lot of memory to disk while there is free space. To be honest, I often ignore the "how to turn off VM?", "how to increase application memory?", and "no free ram!" type posts because they get redundant, so maybe this has been explained in replies to those.
I currently have 132mb of RAM free. I have 3213 pageouts and 18461 pageins. I noticed a few days ago that i actually had 4 swap files. Now, I have 768mb of RAM here, and free RAM available, why is data being paged out to disk? It would seem to me that this must be efficient somehow, like keeping real RAM clear just in case, or paging out less important data that could be used more commonly, but any pageouts used to always be a performance hit (back when I paid attention to OS X memory management explinations in X DP4, Beta, and 10.0).
Am I losing performance? Do I actually need more RAM? would a stick of 64mb do anything? my last 512mb stick was supposed to be the "OS X needs 256mb? i'll just make it 768 and be done with it" solution ;-)
(Last edited by yukon; Dec 22, 2003 at 11:07 AM.
)
|

This insanity brought to you by:
The French CBC, driving antenna users mad since 1937.
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Nov 2001
Location: Norway
Status:
Offline
|
|
Ignore the memory readouts. Free ram should always be available. If not, the paging out would start the moment you launch an application when RAM is full, which would result in a lot of disk trashing and long launch times. OSX therefore pages out at free will, in the backgroud, so that ram memory always is available for the next starting task.
I guess you theoreticallly could avoid paging out entirely, if you had enough ram to store all data in ram memory. But all in all, OSX memory management does an excellent job at manageing the memory, and there should be no reason to worry considering you have plenty of ram. (Of course, more ram will always be desireable, but 768 should be sufficient for daily tasks). Anyway, most of your pageouts is probably data you access very rarely, or once (unless you often run a lot of really memory intensive tasks). No need to waste ram on that.
(Last edited by Sophus; Dec 22, 2003 at 08:57 AM.
)
|
|
|
| |
|
|
|
 |
|
 |
|
Registered User
Join Date: Aug 2002
Location: On my couch
Status:
Offline
|
|
Originally posted by Sophus:
Ignore the memory readouts. Free ram should always be available. If not, the paging out would start the moment you launch an application when RAM is full, which would result in a lot of disk trashing and long launch times. OSX therefore pages out at free will, in the backgroud, so that ram memory always is available for the next starting task.
I guess you theoreticallly could avoid paging out entirely, if you had enough ram to store all data in ram memory. But all in all, OSX memory management does an excellent job at manageing the memory, and there should be no reason to worry considering you have plenty of ram. (Of course, more ram will always be desireable, but 768 should be sufficient for daily tasks). Anyway, most of your pageouts is probably data you access very rarely, or once (unless you often run a lot of really memory intensive tasks). No need to waste ram on that.
Not to mention that if Yukon has 4 swap files out there right now, he/she is working with exceptionally large files which might not fit into available memory anyway even if it were all free.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Oct 2000
Location: Amboy Navada, Canadia.
Status:
Offline
|
|
awesome, thanks. it's always strange seeing what's apparently a lot of VM activity. I remember OS X.1 or so always having about 12mb free, I guess apple found that it wasn't enough for when more memory is suddenly needed.
Thanks for the help guys. I've found a stick of 64mb that i don't really trust here, and I've been putting off installation, watching the memory readouts almost made me stick it in.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Oct 1999
Location: San Jose, Ca
Status:
Offline
|
|
The reasons you will get page-outs when there is still free ram is that an application is freeing memory that has no representation on disk. Most often this is the application's data.
An illustration of this would be in a non-file-cashing web browser (OmniWeb for instance). The user asks for a page with an image in it, and so the browser gets the image from the remote server into memory, and then displays it for the user. Then the user goes away from the page. Ignoring that every browser out there will do something with this image for caching, the browser will then de-allocate the memory.
Now for the pedantic out there, applications will also typically keep their pool of memory, assuming that they will re-use it again, but for conversation we are in a case where this is not true.
So, the program tells the OS that it can have the block of memory back. Since there is no representation of this data anywhere on the HD (at least not so far as the OS knows.. after all, how is it to know it was the same porn image you saved last week?), the data is worthless to the OS, and it will free it, resulting in a page-out.
This is fairly common if you are using large files in Photoshop, as that application does a lot of memory block management like this.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Oct 2000
Location: Edinburgh, Scotland
Status:
Offline
|
|
Originally posted by larkost:
The reasons you will get page-outs when there is still free ram is that an application is freeing memory that has no representation on disk. Most often this is the application's data.
An illustration of this would be in a non-file-cashing web browser (OmniWeb for instance). The user asks for a page with an image in it, and so the browser gets the image from the remote server into memory, and then displays it for the user. Then the user goes away from the page. Ignoring that every browser out there will do something with this image for caching, the browser will then de-allocate the memory.
Now for the pedantic out there, applications will also typically keep their pool of memory, assuming that they will re-use it again, but for conversation we are in a case where this is not true.
So, the program tells the OS that it can have the block of memory back. Since there is no representation of this data anywhere on the HD (at least not so far as the OS knows.. after all, how is it to know it was the same porn image you saved last week?), the data is worthless to the OS, and it will free it, resulting in a page-out.
This is fairly common if you are using large files in Photoshop, as that application does a lot of memory block management like this.
Nice explanation, but isn't this slightly flawed? Basically you're suggesting that data in RAM (which is unlikely to be required again) is being paged out to disk? Why bother? Why not just flag it as reusable? Data would only be paged out to disk if there is an immediate demand for RAM which is unavailable, and the data is likely to be needed again in the future. That's the whole point of paging to disk.
In the event of the system needing more RAM than is currently available, page out chunks of data that are likely to be needed again (according to some weird-ass complex algorithm) and re-use or flag as reusable any chunks RAM which would appear not to be needed again in the future.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Oct 2000
Location: Amboy Navada, Canadia.
Status:
Offline
|
|
Geobunny- I'd guess it's meant to page out unused memory when there's a low load, to free up enough memory so that a new task can be immediatly loaded without any disk thrashing etc.
it's reusing the paged out memory quite a bit, averaging 8.5 times per..uh...in/out unit here. seems inefficient to me, but Apple must have tested this....as long as it's not running out of memory and causing a drop in performance, i guess....
I have my swap partition on a seperate drive that i don't use much, so it shouldn't be too much of a hit anyway, but I don't know how I'd ever tell from the numbers that I'm low on RAM.....are other people noticing the same pattern of numbers? (lots of free RAM, a few thousand pageouts, many thousand pageins)
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
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
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|