LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-22-2007, 05:34 AM   #1
johnpaulodonnell
Member
 
Registered: Jun 2006
Location: Galway
Distribution: Suse 10.1
Posts: 114

Rep: Reputation: 15
how much swap space is needed; how to increase swap space?


Hi.

As a rule of thumb, how much swap space should you have? I read different values in different places...

I'm running a fairly large code at the minute and I'm getting a segmetation fault...I know where the crash is happening and it has been suggested that it might be because I have insufficient swap space...but I don't see how that can be.

I have 3Gb of RAM and 1Gb of swap space...I monitor the memory usuage using top and it never really exceeds about 40% of total...

although maybe I'm missing something and I do need more swap space? Would be nice if this sorted the seg fault...wishful thinking!

thanks
 
Old 03-22-2007, 05:50 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,267

Rep: Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028
Don't think it'll help in this case (40% ), but it's as simple as creating new partition(s)/file(s) and mkswap/swapon.
I keep a couple of spares around just in case. Add them as I need them (obviously, mkswap only needs to be run once each).
 
Old 03-22-2007, 06:10 AM   #3
bdox
Member
 
Registered: Feb 2005
Location: SoL iii
Distribution: Mandriva 2007
Posts: 110

Rep: Reputation: 15
if you never exceeds about 40% of total swap, so for you 1Gb should be ok. typically the guides said your swap should be twice as big as your RAM, but that was back when normal amount of RAM was in the 2Mb - 256M interval...
I would suggest you:
1.reformat you swap partition.
2.create and other (1Gb) swap partition (better in other hdd, closer to the beginning of the disk)
3.add the new swap partition to /etc/fstab

that should put you in the safe side. =)

for doing that you can use gparted or a similar (many distros has similar tools included).
Good Luck!
 
Old 03-22-2007, 07:15 AM   #4
johnpaulodonnell
Member
 
Registered: Jun 2006
Location: Galway
Distribution: Suse 10.1
Posts: 114

Original Poster
Rep: Reputation: 15
thanks for that.

I went for a swapfile - seemed easier!
 
Old 03-22-2007, 08:22 AM   #5
lurko
Member
 
Registered: Jun 2006
Location: Ontario, Canada
Distribution: Debian
Posts: 448

Rep: Reputation: 35
if you run "free" it will tell you how much of your swap is being used. Obviously it should show no swap space available if you need more of it. Probably you've got most of that gig available.

Last edited by lurko; 03-22-2007 at 08:23 AM.
 
Old 03-23-2007, 03:20 AM   #6
Emmanuel_uk
Senior Member
 
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,604

Rep: Reputation: 47
google for swappiness linux as well
and see if increasing it helps
Could be interesting
decrease it for faster performance
 
  


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 Off
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
How do I increase my swap space on RH Linux AS 4.0 pdillard Linux - Software 3 01-19-2007 02:37 AM
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 01:23 AM
How to increase SWAP partition space ? sureshsaragadam Linux - Newbie 23 10-01-2003 09:24 AM
Increase Swap Space? star geezer Linux - Software 9 03-10-2003 12:04 PM


All times are GMT -5. The time now is 09:02 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