again : SWAP-files

arri

Registered
the swap-files keep filling-up my harddisk,
and i know i need more physical ram (it's 512mb now),
but why are there still these 6 swapfiles around that have a modification-date of 3 (or sometimes more) days ago (sizes from 64mb to 512Mb), occupying around 1.5 Gb (or more)?
can't the os just delete them when they're obsolete?
or should i do that myself? (or use some utility for that)

am i wrong when i think that osx is wasting diskspace a little bit?
will tiger do a better job here?

arri
 
restart - will remove those pesky swapfiles!

You can use a utility like Xupport to delete swap files without re-starting. Some say it's risky to delete swap files on a running system, but I don't know.
 
yes. ofcourse a restart will do.
but aren't all these mac-(+other unix) users so proud of uptimes exceeding weeks or even months?
i mean, my laptop is running for a couple of days now, and the only reason for a restart is this stupid virtual-memory thing.
with huge HD or 1 Gig of ram it would probably be a bit less, still i wonder if this isn't just bad engineering..
because what are these old obsolete (?) swapfile doing there?
they're not used for the past 3 days, so why not just delete them?
they use-up the amount of space that the whole pack of adobe-apps would (photoshop,illustrator,indesign,after-effects ... + helpfiles..)

...or maybe i don't understand how osx/unix-memory stuff works.
if so please explain

thanks
 
I'm not 100-percent sure, but I would imagine that OSX gives other files permission to write over HDD space currently filled with SWAP data, meaning regardless how much HDD space it occupies, it's not going to prevent you from using that disk?
 
i don't know if that's true,
but in crisis-times the os sometimes warns me that the boot volume is almost full, and the whole machines just hangs for some time..
this only is solved by a restart. even quiting all apps doesn't free-up the space anymore
 
Many people recommend having a lot of free space available on the OS X boot partition, from 3GB to 5GB minimum free space. Some articles I have read use a figure of 25% free space, but that is maybe a little excessive when drives may be 80 GB or higher, even in laptops.
Modern OSs need plenty of RAM to operate, but computer makers are not always known for providing enough standard RAM for all potential uses (why would they?)
You have 512 MB of installed memory, and are running apps known for their need for lots of RAM. Your system will run more smoothly with more memory and sufficient drive free space. There are many here that will echo my 2 cents. You may suggest that Apple already provides you with enough standard memory to run any and all apps you wish to use, just remember that adding more memory is not a cure-all, but is certainly a cure-many! You can purchase a custom configuration for a new PowerBook from Apple with 2 GB of installed RAM. Who would ever need that much? :)
 
texanpenguin said:
I'm not 100-percent sure, but I would imagine that OSX gives other files permission to write over HDD space currently filled with SWAP data, meaning regardless how much HDD space it occupies, it's not going to prevent you from using that disk?
In OS X, a file is a file is a file, or it may be a folder -- but that is another story. Like any other file, Swapfiles are registered in the volume directory and data blocks used by a swapfile are inviolate. In other words, your imagination is 100% wrong.

arri said:
but aren't all these mac-(+other unix) users so proud of uptimes exceeding weeks or even months?
Swapfiles can be reused so just because at one time you were editing a 2 GB file in Photoshop, a 600 page Word document, and 100 Page InDesign document all at the same time, and the system had to create 3 GB of swapfile space to accommodate all that doesn't mean that an additional swapfiles will be created the next time you are doing some that takes a lot of swapfile space. The system will simply reuse the swapfiles that are already there. And yes it might be a nice feature if OS X would "recover" the swapfile space after some interval. By-the-way, I am one of those users you are talking about.

DeltaMac said:
Some say it's risky to delete swap files on a running system, but I don't know.
Look at it this way, if the swapfile is currently being used when you delete it you will, at the very least, lose the data you were working with and at the other extreme could crash the entire system. On the other hand, OS X will not permit any currently open file to be deleted so either eventuality is highly unlikely.

arri said:
in crisis-times the os sometimes warns me that the boot volume is almost full, and the whole machines just hangs for some time..
The rule of thumb, based on extensive independent testing, for HFS+ [a.k.a Mac OS (Extended)] volumes is they should never fall below 15% free space, regardless of how big or how little the drive is. When you fall below that rule of thumb there is a substantial risk of an irreparable "Overlapped Extents Allocation" error that not even DiskWarrior or TechTool Pro can fix. That is a function of how the HFS+ file system works and is independent of the operating system or applications. The risk is increased by the number of temporary cache, swap, and other temporary files used by OS X and OS X applications as well as OS X's tendency to fragment a drive.

arri said:
will tiger do a better job here?
We will find out, probably sometime in the late October or November time frame. Certainly Panther has made major improvements in virtual memory management and efficiency over Jaguar.
 
You shouldn't have that many swap files. You probably have a program with a memory leak, that is taking up way too much RAM without releasing it. I have 896MB of RAM and only have 2 64MB swap files. There shouldn't be any reason to have 1.5GB of swap files unless you really are opening multi-GB files.
 
Back
Top