deleting virtual memory files

Posted:
in Mac Software edited January 2014
i use an app called Onyx for my matenience because it rocks, but i found an option in it today to delete my virtual memory files. is this ok to do?

Comments

  • Reply 1 of 7
    dobbydobby Posts: 794member
    Try it and find out. I assume virtual memory files are only temporary so I can't see it being a problem except for possible data loss in active programs. IE you type up a document but haven't saved and deleting the virt mem file will delete what you have currently typed in on screen possibly causing the app to crash.



    Dobby.
  • Reply 2 of 7
    Quote:

    Originally posted by ipodandimac

    i use an app called Onyx for my matenience because it rocks, but i found an option in it today to delete my virtual memory files. is this ok to do?



    Bad, bad idea... OS X uses virtual memory all the time. If you avoid a crash/kernel panic when you do it, the VM files will just be re-created when you reboot.



    Leave them alone and let them do what they're designed to do - give you the smooth multi-tasking environment that is OS X.
  • Reply 3 of 7
    even "saving" won't necessarily circumvent the virtual memory. files aren't actually put on disk live. they are put to disk at various intervals. you can force them with a command line call.



    deleting the virtual memory files will not help anything. it will only create problems. at best you gain a few megs of hd space, but the OS may not even work w/o them. the space, as mentioned, will be lost on startup. had you used up the space, you may have issues starting up again.
  • Reply 4 of 7
    Quote:

    Originally posted by thuh Freak

    even "saving" won't necessarily circumvent the virtual memory. files aren't actually put on disk live. they are put to disk at various intervals. you can force them with a command line call.



    deleting the virtual memory files will not help anything. it will only create problems. at best you gain a few megs of hd space, but the OS may not even work w/o them. the space, as mentioned, will be lost on startup. had you used up the space, you may have issues starting up again.




    well i'm going to follow all of the advice and not delete the files, but I reguraly have apps using over 1GB of virtual memory (I have 4.5GB of ram so i dunno if that has anything to do with it). So anyways, thanks for all the feedback.
  • Reply 5 of 7
    pbpb Posts: 4,231member
    Quote:

    Originally posted by ipodandimac

    ...but I reguraly have apps using over 1GB of virtual memory (I have 4.5GB of ram so i dunno if that has anything to do with it).



    I am not sure If I get correctly what you say, but the virtual memory used by applications is not equal to the hard drive space occupied by the VM files. To find out how much of hard drive those files are consuming, just type in the terminal



    ls -la /var/vm/



    It will show you all the VM files with their real sizes.
  • Reply 6 of 7
    Quote:

    Originally posted by PB

    I am not sure If I get correctly what you say, but the virtual memory used by applications is not equal to the hard drive space occupied by the VM files. To find out how much of hard drive those files are consuming, just type in the terminal



    ls -la /var/vm/



    It will show you all the VM files with their real sizes.




    ya i wasnt saying that they were taking up HD space, i was referring to the numbers posted in activity monitor. i wasnt sure what the numbers meant really. thanks for the tip.
  • Reply 7 of 7
    dobbydobby Posts: 794member
    Quote:

    Originally posted by ipodandimac

    I reguraly have apps using over 1GB of virtual memory



    Most graphic apps (especially WindowServer) will have loads of virtual memory allocated. Its only the amount of memory the app thinks it has and has nothing to do with the real memory.

    A $vm_stat will give you an overview and a $vm_stat 1 will give you memory snapshots at 1 second intervals.



    I think Ars technicka or tomshardwareguide did a fairly good job of explaining memory management.



    Dobby.
Sign In or Register to comment.