Memory Allocation problems

I've noticed this problem on a number of Macs that I've used and checked out. It's a major memory allocation problem that's been hampering quite literally any computer with Tiger installed.

Over the time you use the computer, it gradually becomes slower and slower, and it seems as if Mac OS is using virtual memory. Checking in Activity Monitor, the RAM use is almost 100%, leaving possibly only an extreme minimum quantity of ram free (10 or so MB). In my case, i've seen this on computers with ram ranging from 256MB to over 1.5GB. Having only a few programs running the use of the RAM at those levels is impossible.

There is a way around this though, but it's not permanent. I've run Disk utility and chose "Repair Permissions" in the screen. Once it starts (ie when the meter starts to fill up), the ram is literally instantly freed to levels that are much more acceptable (at times 50% to 70%+ is freed instantly, indipendant of RAM quantity).

I've noticed in these forums people complaining on similar problems of computers slowing down and higer virtual memory use. With this work around of using Disk Utility one can possibly get around those problems. But like i'm saying, it seems to be a MUCH larger problem relating to Tiger's memory allocation and the apparant inability to free up memory used by applications that have been closed.

Posted on Sep 17, 2005 5:38 AM

Reply
8 replies

Sep 17, 2005 10:32 AM in response to Daniel Lagos

You need to do a little reading:

http://www.macosxhints.com/article.php?story=20010613140025184

http://developer.apple.com/documentation/Performance/Conceptual/ManagingMemory/i ndex.html

http://developer.apple.com/documentation/Performance/Conceptual/ManagingMemory/A rticles/AboutMemory.html

In fact the "free" memory figure you see only refers to RAM that has not been used. "Inactive" memory is RAM that has been used but is no longer in use and is available for other applications. The total amount of "available" memory is the sum of inactive and free. You know you are running out of memory and relying entirely on VM when you start to see positive instantaneous pagout figures when you run the command "top" from the Terminal. If you see a positive Pageout number in parentheses, then you have a RAM shortage problem.

Your system can become slower over time for a number of other reasons, but first you have to specify what the measure of "slower" is. If you are talking about Safari getting slower, this has nothing to do with VM and everything to do with Safari itself. If you are talking about overall system slowdown it may be because you don't leave your computer on 24/7 and the Unix maintenance scripts are not running. Hence your temp, log, and cache files are getting too large. Install the shareware utility Macaroni to resolve this problem.

Other possible problems can arise from virus software that is incompatible with Tiger and hogs CPU time. Immediately after installing Tiger Spotlight begins to index your hard drives. This could take hours during which time the computer will be sluggish. If you open the Activity Monitor and click on the CPU tab, you can observe whether any particular process is hogging the CPU.

Most complaints about RAM or memory related slowdowns come from users who do not know a thing about memory management in OS X. Repairing permissions is not a memory management solution or maintenance routine.

Sep 17, 2005 10:59 AM in response to Kappy

I totally agree with Kappy. I'll only add that my interpretation of "free" memory on a healthy system is to take the total physical RAM installed on your system (1.5 GB for the top post) and subtract the amount of "wired" memory from this. The result is the amount of physical RAM available to any application, instantaneously.

Activity Monitor will show you the amount of "wired" RAM used. Its usually minimal.

Now, is that physical memory in use before an application requests it? You bet.

RAM that is not in use is a total waste of resources.

The fact that Repairing Permissions frees up memory indicates that your system is not healthy, for some reason or another.

Sep 17, 2005 4:42 PM in response to Kappy

The problem is that the system lists the ram under "Inactive" and does not release it to other applications. The ram is absoluetely unusable at that point. This forces the applications to start relying completely on virtual memory. The weird thing is that it I really don't have anything special installed that would provoke this, and i've replicated this on a number of systems, some with a clean installation and full updates. As for unix cleaning, I do it manually myself, and it does not clear the Ram (weekly does it actually, but it clears it before it actually starts to do it's stuff, it seems that just loading it does the trick at times).

As you said that repairing permissions is not a memory management solution, I know that, but it's weird that all it has to do is just start repairing permissions (doesn't even have to repair anything) and the ram becomes available to use again. You don't even have to complete the repair permissions process to have this effect. like I said, just LAUNCHING it does the trick.

Sep 18, 2005 12:03 AM in response to Daniel Lagos

I'm curious what the basis is for you assumption that the memory tagged as inactive is not available for other applications to use. If applications were reliying solely on VM you would start to hear a lot of drive thrashing and note a dramatic slowdown in application behavior.

I can launch Disk Utility an run Repair Permissions and note no significant change in anything in top other than the additional overhead of running DU. The amount of inactive RAM before and after is just about the same.

Sep 18, 2005 2:34 AM in response to Kappy

Well, there isn't an initial slow down with virtual memory, but as i'm using it and virtual memory is used more and more, it starts to slow down at that point (not immediately). It's quite weird this effect that frees up the inactive memory only when just activating "repair permissions". Usually I should have about 2/3 of my memory completely green on Activity Monitor, but at time quite literally I end up with 1GB of inactive memory and only 10 MB of free ram.

I'm currently at a small Mac user meeting so we have a number of machines active here (from various G5's to G4 machines), so i'll be checking the other computers here to see if the same thing happens to them. Most of them are straight out of the box so I should be able to tell what maybe is causing this (if it's actually a problem in the OS, or if it's a problem with some application entering in conflict.

Sep 18, 2005 5:11 AM in response to Daniel Lagos

The reason pages free up when running Disk Utility is simple; enough memory is required to run the utility that inactive pages have their contents swapped out through normal pager activity, resulting in them being added to the free list.

As mentioned above, you can read more about Apple's memory management here; to quote it in brief:
When the number of pages on the free list falls below a threshold (determined by the size of physical memory), the pager attempts to balance the queues. It does this by pulling pages from the inactive list. If a page has been accessed recently, it is reactivated and placed on the end of the active list. If an inactive page contains data that has not been written to the backing store recently, its contents must be paged out to disk before it can be placed on the free list. If an inactive page has not been modified and is not permanently resident (wired), it is stolen (any current virtual mappings to it are destroyed) and added to the free list. Once the free list size exceeds the target threshold, the pager rests.

Sep 18, 2005 8:33 AM in response to Daniel Lagos

Have a look at this knowledge base article:
http://docs.info.apple.com/article.html?artnum=107918

Here's the last paragraph:
"What does all this mean?
This means you shouldn't worry when the Free memory is low. The only time Free memory should be high is right after the computer starts up. As you use applications or services, memory is used and transitions to Inactive. Applications that need more memory will take from the Inactive, but the Inactive is there just in case you need it again. If the combination of Free and Inactive is very low, then you might need more memory." (emphasis added)

HTH!

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Memory Allocation problems

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.