Less than Stellar Member
|
I've had a crazy amount of pagein and outs lately. I checked activity monitor and I've got half a gig of RAM tied up inactively. I have no clue where it is. I've got 2 gigs of RAM but my computer has been terribly slow of late. I've got about 40 gigs of free space on my HD so that's not it.
I'm running 10.5.5 on a 2.2 ghz Core 2 Duo MBP. Any thoughts? How can I free up some of that inactive RAM? |
quote |
Sneaky Punk
|
What applications are you running? Do you use a lot of tabs in your web browser?
|
quote |
Veteran Member
Join Date: Jul 2007
Location: St. Louis, MO
|
Use the activity monitor, Luke.
|
quote |
Antimatter Man
Join Date: May 2004
Location: that interweb thing
|
Dude, this sooooo calls for a poll.
Where is all my memory being tied up?
All those who believe in telekinesis, raise my hand. |
quote |
ಠ_ರೃ
Join Date: May 2004
Location: Minnesota
|
Safari and Dashboard are the two biggest culprits.
|
quote |
Rocket Surgeon
Join Date: Feb 2005
Location: The Canadark
|
I was going to suggest Dashboard too - got lotsa widgets open?
|
quote |
Antimatter Man
Join Date: May 2004
Location: that interweb thing
|
It's even more fundamental...
If you boot and don't open Dashboard your system uses less RAM than if you open Dashboard ever (even with subsequent closure). Widget cleanup is sloppy, and a clean boot may illustrate (via Activity Monitor) just how much, depending on your widgets. All those who believe in telekinesis, raise my hand. |
quote |
Selfish Heathen
Join Date: May 2004
Location: Zone of Pain
|
Or occasionally "killall Dock" to wipe out Dashboard.
|
quote |
Veteran Member
Join Date: May 2004
|
Quote:
|
|
quote |
Less than Stellar Member
|
I should have been more specific - why do I have so much inactive memory when I'm constantly getting pageins and outs? Shouldn't stuff in inactive memory still be fast and paged out stuff take some time? It's as if everything has paged out but that's certainly not the case.
As for widgets, I've only got 3 going. The calculator, the weather and one called "organized" by iSlayer. |
quote |
Senior Member
Join Date: Nov 2004
|
Quote:
If inactive memory is not re-used and free memory goes below 10%, some of the inactive memory will be transfered to the free list, enough to put the free list back over 10%.. This is just a very clever way of implementing lazy evaluation in the name of maintaining some deference to the principle of locality. Overall a very intelligent way to handle memory management. Page-ins are nothing to worry about. Every page loaded into RAM shows up as a page-in no matter what. Lots of page-outs means you don't have enough RAM for how you are using the computer. Currently 2GB with 10.5 is enough to run adequately, but if you like to leave apps running in the dock and not quit them you really need 4GB+. |
|
quote |
Less than Stellar Member
|
Quote:
|
|
quote |
Veteran Member
Join Date: May 2004
|
Er, clicking?
I've seen disk corruption give rise to super slow performance. Try running Disk Utility. FWIW, I frequently have under 20MB free on my *4GB* machine, with no slowdowns, *except when swapping apps*. Right now it breaks down as: Free: 85MB Wired: 618MB Active: 2.18GB Inactive 1.13GB This is with, um... 15 apps open, one of which is a coding editor with a dozen windows open (that's a dozen *projects*, not a dozen *documents*... each project has anywhere between three and fiftyish documents open, one is Safari with a dozen tabs, one is Lotus Notes (which is a *pig*), etc, etc, etc. All smooth as silk. If you're not switching between apps like mad, and are staying more or less in one app (with the exception of Safari, which, every time you go to a new page, eats more RAM for caching), and it's *still* slow... something is wrong. My guess is that there's something wrong with your drive. My mom's laptop had this issue a couple of years ago, almost feature identically: super slow, sounded like the VM was thrashing, etc, etc. It was that the drive was reporting error after error, and *eventually* it would read or write an uncorrupted block. This meant that every VM swap in or out was dirt slow, and the whole system came to a crawl. She had no other symptoms to speak of. It wasn't until she told me that her Finder preferences were getting reset every so often that the idea of drive issues came to mind. |
quote |
Sneaky Punk
|
Quote:
|
|
quote |
M AH - ch ain saw
Join Date: May 2004
|
Isn't Mail a huge memory hog?
|
quote |
Veteran Member
Join Date: May 2004
|
Quote:
Quote:
|
||
quote |
Less than Stellar Member
|
Ok, maybe clicking isn't the right word. I can hear it reading/writing to disc. It doesn't sound out of the ordinary to me, but I'll run disk utility to be sure (OT: is it "disc" or "disk"?).
Ran Disk Utility and it says my drive is fine. In activity monitor, though, the "System Memory" tab has this: Thoughts? (Bear in mind that my whole HD is 111 gigs, so 93 gigs for VM space seems weird.) Last edited by torifile : 2008-12-18 at 14:44. |
quote |
Veteran Member
Join Date: May 2004
|
I've got 68GB right now... that's not the size of your swap files, that's the size of all files memory-mapped, including multiple instances of System libraries, etc. Not unusual.
For how much your VM is *actually* taking up, look at the size of the folder /var/vm in the Terminal. du -sh /var/vm If you've put the machine to sleep since your last reboot, that includes your sleepimage, which is a copy of your RAM for safe sleep - subtract the total amount of your RAM from it. The above reports 6.0GB for me, and I have 4GB of RAM, so there's actually only 2GB of swap space being used. Or, you could at the bottom of that column at 'swap used'... |
quote |
Less than Stellar Member
|
I've also noticed that my computer can take, and will take more often than not, up to 30 seconds to go to sleep. Now this might be when it's writing the sleepimage file, I don't know, but it seems quite a long time.
|
quote |
Veteran Member
Join Date: May 2004
|
Yup, that's the sleep file. My 4GB takes twice as long. It's annoying.
I've been tempted to turn it off to save myself the wait time when I'm usually headed out the door to something (like a meeting), but otoh, it's saved my bacon a couple of times when I've left the machine sitting for a long weekend without charging. |
quote |
Sneaky Punk
|
We are talking about physical memory not VM here. Don't ask me why it works or how its related, I just know that repairing disk permissions clears out inactive RAM.
|
quote |
Veteran Member
Join Date: May 2004
|
Weeeeeeird? I'll have to try that out. The only thing I can think of is that it forces the VM to release pointers to memory-mapped files so it can muck with the files. Hunh.
|
quote |
Less than Stellar Member
|
Quote:
It also weirdly dropped my page outs from nearly 4 gigs to 91 megs according to activity monitor. This is all very interesting. Before: After: |
|
quote |
Senior Member
Join Date: Nov 2004
|
Quote:
Quote:
Quote:
Quote:
Quote:
This next example isn't particularly correct because HD's don't work this way, but maybe the example will work for you. Think of inactive memory as being like hard drive blocks from deleted files. The directory entry for the file is deleted, but the info is still on the HD. And if the filesystem was smart enough to keep track of all the deleted file sectors you could do Time Machine like recoveries without even hitting the Time Machine drive -- just replace the appropriate directory entry and your file reappears like magic -- all as long as those leftovers had not been claimed to provide space for some new file. There is no appreciable space or performance penalty if the system keeps the appropriate info continuously along on special files called maps, except for the little bit of RAM each map page needs. And if it is actually the case that this happens a lot with certain types of files, it can be a huge win performance-wise. As I said that isn't quite right because HD's really don't do that, but it is just an example. To illustrate it for real, restart (not just logout, that will still leave Mail.app code as inactive) and time how long Mail takes to start up. Now quit mail and immediately re-launch it. For me it is a difference of only needing 1-2 seconds instead of about 15-20 seconds on startup & login. That is because as soon as you quit Mail it went into inactive memory, not straight to the free list. Kick may point out the cache is warm too, but that only helps a little because we need to re-enable the maps before those cache lines can become valid again, and the significant time is in getting the app into memory, not from memory to the CPU. |
|||||
quote |
Posting Rules | Navigation |
|
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SD memory | Dovek916 | Purchasing Advice | 8 | 2007-05-28 08:50 |
Memory for Mac Pro | brutox | Third-Party Products | 11 | 2006-09-07 22:27 |
G5 Memory | Kusakun | Apple Products | 3 | 2006-07-03 16:01 |
Where did my memory go?! | bb823 | Genius Bar | 2 | 2005-07-21 04:54 |
G5 Memory | kmanz | Purchasing Advice | 12 | 2005-03-30 10:16 |