At Fri, 10 May 2002 23:23:53 +1000 (EST), Jessica Mayo wrote:
> On Fri, 10 May 2002, peter anderson wrote:
> > I have been told that it can be beneficial to
> > configure two swapfiles. Is this right? What are the
> > benefits? Where would you use this?
> 
> I have seen a number of assertions along these lines, but unless things
> have changed since I last looked over the swapfile logics, the second
> swapspace is never used until the second one is full. In this case, I can
> see no benifit at all.
> 
> If this has changed with 2.4 kernels, I'd like to know... :)

(note the "->" marked sentence)

swapon(8):
       -p priority
              Specify priority for swapon.  This option  is  only
              available  if swapon was compiled under and is used
              under a 1.3.2 or later kernel.  priority is a value
              between  0  and  32767.  See  swapon(2)  for a full
              description of swap priorities.  Add  pri=value  to
              the  option field of /etc/fstab for use with swapon
              -a.

swapon(2):

PRIORITY
       Each swap area has a priority, either high  or  low.   The
       default  priority  is low.  Within the low-priority areas,
       newer areas are even lower priority than older areas.

       All  priorities  set  with  swapflags  are  high-priority,
       higher than default.  They may have any non-negative value
       chosen by the caller.  Higher numbers mean  higher  prior�
       ity.

       Swap  pages  are  allocated  from areas in priority order,
       highest priority first.  For areas with different  priori�
       ties,  a  higher-priority area is exhausted before using a
 ->    lower-priority area.  If two or more areas have  the  same
 ->    priority,  and it is the highest priority available, pages
 ->    are allocated on a round-robin basis between them.

       As of Linux 1.3.6, the kernel usually follows these rules,
       but there are exceptions.

-- 
 - Gus
--
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to