Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Swap File questins for LINUX servers.

Status
Not open for further replies.
Jan 10, 2001
2,873
US
I have a Server with 512 Meg RAM. How big should the swap file be in LINUX? Right now it is 130Meg. Is that correct? If not how do I change the Swap aprtition without reloading? James Collins
Field Service Engineer
A+, MCP

email: butchrecon@skyenet.net

Please let us (Tek-tips members) know if the solutions we provide are helpful to you. Not only do they help you but they may help others.
 
As a general rule the swap partition should be 1+.5 x mem

If you have 512M in mem, your swap shold be 1280M


-Tony
 
Any way to resize them after they have been created? James Collins
Field Service Engineer
A+, MCP

email: butchrecon@skyenet.net

Please let us (Tek-tips members) know if the solutions we provide are helpful to you. Not only do they help you but they may help others.
 
Hi,



You can either create another partition with id x'82' and mkswap that or you can even create a file on a 'normal' linux partition and use that for swap space (similar to M$ virtual memory files). The redhat installer will sometimes do the latter for you if you upgrade to a 2.4.x kernel edition of redhat. It ends up in /etc/fstab entry like this :



/SWAP swap swap defaults 0 0



I.e the file /SWAP is swap space.



The system should use as swap any /etc/fstab entry with id 'swap' - up to a limit of 8. See 'man mkswap'
. To view active swaps do :

cat /proc/swaps

Regards


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top