|
|
It works
Yes, I tried this. Just be careful that you enter the correct /dev/disk* value. ;-)
bug in rc script
The problem with the solution as presented above by robg is that, when the rc script detects
that swapdir does not exist, it both mounts the disk and creates the directory. If the
swapdir was on a previously umounted disk, then a new directory (with a number
appended) gets created. The new directory is local on / and not on the desired physical
drive.
I worked around the problem by skipping steps 6. and 7. Instead just replace
swapdir=/private/var/vm # Make sure the swapfile exists if [ ! -d ${swapdir} ]; then ConsoleMessage "Creating default swap directory" mount -uw / mkdir -p -m 755 ${swapdir} chown root:wheel ${swapdir} else rm -rf ${swapdir}/swap* fiwith swapdir=/disk-name/path_to_swap_directory # Make sure the swapfile exists, # first check existence # if not first make sure disk is mounted if [ ! -d ${swapdir} ]; then ConsoleMessage "mounting directories" mount -t hfs /dev/disk**** /disk-name mount -uw / fi # Make sure the swapfile exists, # if not, create directory since disk should be mouned if [ ! -d ${swapdir} ]; the ConsoleMessage "Creating default swap directory" mkdir -p -m 755 ${swapdir} chown root:wheel ${swapdir} else rm -rf ${swapdir}/swap* fi
Nice find...
Thanks for finding the bug in the script! As I said at the end, I hadn't tried it myself yet due to
other swap options?
I've got 1G of ram. I want to create atleast 1.5G of swap area to have a total of 2.5G Vmem.
other swap options?
you may want to take a look at : http://www.peak.org/~luomat/articles/FAQs/Swapfile_Swapdisk/
other swap options?
If you've got 1GB of physical RAM, congratulations! You're doing the best you can to manage your memory.
other swap options?
I don't agree with your statement saying that "Chances are, with your 1GB of RAM, you never have any memory paged to disk". |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|