LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 10-25-2003, 07:59 AM   #1
porous
Member
 
Registered: Oct 2003
Distribution: redhat 9
Posts: 147

Rep: Reputation: 15
how much swap space


hi

i was wondering if there is any accepted minimum size for the
swap partition (am i wrong in saying the swap is analogous to
virtual memory in windows , someone corrcet me)

for eg: like any ratio for the system ram to swap space;

i ask this it coz i have a linux box with rh9 and 256mb ram
i have allocated a swap space of 600mb , now when ever
i check the free space with

#free -m

almost all the times the used swap space is very little;

can someone help me with this

thx
 
Old 10-25-2003, 08:50 AM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,176
Blog Entries: 4

Rep: Reputation: 430Reputation: 430Reputation: 430Reputation: 430Reputation: 430
Try a Search - this question has come up many times on this board.
 
Old 10-25-2003, 09:32 AM   #3
Nimoy
Member
 
Registered: Jun 2003
Location: Currently Denmark
Distribution: Ubuntu 11.10
Posts: 334

Rep: Reputation: 30
But the swap size seems alright anyway - Rule of thumb has it down to double that of the physical RAM...
 
Old 10-26-2003, 09:34 AM   #4
porous
Member
 
Registered: Oct 2003
Distribution: redhat 9
Posts: 147

Original Poster
Rep: Reputation: 15
no my question was really am i wasting some space ;
do i need so much swap (coz almost all times i find it not used much )
 
Old 10-26-2003, 09:45 AM   #5
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 47
they used to say that swap should be arounf twice ram but that's really obsolete. By that reasoning, someone with 1GB of ram should have 2GB of swap where in reality he can probably get away with zero swap space for most purposes.

You can see how much swap you realistically need by launching a bunch of programs you can see yourself running in parallel and monitor how much swap space is being used and then add 100MB or so to that. To be safe, a minimum of 250MB maybe?
 
Old 10-26-2003, 09:47 AM   #6
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,176
Blog Entries: 4

Rep: Reputation: 430Reputation: 430Reputation: 430Reputation: 430Reputation: 430
Your swap space seems fine - 600mb isn't really a huge amount. I have seen a post around here somewhere which stated that since most of us use 256mb or more memory that swap space is less necessary. I would stick with what you have.

Quatsch posted as I was typing. Strangely prescient of me, n'est ce pas?

Last edited by XavierP; 10-26-2003 at 09:48 AM.
 
Old 10-26-2003, 10:10 PM   #7
ranger12002
Member
 
Registered: Jun 2003
Location: miami florida
Distribution: slackware 9.0
Posts: 128

Rep: Reputation: 15
ive gotten away with 150mb swap and 256mb ram but since i have a 40gb hdd and ive only used about 4gb in a year i have a 2GB swap just cause i can LOL...but dont make it too small cause you never know when you might need more
 
Old 10-27-2003, 06:19 AM   #8
porous
Member
 
Registered: Oct 2003
Distribution: redhat 9
Posts: 147

Original Poster
Rep: Reputation: 15
thx very much ;

i have one more question , is it possible to regain back some of the swap space after its allocated ...
if possible how can it be done , (i dont want to disturb any other partition...)
 
Old 10-27-2003, 08:00 AM   #9
aaa
Guru
 
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

Rep: Reputation: 46
Yes. Swap can be resized easily (destroyed & remade, there's nothing important on them). The hard part is expanding the other partitions. Partitions with ext2/ext3 on them can be resized easily using the resize2fs tool. First delete the partition & remake it bigger than before with fdisk. Make sure you don't shrink the partition and make sure it starts in the same place. Then run 'resize2fs <partition>, and the will partition take all the new space.

Last edited by aaa; 10-27-2003 at 11:02 AM.
 
Old 10-27-2003, 08:24 AM   #10
porous
Member
 
Registered: Oct 2003
Distribution: redhat 9
Posts: 147

Original Poster
Rep: Reputation: 15
thank you verymuch 3a , thats really solves my problem....
thx to all othes also for your help , see you all at some other
thread :-)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to reduce swap space and reclaim the space grantm Linux - Newbie 7 08-16-2012 07:05 AM
swap space alphisb0t Linux - Software 1 07-05-2004 03:16 PM
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 01:23 AM
swap space not being used bishal Linux - Software 16 05-07-2004 12:28 AM
Swap Space bawbag Slackware 6 07-16-2003 10:59 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration