Unix Technical Forum

Swap Partition

This is a discussion on Swap Partition within the Linux Operating System forums, part of the Unix Operating Systems category; --> Hi to all, I am about to install Fedora Core 6 on my Linux Box. I would love to ...


Go Back   Unix Technical Forum > Unix Operating Systems > Linux Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-18-2008, 08:19 PM
Francesco Barbuto
 
Posts: n/a
Default Swap Partition

Hi to all,

I am about to install Fedora Core 6 on my Linux Box.

I would love to know to what percentage of the hard disk dimensions
should the swap partition amount to.

For instance, for a 250 GB Hard Disk, how much swap partition should I
allow?


TIA.

Regards, FRancesco


--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-18-2008, 08:19 PM
Bit Twister
 
Posts: n/a
Default Re: Swap Partition

On Sat, 13 Jan 2007 14:51:18 +0000 (UTC), Francesco Barbuto wrote:
> Hi to all,


Hi to you.

> I would love to know to what percentage of the hard disk dimensions
> should the swap partition amount to.


Swap pertains to how much memory all your applications require and all
applications that are competing for ram, not disk.

If we look at my system
$ free -m
total used free shared buffers cached
Mem: 946 911 35 0 40 597
-/+ buffers/cache: 273 673
Swap: 1144 0 1144

no swap in use, even though 3 thunderbirds, 1 firefox, 1 editor,
newsreader, 4 xterms, 3 ssh sessions, xbiff, and skype are running
under the KDE desktop manager. I have 157 total tasks loaded.

How much swap will depend on your applications. Example Oracle
database manager might require 700 meg just for starters.

512 meg should be find for a plain ole one user desktop. I /think/ for a
laptop you needed ram+512 meg for hibernation.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-18-2008, 08:19 PM
Scott
 
Posts: n/a
Default Re: Swap Partition

Generally, you size the swap equal to 2x the amount of ram in the system.
Though I recall an article saying if you had 1+ GB of ram, then likely a
swap equal to 1GB was sufficient. You can always add swap partitions
later if necessary.
tks
scott

"Francesco Barbuto" <fbarbuto@inwind.it> wrote in message
news:49c3563b6e0fa5288bf78e213138f2c7.140550@mygat e.mailgate.org...
> Hi to all,
>
> I am about to install Fedora Core 6 on my Linux Box.
>
> I would love to know to what percentage of the hard disk dimensions
> should the swap partition amount to.
>
> For instance, for a 250 GB Hard Disk, how much swap partition should I
> allow?
>
>
> TIA.
>
> Regards, FRancesco
>
>
> --
> Posted via Mailgate.ORG Server - http://www.Mailgate.ORG



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-18-2008, 08:19 PM
Baho Utot
 
Posts: n/a
Default Re: Swap Partition

Francesco Barbuto wrote:

> Hi to all,
>
> I am about to install Fedora Core 6 on my Linux Box.
>
> I would love to know to what percentage of the hard disk dimensions
> should the swap partition amount to.
>
> For instance, for a 250 GB Hard Disk, how much swap partition should I
> allow?
>
>
> TIA.
>
> Regards, FRancesco
>
>


I use 2 times the installed memory, ie with 512MB RAM I would use 1024MB of
swap. Just to make it sure.

--
Dancin in the ruins tonight
Tayo'y Mga Pinoy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-18-2008, 08:19 PM
Davide Bianchi
 
Posts: n/a
Default Re: Swap Partition

On 2007-01-13, Scott <smacd2000@hotmail.com> wrote:
> Generally, you size the swap equal to 2x the amount of ram in the system.


No you don't. Generally, if your system start swapping it means it
doesn't have enought ram. So you buy more ram.

D.

--
Windows: an Unrecoverable Acquisition Error!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-18-2008, 08:19 PM
Gremnebulin
 
Posts: n/a
Default Re: Swap Partition


Davide Bianchi wrote:
> On 2007-01-13, Scott <smacd2000@hotmail.com> wrote:
> > Generally, you size the swap equal to 2x the amount of ram in the system.

>
> No you don't. Generally, if your system start swapping it means it
> doesn't have enought ram. So you buy more ram.


If you haven't allocated any swap, you system is not going to start
swapping , it is going to
come up with "cannot fork" errors. If you would rather see swapping,
you need to allocate
some swap. If you allocate some swap, you need to know how much....

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-18-2008, 08:19 PM
Michael Black
 
Posts: n/a
Default Re: Swap Partition

"Scott" (smacd2000@hotmail.com) writes:
> Generally, you size the swap equal to 2x the amount of ram in the system.
> Though I recall an article saying if you had 1+ GB of ram, then likely a
> swap equal to 1GB was sufficient. You can always add swap partitions
> later if necessary.
> tks
> scott
>

Anyone who asks this question should have realized it's not a new
question, and thus simply done a search. Because nothing has
changed since the last time it was brought up.

The "standards" for swap date from when it was really crucial. Memory
is far larger on the average computer, which makes swap far less
important.

Take a distribution from a decade ago, and the minimum ram would
have been something like 4megs or 8megs. But with that amount, you couldn't
get much going, not after space is allocated for the kernel. And of
course, hard drives were far smaller, meaning you'd not want to allocated
too much swap space, because you needed it for other things.

But swap is about when you run out of memory. If you have lots of
memory and/or aren't using the system much, you barely need swap. If you
are doing a lot with the computer or don't have enough memory, then
you will be quite reliant on swap. Yet, swap is inferior to actual
memory, and the only reason you'd be wanting to rely on it is if
memory was too expensive (like ten years ago). Now, rare will
be the case where swap is getting much use. Either the minimum
ram that is seen in most computers is generally enough, or the person
will realize they have an overused system and will add more memory (at
the very least).

That said, an advantage of allocating more swap than you have ram is
in case you want to add ram later. It's easier to allocate more in
the first place than try to carve out some space later, especially now
that hard drives have gotten so large.

Of course, that rarely applies anyway now, since if you add more ram
now, likely swap useage will go down.

The issue is lost in that whole "2 times ram" argument, which may
or may not have a technical basis years ago (there is debate every
time this comes up). If there was ever a time when you really needed
2 times the ram, because of kernel issues, that's long gone. So if
you allocate the same amount of swap as you have ram, when you add
memory it won't matter since you'll have twice as much ram to take
the load that the swap would be needed for.

My computer's been up for two months, has 256megs of ram, and at
the moment 96megs of swap space is in use, but I still have 121megs
of ram that is free for use. I get the impression the swap is being
used because it's there; obviously it can't be needed if I'm underusing
the ram.

I allocated twice as much swap space as I have ram simply because it
was a 160gig hard drive, and it didn't really matter how much I wasted
on swap. I recall that for months after I installed, I was running
with no swap (I forgot to configure something), and had thought the
system just never needed any swap, since I did have a swap partition.
But in those months, I had no sense of a sluggishness, and when I
realized I needed to do something in order to make use of the swap
partition, I didn't see any real change when it started to be used,
other than that swap space did get minimal useage.

Michael
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 01-18-2008, 08:19 PM
John Hasler
 
Posts: n/a
Default Re: Swap Partition

Gremnebulin writes:
> If you haven't allocated any swap, you system is not going to start
> swapping , it is going to come up with "cannot fork" errors. If you
> would rather see swapping, you need to allocate some swap. If you
> allocate some swap, you need to know how much....


What you need to know is how much virtual memory you need. If the amount
of RAM you have is less than the amount of VM you need you must add RAM,
swap, or both. If not, you are ok.
--
John Hasler
john@dhh.gt.org
Dancing Horse Hill
Elmwood, WI USA
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 01-18-2008, 08:19 PM
The Natural Philosopher
 
Posts: n/a
Default Re: Swap Partition

Scott wrote:
> Generally, you size the swap equal to 2x the amount of ram in the system.
> Though I recall an article saying if you had 1+ GB of ram, then likely a
> swap equal to 1GB was sufficient. You can always add swap partitions
> later if necessary.


Well..thats not really a satisfactory answer.

If you run out of RAM the machine will start to swap. If you run out of
swap it will stop the programs from working at all.

Swap is more or less the last ditch attempt to keep an under memoried
machine with a lot of processes running from slowing to a halt. Instead
it slows to a crawl..;-)

No machine will underperform with a gargantuan swap partition., so why
not make it big?


> tks
> scott
>
> "Francesco Barbuto" <fbarbuto@inwind.it> wrote in message
> news:49c3563b6e0fa5288bf78e213138f2c7.140550@mygat e.mailgate.org...
>> Hi to all,
>>
>> I am about to install Fedora Core 6 on my Linux Box.
>>
>> I would love to know to what percentage of the hard disk dimensions
>> should the swap partition amount to.
>>
>> For instance, for a 250 GB Hard Disk, how much swap partition should I
>> allow?
>>
>>
>> TIA.
>>
>> Regards, FRancesco
>>
>>
>> --
>> Posted via Mailgate.ORG Server - http://www.Mailgate.ORG

>
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 01-18-2008, 08:19 PM
Scott
 
Posts: n/a
Default Re: Swap Partition

http://kbase.redhat.com/faq/FAQ_80_330.shtm


"The Natural Philosopher" <a@b.c> wrote in message
news:1168722970.3284.4@iris.uk.clara.net...
> Scott wrote:
> > Generally, you size the swap equal to 2x the amount of ram in the

system.
> > Though I recall an article saying if you had 1+ GB of ram, then likely a
> > swap equal to 1GB was sufficient. You can always add swap partitions
> > later if necessary.

>
> Well..thats not really a satisfactory answer.
>
> If you run out of RAM the machine will start to swap. If you run out of
> swap it will stop the programs from working at all.
>
> Swap is more or less the last ditch attempt to keep an under memoried
> machine with a lot of processes running from slowing to a halt. Instead
> it slows to a crawl..;-)
>
> No machine will underperform with a gargantuan swap partition., so why
> not make it big?
>
>
> > tks
> > scott
> >
> > "Francesco Barbuto" <fbarbuto@inwind.it> wrote in message
> > news:49c3563b6e0fa5288bf78e213138f2c7.140550@mygat e.mailgate.org...
> >> Hi to all,
> >>
> >> I am about to install Fedora Core 6 on my Linux Box.
> >>
> >> I would love to know to what percentage of the hard disk dimensions
> >> should the swap partition amount to.
> >>
> >> For instance, for a 250 GB Hard Disk, how much swap partition should I
> >> allow?
> >>
> >>
> >> TIA.
> >>
> >> Regards, FRancesco
> >>
> >>
> >> --
> >> Posted via Mailgate.ORG Server - http://www.Mailgate.ORG

> >
> >



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:29 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com