Okay, I think I've got my head wrapped around the whole swap size issue.  Let's
play the game of I say what I think swap is, and then you either pat me on the
head or break out the dunce cap.  Here goes:

The point of swap is to serve as a safety net for RAM, when you're all out of
RAM your computer swaps data in and out of the /swap partition to make sure only
the most active programs are getting the best electronic real estate.  It's
generally a good idea to have twice the swap space as you have RAM space, up to
about 200 megabytes of swap.  (here's the thing I've been confused about...)
While it's never a bad thing to have too much swap, the x2 up to 200 rule serves
to make sure you have at least enough swap.  If you have more swap than you need
it's not a bad thing, the only reason it would be bad is if you actually needed
that 17 gigs of swap.  If you needed more than 200MB of swap then you should be
upgrading your RAM, but if you have 512MB of RAM for your glorified word
processor and you want 1700MB of swap just because you like the cute little
green block in diskdrake, there's nothing wrong with having all that unused
swap.  The reasons for saying not to have more than 200MB of swap are:

1.  if you need more than 200MB, you ought to go buy more RAM, and
2. if you don't need more than 200MB, you are wasting disk space that could be
going to other partitions

How'd I do?  Thanks for putting up with me, the thing I have been hung up on was
why too much could be bad.

Frequently,
Isaac



Quoting Sridhar Dhanapalan <[EMAIL PROTECTED]>:

> If you're using over 200MB of swap, your system would be moving slower
> than 
> some continents. There is nothing really _wrong_ in having over 200MB of
> 
> swap, but there would be nothing to gain. If you need over 200MB
> (assuming 
> you have a decent level of RAM), either you're doing something _very_ 
> memory-intensive (e.g. running a busy server) or (more likely) there is
> 
> something wrong (like a rogue process or a memory leak).
> 
> In other words, the 200MB swap limit is simply a rule-of-thumb based on
> 
> practicality. You don't need to follow it to-the-letter, but you most
> likely 
> won't gain anything by having anything bigger. In fact, since
> filesystems 
> tend to become slower as thet become larger, your system could even slow
> down.
> 
> RAM is relatively cheap nowadays. The best thing you can do to increase
> your 
> system speed would be to have enough RAM so that you don't need and swap
> at 
> all.
> 
> On Fri, 17 Aug 2001 16:47, [EMAIL PROTECTED] wrote:
> > Good helpful example.  I use ten desktops: 2 for monitoring, one for
> > superuser terminal, one for email, one for instant messaging, 2 for
> > browsing, one for writing programs, one non-superuser terminal for
> running
> > them, and one for home directory.  Yes, I realize this is sort of
> > outrageously spread out but I'm just sort of playing right now to get
> a
> > feel for how I'd like to use the desktops and the Linux software. 
> My
> > question is: since having all these things open only ever uses 250MB,
> do I
> > follow the rule proposed here of adding some arbitrary percent of
> swap, or
> > do I use the other rule of RAM x 2 up to 200MB?  My most important
> question
> > is WHY WOULD MORE SWAP BE BAD?  Are there really inefficiencies with
> more
> > swap?  Why would 256M of RAM + 20M of swap behave better than 256M of
> RAM +
> > 10 gigs of swap?  I'm using extreme examples, but I'm just trying to
> wrap
> > my head around why there is a cap to the amount of swap you would
> want
> > (other than the fact you've got limited hard disk real estate, but
> assume
> > that wasn't an issue...).
> >
> > Thanks again,
> > Isaac
> >
> > Quoting Travis Olds <[EMAIL PROTECTED]>:
> > > On Fri, 17 Aug 2001 [EMAIL PROTECTED] wrote:
> > > > This has me curious.  If I don't need much swap, should I not
> make
> > >
> > > much swap?
> > >
> > > > Or is there no upper limit?  If it's the more the marrier, why
> not
> > >
> > > always just
> > >
> > > > make, say, 500MB?
> > >
> > > The point of swap space is to allow you to have more programs
> > > `running'
> > > than you can actually fit in your physical memory. If you have
> swap,
> > > when
> > > you exaust all of your physical memory the OS can "swap to disk"
> those
> > > bits of memory that are not actually being accesses. In this way
> the
> > > fact
> > > that they are not in physical memory and are on slow disk doesn't
> > > matter
> > > because that bit of memory is not being accessed. When it does need
> to
> > > be
> > > accessed it gets swapped back in and seomething else is swapped
> > > out.
> > >
> > > Determining th right amount of swap space is really black
> > > magic. It should be the case that swap + phyical + (some margin of
> a
> > > few
> > > %) = the total amount of memory used by all applications you might
> wish
> > > to
> > > have running at the one time. If you've already got a linux box
> then
> > > just
> > > try opening up everything you might ever want opened at once,
> check
> > > the
> > > momory consumption, add a few % to this number, and that should be
> > > about
> > > your total swap + physical memory number.
> 
> -- 
> Sridhar Dhanapalan.
>       "There are two major products that come from Berkeley:
>       LSD and UNIX. We don't believe this to be a coincidence."
>               -- Jeremy S. Anderson
> 

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://wwww.mandrakestore.com

Reply via email to