Swapper question.

Malaclypse the Elder dwc at homxc.UUCP
Thu Jul 14 11:37:14 AEST 1988


In article <4787 at killer.UUCP>, fmayhar at killer.UUCP (Frank Mayhar) writes:
> I have a question, related to our development work on a 68020-based SVR2 system:
> Why does swapper rack up so much CPU?  In spite of the fact that the machine is
> completely idle for days at a time, swapper's CPU stays roughly even with the
> amount of time that the system has been up, to within about a minute.  What
> gives, and how can we change this?  The machine will run as an intelligent
> peripheral for a mainframe, and we're trying to maximize performance.  If anyone
> can help, please reply by email to the Internet address if possible, otherwise
> to this machine.
> 

i never get mail to work when the path is longer than 5 sites so
i decided to post.  what may be happening is that the system may
at some time in the past have been swapping.  the swapper may have
swapped out a sleeping process (say a user level daemon) during
that period.  that process will never be brought in again until
it wakes up.  but if there is a process that is swapped out, the
swapper remains in a mode of checking to see if anyone is eligible
to come in -- every second.  if there was no one swapped out, the
swapper would go to sleep until a memory condition wakes it up
(i.e. swapper doesn't use up cpu in this case).

one thing you could do is use something like crash to see if there
are any processes that are sleeping and swapped out (does ps give
this info?--i forget).  if it is indeed a daemon process, often times
you can just kill it and restart it again.  now if there is indeed
plenty of memory, it will remain in core and the swapper can sleep
an easy sleep instead of the restless sleep.

danny chen
ihnp4!homxc!dwc



More information about the Comp.unix.wizards mailing list