On rare occasions, there might be a need to increase your system's swap space via a local file(s) on your filesystem. However, this should only be done for a temporary situation. Here is an example on how to set up a 100MB swap file and then delete it.
Get a summary of the VM
# swap -s
Create the swap file
# mkfile 100m /data/myswap
Add the swap
# swap -a /data/myswap
Do a listing of the added swap space
# swap -l
Get a summary of the VM
# swap -s
To remove the file swap space, do the following:
# swap -d /data/myswap
# rm /data/myswap
Verify swap file allocation was removed
# swap -s
# swap -l
This blog covers Unix system administration HOWTO tips for using inline for loops, find command, Unix scripting, configuration, SQL, various Unix-based tools, and command line interface syntax. The Unix OS supports tasks such as running hardware, device drivers, peripherals and third party applications. Share tips/comments. Read the comments. But most importantly: Read Disclaimer - Read Disclaimer.
Monday, June 04, 2007
Adding and Deleting a Swap File
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment