[X4U] What is private>var>vm>swapfile?

B. Kuestner kuestner at macnews.de
Thu Dec 6 05:07:22 PST 2007


Just a few comments on Neil's helpful reply.

> They're virtual memory files. All unix based operating systems use  
> them and they get created when needed; with more being created over  
> time.

You can reduce their size by adding more RAM to your Mac.

You can also reduce their size by avoiding memory intensive workload  
scenarios:
- Lots of apps open, especially when some of them are memory hogs,  
see next line
- Avoid memory hogs: Safari with lots of tabs, Photoshop etc. with  
lots of images, ...
- Fast user switching

> When you reboot the old ones get deleted.

Up to Tiger OS X keeps at least some of them across restarts once  
they have been created.

Leopard has changed the way VM is handled: They are not more flexible  
in size and can also shrink and not just grow.

You can use tools like Onyx to delete them. A restart immediately  
after deleting the files is mandatory.

To save disk space:

I find DiskInventory's graphic representation more helpful than  
WhatSize.

Most Macs also ship with Garageband installed: It requires lots of  
disk space not just in the app itself but the sample files and in / 
Library it drops lots of audio files.

Monolingual is helpful, but I have heard that some apps from Adobe  
will not work afterwards. Here's another change with Leopard: Apps  
can be "signed" and will not run if they were tampered with. So for  
instance removing the unneeded language files falls in the  
"tampering" category, so that Leopard's Mail will not start afterwards.

> There will also be a sleepimage file in the same folder . . . it  
> gets created whenever the machine goes to sleep and is the same  
> size as however much installed RAM you have.

This depends on your Mac. My iBook does not support the "hibernate"  
mode. So it does not create this file.

Björn



More information about the X4U mailing list