1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

How to set swap size?

Discussion in 'Mac OS X 10.7 Lion' started by houkouonchi, Jul 14, 2012.

  1. macrumors regular

    #1
    Been having problems since I upgraded to the 16 GB of ram macbook pro retina. I only have a 40 GB mac OS X partition and terminal kept saying i was running low on swap so it would disable the buffer (over and over again even after i clicked close).

    On reboot is aw it said it wasa running low on space. At one point a df showed 17 GB free and a second later it was 200MB free, and then again it shows 17 GB free again.

    Ok so i am worried its wearing out the SSD depending on how it keeps allocating the file.

    Second how can I disable (or I would rather, simply put a set size) on the swap partition? Its obviously trying to allocate 16GB for swap which is almost half the disk space I have for the partition and is retarded. There is no reason a machine with 16 GB of ram needs a 16GB swap in the first place.

    Suggestions?
     
  2. macrumors demi-god

    GGJstudios

    #2
    1. Launch Activity Monitor
    2. Change "My Processes" at the top to "All Processes"
    3. Click on the CPU column heading once or twice, so the arrow points downward (highest values on top).
    4. Click on the System Memory tab at the bottom.
    5. Take a screen shot of the whole Activity Monitor window, then scroll down to see the rest of the list, take another screen shot
    6. Post your screenshots.
     
  3. macrumors regular

    #3
    Sreenshots? why not just top output?

    Anyway i used do to trace the file and its the stupid hibernation/sleep file. I am new on mac since the last macs i used were 68k but heavy unix/linux.

    Anyway it kept trying to create the 16 GB hibernation file. Again dumb. It should really do some checks and not create it when its > x% of the filesystem.

    Reminds me of when I booted up windows off a 30 GB partition with 48 GB of ram and it kept making the machine run out of disk space for the dumb hibernation file. Apparently mac OS X does the same thing =(.
     
  4. macrumors demi-god

    Weaselboy

    #4
    That does sound like the sleep image.

    You can turn it off and delete it with the following commands in Terminal.

    To remove the sleep image file:
    Code:
    sudo rm -rf /var/vm/sleepimage
    To disable safe sleep mode:
    Code:
    sudo pmset hibernatemode 0
     
  5. macrumors regular

    #5
    Thanks for that but yeah I was able to google how to disable it pretty quick and already had it disabled after my last post. Setting the swap on the other hand doesn't seem that simple from what amount i google'd.
     
  6. macrumors demi-god

    Weaselboy

    #6
    I don't think you can limit it to a given size... I think it is either on or off. Glad you got it sorted. :)
     

Share This Page