[vox-tech] can YOU be certified?!?

Peter Jay Salzman vox-tech@lists.lugod.org
Sun, 21 Jul 2002 09:51:14 -0700


=======================================================================
Based on observation and the output from the top command, which of the
following pieces of information tells you that swap space needs to be
increased?

a) The amount of available memory nearly equals the amount of used
   memory.

b) The amount of available swap space nearly equals the amount of RAM.

c) You hear constant noise from your hard drive.

d) The CPU utilization level is near 100%
=======================================================================


so we all agree that none of the answers are good.   here is my
thinking.



my thinking:
============

d) the CPU does alot of activity to swap pages from disk to memory, but
   that isn't the bottleneck here, is it?  disk I/O is the bottleneck,
   so d (which nobody picked) clearly can't be the right answer.

c) if we assume that hard drive activity is NOT related to swap (ie-
   trick question) then clearly c is not correct.

   if we assume hard drive activity IS related to swap activity, then
   the system is already swapping.  this means the CPU is having trouble
   keeping all the memory maps in RAM.  in order to give processes their
   share of system utilization, it's swapping pages back and forth
   between the swap space and RAM since there isn't enough RAM to store
   all the memory maps at once.

   this indicates the system is RAM starved, not swap starved.  in
   general, swapping means RAM starved, not swap starved.

a) the word "available" is nebulous.

   if the amount of *free* RAM nearly equals the amount of used memory,
   then the system is probably comfortable.  no major swapping should be
   done, an swap shouldn't be increased.

   if the amount of *total* RAM equals the amount of RAM, then the
   system should start to swap heavily.  but this doesn't mean we should
   increase swap.  it only means the system should begin to swap.

b) in older linux books, they say "swap should be double physical ram".
   i think the linux-installation-HOWTO mentions this, but this advice
   has fallen out of fasion, and is clearly not right for every system.

   in any event, there's no reason why swap space equaling total RAM
   should indicate the admin should INCREASE swap space.  it simply
   means you didn't follow outdated (and possibly bad) advice.



my answer:
==========

c and d make no sense to me, so it's a toss up between a and b.

so i agree with everyone that there's no good answer.  but i'm
pretending to be at the test, and i need to pick one.  which one?  i
throw a dart and it lands on choice b.  i can imagine a certification
question taking the "double the physical RAM" advice literally.



the exam answer:
================
the exam answer: choice c

the rationale:

   Finding the right amount of space for your swap partition can be a
   trial-and-error process.  For example, if you hear your hard drive
   churning because of constant data transfer between your RAM and hard
   drive, that is a sign you need more swap space.

i will *not* comment on this further, simply because we all know this is
clearly wrong.



the "real" answer:
==================

how are we _really_ supposed to know if a system needs more swap?

p@satan% cat /proc/swaps 
Filename                        Type            Size    Used    Priority
/dev/hda3                       partition       128516  3368    1
/dev/hdb1                       partition       131504  3368    1
/dev/hdc1                       partition       125960  3368    1


now that wasn't so hard, was it?   ;-)

pete



begin Rod Roark <rod@sunsetsystems.com> 
> Mostly I would look at the amount of swap space available 
> at times when I think swap would be most heavily used.
> Whether the resulting number is adequate depends of many
> things.
> 
> So I guess (b) is a VERY poor best fit.
> 
> -- Rod
>    http://www.sunsetsystems.com/
> 
> On Sunday 21 July 2002 01:32 am, Peter Jay Salzman wrote:
> > this is a question from "exam cram linux+", a book that's supposed to
> > prepare people for the linux+ certification test.
> >
> > let's not discuss the linux+ exam itself.  let's not discuss the value
> > of certifications in general (people are free to start OTHER threads on
> > these topics).  for this thread, let's just talk about THIS question for
> > now.
> >
> > is anyone brave enough to try to answer this question in public?
> >
> > after a few people answer this question, i'll post the book's answer.
> >
> > =======================================================================
> > Based on observation and the output from the top command, which of the
> > following pieces of information tells you that swap space needs to be
> > increased?
> >
> > a) The amount of available memory nearly equals the amount of used
> >    memory.
> >
> > b) The amount of available swap space nearly equals the amount of RAM.
> >
> > c) You hear constant noise from your hard drive.
> >
> > d) The CPU utilization level is near 100%
> > =======================================================================

-- 
GPG Fingerprint: B9F1 6CF3 47C4 7CD8 D33E  70A9 A3B9 1945 67EA 951D