Big SWAP File, everything slow

Hi. Im having trouble with my PowerBook G4 (1,67 GHz, 1GB RAM). Since i installed Leopard the System is slow after a while (a few hours). Before 10.5 i used Panther with the exactly same Apps; Mail, Safari, iTunes. Ok Leopard comes with newer Versions of them. I found out that 10.5 is swapping much more than 10.3.9 does. But the "active" RAM isn't near 900MB, it is usualy 500-600MB. So why is 10.5 swaping so much, at this moment 1,15GB ! For what?

I think one of the Apps have an Memory Problem. But how can i check this? I opened Activity Monitor, list all Processes and sort by "RSIZE" and "VSIZE". *What does R/V SIZE mean and are my Values ok?*
VSIZE http://img255.imageshack.us/img255/9679/vsizebr9.png
RSIZE http://img393.imageshack.us/img393/2243/rsizens4.png



I searched Apples Site and found this ...

_*Inactive memory*_
This information is no longer being used and has been cached to disk, but it will remain in RAM until another application needs the space. Leaving this information in RAM is to your advantage if you (or a client of your computer) come back to it later.

http://docs.info.apple.com/article.html?artnum=107918

Thats maybe the problem. The System swaps inactive Data from RAM to Disc but doesent stop with that. This slows everything down when i open an App or switsch to other opend Apps. Never had this Problem with Panther and don't wont to stay with it. 😟

17" PowerBook G4, 1,67 GHz, 1GB RAM, Mac OS X (10.5.2)

Posted on Mar 16, 2008 8:56 AM

Reply
26 replies

Mar 16, 2008 9:09 AM in response to Tohu

Your problem is simply not enough RAM. Not only do Leopard apps use more memory but Leopard itself requires 512 MBs versus 256 MBs for Tiger and 128 MBs for Panther. Get more RAM.

Now, as for your swap file how do you know it's "big?" Where did your 1.15 GB figure come from? The actual disk-based swap file starts as 64 MBs and increases in multiples of that figure, so you really can't have a swap file that's 1.15 GBs in size.

Here's some reading material on memory management. It may help you understand better what's going on.

About OS X Memory Management and Usage

Reading system memory usage in Activity Monitor
Memory Management in Mac OS X
Performance Guidelines- Memory Management in Mac OS X
A detailed look at memory usage in OS X

Understanding top output in the Terminal

The amount of available RAM for applications is the sum of Free RAM and Inactive RAM. This will change as applications are opened and closed or change from active to inactive status. The Swap figure represents an estimate of the total amount of swap space required for VM if used, but does not necessarily indicate the actual size of the existing swap file. If you are really in need of more RAM that would be indicated by how frequently the system uses VM. If you open the Terminal and run the top command at the prompt you will find information reported on Pageins () and Pageouts (). Pageouts () is the important figure. If the value in the parentheses is 0 (zero) then OS X is not making instantaneous use of VM which means you have adequate physical RAM for the system with the applications you have loaded. If the figure in parentheses is running positive and your hard drive is constantly being used (thrashing) then you need more physical RAM.

Mar 17, 2008 11:04 AM in response to Tohu

I have a smilar problem, however my swap file is too small and my programs require only about 500-600Mb. I checked out /private/var/vm/swapfile0 and it was only 54Mb. I need more. My swap file, I think, should be at least a few gigs. I remember adjusting it once with mac os 9 when the system was first out. This was back in the day when mac os 9 and os x were on the same hard drive and you could just switch the startup os. I wonder if changing the swap file size in the os 9 control panel had anything to do with it. Let me know what you find out.

Thanks,

Abram Hollon

Mar 17, 2008 12:13 PM in response to abramhollon

I think you need to read the information linked in my other post, too.

First, your swap file starts at 64 MBs, not 54 MBs. Second, it's never too small because it grows as needed. Third, it has nothing to do with the OS 9 VM file as memory management in OS X is completely different as is the operating system (OS 9 does not truly multi-task in the same way as OS X.)

I'm afraid you simply don't understand how this all works either in OS 9 or OS X. So read the material I provided in my earlier post.

Mar 17, 2008 12:32 PM in response to Kappy

*+... your swap file how do you know it's "big?" Where did your 1.15 GB figure come from?+*
You can see it in Activity Monitor. I know that there is not one File with 1,15GB, i opined the size of the whole swap space. 😉

+*Not only do Leopard apps use more memory but Leopard itself requires 512 MBs versus 256 MBs for Tiger and 128 MBs for Panther.*+
That is the information i supposable need. If so, i will (must) buy more RAM. But i never read before that 10.5 needs more RAM. Is there an official Information from Apple? Why does the new system needs so much more RAM? Is it so hungry? 😉

Apple says Macs needs 512 MB memory to run Leopard. How should i understand that? You say the system needs 512MB but if i would just have 512 installed it would be not possible to open one App. I know, Leopard don't needs 512 all the time for itself. That is why i think one App has got an memory lack.

Ok then, i will test this out. I buy additional 1 GB and will see if 2GB stop this heavy use of SWAP Space. Hope so.

Mar 17, 2008 12:53 PM in response to Tohu

The figure you see in Activity Monitor has nothing to do with the size of the swap file.

Memory specifications for Leopard are clearly noted in System Requirements posted on Apple's website. Leopard simply requires more RAM because it has a larger memory footprint than Tiger.

You need to read the information I provided you. Your questions still indicate you do not understand how memory management works in OS X nor how to properly understand the information found in Activity Monitor.

Mar 17, 2008 1:07 PM in response to Kappy

... your swap file how do you know it's "big?" Where did your 1.15 GB figure come from?


+You can see it in Activity Monitor. I know that there is not one File with 1,15GB, i opined the size of the whole swap space.+

So he did see that he has multiple swap files (64, 64, 128... n) total 1.15GB.

Tiger is 64-bit and allocates a virtual address space that is huge, 46GB on mine, but I never see any pageouts normally. And pageouts is more indicative of using swap files.

Anyone remember when OS 9 requirement went like this:

32MB of physical memory with VM set to 40MB? and that was just to install. Most users found that OS 9 was taking up 50MB of RAM. If you wanted to actually run an application or two, you needed 96 or 128MB at the least. And VM was poorly 'tuned' up until 9.1. 256MB was a more reasonable amount, too.

Slow hard drive; drive filled to 60% or more; contribute to how sluggish it feels. Also, a single cpu vs dual cpu. Maxing the RAM is a good first step. What other services and background tasks and startupitems also affect performance. Firefox 3.0 (Minefield) has a good small footprint and quick, and you can disable the disk cache in your browsers, but browsers like to hold content in memory to improve performance.

I thought my SE/30 would last forever, until I found that it had "dirty" 32-bit ROM and would be unlikely to be able to afford 8 x 4MB DIMMs, let alone even higher density.

Dual and quad-core mobile systems are slated for 3rd quarter by Intel, which should bring near desktop to many.

Mar 17, 2008 1:27 PM in response to The hatter

Well, I don't see any indication of swap file size in my Activity Monitor. All I see is an listing of VM size. That does not indicate the size of the swap file nor the amount of the swap file that is in use.

The main problems with Mac OS was that it did not use preemptive multi-tasking and required that all applications load into a single contiguous address space in memory. If you did not have a lot of installed RAM then you might only be able to run one application without hitting VM. I used to use Mac OS at the same time I was also using an Amiga. Amiga OS was so much better!

Mar 18, 2008 5:19 AM in response to Kappy

{quote:title=Kappy wrote:}I don't see any indication of swap file size in my Activity Monitor. All I see is an listing of VM size.{quote}
That is not my error but Apples. I use the system with german language and in activity monitor you can find the information "used swap".
*Activity Monitor*
Englisch: http://img370.imageshack.us/img370/7984/picture1ya6.png
German: http://img291.imageshack.us/img291/9101/aktivittsanzeigebk1.jpg

This seems to be an additional Information that is not displayed when you use the system in english.

Mar 18, 2008 6:04 AM in response to Tohu

To see swap file size, I use the Finder's "Go to Folder"

/var/vm

However, according to your screen shot
http://img370.imageshack.us/img370/7984/picture1ya6.png

It shows pageouts as zero, which means even if you do have swap files, it isn't paging now. Swap files are rebuilt on restart and should be down to just one 64MB file.

It isn't safe to delete swap files normally, but you could do a SAFE Boot, use a tool or manually remove all but swap file0, and then restart. I think Onyx and Leopard Cache Cleaner will also 'clean out' swap files and force a restart.

Mar 18, 2008 7:17 AM in response to The hatter

The SWAP Space on my System will go to Zero if i perform an restart, so there is no need to delete anything nor install some tools. 😉

And you got me wrong. The screenshot with english Activity Monitor isn't mine, the german one is. Here is my memory status from this morning. I switshed Language so you all can see and read about the used "SWAP" and "Page Out". Remember, i restartet this morning so that is why the swap space is "only" 462MB. But this is even too much for a few minutes working with Safari, Mail, iTunes, Finder when 1GB is installed.

http://img291.imageshack.us/img291/9236/activitymonitorenlp8.png


I have now 2 GB installed and will let you know if that helps.

Mar 18, 2008 7:52 AM in response to Tohu

You have me - I have never seen that in Activity Monitor - and I generally keep it open too.

On Intel Macs, when they use PPC applications, they run under Rosetta's emulation and even small programs that would take 10MB can take up to 130MB, but I don't know what is eating up all that memory and swpping to disk.

Maybe Safari 3.1 is better behaved (just released). When I open 50 web pages in tabs, it eats up 500MB on its own, real memory.

Stumped 😟

Mar 18, 2008 8:04 AM in response to Tohu

You still don't understand that whatever you are looking at in Activity Monitor it isn't your swap file. The swap file is never zero. At startup it defaults to 64 MBs. What you see in Activity Monitor is information on the VM space reserved by each running application in the event that it needs virtual memory.

Mar 18, 2008 9:33 AM in response to Kappy

{quote:title=Kappy wrote:}The swap file is never zero. At startup it defaults to 64 MBs.{quote}
Hi Kappy. I know that there is always one 64MB File but im talking about the SWAP SPACE that is in use.

Would you please take a quick look at this screenshot.
http://img291.imageshack.us/img291/9236/activitymonitorenlp8.png

You can read "SWAP Used" and "Page outs" and there are some Numbers behind it. If this aren't the Values of the Data cached from RAM to Harddrive then whatfor are they?

Mar 18, 2008 10:05 AM in response to Tohu

As I've tried to explain VM size simply refers to the system's potential allocation of virtual memory not to how much space is used by the swap file. Pageouts and Pageins by themselves are relatively meaningless in that they only indicate a total of such activities. It does not represent an instantaneous level nor the actual amount of swap space in use on the hard drive. If you will read the links I provided they will explain the meaning of PageIn and Pageout information as reported by top.

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.

Big SWAP File, everything slow

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