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

eyoungren

macrumors Penryn
Original poster
Aug 31, 2011
28,775
26,843
I don't know if anyone would be interested in this, but I'll post it anyway. Below is an Applescript that I use to recover RAM when my PowerBook has tied up most of it (based on iStat Menus). Open Script Editor, copy the text below, paste into Script Editor and then replace X with your username (the short name) and Y with your password. Save as an Application. You can put this anywhere and then run it when you need to by double-clicking on it.

do shell script "purge" user name "X" password "Y" with administrator privileges

One caveat. You need to have the Developer Tools installed or this won't work.

You can also just enter the purge command in to Terminal if you'd rather do that. But again, the Developer Tools have to be installed. The purge command issues cleanup instructions for RAM to the Mac which is why you can use it to recover RAM.

I've modded this a bit by using Fastscripts to create a keyboard shortcut for it. I then ran the app I had made through Dock Dodger which is a PowerPC app that can make apps run without showing their icons in the Dock. That has the effect of making the script run without the spinner being seen and the script being shown in the dock. So effectively what this does is make it run silently and invisibly whenever I use the keyboard shortcut for it.

P.S. I know there are other ways to do a shell script as an admin without having to put in your username and password, but as it is I don't have a problem with it for myself.
 

benwiggy

macrumors 68020
Jun 15, 2012
2,382
199
Can't believe how many posts there are on this forum about trying to "recover" Ram.
This is not something you generally need to do. Even on older, PowerPC Macs with less RAM.
OS X is designed to manage your memory effectively. It uses as much RAM as it needs, and as much as it can get.

Unless you've got some badly written app that has a memory leak, you don't need to do this.

Purging RAM seems to be the new "Repairing Permissions".
 

skateny

macrumors 6502
Jul 19, 2012
448
0
New York, NY
Can't believe how many posts there are on this forum about trying to "recover" Ram.
This is not something you generally need to do. Even on older, PowerPC Macs with less RAM.
OS X is designed to manage your memory effectively. It uses as much RAM as it needs, and as much as it can get.

Unless you've got some badly written app that has a memory leak, you don't need to do this.

Purging RAM seems to be the new "Repairing Permissions".

Me too. Never heard of this as a problem with PowerPCs.

On a personal note, unless you absolutely cannot afford it (and RAM prices for these rigs are generally extremely low), I don't know why PowerPC users don't max out RAM on their rigs.

Never had a problem with losing, misallocating or recovering RAM.
 

eyoungren

macrumors Penryn
Original poster
Aug 31, 2011
28,775
26,843
I agree with both of you. However, my 1GHZ 17" PowerBook has a failed external cache. It has 2GB of ram (the max). But whenever running T4Fx or Aurora I can watch the amount of ram use steadily increase over time. I am often on the Internet with this PB for several hours. If I let it go and don't do anything the amount of ram used can go over 1.6gb. I've even had the PB freeze on me because of this. In the meantime the browser has slowed to a crawl. And any ram recovered by the OS is minimal and does not reduce the total used over time.

Sure I can restart the browser but I end up doing that several times a day and logging back into everything is a pain. It's easier and faster for me to just use this.

I offered it as something that may be useful. I know what you guys are saying in regards to ram, but this helps on this Mac.

Incidentally, this isn't an issue on my other PB so there is no need. Ram recovery by the OS works just fine there.
 

skateny

macrumors 6502
Jul 19, 2012
448
0
New York, NY
I agree with both of you. However, my 1GHZ 17" PowerBook has a failed external cache. It has 2GB of ram (the max). But whenever running T4Fx or Aurora I can watch the amount of ram use steadily increase over time. I am often on the Internet with this PB for several hours. If I let it go and don't do anything the amount of ram used can go over 1.6gb. I've even had the PB freeze on me because of this. In the meantime the browser has slowed to a crawl. And any ram recovered by the OS is minimal and does not reduce the total used over time.

Sure I can restart the browser but I end up doing that several times a day and logging back into everything is a pain. It's easier and faster for me to just use this.

I offered it as something that may be useful. I know what you guys are saying in regards to ram, but this helps on this Mac.

Incidentally, this isn't an issue on my other PB so there is no need. Ram recovery by the OS works just fine there.

Well, that clears things up.

Without this information, I was tempted to look for a problem I didn't have.:)
 

eyoungren

macrumors Penryn
Original poster
Aug 31, 2011
28,775
26,843
Well, that clears things up.

Without this information, I was tempted to look for a problem I didn't have.:)
I suppose I should have qualified everything when I initially posted this by stating that my Mac has a cache issue. I wasn't meaning to imply a solution to a non-problem or a "solution" to something that is normally handled efficiently by the OS.

But if this helps me, it may help someone else. That's why I posted it.
 

skateny

macrumors 6502
Jul 19, 2012
448
0
New York, NY
I suppose I should have qualified everything when I initially posted this by stating that my Mac has a cache issue. I wasn't meaning to imply a solution to a non-problem or a "solution" to something that is normally handled efficiently by the OS.

But if this helps me, it may help someone else. That's why I posted it.

Yeah, I get that.

Your posts have been very helpful for me.
 

justperry

macrumors G5
Aug 10, 2007
12,557
9,750
I'm a rolling stone.
I agree with both of you. However, my 1GHZ 17" PowerBook has a failed external cache. It has 2GB of ram (the max). But whenever running T4Fx or Aurora I can watch the amount of ram use steadily increase over time. I am often on the Internet with this PB for several hours. If I let it go and don't do anything the amount of ram used can go over 1.6gb. I've even had the PB freeze on me because of this. In the meantime the browser has slowed to a crawl. And any ram recovered by the OS is minimal and does not reduce the total used over time.

Sure I can restart the browser but I end up doing that several times a day and logging back into everything is a pain. It's easier and faster for me to just use this.

I offered it as something that may be useful. I know what you guys are saying in regards to ram, but this helps on this Mac.

Incidentally, this isn't an issue on my other PB so there is no need. Ram recovery by the OS works just fine there.

And I kindly disagree with the above 2 posters, OS X earlier VM was not that good, if you switch it of you'll see the system will be quite a bit faster.
I only have 1 GB of memory due to a bad memory slot and as soon as my VM gets more than 2 GB Safari gets slooooow, if I quit it I can still see several Pagefiles and they won't get purged, reason is that it is fragmented and the system is unable to recover that memory, party but not completely.
One of these posters said, get more memory but most where limited at 2 GB or less.

What problem did you have with cache?
 

eyoungren

macrumors Penryn
Original poster
Aug 31, 2011
28,775
26,843
What problem did you have with cache?
Unknown. Specifically, anyway.

If you open System Profiler after the Mac has booted and click on the Diagnostics section it says the time that diags were performed (startup) and it then says "External Cache: Failed". From what I can gather it's to do with the L2 memory caching. It's a logicboard issue and replacing the logicboard is the only solution. I suppose a chip somewhere could be replaced (maybe) but I'd have to find it, get another chip and then use skills I don't have to replace it.

Everything I have looked up about it (which isn't much) suggests that the Mac will function, just slower until the logiboard fails. Which is true. It's had this problem since I bought it three years ago. It's a 2003 model. But the Mac is still going strong. I just have to work around issues like recovering ram.

I have tried disabling virtual memory in the past. But that seemed to just put some sort of increased load on the machine.
 

justperry

macrumors G5
Aug 10, 2007
12,557
9,750
I'm a rolling stone.
Unknown. Specifically, anyway.

If you open System Profiler after the Mac has booted and click on the Diagnostics section it says the time that diags were performed (startup) and it then says "External Cache: Failed". From what I can gather it's to do with the L2 memory caching. It's a logicboard issue and replacing the logicboard is the only solution. I suppose a chip somewhere could be replaced (maybe) but I'd have to find it, get another chip and then use skills I don't have to replace it.

Everything I have looked up about it (which isn't much) suggests that the Mac will function, just slower until the logiboard fails. Which is true. It's had this problem since I bought it three years ago. It's a 2003 model. But the Mac is still going strong. I just have to work around issues like recovering ram.

I have tried disabling virtual memory in the past. But that seemed to just put some sort of increased load on the machine.

Your "lucky", I had my cache failed on a Pismo, had some issues for a couple of days, died soon thereafter, hopefully yours lives for quite a bit longer.

As I said before, my powerbook has only 1 GB, turned VM of and it "flies" but 1 GB isn't enough for long and it will crash if it runs out of memory.

Purge does not work if safari is still open on mine, it's a pain to reload on a limited internet connection.

I have iMemory installed, not free but I have Little Snitch block it's access and works better than purge.
 

eyoungren

macrumors Penryn
Original poster
Aug 31, 2011
28,775
26,843
Hmmm. I've not tried it with Safari open, but I don't use Safari normally, just T4FX or Aurora. I agree that having to reload is a major pain.

I might try disabling the VM again and see what happens.

As to being "lucky," yeah. I have been. This Mac was sold to me without case screws and an LCD issue. The seller advertised it as "on it's last legs." I've been very fortunate. It's a great Mac though. I've replaced the LCD, the sound card, the DC-Inboard (a few times) and some other minor stuff. But it's still gone strong. I sent pictures of it to the seller once. Never got a reply email. :rolleyes:
 

skateny

macrumors 6502
Jul 19, 2012
448
0
New York, NY
And I kindly disagree with the above 2 posters, OS X earlier VM was not that good, if you switch it of you'll see the system will be quite a bit faster.
I only have 1 GB of memory due to a bad memory slot and as soon as my VM gets more than 2 GB Safari gets slooooow, if I quit it I can still see several Pagefiles and they won't get purged, reason is that it is fragmented and the system is unable to recover that memory, party but not completely.
One of these posters said, get more memory but most where limited at 2 GB or less.

What problem did you have with cache?

You're welcome to disagree, but I've simply never had memory problems, VM or otherwise.

I stopped using Safari years ago, since it has (for me) always been very slow, and it's just a drag on PowerPCs.
 

justperry

macrumors G5
Aug 10, 2007
12,557
9,750
I'm a rolling stone.
You're welcome to disagree, but I've simply never had memory problems, VM or otherwise.

I stopped using Safari years ago, since it has (for me) always been very slow, and it's just a drag on PowerPCs.

I agree it's slow but I find it still better than the other's.

The problem I have is I am limited to 1 GB due to Apple's stupidity, a firmware would probably have solved the lower memory slot "failure" but they just ignored it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.