In article <[EMAIL PROTECTED]> you write:
>On Tue, 24 Mar 1998, John Winters wrote:
>
>> >I would like to find out how if I can "restart" the swap space...I
>> >think there's deadwood in there.  But I don't know whether there's a
>> >utility to tell me whether any swap space currently is being wasted.
>> >Any ideas?
>> 
>> Define "wasted".  If you think there's a bug in the Linux paging code
>> which causes it to forget about part of the swap space then report it
>> (preferably with some form of supporting evidence).  Otherwise the
>> swap space is being used to store bits of running programs which are
>> not currently required.  This isn't waste - it's freeing up your RAM
>> for better purposes.  Why would you want to force stuff to be moved
>> back into RAM if it doesn't need to be?
>
>I wouldn't  think an error, if there is any, would have to be in the
>paging code.  Couldn't there be a program, or a set of programs, that
>don't terminate as they should?

Only if there was a bug in the process management code so that it failed
to clear up properly when a program terminated.  In this case of course
you would even less want to "restart" the swap space because the
paging code would be compensating for this bug by at least making sure
the wasted memory was out in the swap area.

>Seems like there could be many other scenarios.

Such as?

>Anyway, before I restart X with a handful of applications and Xterms,
>I had 68% swap used.  After I restarted X with the same applications
>used, I had 20% swap used.  If the paging code were so perfect, or if
>the there were no other explanations or inefficiencies, what accounts 
>for the nearly 26MB of swap that are suddenly no longer in use?

Who said anything about there being no other explanations or
inefficiencies?  You have two obvious explanations here:

1)  Your programs, being freshly started are now using less memory
    than they were before - thus making the total memory requirement
    of the system less and reducing the amount of swap space in use.

2)  Because the programs are freshly started, the paging code hasn't
    yet been able to identify the portions of the programs which can
    happily reside on the swap space.  The efficiency of your system
    is thus *lower* than it was before you restarted the programs.

In either case, no form of "restarting" the swap space is going to
improve things.  If there's dead wood in there that's a good thing -
better waste swap space on the dead wood than RAM.

HTH
John
-- 
John Winters.  Wallingford, Oxon, England.

The Linux Emporium - a source for Linux CDs in the UK
See <http://www.polo.demon.co.uk/emporium.html>


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
         To unsubscribe: mail [EMAIL PROTECTED] with 
                       "unsubscribe" as the Subject.

Reply via email to