Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: deleting swap files



This is expected behavior. The files in /private/var/vm don't get cleaned up until the reboot is in progress. If you've moved them elsewhere, then on reboot, they won't be looked at and removed. You are essentially tying up disk space for no gain when you do this.

Assuming that /private/var/vm and /Volumes/var/vm are on the same volume, moving them has no real effect until the reboot occurs: the inodes are the same, and the pager continues to use those files.

Regards,

Justin

On Friday, June 22, 2001, at 04:38 PM, Mark Weaver wrote:

I noticed this on my OSX box when I moved my swap from /Private/var/vm to /Volumes/swap/vm it left the old swap files in /Private/var/vm, it never deleted them after reboot. A day later when the dates of the files didn't change I deleted them.

--
Mark Weaver
WebMaster/Systems Admin
http://www.maximumlinux.org


On Friday, June 22, 2001, at 05:59 PM, Umesh Vaishampayan wrote:

On Thursday, June 21, 2001, at 10:31 PM, Troy Goodson <Troy.D.Goodson@jpl.
nasa.gov> wrote:


I noticed that my free HD space was lower than usual and found that
the culprit was the existence of several swap files:

-rw------T 1 root wheel 80000000 Jun 20 11:18 swapfile7
-rw------T 1 root wheel 80000000 Jun 19 14:34 swapfile6
-rw------T 1 root wheel 80000000 Jun 19 09:24 swapfile5
-rw------T 1 root wheel 80000000 Jun 18 15:40 swapfile4
-rw------T 1 root wheel 80000000 Jun 18 13:57 swapfile3
-rw------T 1 root wheel 80000000 Jun 18 13:55 swapfile2
-rw------T 1 root wheel 80000000 Jun 18 09:16 swapfile1
-rw------T 1 root wheel 80000000 Jun 16 11:26 swapfile0

Suspecting that I didn't really need all these swap files, I
rebooted. Now, I'm back to one.

-rw------T 1 root wheel 80000000 Jun 20 11:39 swapfile0

Which leads me to these questions:

if Darwin isn't deleting unused swap files that's a bug, right?

VM will delete unused swapfiles. I think you have a leak in one of the user process you are running. Please use top to catch it.

how do I know if a swap file is being used or not?

There is no tool. But if it exists, it's being used.

if I think unused swap files are laying around, is the best recourse to reboot?

Use top to catch the process that is leaking. Killing that process should be sufficient. Of course, reboot will
_______________________________________________
darwinos-users mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/darwinos-users

---
Justin C. Walker, Curmudgeon-At-Large *
Institute for General Semantics |
Director of Technology | It's not whether you win or lose...
Nexsi Systems Corp. | It's whether *I* win or lose.
1959 Concourse Drive |
San Jose, CA 95131 |
*--------------------------------------*-------------------------------*


References: 
 >Re: deleting swap files (From: Mark Weaver <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.