How to disable swap file in OS X Leopard

Discussion in 'macOS' started by xor, Jun 5, 2009.

  1. xor macrumors newbie

    Joined:
    Jun 5, 2009
    #1
    My theory is quite simple: Swap file is Evil :eek:
    Just don't like idea of swapping on 4GB system :mad: If I ever max it out I will happily buy another 4GB :D

    I googled and found no solution for Leopard :(
    If someone know how to disable swap files in OSX 10.5.7 I and other googling people will appreciate it very much! :apple:
     
  2. Guiyon macrumors 6502a

    Joined:
    Mar 19, 2008
    Location:
    North Shore, MA
    #2
    Virtual memory is a vital part of any modern OS and many parts of the OS rely on it, whether you like it or not. Things will most likely break at some point if you disable it and, in the case that you do use up all your memory, only kernel panics will await you.
     
  3. yellow Moderator emeritus

    yellow

    Joined:
    Oct 21, 2003
    Location:
    Portland, OR
    #3
    Agreed.

    In order to disable swap, I'm guessing you'd have to hack your own mach kernel. And when you run out of real RAM, something is going to go poof.
     
  4. detz macrumors 65816

    Joined:
    Jun 29, 2007
    #4
    If it's swapping it's because it has too not because it want's to. If you turn it off your system will not be usable.
     
  5. mrkgoo macrumors 65816

    Joined:
    Aug 18, 2005
    #5
    I'm not sure what you mean by swap file. As Guiyon mentioned, virtual memory is an integral part of any modern OS.

    But something to keep in mind is that the sleep mode for modern macs is defaulted to one that writes out the contents of RAM to the harddrive everytime it sleeps. If you have 4GB like myself, this means a reasonable wait time upon sleeping your mac before it actually passes out, and also 4GB of your harddrive used. You can disable this by reverting to the old style sleep, and then deleting the sleep image file. Google up mac os x hibernate mode.
     
  6. xor thread starter macrumors newbie

    Joined:
    Jun 5, 2009
    #7
    I don't want to disable "Virtual memory", it's not even possible anyway :)

    I want to disable swaping on my HDD. In XP/Vista/Win7 I can do it quite simply :D But I rather create small ramdisk (<1gb) and then set my swap file to reside there (only way in win2000 to disable swapping on hdd) and this give's best results on stability and compatibility side.

    So... how do I create such a ramdisk (I guess I need some kexts?) and how do I set my swap files there?

    And YES, I WAN'T TO RUN OUT OF MEMORY, if it hapens I will know I have to buy another 4GB of cheap DDR2 memory :cool:
     
  7. miles01110 macrumors Core

    miles01110

    Joined:
    Jul 24, 2006
    Location:
    The Ivory Tower (I'm not coming down)
    #8
    In OS X swap space and virtual memory are the same thing. Here a list of instructions on how to set your swap drive to something other than your main hard drive. Use at your own risk.

    http://www.macosxhints.com/article.php?story=20060206013801960
     
  8. old-wiz macrumors G3

    Joined:
    Mar 26, 2008
    Location:
    West Suburban Boston Ma
    #9
    Unless you have a MacPro or one of the new MacBookPros, you're limited to 4GB in most macs.
     
  9. MisterMe macrumors G4

    MisterMe

    Joined:
    Jul 17, 2002
    Location:
    USA
    #10
    My, my, my. RAM disk uses ... RAM! That means that you have less RAM for your running tasks. That means that you have to page out to disc more often. Exactly how do you expect RAM disk to save you anything?
     

Share This Page