PDA

View Full Version : How to set swap size?




houkouonchi
Jul 14, 2012, 09:50 AM
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?



GGJstudios
Jul 14, 2012, 09:53 AM
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.
Launch Activity Monitor
Change "My Processes" at the top to "All Processes"
Click on the CPU column heading once or twice, so the arrow points downward (highest values on top).
Click on the System Memory tab at the bottom.
Take a screen shot (http://guides.macrumors.com/Taking_Screenshots_in_Mac_OS_X) of the whole Activity Monitor window, then scroll down to see the rest of the list, take another screen shot
Post your screenshots (http://forums.macrumors.com/showpost.php?p=14126379&postcount=16).

houkouonchi
Jul 14, 2012, 10:07 AM
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 =(.

Weaselboy
Jul 14, 2012, 10:12 AM
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: sudo rm -rf /var/vm/sleepimage

To disable safe sleep mode: sudo pmset hibernatemode 0

houkouonchi
Jul 14, 2012, 10:49 AM
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: sudo rm -rf /var/vm/sleepimage

To disable safe sleep mode: sudo pmset hibernatemode 0

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.

Weaselboy
Jul 14, 2012, 08:55 PM
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.

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. :)