LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-11-2008, 02:18 PM   #1
linuxguy08
Member
 
Registered: Apr 2008
Posts: 155
Blog Entries: 2

Rep: Reputation: 15
setting swap space in linux


Hi ,

I have one clarification of setting swap space in Linux EL server. Generally the swap space is double of the memory that server has, AS per my dell poweredge server , it has 4GB RAM by default. Could that be possible to set swap the double of Memory as 8 GB?.

Thanks
 
Old 12-11-2008, 02:34 PM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
Are you asking if it is possible to set the swap to 8GB? As long as you have 8GB of space to allocate to swap, it is. I once created a 60GB swap on a spare partition because something I was doing was using all my RAM and all my swap.

Are you asking if you need to set the swap to as much as 8GB? The 1x's to 2x's RAM thumbrule was derived in the days when hard drives weren't even 4GB. IMO, it depends on what you're going to be doing with the machine. I still follow it on my machines with 2GB or less (I use 1x's), but rarely do I see it being used extensively. On my machines with 4GB, I set it to 2GB. But, these are not machines being used in a business environment.
 
Old 12-11-2008, 02:45 PM   #3
luisduenas
LQ Newbie
 
Registered: Dec 2008
Distribution: Debian - pero ya no.
Posts: 22

Rep: Reputation: 0
I that's not a rule is a suggestion, and of course it depends on your aplications.

I created a 6gb swap in a 64 bit kernel 2.6 .

in the days of 2.4(i think ) you can use more than 2.0 gb of swap but in diferents partitions. I dont know for the kernel 2.6 - 32 bits and exist a limitation.

In a dns server I only use a swap partition whit the same size of the phisical ram, and have no problems, of course monitoring the swap and if it increase to much , better increment the ram.

here the evidence.

Mem: 3092140k total, 3070240k used, 21900k free, 164004k buffers
Swap: 5855640k total, 980k used, 5854660k free, 2448580k cached
 
Old 12-11-2008, 03:07 PM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,338

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
If your machine starts to swap it will slow down dramatically. The solution to a swap performance problem is not to increase the amount of swap space. Instead you would either buy more RAM or decrease the number of programs that you are trying to run simultaneously. Therefore 512 Meg is enough swap for anybody.

The one exception is if you use the suspend to disk function. Then you will need a swap size of about 1.5 times your RAM size in order to accommodate suspend to disk.

-----------------------
Steve Stites
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how much swap space is needed; how to increase swap space? johnpaulodonnell Linux - Newbie 5 03-23-2007 03:20 AM
Linux uses up Disk 2 for swap space jwcooley Linux - Software 2 03-14-2006 09:05 PM
Can I use linux swap space with BSD? thedeadhead *BSD 1 08-30-2005 11:52 AM
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 01:23 AM
Linux swap space in FreeBSD rch *BSD 5 02-28-2004 11:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration