Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
I'd suggest deleting the swap files but I don't know how safe that is. In theory it should just recreate them but it might bork. I'd wait and get a second opinion from some other members here.

EDIT: Not particularly helpful but remember that the system creates a sleepimage file which is equal to the amount of RAM you have + ~200MB or so, so subtract that from the size of your VM folder.
 
Rebooting deletes the swap files, so no need to attempt this manually (I sure wouldn't). Even logging out gets rid of most of them.

This number of swap files is very abnormal. I would certainly want to find the cause.
 
Do you have any PowerPC apps running? That would eat up RAM like mad. That's a strange issue, though. My Mini, which is only a 1.83 C2D with 3 GB of RAM performs just fine, I barely dive into the 2 GB region with 4 or 5 apps open at once. Try running the Hardware Test CD that came with your machine, or Disk Utility. Maybe your HDD became fragmented, causing more resources to be used to gather information.
 
Do you have any PowerPC apps running? That would eat up RAM like mad.

Not like that they don't. Leastwise, I have never seen anything like this, even remotely. I also don't see how disk fragmentation could have anything to do with it. First off, OSX defragments automatically. Secondly, swap files are supposed to be created when physical RAM is exceeded.

We need to know what applications are running when this happens. This should be very easy to determine -- simply leave the vm folder open in the Finder and watch.
 
Not like that they don't. Leastwise, I have never seen anything like this, even remotely. I also don't see how disk fragmentation could have anything to do with it. First off, OSX defragments automatically. Secondly, swap files are supposed to be created when physical RAM is exceeded.

OS X does not defragment free space; the VM requires each swapfile to be in one piece. Free space fragmentation could cause 41 swap files that only add up to 5GB, or whatever it happens to be.

My guess is one of those apps (perhaps Dreamweaver?) likes to reserve a lot of memory. I'm sure with experimentation, poster can figure out the app causing it.
 
Why would free space need to be defragmented? By definition, fragmentation occurs with files.

Anyway, I agree, it should be fairly easy to determine which application(s) are running when this happens, but it might be far more difficult to determine why. The biggest RAM hogs I run don't produce even a tiny fraction the swap files he's seeing in a week, let alone in the course of an hour.
 
Hi

I'm baffled as to how much ram leopard uses, and how it uses it.

Yes, it's a complicated subject. Unless you've studied modern demand paged operating systems in detail and maybe even read some of the code you should be baffled. It's the same way with airplane jet engines. Unless you've studied them you'd be a bit baffled about how they work too.

The simple answer is that Leopard tries to put all of the RAM you give it to productive use. Give it more and it will find a way to put even more of it to use. You have to ask what is the purpose of RAM? Why would having more of it make a computer run faster? Seriously, Why? Having more RAM does not allow you to have more software, software lives on disk, code gets executed for L1 Cache, not from RAM. So what does RAM do?

Think of a computer as a multi-level cache system at the top level are the general purpose rgisters, then L1 and L2 cache followed by RAM and then the disk drive. The time required to access any given data item in an n-level cache system is
Code:
P(1)*S(1) + P(2)*S(2) +P(3)*S(3) +... P(n)*S(n)
Where P(m) is the probability of the item being present in cache level-m and S(m) is the speed of that level.

So if RAM is level 3. The more stuff you keep there the larger is P(3) Unused RAM holds nothing (by definition) and so does not contribute to overall system speed. So if the OS is doing it's job it should have found stuff to put in RAM and put it there. There is a lot more involved and if you are interested there are plenty of books on the subject and university course to take. How to keep those P(m) values high is a well studied subject but the simple answer is to fill RAM with "stuff" that is likely to be accessed.
 
My vote is for Gremlins ...

They are cute and cuddly until you feed them after midnight.
 
Not like that they don't. Leastwise, I have never seen anything like this, even remotely. I also don't see how disk fragmentation could have anything to do with it. First off, OSX defragments automatically. Secondly, swap files are supposed to be created when physical RAM is exceeded.

We need to know what applications are running when this happens. This should be very easy to determine -- simply leave the vm folder open in the Finder and watch.

Program I generally run:
Firefox and Safari as browsers;
iTunes;
Mail App;
Address Book and iCal;
Preview;
Text Edit;
MS Word and Excel (Office 2008);
Sibelius 5 and sometimes Finale 2009;
AOL;

I have a Canon Pixma MP830 printer.

As I mentioned, I have a brand new iMac G5, 2.66 Ghz, 4 Gigs of RAM, 750 GB hard drive) - and this swapfile/memory problem also happened with my older iMac G5 as well (2 Ghz, 2 gigs RAM, 500 GB hard drive).

Right now there are 42 Gigs of swapfiles in the vm folder. Oddly enough, this has not changed/increased since I posted here last night (9/08, 11:26 PM). The swapfiles do disappear when I reboot, of course.
 
My VM size is 43GB(as reported in Activity Monitor), and I only have 64MB of swap.

IF you sort the processes (make sure you are showing All Processes at the top) by VSIZE (aka Virtual Memory), doesn't one of them jump out at you as being a lot larger than the rest??

Strangely, if I add the Shared Memory or Private Memory column, my VM Size is shown to drop to 7.13GB. Is this a bug in Activity Monitor?
 
My VM size is 43GB(as reported in Activity Monitor), and I only have 64MB of swap.

IF you sort the processes (make sure you are showing All Processes at the top) by VSIZE (aka Virtual Memory), doesn't one of them jump out at you as being a lot larger than the rest??

Strangely, if I add the Shared Memory or Private Memory column, my VM Size is shown to drop to 7.13GB. Is this a bug in Activity Monitor?


Here -- I just did a screen capture on 9/10/08 at 1:28 AM PDT
 

Attachments

  • Activity Monitor-Picture 1.png
    Activity Monitor-Picture 1.png
    298.5 KB · Views: 99
Well, there is a little clue in the attachment you posted previously of your vm folder. The first swapfile was created at 7:21PM. The second was created at 8:05PM, and roughly every five minutes another one was created.

If you turned your computer on or rebooted at 7:21PM, then you started the culprit program at about 8:00PM. Reboot your computer, and then immediatley open the vm folder in Finder and keep it on screen. Wait for it to start adding files as you start opening one program at a time.

If that doesn't work, go to your Activity Monitor. Start quitting PowerPC processes (esp. AOL) and see if the Swap used drops, or files start vanishing from your vm folder. Then kill Microsoft Office apps. Kill TechToolProtection, veohd, those ButtonManager apps, Microsoft Database Daemon.

One of these programs has to be the problem, unless: The other possibility is that you have a bad device driver that is leaking memory. In that case, killing programs won't find it. I'm sure you know what hardware you've added to the system that also required driver software. Remove it, or re-install your OS and don't re-install the driver software from discs. Look for newer versions on the Internet.
 
As I mentioned, I have a brand new iMac G5, 2.66 Ghz, 4 Gigs of RAM, 750 GB hard drive) - and this swapfile/memory problem also happened with my older iMac G5 as well (2 Ghz, 2 gigs RAM, 500 GB hard drive).

You do mean a new Intel iMac, do you not? The iMac G5 hasn't been "new" for several years, and none ever ran at 2.66 Ghz.

Anyway, I still don't have the information I hoped to see. I'd like to know which applications you are running at the moment these swap files start multiplying like rabbits. This would require you to reboot, and leave your vm directory open while you launch applications. If you find one that causes swap file creation, reboot again and try a different application. I'm going to predict that it's not just one application doing the dirty deed.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.