On Thursday, 20 January 2005 18:07, Mark Miller wrote:
> Thanks for the insight James. Have you been in touch with Dave
> Edwards? We could use some items written in this area...

Interesting thread this, we seem to agree that there is no firm answer. 
I have some thoughts on this, perhaps they are worth discussing.  I get 
questions on swap often from my students, and the conclusions that come 
up are:

1. You don't know how much swap you need till you measure it
2. To measure it, you have to have made some swap anyway
3. You can't increase your memory (RAM and swap) at the point when you 
need it most - when you run out
4. Once you've made a swap partition, it's hard to change it, usually 
not worth the effort, and what you started with is what you end up 
living with (not always of course, but this is often the case)
5. How many users or even admins are in a position to detect when more 
swap is needed before it crashes the box, and make an extra swap file 
just-in-time?

This all has a heavy influence on exam items for swap:

1. If the rules are hazy, how are you going to write an item on them?
2. The fact tested on an exam item has to have a known definitive 
answer, otherwise the item itself is worthless.
3. How much swap? How do you calculate the swap you need? are therefore 
largely invalid test questions

That leaves us with questions like (just some ideas of the top of my 
head):

1. Which command is used to create | use | stop using swap?
2. What is the upper limit of swap space the kernel can use?
3. How do you monitor swap usage?
4. How do you mount swap in fstab?

Regards,
Alan
>
> On Thu, 2005-01-20 at 09:23 +0100, James Jacobsson wrote:
> > It is also an opinion of tuning..
> >
> > How agressively Linux uses the swap is determined by
> > /proc/sys/vm/swappiness
> > If you set this to 100, linux will try and swap out everything to
> > the swap. (Except the kernel, since its not swappable). Set it to
> > 0, and Linux will only swap when you run out of physical ram.
> >
> > The size of the swap should _always_ be determined by the
> > applications you are running on the server. For example, a server
> > only running Apache, will live quite happily with 512MB of RAM and
> > no swap at all.
> >
> > Also, the amount of memory a process consumes isn't the size of its
> > VM, but the size of the number of pages it has written or read
> > to/from. Stats for this can be found in /proc/[pid]/stats  (You'll
> > haveto look up the syntax, as I cant recall it right now)
> > Why?  Because Linux supports shared libraries, on-demand paging and
> > shared memory.
> >
> > /James
> >
> > On Jan 20, 2005, at 12:27 AM, Mark Miller wrote:
> > > On Wed, 2005-01-19 at 23:53 +0100, Carles Pina i Estany wrote:
> > >> On Jan/20/2005, Les Bell wrote:
> > >>> Carles Pina i Estany <[EMAIL PROTECTED]> wrote:
> > >>>
> > >>>
> > >>> I remember some questions about Swap size, that I think that
> > >>> are confusing, like "which is the best recomended size for
> > >>> swap?" with answers like "double as RAM", "same size as RAM",
> > >>> etc. etc. etc. <<
> > >>>
> > >>> I don't believe there is a definitive answer to this, only a
> > >>> huge number of
> > >>> differing opinions, many of which are based on oral history and
> > >>> old wives
> > >>
> > >> Everything about this topic is a opinion, but not some rules in
> > >> some "old" Kernels (2.0 or 2.2, I remember that i have read some
> > >> problems with less swap than RAM memory for some algorithms).
> > >> But not today!
> > >
> > > You are correct Carles, this is indeed an area of opinion. The
> > > items on swap that you ask about do indeed assume the older
> > > opinion of you should
> > > have two times your RAM as swap.  Even in the early days this was
> > > largely opinion. Recently I have even heard of people looking to
> > > drop the swap partition completely. For now the older "wisdom" is
> > > what the test relies on.
> > >
> > > Thank you Les for the insight as well. I am glad to see people on
> > > this list stepping up to help fill in the technical gaps. I would
> > > encourage all people on the list to bring up any technical issues
> > > that they find and have such discussions among all of us. Your
> > > information is heard and
> > > we at LPI are actively working to make sure that any input is
> > > answered and used on the tests when it can be.
> > >
> > > I look forward to a day when this is a high volume list and I
> > > learn something technical from it daily!
> > >
> > > Thanks Carles for taking the time and effort to start this
> > > thread...
> > >
> > > --
> > > Mark Miller
> > > Program Manager
> > > Exam Development Level 1
> > > Linux Professional Institute
> > >
> > > _______________________________________________
> > > lpi-examdev mailing list
> > > lpi-examdev@lpi.org
> > > http://list.lpi.org/mailman/listinfo/lpi-examdev
> >
> > _______________________________________________
> > lpi-examdev mailing list
> > lpi-examdev@lpi.org
> > http://list.lpi.org/mailman/listinfo/lpi-examdev

-- 
Alan McKinnon
Head trainer - Afribiz
For superior Linux training

852 Hertzog St
Rietfontein
Pretoria, 0084
W: +27 12 331 8102
F: +27 12 349 9277
C: +27 82 337 1935
_______________________________________________
lpi-examdev mailing list
lpi-examdev@lpi.org
http://list.lpi.org/mailman/listinfo/lpi-examdev

Reply via email to