|
|
10.3: Use Secure Empty Trash to reclaim hard disk space
I am also experiencing the slow loss of space. I tracked it down to virtual memory & swap files. It seems that Panther handles virtual memory differently than Jaguar and doesn't handle it very well. If you look in /private/var/vm/ you might notice multiple swap files.
10.3: Slightly easier (or more effective) way...
The easiest way I've found to delete the nasty swap files is to go into the terminal, su to root and type in "rm -rf /private/var/vm/*" (without the " obviously).
10.3: Slightly easier (or more effective) way...
Uhh, don't do that. Just don't do that. You're deleting the memory contents of currently running programs. Those vm files aren't just debris, they actively represent data your system is trying to keep track of. If you want to restrict the growth of VM usage, avoid running many programs simultaneously. If you can do so, try to keep a few GB of disc free so that swap consumption can grow naturally. Or if you want to spend some money, bulk up on RAM &/or get a bigger hard drive. Any of these will help with swap & disc space issues. The details of Panther handles virtual memory may be different from how it was done in Jaguar & earlier, but the general idea isn't any different from how it has always been: if you are trying to have the system keep track of more data than you have physical memory, it will start swapping data out to swap files. If you have a lot of ram, the ceiling is higher before you start having to swap. If you have a lot of free disc space, you have a more comfortable buffer before problems start coming up. But if you just start nuking swap files willy nilly, you're just begging for things to start going wrong. Please don't recommend that people do this, it's the wrong way to solve the problem. (Alternatively, it would be nice if Apple had a utility -- preferably an automatic one -- that tried to reduce the growth of the VM size. This may be something that can be figured out by examining the open source Darwin core, but I've never looked into it. I'd assume that they already do some things to manage VM, but maybe other tools would be useful. However, it is very safe to say that sudo rm /var/vm/* is not a responsible or productive way to go about this. ---
10.3: Slightly easier (or more effective) way...
Actually, this is probably NOT a problem, because, in unix, once a file is open, and it is being accessed, you really don't delete it or free it up until it is closed by the program using it. This is a common unix problem with trying to delete evergrowing log files. Even when you rm the file, you don't regain space until the programing using it closes it. Now I am assuming that a VM file would not be closed until the OS was done with it. Also the fact that the user who did this continued being able to work with no problems, adds some credence to the contents not really being lost.
Trashing swap can have deleterious effects.
I was trying out some utility which offered to trash swap. I incorrectly assumed that it would not trash something in use, and let it do so. But it trashed all the swapfiles anyway. The computer locked-up after a bit. The swapfiles should not be trashed by the user. Panther will give back swapfiles itself sometimes, however.
10.3: Use Secure Empty Trash to reclaim hard disk space
This is interesting. note the dates on the swap files:
10.3: Use Secure Empty Trash to reclaim hard disk space
I wonder what the heck is going on. Seems like I should be able to kill a 3 day old swap file. Depends, have you been running a program for three days? If so it may have "stuff" in there. Even if you havn't it might still be in use. The swap file may have been created three days ago when you were running Word, and then you started Excel two days ago and is put some more stuff in there, then you quit Word, and yesterday you started TextEdit and it used the same swap file, and then you quit Excel, but your three day old swap file still has parts in use by the TextEdit you just started recently... If it is like any other Unix system I have used though the free space in the swap file will get used for other stuff that needs to swap. Also removing the files won't normally do any harm (a secure delete of them might, but a normal rm or drag to trash and "empty trash" won't) because as others have said Unix doesn't actually delete stuff until the last "reference" to it goes away (it will delete the name from the filesystem, but the contents live on until no process has the file open...and there is some interaction with hard links you probbably don't want to know about).
Later swapfiles have earlier dates?
What I find most interesting about the swapfiles in the above post is that later swapfiles have earlier dates. Why is swapfile3 dated before any of the others (unless SOX had successfully deleted swapfile0, swapfile1, swapfile 2 ealier AND the swapfiles which were created thereafter started with swapfile0 again) and why swapfile2 is dated before swapfile0 and swapfile1 (unless that above happened and SOX had successfully deleted the new swapfile0 and swapfile1 again).
Later swapfiles have earlier dates?
Doh! I guess I can tell from your post that the new swapfile0 and swapfile1 were both 64 MB again! ...but, did you delete successfully those original swapfiles and get them replaced by a new swapfile0 and swapfile1, etc. or what is the explanation of the dates being out of order?
Later swapfiles have earlier dates?
I'm not sure how you perceive that the swapfiles listed in SOX's post are in reverse chronological order:
10.3: Use Secure Empty Trash to reclaim hard disk space
Panther will give back swapfiles. Particularly if you log out and back in immediately after some heavy usage. Logging out after some heavy usage (and after some swapfiles have recently been created) will quit as many processes as possible. Waiting a few moments and then logging back in will show that some swap has probably been released by the OS. Pather will give back some swap even without logging out, but the maximum swapspace will likely be returned if as much activity is killed as quickly as is reasonably possible after the swapfiles have been created. Try it!
Panther does give back swap without a restart.
The above post of mine should read "Pather does give back swap without a restart. I apologize for this extra post, but I wanted to make sure that the point of the post was clear.
Default is for swapfile sizes to double after swapfile1
From makern's above post |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.10 seconds |
|